All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap
@ 2017-10-24 12:47 Baoquan He
  2017-10-24 13:29 ` Ingo Molnar
  2017-10-26  6:33 ` [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap kbuild test robot
  0 siblings, 2 replies; 7+ messages in thread
From: Baoquan He @ 2017-10-24 12:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, x86, Baoquan He

For register_page_bootmem_memmap(), the 3rd argument 'size' indicates
the number of pages which are inside the memory section, not a size.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 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;
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap
  2017-10-24 12:47 [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap Baoquan He
@ 2017-10-24 13:29 ` Ingo Molnar
  2017-10-24 13:34   ` Baoquan He
  2017-10-27 15:51   ` [PATCH] x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages' kbuild test robot
  2017-10-26  6:33 ` [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap kbuild test robot
  1 sibling, 2 replies; 7+ messages in thread
From: Ingo Molnar @ 2017-10-24 13:29 UTC (permalink / raw)
  To: Baoquan He; +Cc: linux-kernel, akpm, x86


* Baoquan He <bhe@redhat.com> wrote:

> For register_page_bootmem_memmap(), the 3rd argument 'size' indicates
> the number of pages which are inside the memory section, not a size.
> 
> Signed-off-by: Baoquan He <bhe@redhat.com>
> ---
>  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;

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,

	Ingo

==================>
>From 67780ebe5c99190d2a946de106bd0c7b83e11b68 Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
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 <bhe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
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 <mingo@kernel.org>
---
 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;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap
  2017-10-24 13:29 ` Ingo Molnar
@ 2017-10-24 13:34   ` Baoquan He
  2017-10-27 15:51   ` [PATCH] x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages' kbuild test robot
  1 sibling, 0 replies; 7+ messages in thread
From: Baoquan He @ 2017-10-24 13:34 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, akpm, x86

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 <bhe@redhat.com>
> 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 <bhe@redhat.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> 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 <mingo@kernel.org>
> ---
>  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;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap
  2017-10-24 12:47 [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap Baoquan He
  2017-10-24 13:29 ` Ingo Molnar
@ 2017-10-26  6:33 ` kbuild test robot
  2017-10-26  6:58   ` Baoquan He
  1 sibling, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2017-10-26  6:33 UTC (permalink / raw)
  To: Baoquan He; +Cc: kbuild-all, linux-kernel, akpm, x86, Baoquan He

[-- Attachment #1: Type: text/plain, Size: 6452 bytes --]

Hi Baoquan,

[auto build test ERROR on tip/x86/core]
[also build test ERROR on v4.14-rc6 next-20171018]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Baoquan-He/x86-mm-64-Rename-the-argument-size-as-nr_pages-in-register_page_bootmem_memmap/20171026-125956
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   arch/x86//mm/init_64.c: In function 'register_page_bootmem_memmap':
>> arch/x86//mm/init_64.c:1341:15: error: 'nr_pages' redeclared as different kind of symbol
     unsigned int nr_pages;
                  ^~~~~~~~
   arch/x86//mm/init_64.c:1332:46: note: previous definition of 'nr_pages' was here
          struct page *start_page, unsigned long nr_pages)
                                                 ^~~~~~~~

vim +/nr_pages +1341 arch/x86//mm/init_64.c

c2b91e2ee Yinghai Lu         2008-04-12  1329  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1330  #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HAVE_BOOTMEM_INFO_NODE)
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1331  void register_page_bootmem_memmap(unsigned long section_nr,
b5f7b7e8b Baoquan He         2017-10-24  1332  				  struct page *start_page, unsigned long nr_pages)
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1333  {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1334  	unsigned long addr = (unsigned long)start_page;
b5f7b7e8b Baoquan He         2017-10-24  1335  	unsigned long end = (unsigned long)(start_page + nr_pages);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1336  	unsigned long next;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1337  	pgd_t *pgd;
f2a6a7050 Kirill A. Shutemov 2017-03-17  1338  	p4d_t *p4d;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1339  	pud_t *pud;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1340  	pmd_t *pmd;
46723bfa5 Yasuaki Ishimatsu  2013-02-22 @1341  	unsigned int nr_pages;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1342  	struct page *page;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1343  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1344  	for (; addr < end; addr = next) {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1345  		pte_t *pte = NULL;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1346  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1347  		pgd = pgd_offset_k(addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1348  		if (pgd_none(*pgd)) {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1349  			next = (addr + PAGE_SIZE) & PAGE_MASK;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1350  			continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1351  		}
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1352  		get_page_bootmem(section_nr, pgd_page(*pgd), MIX_SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1353  
f2a6a7050 Kirill A. Shutemov 2017-03-17  1354  		p4d = p4d_offset(pgd, addr);
f2a6a7050 Kirill A. Shutemov 2017-03-17  1355  		if (p4d_none(*p4d)) {
f2a6a7050 Kirill A. Shutemov 2017-03-17  1356  			next = (addr + PAGE_SIZE) & PAGE_MASK;
f2a6a7050 Kirill A. Shutemov 2017-03-17  1357  			continue;
f2a6a7050 Kirill A. Shutemov 2017-03-17  1358  		}
f2a6a7050 Kirill A. Shutemov 2017-03-17  1359  		get_page_bootmem(section_nr, p4d_page(*p4d), MIX_SECTION_INFO);
f2a6a7050 Kirill A. Shutemov 2017-03-17  1360  
f2a6a7050 Kirill A. Shutemov 2017-03-17  1361  		pud = pud_offset(p4d, addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1362  		if (pud_none(*pud)) {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1363  			next = (addr + PAGE_SIZE) & PAGE_MASK;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1364  			continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1365  		}
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1366  		get_page_bootmem(section_nr, pud_page(*pud), MIX_SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1367  
16bf92261 Borislav Petkov    2016-03-29  1368  		if (!boot_cpu_has(X86_FEATURE_PSE)) {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1369  			next = (addr + PAGE_SIZE) & PAGE_MASK;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1370  			pmd = pmd_offset(pud, addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1371  			if (pmd_none(*pmd))
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1372  				continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1373  			get_page_bootmem(section_nr, pmd_page(*pmd),
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1374  					 MIX_SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1375  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1376  			pte = pte_offset_kernel(pmd, addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1377  			if (pte_none(*pte))
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1378  				continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1379  			get_page_bootmem(section_nr, pte_page(*pte),
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1380  					 SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1381  		} else {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1382  			next = pmd_addr_end(addr, end);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1383  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1384  			pmd = pmd_offset(pud, addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1385  			if (pmd_none(*pmd))
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1386  				continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1387  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1388  			nr_pages = 1 << (get_order(PMD_SIZE));
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1389  			page = pmd_page(*pmd);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1390  			while (nr_pages--)
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1391  				get_page_bootmem(section_nr, page++,
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1392  						 SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1393  		}
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1394  	}
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1395  }
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1396  #endif
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1397  

:::::: The code at line 1341 was first introduced by commit
:::::: 46723bfa540f0a1e494476a1734d03626a0bd1e0 memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

:::::: TO: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59282 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap
  2017-10-26  6:33 ` [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap kbuild test robot
@ 2017-10-26  6:58   ` Baoquan He
  0 siblings, 0 replies; 7+ messages in thread
From: Baoquan He @ 2017-10-26  6:58 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all, linux-kernel, akpm, x86

On 10/26/17 at 02:33pm, kbuild test robot wrote:
> Hi Baoquan,
> 
> [auto build test ERROR on tip/x86/core]
> [also build test ERROR on v4.14-rc6 next-20171018]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Baoquan-He/x86-mm-64-Rename-the-argument-size-as-nr_pages-in-register_page_bootmem_memmap/20171026-125956
> config: x86_64-allyesconfig (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    arch/x86//mm/init_64.c: In function 'register_page_bootmem_memmap':
> >> arch/x86//mm/init_64.c:1341:15: error: 'nr_pages' redeclared as different kind of symbol
>      unsigned int nr_pages;
>                   ^~~~~~~~
>    arch/x86//mm/init_64.c:1332:46: note: previous definition of 'nr_pages' was here
>           struct page *start_page, unsigned long nr_pages)

Thanks for telling, this patch is incomplete. I have posted v2 and will
post v3 per Ingo's comments. So NACK this v1 post.

>                                                  ^~~~~~~~
> 
> vim +/nr_pages +1341 arch/x86//mm/init_64.c
> 
> c2b91e2ee Yinghai Lu         2008-04-12  1329  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1330  #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HAVE_BOOTMEM_INFO_NODE)
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1331  void register_page_bootmem_memmap(unsigned long section_nr,
> b5f7b7e8b Baoquan He         2017-10-24  1332  				  struct page *start_page, unsigned long nr_pages)
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1333  {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1334  	unsigned long addr = (unsigned long)start_page;
> b5f7b7e8b Baoquan He         2017-10-24  1335  	unsigned long end = (unsigned long)(start_page + nr_pages);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1336  	unsigned long next;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1337  	pgd_t *pgd;
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1338  	p4d_t *p4d;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1339  	pud_t *pud;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1340  	pmd_t *pmd;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22 @1341  	unsigned int nr_pages;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1342  	struct page *page;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1343  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1344  	for (; addr < end; addr = next) {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1345  		pte_t *pte = NULL;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1346  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1347  		pgd = pgd_offset_k(addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1348  		if (pgd_none(*pgd)) {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1349  			next = (addr + PAGE_SIZE) & PAGE_MASK;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1350  			continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1351  		}
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1352  		get_page_bootmem(section_nr, pgd_page(*pgd), MIX_SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1353  
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1354  		p4d = p4d_offset(pgd, addr);
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1355  		if (p4d_none(*p4d)) {
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1356  			next = (addr + PAGE_SIZE) & PAGE_MASK;
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1357  			continue;
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1358  		}
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1359  		get_page_bootmem(section_nr, p4d_page(*p4d), MIX_SECTION_INFO);
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1360  
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1361  		pud = pud_offset(p4d, addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1362  		if (pud_none(*pud)) {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1363  			next = (addr + PAGE_SIZE) & PAGE_MASK;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1364  			continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1365  		}
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1366  		get_page_bootmem(section_nr, pud_page(*pud), MIX_SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1367  
> 16bf92261 Borislav Petkov    2016-03-29  1368  		if (!boot_cpu_has(X86_FEATURE_PSE)) {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1369  			next = (addr + PAGE_SIZE) & PAGE_MASK;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1370  			pmd = pmd_offset(pud, addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1371  			if (pmd_none(*pmd))
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1372  				continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1373  			get_page_bootmem(section_nr, pmd_page(*pmd),
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1374  					 MIX_SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1375  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1376  			pte = pte_offset_kernel(pmd, addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1377  			if (pte_none(*pte))
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1378  				continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1379  			get_page_bootmem(section_nr, pte_page(*pte),
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1380  					 SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1381  		} else {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1382  			next = pmd_addr_end(addr, end);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1383  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1384  			pmd = pmd_offset(pud, addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1385  			if (pmd_none(*pmd))
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1386  				continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1387  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1388  			nr_pages = 1 << (get_order(PMD_SIZE));
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1389  			page = pmd_page(*pmd);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1390  			while (nr_pages--)
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1391  				get_page_bootmem(section_nr, page++,
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1392  						 SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1393  		}
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1394  	}
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1395  }
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1396  #endif
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1397  
> 
> :::::: The code at line 1341 was first introduced by commit
> :::::: 46723bfa540f0a1e494476a1734d03626a0bd1e0 memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap
> 
> :::::: TO: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
> :::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages'
  2017-10-24 13:29 ` Ingo Molnar
  2017-10-24 13:34   ` Baoquan He
@ 2017-10-27 15:51   ` kbuild test robot
  2017-10-27 23:45     ` Baoquan He
  1 sibling, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2017-10-27 15:51 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: kbuild-all, Baoquan He, linux-kernel, akpm, x86

[-- Attachment #1: Type: text/plain, Size: 6488 bytes --]

Hi Ingo,

Thank you for the patch! Yet we hit a small issue.
[auto build test ERROR on tip/x86/core]
[also build test ERROR on v4.14-rc6 next-20171018]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Ingo-Molnar/x86-mm-64-Rename-the-register_page_bootmem_memmap-size-parameter-to-nr_pages/20171027-181456
config: x86_64-kexec (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   arch/x86/mm/init_64.c: In function 'register_page_bootmem_memmap':
>> arch/x86/mm/init_64.c:1341:15: error: 'nr_pages' redeclared as different kind of symbol
     unsigned int nr_pages;
                  ^~~~~~~~
   arch/x86/mm/init_64.c:1332:46: note: previous definition of 'nr_pages' was here
          struct page *start_page, unsigned long nr_pages)
                                                 ^~~~~~~~

vim +/nr_pages +1341 arch/x86/mm/init_64.c

c2b91e2ee Yinghai Lu         2008-04-12  1329  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1330  #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HAVE_BOOTMEM_INFO_NODE)
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1331  void register_page_bootmem_memmap(unsigned long section_nr,
56f1692b6 Ingo Molnar        2017-10-24  1332  				  struct page *start_page, unsigned long nr_pages)
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1333  {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1334  	unsigned long addr = (unsigned long)start_page;
56f1692b6 Ingo Molnar        2017-10-24  1335  	unsigned long end = (unsigned long)(start_page + nr_pages);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1336  	unsigned long next;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1337  	pgd_t *pgd;
f2a6a7050 Kirill A. Shutemov 2017-03-17  1338  	p4d_t *p4d;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1339  	pud_t *pud;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1340  	pmd_t *pmd;
46723bfa5 Yasuaki Ishimatsu  2013-02-22 @1341  	unsigned int nr_pages;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1342  	struct page *page;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1343  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1344  	for (; addr < end; addr = next) {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1345  		pte_t *pte = NULL;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1346  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1347  		pgd = pgd_offset_k(addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1348  		if (pgd_none(*pgd)) {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1349  			next = (addr + PAGE_SIZE) & PAGE_MASK;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1350  			continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1351  		}
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1352  		get_page_bootmem(section_nr, pgd_page(*pgd), MIX_SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1353  
f2a6a7050 Kirill A. Shutemov 2017-03-17  1354  		p4d = p4d_offset(pgd, addr);
f2a6a7050 Kirill A. Shutemov 2017-03-17  1355  		if (p4d_none(*p4d)) {
f2a6a7050 Kirill A. Shutemov 2017-03-17  1356  			next = (addr + PAGE_SIZE) & PAGE_MASK;
f2a6a7050 Kirill A. Shutemov 2017-03-17  1357  			continue;
f2a6a7050 Kirill A. Shutemov 2017-03-17  1358  		}
f2a6a7050 Kirill A. Shutemov 2017-03-17  1359  		get_page_bootmem(section_nr, p4d_page(*p4d), MIX_SECTION_INFO);
f2a6a7050 Kirill A. Shutemov 2017-03-17  1360  
f2a6a7050 Kirill A. Shutemov 2017-03-17  1361  		pud = pud_offset(p4d, addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1362  		if (pud_none(*pud)) {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1363  			next = (addr + PAGE_SIZE) & PAGE_MASK;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1364  			continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1365  		}
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1366  		get_page_bootmem(section_nr, pud_page(*pud), MIX_SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1367  
16bf92261 Borislav Petkov    2016-03-29  1368  		if (!boot_cpu_has(X86_FEATURE_PSE)) {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1369  			next = (addr + PAGE_SIZE) & PAGE_MASK;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1370  			pmd = pmd_offset(pud, addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1371  			if (pmd_none(*pmd))
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1372  				continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1373  			get_page_bootmem(section_nr, pmd_page(*pmd),
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1374  					 MIX_SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1375  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1376  			pte = pte_offset_kernel(pmd, addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1377  			if (pte_none(*pte))
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1378  				continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1379  			get_page_bootmem(section_nr, pte_page(*pte),
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1380  					 SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1381  		} else {
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1382  			next = pmd_addr_end(addr, end);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1383  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1384  			pmd = pmd_offset(pud, addr);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1385  			if (pmd_none(*pmd))
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1386  				continue;
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1387  
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1388  			nr_pages = 1 << (get_order(PMD_SIZE));
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1389  			page = pmd_page(*pmd);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1390  			while (nr_pages--)
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1391  				get_page_bootmem(section_nr, page++,
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1392  						 SECTION_INFO);
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1393  		}
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1394  	}
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1395  }
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1396  #endif
46723bfa5 Yasuaki Ishimatsu  2013-02-22  1397  

:::::: The code at line 1341 was first introduced by commit
:::::: 46723bfa540f0a1e494476a1734d03626a0bd1e0 memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

:::::: TO: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25601 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages'
  2017-10-27 15:51   ` [PATCH] x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages' kbuild test robot
@ 2017-10-27 23:45     ` Baoquan He
  0 siblings, 0 replies; 7+ messages in thread
From: Baoquan He @ 2017-10-27 23:45 UTC (permalink / raw)
  To: kbuild test robot; +Cc: Ingo Molnar, kbuild-all, linux-kernel, akpm, x86

Hi,

On 10/27/17 at 11:51pm, kbuild test robot wrote:
> Hi Ingo,
> 
> Thank you for the patch! Yet we hit a small issue.
> [auto build test ERROR on tip/x86/core]
> [also build test ERROR on v4.14-rc6 next-20171018]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Ingo-Molnar/x86-mm-64-Rename-the-register_page_bootmem_memmap-size-parameter-to-nr_pages/20171027-181456
> config: x86_64-kexec (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    arch/x86/mm/init_64.c: In function 'register_page_bootmem_memmap':
> >> arch/x86/mm/init_64.c:1341:15: error: 'nr_pages' redeclared as different kind of symbol
>      unsigned int nr_pages;
>                   ^~~~~~~~
>    arch/x86/mm/init_64.c:1332:46: note: previous definition of 'nr_pages' was here
>           struct page *start_page, unsigned long nr_pages)
>                                                  ^~~~~~~~
The code change is incomplete in this thread, Ingo helped rewrite the
patch log in the suggested patch. I catched this error too when rebuilt,
will post v3. Please drop this one.

Thanks
Baoquan

> 
> vim +/nr_pages +1341 arch/x86/mm/init_64.c
> 
> c2b91e2ee Yinghai Lu         2008-04-12  1329  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1330  #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HAVE_BOOTMEM_INFO_NODE)
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1331  void register_page_bootmem_memmap(unsigned long section_nr,
> 56f1692b6 Ingo Molnar        2017-10-24  1332  				  struct page *start_page, unsigned long nr_pages)
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1333  {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1334  	unsigned long addr = (unsigned long)start_page;
> 56f1692b6 Ingo Molnar        2017-10-24  1335  	unsigned long end = (unsigned long)(start_page + nr_pages);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1336  	unsigned long next;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1337  	pgd_t *pgd;
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1338  	p4d_t *p4d;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1339  	pud_t *pud;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1340  	pmd_t *pmd;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22 @1341  	unsigned int nr_pages;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1342  	struct page *page;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1343  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1344  	for (; addr < end; addr = next) {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1345  		pte_t *pte = NULL;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1346  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1347  		pgd = pgd_offset_k(addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1348  		if (pgd_none(*pgd)) {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1349  			next = (addr + PAGE_SIZE) & PAGE_MASK;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1350  			continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1351  		}
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1352  		get_page_bootmem(section_nr, pgd_page(*pgd), MIX_SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1353  
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1354  		p4d = p4d_offset(pgd, addr);
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1355  		if (p4d_none(*p4d)) {
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1356  			next = (addr + PAGE_SIZE) & PAGE_MASK;
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1357  			continue;
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1358  		}
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1359  		get_page_bootmem(section_nr, p4d_page(*p4d), MIX_SECTION_INFO);
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1360  
> f2a6a7050 Kirill A. Shutemov 2017-03-17  1361  		pud = pud_offset(p4d, addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1362  		if (pud_none(*pud)) {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1363  			next = (addr + PAGE_SIZE) & PAGE_MASK;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1364  			continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1365  		}
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1366  		get_page_bootmem(section_nr, pud_page(*pud), MIX_SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1367  
> 16bf92261 Borislav Petkov    2016-03-29  1368  		if (!boot_cpu_has(X86_FEATURE_PSE)) {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1369  			next = (addr + PAGE_SIZE) & PAGE_MASK;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1370  			pmd = pmd_offset(pud, addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1371  			if (pmd_none(*pmd))
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1372  				continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1373  			get_page_bootmem(section_nr, pmd_page(*pmd),
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1374  					 MIX_SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1375  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1376  			pte = pte_offset_kernel(pmd, addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1377  			if (pte_none(*pte))
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1378  				continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1379  			get_page_bootmem(section_nr, pte_page(*pte),
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1380  					 SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1381  		} else {
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1382  			next = pmd_addr_end(addr, end);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1383  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1384  			pmd = pmd_offset(pud, addr);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1385  			if (pmd_none(*pmd))
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1386  				continue;
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1387  
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1388  			nr_pages = 1 << (get_order(PMD_SIZE));
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1389  			page = pmd_page(*pmd);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1390  			while (nr_pages--)
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1391  				get_page_bootmem(section_nr, page++,
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1392  						 SECTION_INFO);
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1393  		}
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1394  	}
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1395  }
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1396  #endif
> 46723bfa5 Yasuaki Ishimatsu  2013-02-22  1397  
> 
> :::::: The code at line 1341 was first introduced by commit
> :::::: 46723bfa540f0a1e494476a1734d03626a0bd1e0 memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap
> 
> :::::: TO: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
> :::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-10-27 23:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-24 12:47 [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap Baoquan He
2017-10-24 13:29 ` Ingo Molnar
2017-10-24 13:34   ` Baoquan He
2017-10-27 15:51   ` [PATCH] x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages' kbuild test robot
2017-10-27 23:45     ` Baoquan He
2017-10-26  6:33 ` [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap kbuild test robot
2017-10-26  6:58   ` Baoquan He

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.