Commit 5ad62f24 authored by Jiang Liu's avatar Jiang Liu Committed by Linus Torvalds

mm/metag: prepare for killing free_all_bootmem_node()

Prepare for killing free_all_bootmem_node() by using free_all_bootmem().
Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
Cc: James Hogan <james.hogan@imgtec.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b69a9787
...@@ -376,31 +376,21 @@ void __init paging_init(unsigned long mem_end) ...@@ -376,31 +376,21 @@ void __init paging_init(unsigned long mem_end)
void __init mem_init(void) void __init mem_init(void)
{ {
int nid;
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
unsigned long tmp; unsigned long tmp;
/* /*
* Explicitly reset zone->managed_pages because highmem pages are * Explicitly reset zone->managed_pages because highmem pages are
* freed before calling free_all_bootmem_node(); * freed before calling free_all_bootmem();
*/ */
reset_all_zones_managed_pages(); reset_all_zones_managed_pages();
for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) for (tmp = highstart_pfn; tmp < highend_pfn; tmp++)
free_highmem_page(pfn_to_page(tmp)); free_highmem_page(pfn_to_page(tmp));
#endif /* CONFIG_HIGHMEM */ #endif /* CONFIG_HIGHMEM */
for_each_online_node(nid) { free_all_bootmem();
pg_data_t *pgdat = NODE_DATA(nid);
if (pgdat->node_spanned_pages)
free_all_bootmem_node(pgdat);
}
mem_init_print_info(NULL); mem_init_print_info(NULL);
show_mem(0); show_mem(0);
return;
} }
void free_initmem(void) void free_initmem(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment