diff options
Diffstat (limited to 'arch/ppc64/mm/init.c')
-rw-r--r-- | arch/ppc64/mm/init.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c index c02dc9809ca5..b3b1e9c1770a 100644 --- a/arch/ppc64/mm/init.c +++ b/arch/ppc64/mm/init.c | |||
@@ -552,27 +552,18 @@ void __init do_init_bootmem(void) | |||
552 | /* Add all physical memory to the bootmem map, mark each area | 552 | /* Add all physical memory to the bootmem map, mark each area |
553 | * present. | 553 | * present. |
554 | */ | 554 | */ |
555 | for (i=0; i < lmb.memory.cnt; i++) { | 555 | for (i=0; i < lmb.memory.cnt; i++) |
556 | unsigned long base, size; | 556 | free_bootmem(lmb_start_pfn(&lmb.memory, i), |
557 | unsigned long start_pfn, end_pfn; | 557 | lmb_size_bytes(&lmb.memory, i)); |
558 | |||
559 | base = lmb.memory.region[i].base; | ||
560 | size = lmb.memory.region[i].size; | ||
561 | |||
562 | start_pfn = base >> PAGE_SHIFT; | ||
563 | end_pfn = start_pfn + (size >> PAGE_SHIFT); | ||
564 | memory_present(0, start_pfn, end_pfn); | ||
565 | |||
566 | free_bootmem(base, size); | ||
567 | } | ||
568 | 558 | ||
569 | /* reserve the sections we're already using */ | 559 | /* reserve the sections we're already using */ |
570 | for (i=0; i < lmb.reserved.cnt; i++) { | 560 | for (i=0; i < lmb.reserved.cnt; i++) |
571 | unsigned long base = lmb.reserved.region[i].base; | 561 | reserve_bootmem(lmb_start_pfn(&lmb.reserved, i), |
572 | unsigned long size = lmb.reserved.region[i].size; | 562 | lmb_size_bytes(&lmb.reserved, i)); |
573 | 563 | ||
574 | reserve_bootmem(base, size); | 564 | for (i=0; i < lmb.memory.cnt; i++) |
575 | } | 565 | memory_present(0, lmb_start_pfn(&lmb.memory, i), |
566 | lmb_end_pfn(&lmb.memory, i)); | ||
576 | } | 567 | } |
577 | 568 | ||
578 | /* | 569 | /* |