From patchwork Mon Aug 15 15:35:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 9281441 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 EA7B960467 for ; Mon, 15 Aug 2016 15:35:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBA8D28D25 for ; Mon, 15 Aug 2016 15:35:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D039D28D45; Mon, 15 Aug 2016 15:35:55 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 44F0C28D25 for ; Mon, 15 Aug 2016 15:35:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752946AbcHOPfy (ORCPT ); Mon, 15 Aug 2016 11:35:54 -0400 Received: from foss.arm.com ([217.140.101.70]:41501 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752812AbcHOPfx (ORCPT ); Mon, 15 Aug 2016 11:35:53 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C28E4318; Mon, 15 Aug 2016 08:37:24 -0700 (PDT) Received: from e104818-lin.cambridge.arm.com (e104818-lin.cambridge.arm.com [10.1.206.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DE9703F21A; Mon, 15 Aug 2016 08:35:48 -0700 (PDT) Date: Mon, 15 Aug 2016 16:35:46 +0100 From: Catalin Marinas To: David Daney Cc: Will Deacon , linux-arm-kernel@lists.infradead.org, Mark Rutland , 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, Robert Richter , Ganapatrao Kulkarni , linux-kernel@vger.kernel.org, David Daney Subject: Re: [PATCH v7 14/15] arm64, acpi, numa: NUMA support based on SRAT and SLIT Message-ID: <20160815153546.GF22320@e104818-lin.cambridge.arm.com> References: <1464129345-18985-1-git-send-email-ddaney.cavm@gmail.com> <1464129345-18985-15-git-send-email-ddaney.cavm@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1464129345-18985-15-git-send-email-ddaney.cavm@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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 On Tue, May 24, 2016 at 03:35:44PM -0700, David Daney wrote: > diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h > index aee323b..4b13ecd 100644 > --- a/arch/arm64/include/asm/acpi.h > +++ b/arch/arm64/include/asm/acpi.h > @@ -113,4 +113,12 @@ static inline const char *acpi_get_enable_method(int cpu) > pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr); > #endif > > +#ifdef CONFIG_ACPI_NUMA > +int arm64_acpi_numa_init(void); > +int acpi_numa_get_nid(unsigned int cpu, u64 hwid); > +#else > +static inline int arm64_acpi_numa_init(void) { return -ENOSYS; } > +static inline int acpi_numa_get_nid(unsigned int cpu, u64 hwid) { return NUMA_NO_NODE; } > +#endif /* CONFIG_ACPI_NUMA */ > + > #endif /*_ASM_ACPI_H*/ Apparently this doesn't always build since asm/acpi.h is conditionally included from linux/acpi.h only when CONFIG_ACPI is enabled. Disabling this option on arm64 leads to: arch/arm64/mm/numa.c: In function ‘arm64_numa_init’: arch/arm64/mm/numa.c:395:24: error: ‘arm64_acpi_numa_init’ undeclared (first use in this function) if (!acpi_disabled && !numa_init(arm64_acpi_numa_init)) I'll fix it in arch/arm64 by including asm/acpi.h directly as we do in a couple of other files: ------------------8<------------------------------ From 9a83bf400e0b4ef066b83eeaecdbca909b8491ea Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Mon, 15 Aug 2016 16:33:10 +0100 Subject: [PATCH] arm64: Fix NUMA build error when !CONFIG_ACPI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since asm/acpi.h is only included by linux/acpi.h when CONFIG_ACPI is enabled, disabling the latter leads to the following build error on arm64: arch/arm64/mm/numa.c: In function ‘arm64_numa_init’: arch/arm64/mm/numa.c:395:24: error: ‘arm64_acpi_numa_init’ undeclared (first use in this function) if (!acpi_disabled && !numa_init(arm64_acpi_numa_init)) This patch include the asm/acpi.h explicitly in arch/arm64/mm/numa.c for the arm64_acpi_numa_init() definition. Fixes: d8b47fca8c23 ("arm64, ACPI, NUMA: NUMA support based on SRAT and SLIT") Signed-off-by: Catalin Marinas Reviewed-by: Hanjun Guo --- arch/arm64/mm/numa.c | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c index c7fe3ec70774..5bb15eab6f00 100644 --- a/arch/arm64/mm/numa.c +++ b/arch/arm64/mm/numa.c @@ -23,6 +23,8 @@ #include #include +#include + struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; EXPORT_SYMBOL(node_data); nodemask_t numa_nodes_parsed __initdata;