powerpc: minor fix of numa message
PATCH 1/1 powerpc: minor fix of numa message
This is a very minor fix that effects no current system. The NUMA startup message values for 'Top of RAM' and 'Memory hole size' were reported incorrectly if more than one lmb region was added.
A comment in the lmb code states that lmb_analyze() must be called before lmb_phys_mem_size().
---
arch/powerpc/mm/numa.c +6 -2
@@ -483,10 +483,14 @@static void __init setup_nonnuma (void ) { -unsigned long top_of_ram =lmb_end_of_DRAM (); -unsigned long total_ram =lmb_phys_mem_size (); +unsigned long top_of_ram; +unsigned long total_ram;unsigned int i; +lmb_analyze (); + top_of_ram =lmb_end_of_DRAM (); + total_ram =lmb_phys_mem_size (); +printk (KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n" , top_of_ram, total_ram); printk(KERN_DEBUG "Memory hole size: %ldMB\n",
Quoted 6 lines · Geoff Levand
This is a very minor fix that effects no current system. The NUMA startup message values for 'Top of RAM' and 'Memory hole size' were reported incorrectly if more than one lmb region was added.
A comment in the lmb code states that
lmb_analyze()must be called beforelmb_phys_mem_size().
But we've already called it in early_init_devtree()?
cheers
Signature · 8 lines
Michael Ellerman OzLabs, IBM Australia Development Lab wwweb: http://michael.ellerman.id.au phone: +61 2 6212 1183 (tie line 70 21183) We do not inherit the earth from our ancestors, we borrow it from our children. - S.M.A.R.T Person
Quoted 9 lines · Michael Ellerman
Quoted 6 lines · Geoff Levand
This is a very minor fix that effects no current system. The NUMA startup message values for 'Top of RAM' and 'Memory hole size' were reported incorrectly if more than one lmb region was added.
A comment in the lmb code states that
lmb_analyze()must be called beforelmb_phys_mem_size().But we've already called it in
early_init_devtree()?
Yes, of course you are correct. Updated patch follows.
-Geoff
This is a very minor comment change to the powerpc lbm code reflect current usage.
---
arch/powerpc/mm/lmb.c +3 -1
@@ -285,7 +285,9 @@return base; } -/* You must call lmb_analyze() before this. */ +/* You must call lmb_analyze() sometime before this, typcally just after +* adding regions. +*/ unsigned long __init lmb_phys_mem_size (void ) {return lmb.memory.size;