aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/mm/init.c')
-rw-r--r--arch/avr32/mm/init.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index af6890fd7319..0fc04b9323cf 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -100,26 +100,16 @@ void __init paging_init(void)
100 100
101void __init mem_init(void) 101void __init mem_init(void)
102{ 102{
103 int codesize, reservedpages, datasize, initsize; 103 pg_data_t *pgdat;
104 int nid, i;
105 104
106 reservedpages = 0;
107 high_memory = NULL; 105 high_memory = NULL;
108 106
109 /* this will put all low memory onto the freelists */ 107 /* this will put all low memory onto the freelists */
110 for_each_online_node(nid) { 108 for_each_online_pgdat(pgdat) {
111 pg_data_t *pgdat = NODE_DATA(nid);
112 unsigned long node_pages = 0;
113 void *node_high_memory; 109 void *node_high_memory;
114 110
115 num_physpages += pgdat->node_present_pages;
116
117 if (pgdat->node_spanned_pages != 0) 111 if (pgdat->node_spanned_pages != 0)
118 node_pages = free_all_bootmem_node(pgdat); 112 free_all_bootmem_node(pgdat);
119
120 for (i = 0; i < node_pages; i++)
121 if (PageReserved(pgdat->node_mem_map + i))
122 reservedpages++;
123 113
124 node_high_memory = (void *)((pgdat->node_start_pfn 114 node_high_memory = (void *)((pgdat->node_start_pfn
125 + pgdat->node_spanned_pages) 115 + pgdat->node_spanned_pages)
@@ -130,18 +120,7 @@ void __init mem_init(void)
130 120
131 max_mapnr = MAP_NR(high_memory); 121 max_mapnr = MAP_NR(high_memory);
132 122
133 codesize = (unsigned long)_etext - (unsigned long)_text; 123 mem_init_print_info(NULL);
134 datasize = (unsigned long)_edata - (unsigned long)_data;
135 initsize = (unsigned long)__init_end - (unsigned long)__init_begin;
136
137 printk ("Memory: %luk/%luk available (%dk kernel code, "
138 "%dk reserved, %dk data, %dk init)\n",
139 nr_free_pages() << (PAGE_SHIFT - 10),
140 totalram_pages << (PAGE_SHIFT - 10),
141 codesize >> 10,
142 reservedpages << (PAGE_SHIFT - 10),
143 datasize >> 10,
144 initsize >> 10);
145} 124}
146 125
147void free_initmem(void) 126void free_initmem(void)