summaryrefslogtreecommitdiffstats
path: root/arch/m32r/mm
diff options
context:
space:
mode:
authorJiang Liu <liuj97@gmail.com>2013-07-03 15:04:26 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 16:07:38 -0700
commitc5c009fbe753393dabc5d67b617c8188f81740a2 (patch)
treedad4ecd2e869dceb8d173b3e8ea4d8c8b563c4cf /arch/m32r/mm
parentb57b63a2ace84d09c6fc270150d0408ddef1efa7 (diff)
downloadlinux-stable-c5c009fbe753393dabc5d67b617c8188f81740a2.tar.gz
linux-stable-c5c009fbe753393dabc5d67b617c8188f81740a2.tar.bz2
linux-stable-c5c009fbe753393dabc5d67b617c8188f81740a2.zip
mm/m32r: 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: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m32r/mm')
-rw-r--r--arch/m32r/mm/init.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c
index a4f8d934e25f..0d4146f644dc 100644
--- a/arch/m32r/mm/init.c
+++ b/arch/m32r/mm/init.c
@@ -111,28 +111,19 @@ void __init paging_init(void)
*======================================================================*/
void __init mem_init(void)
{
- int nid;
#ifndef CONFIG_MMU
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);
+#else
+ high_memory = (void *)__va(PFN_PHYS(MAX_LOW_PFN(0)));
#endif /* CONFIG_MMU */
/* clear the zero-page */
memset(empty_zero_page, 0, PAGE_SIZE);
- /* this will put all low memory onto the freelists */
- for_each_online_node(nid)
- free_all_bootmem_node(NODE_DATA(nid));
-
+ set_max_mapnr(get_num_physpages());
+ free_all_bootmem();
mem_init_print_info(NULL);
}