Commit ce7549e1 authored by Jiang Liu's avatar Jiang Liu Committed by Linus Torvalds

mm/AVR32: prepare for killing free_all_bootmem_node()

Prepare for killing free_all_bootmem_node() by using free_all_bootmem()
instead.
Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fccc9987
...@@ -103,23 +103,12 @@ void __init mem_init(void) ...@@ -103,23 +103,12 @@ void __init mem_init(void)
pg_data_t *pgdat; pg_data_t *pgdat;
high_memory = NULL; high_memory = NULL;
for_each_online_pgdat(pgdat)
high_memory = max_t(void *, high_memory,
__va(pgdat_end_pfn(pgdat) << PAGE_SHIFT));
/* this will put all low memory onto the freelists */ set_max_mapnr(MAP_NR(high_memory));
for_each_online_pgdat(pgdat) { free_all_bootmem();
void *node_high_memory;
if (pgdat->node_spanned_pages != 0)
free_all_bootmem_node(pgdat);
node_high_memory = (void *)((pgdat->node_start_pfn
+ pgdat->node_spanned_pages)
<< PAGE_SHIFT);
if (node_high_memory > high_memory)
high_memory = node_high_memory;
}
max_mapnr = MAP_NR(high_memory);
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
......
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