aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r--arch/arm/mm/init.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 105d1d4f420b..1ba6cf5a2c02 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -16,6 +16,7 @@
16#include <linux/nodemask.h> 16#include <linux/nodemask.h>
17#include <linux/initrd.h> 17#include <linux/initrd.h>
18#include <linux/highmem.h> 18#include <linux/highmem.h>
19#include <linux/gfp.h>
19 20
20#include <asm/mach-types.h> 21#include <asm/mach-types.h>
21#include <asm/sections.h> 22#include <asm/sections.h>
@@ -84,9 +85,6 @@ void show_mem(void)
84 printk("Mem-info:\n"); 85 printk("Mem-info:\n");
85 show_free_areas(); 86 show_free_areas();
86 for_each_online_node(node) { 87 for_each_online_node(node) {
87 pg_data_t *n = NODE_DATA(node);
88 struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn;
89
90 for_each_nodebank (i,mi,node) { 88 for_each_nodebank (i,mi,node) {
91 struct membank *bank = &mi->bank[i]; 89 struct membank *bank = &mi->bank[i];
92 unsigned int pfn1, pfn2; 90 unsigned int pfn1, pfn2;
@@ -95,8 +93,8 @@ void show_mem(void)
95 pfn1 = bank_pfn_start(bank); 93 pfn1 = bank_pfn_start(bank);
96 pfn2 = bank_pfn_end(bank); 94 pfn2 = bank_pfn_end(bank);
97 95
98 page = map + pfn1; 96 page = pfn_to_page(pfn1);
99 end = map + pfn2; 97 end = pfn_to_page(pfn2 - 1) + 1;
100 98
101 do { 99 do {
102 total++; 100 total++;
@@ -568,9 +566,6 @@ void __init mem_init(void)
568 reserved_pages = free_pages = 0; 566 reserved_pages = free_pages = 0;
569 567
570 for_each_online_node(node) { 568 for_each_online_node(node) {
571 pg_data_t *n = NODE_DATA(node);
572 struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn;
573
574 for_each_nodebank(i, &meminfo, node) { 569 for_each_nodebank(i, &meminfo, node) {
575 struct membank *bank = &meminfo.bank[i]; 570 struct membank *bank = &meminfo.bank[i];
576 unsigned int pfn1, pfn2; 571 unsigned int pfn1, pfn2;
@@ -579,8 +574,8 @@ void __init mem_init(void)
579 pfn1 = bank_pfn_start(bank); 574 pfn1 = bank_pfn_start(bank);
580 pfn2 = bank_pfn_end(bank); 575 pfn2 = bank_pfn_end(bank);
581 576
582 page = map + pfn1; 577 page = pfn_to_page(pfn1);
583 end = map + pfn2; 578 end = pfn_to_page(pfn2 - 1) + 1;
584 579
585 do { 580 do {
586 if (PageReserved(page)) 581 if (PageReserved(page))