From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932589AbdJXNfI (ORCPT ); Tue, 24 Oct 2017 09:35:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39580 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbdJXNfA (ORCPT ); Tue, 24 Oct 2017 09:35:00 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CBE0782106 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=bhe@redhat.com Date: Tue, 24 Oct 2017 21:34:54 +0800 From: Baoquan He To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, x86@kernel.org Subject: Re: [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap Message-ID: <20171024133454.GJ27757@x1> References: <1508849249-18035-1-git-send-email-bhe@redhat.com> <20171024132900.nxftpzwbuifon7tk@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171024132900.nxftpzwbuifon7tk@gmail.com> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 24 Oct 2017 13:34:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ingo, On 10/24/17 at 03:29pm, Ingo Molnar wrote: > > diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c > > index 048fbe8fc274..f5aa0d7c4cd1 100644 > > --- a/arch/x86/mm/init_64.c > > +++ b/arch/x86/mm/init_64.c > > @@ -1426,10 +1426,10 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node) > > > > #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HAVE_BOOTMEM_INFO_NODE) > > void register_page_bootmem_memmap(unsigned long section_nr, > > - struct page *start_page, unsigned long size) > > + struct page *start_page, unsigned long nr_pages) > > { > > unsigned long addr = (unsigned long)start_page; > > - unsigned long end = (unsigned long)(start_page + size); > > + unsigned long end = (unsigned long)(start_page + nr_pages); > > unsigned long next; > > pgd_t *pgd; > > p4d_t *p4d; > > This doesn't build on x86-64 allyesconfig: > > arch/x86/mm/init_64.c: In function ‘register_page_bootmem_memmap’: > arch/x86/mm/init_64.c:1438:15: error: ‘nr_pages’ redeclared as different kind of symbol > arch/x86/mm/init_64.c:1429:46: note: previous definition of ‘nr_pages’ was here > > Also note that I improved the changelog (see below), could you please pick those > changes up for a v2 submission? Thanks a lot for checking this and rewrote the change log. Seems I didn't merge the change in mm.h. Will make v2 with your patch log changes and repost after testing. Thanks Baoquan > > > ==================> > From 67780ebe5c99190d2a946de106bd0c7b83e11b68 Mon Sep 17 00:00:00 2001 > From: Baoquan He > Date: Tue, 24 Oct 2017 20:47:29 +0800 > Subject: [PATCH] x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages' > > register_page_bootmem_memmap()'s 3rd 'size' parameter is named > in a somewhat misleading fashion - rename it to 'nr_pages' which > makes the units of it much clearer. > > Signed-off-by: Baoquan He > Cc: Linus Torvalds > Cc: Peter Zijlstra > Cc: Thomas Gleixner > Cc: akpm@linux-foundation.org > Link: http://lkml.kernel.org/r/1508849249-18035-1-git-send-email-bhe@redhat.com > Signed-off-by: Ingo Molnar > --- > arch/x86/mm/init_64.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c > index 048fbe8fc274..f5aa0d7c4cd1 100644 > --- a/arch/x86/mm/init_64.c > +++ b/arch/x86/mm/init_64.c > @@ -1426,10 +1426,10 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node) > > #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HAVE_BOOTMEM_INFO_NODE) > void register_page_bootmem_memmap(unsigned long section_nr, > - struct page *start_page, unsigned long size) > + struct page *start_page, unsigned long nr_pages) > { > unsigned long addr = (unsigned long)start_page; > - unsigned long end = (unsigned long)(start_page + size); > + unsigned long end = (unsigned long)(start_page + nr_pages); > unsigned long next; > pgd_t *pgd; > p4d_t *p4d;