Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463733

Re: [PATCH v7 14/15] arm64, acpi, numa: NUMA support based on SRAT and SLIT

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Hanjun Guo <hanjun.guo@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v7 14/15] arm64, acpi, numa: NUMA support based on SRAT and SLIT
Date Tue, 16 Aug 2016 14:00:01 +0200
Message-ID <s6Lcd-2BC-9@gated-at.bofh.it> (permalink)
References <rCt9v-R2-5@gated-at.bofh.it> <rCt9w-R2-27@gated-at.bofh.it> <s6s9z-7m4-19@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=LI6QxmWgPSyc7HXPFhR5rKAjU5jPiEEAV3/jvBfGmt8=; b=KMneRTnUkvM8DvK9MYWFm/Zgv4eaGZvu5DPmjLxof33KYalwPNGXXf3GRfLvhOABSg L+FGENSIpopU6ByQnzT/vIwNqwwDTd03Xq7q5S0rWXZyJYYCJzR2/RB+DgbY4LbVA7di 2nZlbxJpoDtvzbLhWRkFycxI/gDGSY9brmGC4=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=LI6QxmWgPSyc7HXPFhR5rKAjU5jPiEEAV3/jvBfGmt8=; b=MEHnjgOfER1gAgH+usxVt2zgLMwN/epRkybHZAcvYopQ72ensogMa8Oc7DSSwJ3LxD weICduhgvnSdqpI7KOra7h5dt4Ur3lA1S+yd36EsTi/u5LZFK/as/FOFQRYnaihbqOl6 vCqcp2r7knsKLdMbDrnO8YrsLVh87srHplDTEyRLqn8D7JOINLKMMUQpA4xJBNq5Iq1w gcN9QYxNYUI8hhp5serk2tI23G/GS5xzZGRVdBMTodkskhnkw23XnzalS6kyq9H1VH28 NrOtIEzzxczAXT14FbZYMqmR5MjH28T5gGCj+xILxMB4+UXvX0CSFi7sYuCpedWocfgK j0Mw==
X-Gm-Message-State AEkoouu9UtisxgnlTTj5AFKSWUo2dOSyaUk7v3p/wZ7hqY3qurORKeeVozLMzV7IFo7sDxyJ
X-Received by 10.98.147.156 with SMTP id r28mr6553482pfk.154.1471348701038; Tue, 16 Aug 2016 04:58:21 -0700 (PDT)
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 8bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 77
Organization linux.* mail to news gateway
X-Original-Cc Will Deacon <will.deacon@arm.com>, linux-arm-kernel@lists.infradead.org, Mark Rutland <mark.rutland@arm.com>, Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, x86@kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>, Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>, Grant Likely <grant.likely@linaro.org>, Robert Moore <robert.moore@intel.com>, Lv Zheng <lv.zheng@intel.com>, Marc Zyngier <Marc.Zyngier@arm.com>, linux-ia64@vger.kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org, Robert Richter <rrichter@cavium.com>, Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>, linux-kernel@vger.kernel.org, David Daney <david.daney@cavium.com>
X-Original-Date Tue, 16 Aug 2016 19:58:09 +0800
X-Original-Message-ID <3ac8ffb3-f447-45ef-c118-dde4efe74911@linaro.org>
X-Original-References <1464129345-18985-1-git-send-email-ddaney.cavm@gmail.com> <1464129345-18985-15-git-send-email-ddaney.cavm@gmail.com> <20160815153546.GF22320@e104818-lin.cambridge.arm.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1463733

Show key headers only | View raw


On 2016/8/15 23:35, Catalin Marinas wrote:
> 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 <catalin.marinas@arm.com>
> 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 <catalin.marinas@arm.com>
> ---
>  arch/arm64/mm/numa.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> 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 <linux/module.h>
>  #include <linux/of.h>
>
> +#include <asm/acpi.h>
> +
>  struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
>  EXPORT_SYMBOL(node_data);
>  nodemask_t numa_nodes_parsed __initdata;


Thanks a lot!

Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>

Hanjun

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v7 14/15] arm64, acpi, numa: NUMA support based on SRAT  and SLIT Catalin Marinas <catalin.marinas@arm.com> - 2016-08-15 17:40 +0200
  Re: [PATCH v7 14/15] arm64, acpi, numa: NUMA support based on SRAT  and SLIT Hanjun Guo <hanjun.guo@linaro.org> - 2016-08-16 14:00 +0200

csiph-web