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: 8096591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1BF63BEEE5 for ; Sat, 23 Jan 2016 09:46:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 131EA2034B for ; Sat, 23 Jan 2016 09:46:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 261B7202C8 for ; Sat, 23 Jan 2016 09:46:57 +0000 (UTC) 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-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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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;