aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/metag/mm/init.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/metag/mm/init.c b/arch/metag/mm/init.c
index e0862b7ecd6e..28813f164730 100644
--- a/arch/metag/mm/init.c
+++ b/arch/metag/mm/init.c
@@ -376,31 +376,21 @@ void __init paging_init(unsigned long mem_end)
376 376
377void __init mem_init(void) 377void __init mem_init(void)
378{ 378{
379 int nid;
380
381#ifdef CONFIG_HIGHMEM 379#ifdef CONFIG_HIGHMEM
382 unsigned long tmp; 380 unsigned long tmp;
383 381
384 /* 382 /*
385 * Explicitly reset zone->managed_pages because highmem pages are 383 * Explicitly reset zone->managed_pages because highmem pages are
386 * freed before calling free_all_bootmem_node(); 384 * freed before calling free_all_bootmem();
387 */ 385 */
388 reset_all_zones_managed_pages(); 386 reset_all_zones_managed_pages();
389 for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) 387 for (tmp = highstart_pfn; tmp < highend_pfn; tmp++)
390 free_highmem_page(pfn_to_page(tmp)); 388 free_highmem_page(pfn_to_page(tmp));
391#endif /* CONFIG_HIGHMEM */ 389#endif /* CONFIG_HIGHMEM */
392 390
393 for_each_online_node(nid) { 391 free_all_bootmem();
394 pg_data_t *pgdat = NODE_DATA(nid);
395
396 if (pgdat->node_spanned_pages)
397 free_all_bootmem_node(pgdat);
398 }
399
400 mem_init_print_info(NULL); 392 mem_init_print_info(NULL);
401 show_mem(0); 393 show_mem(0);
402
403 return;
404} 394}
405 395
406void free_initmem(void) 396void free_initmem(void)