From: Andy Whitcroft Tidy up the comments for the ppc64 flat memory support and fix a currently benign double call to memory_present() for the first memory block. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton --- arch/ppc64/mm/init.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff -puN arch/ppc64/mm/init.c~ppc64-sparsemem-memory-model-fix arch/ppc64/mm/init.c --- 25/arch/ppc64/mm/init.c~ppc64-sparsemem-memory-model-fix 2005-05-09 18:10:03.000000000 -0700 +++ 25-akpm/arch/ppc64/mm/init.c 2005-05-09 18:10:03.000000000 -0700 @@ -636,18 +636,19 @@ void __init do_init_bootmem(void) max_pfn = max_low_pfn; - /* add all physical memory to the bootmem map. Also, find the first - * presence of all LMBs*/ + /* Add all physical memory to the bootmem map, mark each area + * present. The first block has already been marked present above. + */ for (i=0; i < lmb.memory.cnt; i++) { unsigned long physbase, size; physbase = lmb.memory.region[i].physbase; size = lmb.memory.region[i].size; - if (i) { /* already created mappings for first LMB */ + if (i) { start_pfn = physbase >> PAGE_SHIFT; end_pfn = start_pfn + (size >> PAGE_SHIFT); + memory_present(0, start_pfn, end_pfn); } - memory_present(0, start_pfn, end_pfn); free_bootmem(physbase, size); } _