From patchwork Wed Apr 27 18:07:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 8961131 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 70B9ABF29F for ; Wed, 27 Apr 2016 18:09:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7DE692015A for ; Wed, 27 Apr 2016 18:09:55 +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 9899F20138 for ; Wed, 27 Apr 2016 18:09:54 +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 1avTt9-00087v-3e; Wed, 27 Apr 2016 18:08:39 +0000 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1avTsQ-0007a8-LK for linux-arm-kernel@lists.infradead.org; Wed, 27 Apr 2016 18:07:55 +0000 Received: by mail-pa0-x241.google.com with SMTP id vv3so6523319pab.0 for ; Wed, 27 Apr 2016 11:07:36 -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=Q40HEinX/foRkYWU+61vgKCUyWNylHTMrWyLOzVwgm8=; b=q/YK0S3xvEYcHMoSl7UIyaxqyXnVoqgZ5qj8Ulx/Am3UJBeW7RTke6VD8Ltfr3xaFL qXJvLGhONrdQQncBQJGSZKMsBNJpz4cg/Q2AKk7JJuIfSXMIrr36w8PRfwhHNJU5sylI Az2i8Cs/imCBg7g0aspb4//fdEC3NMKlLty6iAkJgeQDyIeaXP7M/G4X+vOziV1E988p 64fcYoWHNFJps8CXS8itk0mjpIzgl57bbECgmxnBGPo+6BXTEb+EvlgE979khL5RlLFX gMk1h930L7pzsv8QHjhcZrxfimyqj/NFolu8iDFts1u6dm01lOSi63crrkRXfO43GrXG FxBA== 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=Q40HEinX/foRkYWU+61vgKCUyWNylHTMrWyLOzVwgm8=; b=HZMR32/mzjgaJWhPgY6koRRuxfsU3vLwbVrytE6+DW/NhxrSf05WrdXgxp8fVcswyp 1pKtYsQ5xo9RrzYsMVRvGKdGkN1LF6uX5n7eZIfd2JhANe/4fjuDWv9gPQelrj/mfMKo 7mt8Bo1NOsU3UelNmSTUx2rFpy/yZ6thISQRMJHxQbPzP4Ge02NhqL3uCeg2JBqDchEl MqYryoYQT+t0Wbmzyia7xMkutr96Df6K2+ewH2q2aKf7ld40sWBtlninQXPO5//sTmQz SXgNT3bTqd7jx1gZX08XrJrxLUIX65zJSeI6nviX5Aj0VzkSYHsDNoT+5hsr6jrm1HHj CYiw== X-Gm-Message-State: AOPr4FUk8HviBs4Cyxd3qJ69uGytD1Y6QvfRgxAvWJSZ4LAnrj9HwJCxhaIi8Mrb0dRLFA== X-Received: by 10.66.136.41 with SMTP id px9mr14005180pab.80.1461780456135; Wed, 27 Apr 2016 11:07:36 -0700 (PDT) Received: from dl.caveonetworks.com ([64.2.3.194]) by smtp.gmail.com with ESMTPSA id dr4sm8486441pac.11.2016.04.27.11.07.30 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 27 Apr 2016 11:07:32 -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 u3RI7TAW027247; Wed, 27 Apr 2016 11:07:29 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id u3RI7T25027246; Wed, 27 Apr 2016 11:07:29 -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 Subject: [PATCH v6 04/14] acpi, numa: Move acpi_numa_arch_fixup() to ia64 only Date: Wed, 27 Apr 2016 11:07:06 -0700 Message-Id: <1461780436-27182-5-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1461780436-27182-1-git-send-email-ddaney.cavm@gmail.com> References: <1461780436-27182-1-git-send-email-ddaney.cavm@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160427_110754_784219_22906784 X-CRM114-Status: GOOD ( 16.06 ) X-Spam-Score: -2.7 (--) 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: Robert Richter , linux-kernel@vger.kernel.org, David Daney MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: 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 2de6068..f41f06b 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -316,8 +316,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 06ed7e5..ab6fd96 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -244,7 +244,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;