diff options
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r-- | arch/arm/mm/init.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 83db12a68d56..0ed29bfeba1c 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -86,9 +86,6 @@ void show_mem(void) | |||
86 | printk("Mem-info:\n"); | 86 | printk("Mem-info:\n"); |
87 | show_free_areas(); | 87 | show_free_areas(); |
88 | for_each_online_node(node) { | 88 | for_each_online_node(node) { |
89 | pg_data_t *n = NODE_DATA(node); | ||
90 | struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn; | ||
91 | |||
92 | for_each_nodebank (i,mi,node) { | 89 | for_each_nodebank (i,mi,node) { |
93 | struct membank *bank = &mi->bank[i]; | 90 | struct membank *bank = &mi->bank[i]; |
94 | unsigned int pfn1, pfn2; | 91 | unsigned int pfn1, pfn2; |
@@ -97,8 +94,8 @@ void show_mem(void) | |||
97 | pfn1 = bank_pfn_start(bank); | 94 | pfn1 = bank_pfn_start(bank); |
98 | pfn2 = bank_pfn_end(bank); | 95 | pfn2 = bank_pfn_end(bank); |
99 | 96 | ||
100 | page = map + pfn1; | 97 | page = pfn_to_page(pfn1); |
101 | end = map + pfn2; | 98 | end = pfn_to_page(pfn2 - 1) + 1; |
102 | 99 | ||
103 | do { | 100 | do { |
104 | total++; | 101 | total++; |
@@ -603,9 +600,6 @@ void __init mem_init(void) | |||
603 | reserved_pages = free_pages = 0; | 600 | reserved_pages = free_pages = 0; |
604 | 601 | ||
605 | for_each_online_node(node) { | 602 | for_each_online_node(node) { |
606 | pg_data_t *n = NODE_DATA(node); | ||
607 | struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn; | ||
608 | |||
609 | for_each_nodebank(i, &meminfo, node) { | 603 | for_each_nodebank(i, &meminfo, node) { |
610 | struct membank *bank = &meminfo.bank[i]; | 604 | struct membank *bank = &meminfo.bank[i]; |
611 | unsigned int pfn1, pfn2; | 605 | unsigned int pfn1, pfn2; |
@@ -614,8 +608,8 @@ void __init mem_init(void) | |||
614 | pfn1 = bank_pfn_start(bank); | 608 | pfn1 = bank_pfn_start(bank); |
615 | pfn2 = bank_pfn_end(bank); | 609 | pfn2 = bank_pfn_end(bank); |
616 | 610 | ||
617 | page = map + pfn1; | 611 | page = pfn_to_page(pfn1); |
618 | end = map + pfn2; | 612 | end = pfn_to_page(pfn2 - 1) + 1; |
619 | 613 | ||
620 | do { | 614 | do { |
621 | if (PageReserved(page)) | 615 | if (PageReserved(page)) |