From: hanjun.guo@linaro.org (Hanjun Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 08/12] arm64, numa: rework numa_add_memblk()
Date: Thu, 10 Mar 2016 18:10:10 +0800 [thread overview]
Message-ID: <56E14802.8040500@linaro.org> (raw)
In-Reply-To: <20160309122744.GD1535@rric.localdomain>
Hi Robert,
On 03/09/2016 08:27 PM, Robert Richter wrote:
> On 23.01.16 17:39:23, Hanjun Guo wrote:
>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>
>> Rework numa_add_memblk() to update the parameter "u64 size"
>> to "u64 end", this will make it consistent with x86 and
>> can simplify the code later.
>>
>> Updates for arch/arm64/mm/numa.c should squash to core NUMA
>> patches from Ganapat.
>>
>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>> ---
>> arch/arm64/kernel/acpi_numa.c | 2 +-
>> arch/arm64/kernel/of_numa.c | 2 +-
>> arch/arm64/mm/numa.c | 12 ++++++------
>> 3 files changed, 8 insertions(+), 8 deletions(-)
>
>> diff --git a/arch/arm64/kernel/of_numa.c b/arch/arm64/kernel/of_numa.c
>> index 2f9e34b..aa6f3a3 100644
>> --- a/arch/arm64/kernel/of_numa.c
>> +++ b/arch/arm64/kernel/of_numa.c
>> @@ -168,7 +168,7 @@ static int __init early_init_parse_memory_node(unsigned long node)
>> pr_debug("NUMA-DT: base = %llx , node = %u\n",
>> base, nid);
>>
>> - if (numa_add_memblk(nid, base, size) < 0)
>> + if (numa_add_memblk(nid, base, base + size) < 0)
>> return -EINVAL;
>> }
>>
>> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
>> index e974995..2b04b8a 100644
>> --- a/arch/arm64/mm/numa.c
>> +++ b/arch/arm64/mm/numa.c
>> @@ -137,25 +137,25 @@ void numa_store_cpu_info(unsigned int cpu)
>> * numa_add_memblk - Set node id to memblk
>> * @nid: NUMA node ID of the new memblk
>> * @start: Start address of the new memblk
>> - * @size: Size of the new memblk
>> + * @end: End address of the new memblk
>
> Apart from my earlier comment, this is not exactly correct and may
> cause confussion. The implementation here defines:
>
> size == end - start
>
> which is different to struct resource, where:
>
> resource_size(res) == res->end - res->start + 1
>
> Thus, @end here is the first address outside of memblk.
>
> This is one more argument for keeping @size here.
I agree :)
I'm working on the new version and met the problem of no
definition for numa_add_memblk() and numa_set_distance()
on IA64, numa_set_distance() seems to easy to add one for
IA64, but numa_add_memblk() is not, this will the blocker
for moving functions to common place, what's your opinion
here?
Also I'm thinking to move all the code in arch/arm64/kernel/acpi_numa.c
to the arch/arm64/kernel/acpi.c to make the ACPI code in ARM64
self-contained, what do you think?
Thanks
Hanjun
next prev parent reply other threads:[~2016-03-10 10:10 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-23 9:39 [PATCH v3 00/12] ACPI NUMA support for ARM64 Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 01/12] acpi, numa: Use pr_fmt() instead of printk Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 02/12] acpi, numa: Replace ACPI_DEBUG_PRINT() with pr_debug() Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 03/12] acpi, numa: remove duplicate NULL check Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 04/12] acpi, numa: introduce ACPI_HAS_NUMA_ARCH_FIXUP Hanjun Guo
2016-01-23 10:25 ` Robert Richter
2016-01-24 4:56 ` Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 05/12] arm64, acpi, numa: NUMA support based on SRAT and SLIT Hanjun Guo
2016-01-25 10:21 ` Robert Richter
2016-01-27 7:12 ` Hanjun Guo
2016-01-27 14:01 ` Robert Richter
2016-01-28 3:16 ` Hanjun Guo
2016-02-01 18:09 ` Robert Richter
2016-02-02 11:30 ` Hanjun Guo
2016-02-02 17:00 ` Lorenzo Pieralisi
2016-03-02 14:10 ` Matthias Brugger
2016-03-02 14:10 ` Matthias Brugger
2016-03-02 14:08 ` Matthias Brugger
2016-03-10 9:50 ` Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 06/12] acpi, numa: Enable ACPI based NUMA on ARM64 Hanjun Guo
2016-01-29 16:37 ` Robert Richter
2016-01-23 9:39 ` [PATCH v3 07/12] acpi, numa: move acpi_numa_slit_init() to common place Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 08/12] arm64, numa: rework numa_add_memblk() Hanjun Guo
2016-01-25 9:34 ` Robert Richter
2016-01-27 6:20 ` Hanjun Guo
2016-03-09 12:27 ` Robert Richter
2016-03-10 10:10 ` Hanjun Guo [this message]
2016-01-23 9:39 ` [PATCH v3 09/12] x86, acpi, numa: cleanup acpi_numa_processor_affinity_init() Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 10/12] acpi, numa: move bad_srat() and srat_disabled() to common place Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 11/12] acpi, numa: remove unneeded acpi_numa=1 Hanjun Guo
2016-01-23 9:39 ` [PATCH v3 12/12] acpi, numa: reuse acpi_numa_memory_affinity_init() Hanjun Guo
2016-01-25 10:26 ` Robert Richter
2016-01-27 6:15 ` Hanjun Guo
2016-01-27 14:18 ` Robert Richter
2016-01-28 2:48 ` Hanjun Guo
2016-01-28 13:31 ` Robert Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56E14802.8040500@linaro.org \
--to=hanjun.guo@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).