From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Richter Subject: Re: [PATCH v3 08/12] arm64, numa: rework numa_add_memblk() Date: Mon, 25 Jan 2016 10:34:29 +0100 Message-ID: <20160125093429.GD24726@rric.localdomain> References: <1453541967-3744-1-git-send-email-guohanjun@huawei.com> <1453541967-3744-9-git-send-email-guohanjun@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1453541967-3744-9-git-send-email-guohanjun@huawei.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Hanjun Guo Cc: Mark Rutland , Lorenzo Pieralisi , Steve Capper , "Rafael J. Wysocki" , Will Deacon , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Shannon Zhao , Catalin Marinas , Ganapatrao Kulkarni , linux-arm-kernel@lists.infradead.org, Hanjun Guo List-Id: linux-acpi@vger.kernel.org On 23.01.16 17:39:23, Hanjun Guo wrote: > 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. > --- 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) The overall function usage looks more like as it should use size instead of end. Even in the x86 implementation end is calculated from base + size. So better change x86 code to use size instead. Though this might involve to change the interface for numa_add_memblk_to() for unifcation too. -Robert