From patchwork Tue May 24 22:35:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 9134417 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9DB17607D3 for ; Tue, 24 May 2016 22:40:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 936B6281E3 for ; Tue, 24 May 2016 22:40:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 881542822B; Tue, 24 May 2016 22:40:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CA62281E3 for ; Tue, 24 May 2016 22:40:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752655AbcEXWkZ (ORCPT ); Tue, 24 May 2016 18:40:25 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34445 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752569AbcEXWgG (ORCPT ); Tue, 24 May 2016 18:36:06 -0400 Received: by mail-pf0-f194.google.com with SMTP id 145so3422016pfz.1; Tue, 24 May 2016 15:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9S58WLzZrs4umGuly/dJPD6koe+lURMcQ4rvvzDI88Y=; b=KziVOAqEZUnPqenP2sx1sAdBosBjrPa0YXcz10apMjyPd8cmRzSow++FpDUXku8IOz pkzRTtsOCCaS7P0KM4al5z2BUDe2wnjVxpgSxYU1sJVYxwwtjaf7DGg0QCITdKjQT6PE 3m+ZBQZalEyYagGo+0RPw/jmLU75wS0A3pTaSQ3kCl6O6kN8aiA/MPWlOReOWq9hFOLv vth8Yw/4LzQAC1WdRybrcVYa1eUaaQg/2yPNoM289/p6sejCRkejhpeGIxdCoVdSggug 9VWSOhneCQvzJFzdwcWRMHSGdRfG4ObjSSAn6vHT1gBG58oOF0Xqm4wiuY5slEIhN1+l HtXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9S58WLzZrs4umGuly/dJPD6koe+lURMcQ4rvvzDI88Y=; b=ViUKuDg56VSqsMdznXSmrByD96LnljQONaEuMDk3chTx6Zd9t2IkTkRT/6YXkqmtOX n/XuK+phHP72YujDRuEEwHv+BEaIp3EV9HtDRlY4z9Yl0TFjWrjBoOSJLuMuOUwy9FaW zBHzOv0buuw2Ok8y6MYXQFjq0rpqyg5BMa84LxTmbwoM5gRhdQJ9UFv/jBrVmkU8Z/ud YhzIsH4dL6IVnR5CepFjtZoBttgHjJnB2TtjU6cVTWB3GK8ndCMlgNhqKoGclQh53pau 8TsistmH2O2WBfXA1dP1dEQT98AAtoARNWdE9efYH8BKAb1g+EGO42rRGxVjvy320YKo F7vQ== X-Gm-Message-State: ALyK8tKZs177XjC/Q6L/n4Eh71m8h/nNey2v4JxdlCmXq9NX5FnFFSKY8wgi/YkEHv0LBw== X-Received: by 10.98.82.208 with SMTP id g199mr829315pfb.113.1464129365276; Tue, 24 May 2016 15:36:05 -0700 (PDT) Received: from dl.caveonetworks.com ([50.233.148.158]) by smtp.gmail.com with ESMTPSA id p187sm56714444pfb.3.2016.05.24.15.35.59 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 May 2016 15:36:02 -0700 (PDT) Received: from dl.caveonetworks.com (localhost.localdomain [127.0.0.1]) by dl.caveonetworks.com (8.14.5/8.14.5) with ESMTP id u4OMZxIq019051; Tue, 24 May 2016 15:35:59 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id u4OMZxT9019050; Tue, 24 May 2016 15:35:59 -0700 From: David Daney To: Will Deacon , linux-arm-kernel@lists.infradead.org, Mark Rutland , Catalin Marinas , Tony Luck , Fenghua Yu , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, "Rafael J. Wysocki" , Len Brown , Rob Herring , Frank Rowand , Grant Likely , Robert Moore , Lv Zheng , Hanjun Guo , Marc Zyngier , linux-ia64@vger.kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org Cc: linux-kernel@vger.kernel.org, Robert Richter , David Daney Subject: [PATCH v7 04/15] acpi, numa: Move acpi_numa_arch_fixup() to ia64 only Date: Tue, 24 May 2016 15:35:34 -0700 Message-Id: <1464129345-18985-5-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1464129345-18985-1-git-send-email-ddaney.cavm@gmail.com> References: <1464129345-18985-1-git-send-email-ddaney.cavm@gmail.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Robert Richter Since acpi_numa_arch_fixup() is only used in arch ia64, move it there to make a generic interface easier. This avoids empty function stubs or some complex kconfig options for x86 and arm64. Signed-off-by: Robert Richter Reviewed-by: Hanjun Guo Signed-off-by: David Daney --- arch/ia64/include/asm/acpi.h | 3 +++ arch/ia64/kernel/acpi.c | 2 +- arch/ia64/kernel/setup.c | 1 + arch/x86/mm/srat.c | 2 -- drivers/acpi/numa.c | 2 -- include/linux/acpi.h | 1 - 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h index aa0fdf1..a3d0211 100644 --- a/arch/ia64/include/asm/acpi.h +++ b/arch/ia64/include/asm/acpi.h @@ -140,6 +140,9 @@ static inline void per_cpu_scan_finalize(int min_cpus, int reserve_cpus) } } } + +extern void acpi_numa_fixup(void); + #endif /* CONFIG_ACPI_NUMA */ #endif /*__KERNEL__*/ diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index b1698bc..92b7bc9 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -524,7 +524,7 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) return 0; } -void __init acpi_numa_arch_fixup(void) +void __init acpi_numa_fixup(void) { int i, j, node_from, node_to; diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 2029a38..afddb3e 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c @@ -552,6 +552,7 @@ setup_arch (char **cmdline_p) early_acpi_boot_init(); # ifdef CONFIG_ACPI_NUMA acpi_numa_init(); + acpi_numa_fixup(); # ifdef CONFIG_ACPI_HOTPLUG_CPU prefill_possible_map(); # endif diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index b5f8218..90b6ed9 100644 --- a/arch/x86/mm/srat.c +++ b/arch/x86/mm/srat.c @@ -212,8 +212,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/numa.c b/drivers/acpi/numa.c index 6f1cad8..fb2c0d6 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -324,8 +324,6 @@ int __init acpi_numa_init(void) /* SLIT: System Locality Information Table */ acpi_table_parse(ACPI_SIG_SLIT, acpi_parse_slit); - acpi_numa_arch_fixup(); - if (cnt < 0) return cnt; else if (!parsed_numa_memblks) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 288fac5..8010b26 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -237,7 +237,6 @@ 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); -void acpi_numa_arch_fixup(void); #ifndef PHYS_CPUID_INVALID typedef u32 phys_cpuid_t;