From patchwork Sat Jan 23 09:39:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 60263 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp358801lbb; Sat, 23 Jan 2016 01:46:27 -0800 (PST) X-Received: by 10.98.40.131 with SMTP id o125mr10862592pfo.83.1453542387749; Sat, 23 Jan 2016 01:46:27 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id yk10si16250424pac.24.2016.01.23.01.46.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Jan 2016 01:46:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aMul0-0001Z4-At; Sat, 23 Jan 2016 09:45:22 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aMukj-000069-FR for linux-arm-kernel@lists.infradead.org; Sat, 23 Jan 2016 09:45:07 +0000 Received: from 172.24.1.51 (EHLO szxeml426-hub.china.huawei.com) ([172.24.1.51]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DAK82839; Sat, 23 Jan 2016 17:40:32 +0800 (CST) Received: from localhost (10.177.17.188) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.235.1; Sat, 23 Jan 2016 17:40:20 +0800 From: Hanjun Guo To: "Rafael J. Wysocki" , Will Deacon , Catalin Marinas Subject: [PATCH v3 04/12] acpi, numa: introduce ACPI_HAS_NUMA_ARCH_FIXUP Date: Sat, 23 Jan 2016 17:39:19 +0800 Message-ID: <1453541967-3744-5-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.10.msysgit.1 In-Reply-To: <1453541967-3744-1-git-send-email-guohanjun@huawei.com> References: <1453541967-3744-1-git-send-email-guohanjun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.17.188] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.56A34A92.0031, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: e1814bb8a94249c267cd0c1b49dd3e85 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160123_014506_048357_589BB154 X-CRM114-Status: GOOD ( 13.73 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [119.145.14.65 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [119.145.14.65 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Lorenzo Pieralisi , Steve Capper , linux-kernel@vger.kernel.org, Robert Richter , linux-acpi@vger.kernel.org, Shannon Zhao , Ganapatrao Kulkarni , linux-arm-kernel@lists.infradead.org, Hanjun Guo Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org From: Hanjun Guo acpi_numa_arch_fixup() is only used for IA64, x86 introduce a dummy function for it, when we came to a new architecture (such as ARM64), we need to introduce another dummy one to make the code compile. That's pretty boring so introduce ACPI_HAS_NUMA_ARCH_FIXUP and select it for IA64, introduce a stub function for acpi_numa_arch_fixup() then it's pretty clean for x86 and ARM64. Signed-off-by: Hanjun Guo --- arch/ia64/Kconfig | 1 + arch/x86/mm/srat.c | 2 -- drivers/acpi/Kconfig | 3 +++ include/linux/acpi.h | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index eb0249e..1285cef 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -17,6 +17,7 @@ config IA64 select ACPI if (!IA64_HP_SIM) select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI + select ACPI_HAS_NUMA_ARCH_FIXUP if ACPI select HAVE_UNSTABLE_SCHED_CLOCK select HAVE_IDE select HAVE_OPROFILE diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index c2aea63..9fa1746 100644 --- a/arch/x86/mm/srat.c +++ b/arch/x86/mm/srat.c @@ -210,8 +210,6 @@ out_err: return -1; } -void __init acpi_numa_arch_fixup(void) {} - int __init x86_acpi_numa_init(void) { int ret; diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 5eef4cb..d6d5749 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -57,6 +57,9 @@ config ACPI_SYSTEM_POWER_STATES_SUPPORT config ACPI_CCA_REQUIRED bool +config ACPI_HAS_NUMA_ARCH_FIXUP + bool + config ACPI_DEBUGGER bool "AML debugger interface (EXPERIMENTAL)" select ACPI_DEBUG diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 1991aea..574d829 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -173,7 +173,12 @@ void acpi_numa_slit_init (struct acpi_table_slit *slit); void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa); int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); + +#ifdef CONFIG_ACPI_HAS_NUMA_ARCH_FIXUP void acpi_numa_arch_fixup(void); +#else +static inline void acpi_numa_arch_fixup(void) { } +#endif #ifndef PHYS_CPUID_INVALID typedef u32 phys_cpuid_t;