aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/avr32/mm/init.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index 0fc04b9323cf..def5391d927a 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -103,23 +103,12 @@ void __init mem_init(void)
103 pg_data_t *pgdat; 103 pg_data_t *pgdat;
104 104
105 high_memory = NULL; 105 high_memory = NULL;
106 for_each_online_pgdat(pgdat)
107 high_memory = max_t(void *, high_memory,
108 __va(pgdat_end_pfn(pgdat) << PAGE_SHIFT));
106 109
107 /* this will put all low memory onto the freelists */ 110 set_max_mapnr(MAP_NR(high_memory));
108 for_each_online_pgdat(pgdat) { 111 free_all_bootmem();
109 void *node_high_memory;
110
111 if (pgdat->node_spanned_pages != 0)
112 free_all_bootmem_node(pgdat);
113
114 node_high_memory = (void *)((pgdat->node_start_pfn
115 + pgdat->node_spanned_pages)
116 << PAGE_SHIFT);
117 if (node_high_memory > high_memory)
118 high_memory = node_high_memory;
119 }
120
121 max_mapnr = MAP_NR(high_memory);
122
123 mem_init_print_info(NULL); 112 mem_init_print_info(NULL);
124} 113}
125 114