From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hanjun Guo Subject: Re: [PATCH v3 12/12] acpi, numa: reuse acpi_numa_memory_affinity_init() Date: Wed, 27 Jan 2016 14:15:06 +0800 Message-ID: <56A8606A.8080407@huawei.com> References: <1453541967-3744-1-git-send-email-guohanjun@huawei.com> <1453541967-3744-13-git-send-email-guohanjun@huawei.com> <20160125102643.GF24726@rric.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: Received: from szxga03-in.huawei.com ([119.145.14.66]:22463 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750870AbcA0GRc (ORCPT ); Wed, 27 Jan 2016 01:17:32 -0500 In-Reply-To: <20160125102643.GF24726@rric.localdomain> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Robert Richter Cc: "Rafael J. Wysocki" , Will Deacon , Catalin Marinas , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ganapatrao Kulkarni , Lorenzo Pieralisi , Shannon Zhao , Steve Capper , Mark Rutland , Hanjun Guo Hi Robert, On 2016/1/25 18:26, Robert Richter wrote: > On 23.01.16 17:39:27, Hanjun Guo wrote: >> From: Hanjun Guo >> >> After the cleanup for acpi_numa_memory_affinity_init(), >> it can be used for architetures both x86 and arm64, since >> CONFIG_MEMORY_HOTPLUG is not enabled for arm64, so no >> worry about that. >> >> Signed-off-by: Hanjun Guo >> --- >> arch/arm64/kernel/acpi_numa.c | 42 ------------------------------- >> arch/x86/mm/srat.c | 54 ---------------------------------------- >> drivers/acpi/numa.c | 57 +++++++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 57 insertions(+), 96 deletions(-) > This one reverts acpi_numa_memory_affinity_init() to the x86 version. > I rather would prefer the arm64 version for the generic code. We could > keep the x86 implementation until x86 maintainers agree to remove them > and use the generic one (implemented in a separate patch). > > Doing so we can move acpi_numa_memory_affinity_init() from the > beginning to generic code (used for arm64) and have this last patch to > remove the x86 version. I think the x86 version is the generic one, all the flags (ACPI_SRAT_MEM_HOT_PLUGGABLE and etc) are defined in the ACPI spec, x86 just use all the flags because it support such features. For ARM64, firmware should be careful and represent the true platform configuration to OS, such as on ARM64, we can't set hotpluggable flag as the ARM64 arch don't support memory hot-plug yet (also the firmware don't support it too), if firmware do things right, it will be not worries for the kernel. Thanks Hanjun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752255AbcA0GRh (ORCPT ); Wed, 27 Jan 2016 01:17:37 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:22463 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750870AbcA0GRc (ORCPT ); Wed, 27 Jan 2016 01:17:32 -0500 Subject: Re: [PATCH v3 12/12] acpi, numa: reuse acpi_numa_memory_affinity_init() To: Robert Richter References: <1453541967-3744-1-git-send-email-guohanjun@huawei.com> <1453541967-3744-13-git-send-email-guohanjun@huawei.com> <20160125102643.GF24726@rric.localdomain> CC: "Rafael J. Wysocki" , Will Deacon , Catalin Marinas , , , , Ganapatrao Kulkarni , Lorenzo Pieralisi , Shannon Zhao , "Steve Capper" , Mark Rutland , "Hanjun Guo" From: Hanjun Guo Message-ID: <56A8606A.8080407@huawei.com> Date: Wed, 27 Jan 2016 14:15:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160125102643.GF24726@rric.localdomain> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.17.188] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.56A86078.0219,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a13c1e574802b82c2ae707f10b81c4b8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robert, On 2016/1/25 18:26, Robert Richter wrote: > On 23.01.16 17:39:27, Hanjun Guo wrote: >> From: Hanjun Guo >> >> After the cleanup for acpi_numa_memory_affinity_init(), >> it can be used for architetures both x86 and arm64, since >> CONFIG_MEMORY_HOTPLUG is not enabled for arm64, so no >> worry about that. >> >> Signed-off-by: Hanjun Guo >> --- >> arch/arm64/kernel/acpi_numa.c | 42 ------------------------------- >> arch/x86/mm/srat.c | 54 ---------------------------------------- >> drivers/acpi/numa.c | 57 +++++++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 57 insertions(+), 96 deletions(-) > This one reverts acpi_numa_memory_affinity_init() to the x86 version. > I rather would prefer the arm64 version for the generic code. We could > keep the x86 implementation until x86 maintainers agree to remove them > and use the generic one (implemented in a separate patch). > > Doing so we can move acpi_numa_memory_affinity_init() from the > beginning to generic code (used for arm64) and have this last patch to > remove the x86 version. I think the x86 version is the generic one, all the flags (ACPI_SRAT_MEM_HOT_PLUGGABLE and etc) are defined in the ACPI spec, x86 just use all the flags because it support such features. For ARM64, firmware should be careful and represent the true platform configuration to OS, such as on ARM64, we can't set hotpluggable flag as the ARM64 arch don't support memory hot-plug yet (also the firmware don't support it too), if firmware do things right, it will be not worries for the kernel. Thanks Hanjun From mboxrd@z Thu Jan 1 00:00:00 1970 From: guohanjun@huawei.com (Hanjun Guo) Date: Wed, 27 Jan 2016 14:15:06 +0800 Subject: [PATCH v3 12/12] acpi, numa: reuse acpi_numa_memory_affinity_init() In-Reply-To: <20160125102643.GF24726@rric.localdomain> References: <1453541967-3744-1-git-send-email-guohanjun@huawei.com> <1453541967-3744-13-git-send-email-guohanjun@huawei.com> <20160125102643.GF24726@rric.localdomain> Message-ID: <56A8606A.8080407@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Robert, On 2016/1/25 18:26, Robert Richter wrote: > On 23.01.16 17:39:27, Hanjun Guo wrote: >> From: Hanjun Guo >> >> After the cleanup for acpi_numa_memory_affinity_init(), >> it can be used for architetures both x86 and arm64, since >> CONFIG_MEMORY_HOTPLUG is not enabled for arm64, so no >> worry about that. >> >> Signed-off-by: Hanjun Guo >> --- >> arch/arm64/kernel/acpi_numa.c | 42 ------------------------------- >> arch/x86/mm/srat.c | 54 ---------------------------------------- >> drivers/acpi/numa.c | 57 +++++++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 57 insertions(+), 96 deletions(-) > This one reverts acpi_numa_memory_affinity_init() to the x86 version. > I rather would prefer the arm64 version for the generic code. We could > keep the x86 implementation until x86 maintainers agree to remove them > and use the generic one (implemented in a separate patch). > > Doing so we can move acpi_numa_memory_affinity_init() from the > beginning to generic code (used for arm64) and have this last patch to > remove the x86 version. I think the x86 version is the generic one, all the flags (ACPI_SRAT_MEM_HOT_PLUGGABLE and etc) are defined in the ACPI spec, x86 just use all the flags because it support such features. For ARM64, firmware should be careful and represent the true platform configuration to OS, such as on ARM64, we can't set hotpluggable flag as the ARM64 arch don't support memory hot-plug yet (also the firmware don't support it too), if firmware do things right, it will be not worries for the kernel. Thanks Hanjun