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

mm/m32r: 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: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b57b63a2
...@@ -111,28 +111,19 @@ void __init paging_init(void) ...@@ -111,28 +111,19 @@ void __init paging_init(void)
*======================================================================*/ *======================================================================*/
void __init mem_init(void) void __init mem_init(void)
{ {
int nid;
#ifndef CONFIG_MMU #ifndef CONFIG_MMU
extern unsigned long memory_end; extern unsigned long memory_end;
#endif
#ifndef CONFIG_DISCONTIGMEM
max_mapnr = get_num_physpages();
#endif /* CONFIG_DISCONTIGMEM */
#ifdef CONFIG_MMU
high_memory = (void *)__va(PFN_PHYS(MAX_LOW_PFN(0)));
#else
high_memory = (void *)(memory_end & PAGE_MASK); high_memory = (void *)(memory_end & PAGE_MASK);
#else
high_memory = (void *)__va(PFN_PHYS(MAX_LOW_PFN(0)));
#endif /* CONFIG_MMU */ #endif /* CONFIG_MMU */
/* clear the zero-page */ /* clear the zero-page */
memset(empty_zero_page, 0, PAGE_SIZE); memset(empty_zero_page, 0, PAGE_SIZE);
/* this will put all low memory onto the freelists */ set_max_mapnr(get_num_physpages());
for_each_online_node(nid) free_all_bootmem();
free_all_bootmem_node(NODE_DATA(nid));
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