aboutsummaryrefslogtreecommitdiffstats
path: root/arch/metag
diff options
context:
space:
mode:
authorJiang Liu <liuj97@gmail.com>2013-07-03 18:04:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:07:38 -0400
commit5ad62f24ba22543a3b35b4f28fafd80e55eda269 (patch)
tree67036b0eed044b8f3a8c95ae068159fe4dcc42bb /arch/metag
parentb69a9787b1dfb2e5055fb4e0fea71f9e16c7ea01 (diff)
mm/metag: prepare for killing free_all_bootmem_node()
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Cc: James Hogan <james.hogan@imgtec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/metag')
-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)