diff options
-rw-r--r-- | arch/arm/mm/init.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 8e1edbc6116f..58b90ad4949f 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -444,6 +444,7 @@ static void __init free_unused_memmap(struct meminfo *mi) | |||
444 | void __init mem_init(void) | 444 | void __init mem_init(void) |
445 | { | 445 | { |
446 | unsigned long reserved_pages, free_pages; | 446 | unsigned long reserved_pages, free_pages; |
447 | struct memblock_region *reg; | ||
447 | int i; | 448 | int i; |
448 | #ifdef CONFIG_HAVE_TCM | 449 | #ifdef CONFIG_HAVE_TCM |
449 | /* These pointers are filled in on TCM detection */ | 450 | /* These pointers are filled in on TCM detection */ |
@@ -503,9 +504,11 @@ void __init mem_init(void) | |||
503 | */ | 504 | */ |
504 | printk(KERN_INFO "Memory:"); | 505 | printk(KERN_INFO "Memory:"); |
505 | num_physpages = 0; | 506 | num_physpages = 0; |
506 | for (i = 0; i < meminfo.nr_banks; i++) { | 507 | for_each_memblock(memory, reg) { |
507 | num_physpages += bank_pfn_size(&meminfo.bank[i]); | 508 | unsigned long pages = memblock_region_memory_end_pfn(reg) - |
508 | printk(" %ldMB", bank_phys_size(&meminfo.bank[i]) >> 20); | 509 | memblock_region_memory_base_pfn(reg); |
510 | num_physpages += pages; | ||
511 | printk(" %ldMB", pages >> (20 - PAGE_SHIFT)); | ||
509 | } | 512 | } |
510 | printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT)); | 513 | printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT)); |
511 | 514 | ||