lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1464129345-18985-7-git-send-email-ddaney.cavm@gmail.com> Date: Tue, 24 May 2016 15:35:36 -0700 From: David Daney <ddaney.cavm@...il.com> To: Will Deacon <will.deacon@....com>, linux-arm-kernel@...ts.infradead.org, Mark Rutland <mark.rutland@....com>, Catalin Marinas <catalin.marinas@....com>, Tony Luck <tony.luck@...el.com>, Fenghua Yu <fenghua.yu@...el.com>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org, "Rafael J. Wysocki" <rjw@...ysocki.net>, Len Brown <lenb@...nel.org>, Rob Herring <robh+dt@...nel.org>, Frank Rowand <frowand.list@...il.com>, Grant Likely <grant.likely@...aro.org>, Robert Moore <robert.moore@...el.com>, Lv Zheng <lv.zheng@...el.com>, Hanjun Guo <hanjun.guo@...aro.org>, Marc Zyngier <Marc.Zyngier@....com>, linux-ia64@...r.kernel.org, linux-acpi@...r.kernel.org, devel@...ica.org Cc: linux-kernel@...r.kernel.org, Robert Richter <rrichter@...ium.com>, David Daney <david.daney@...ium.com> Subject: [PATCH v7 06/15] arm64, numa: rework numa_add_memblk() From: Hanjun Guo <hanjun.guo@...aro.org> Rework numa_add_memblk() to update the parameter "u64 size" to "u64 end", this will make it consistent with x86 and simplifies the arm64 ACPI NUMA code to be added later. Signed-off-by: Hanjun Guo <hanjun.guo@...aro.org> Signed-off-by: Robert Richter <rrichter@...ium.com> Signed-off-by: David Daney <david.daney@...ium.com> Acked-by: Catalin Marinas <catalin.marinas@....com> --- arch/arm64/mm/numa.c | 12 ++++++------ drivers/of/of_numa.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c index 98dc104..6cb03f9 100644 --- a/arch/arm64/mm/numa.c +++ b/arch/arm64/mm/numa.c @@ -131,25 +131,25 @@ void __init early_map_cpu_to_node(unsigned int cpu, int nid) * 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 * * RETURNS: * 0 on success, -errno on failure. */ -int __init numa_add_memblk(int nid, u64 start, u64 size) +int __init numa_add_memblk(int nid, u64 start, u64 end) { int ret; - ret = memblock_set_node(start, size, &memblock.memory, nid); + ret = memblock_set_node(start, (end - start), &memblock.memory, nid); if (ret < 0) { pr_err("NUMA: memblock [0x%llx - 0x%llx] failed to add on node %d\n", - start, (start + size - 1), nid); + start, (end - 1), nid); return ret; } node_set(nid, numa_nodes_parsed); pr_info("NUMA: Adding memblock [0x%llx - 0x%llx] on node %d\n", - start, (start + size - 1), nid); + start, (end - 1), nid); return ret; } @@ -367,7 +367,7 @@ static int __init dummy_numa_init(void) 0LLU, PFN_PHYS(max_pfn) - 1); for_each_memblock(memory, mblk) { - ret = numa_add_memblk(0, mblk->base, mblk->size); + ret = numa_add_memblk(0, mblk->base, mblk->base + mblk->size); if (!ret) continue; diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c index 0f2784b..ed5a097 100644 --- a/drivers/of/of_numa.c +++ b/drivers/of/of_numa.c @@ -91,8 +91,8 @@ static int __init of_numa_parse_memory_nodes(void) pr_debug("NUMA: base = %llx len = %llx, node = %u\n", rsrc.start, rsrc.end - rsrc.start + 1, nid); - r = numa_add_memblk(nid, rsrc.start, - rsrc.end - rsrc.start + 1); + + r = numa_add_memblk(nid, rsrc.start, rsrc.end + 1); if (r) break; } -- 1.7.11.7
Powered by blists - more mailing lists