aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m32r/mm/init.c')
-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)
111 *======================================================================*/ 111 *======================================================================*/
112void __init mem_init(void) 112void __init mem_init(void)
113{ 113{
114 int nid;
115#ifndef CONFIG_MMU 114#ifndef CONFIG_MMU
116 extern unsigned long memory_end; 115 extern unsigned long memory_end;
117#endif
118 116
119#ifndef CONFIG_DISCONTIGMEM
120 max_mapnr = get_num_physpages();
121#endif /* CONFIG_DISCONTIGMEM */
122
123#ifdef CONFIG_MMU
124 high_memory = (void *)__va(PFN_PHYS(MAX_LOW_PFN(0)));
125#else
126 high_memory = (void *)(memory_end & PAGE_MASK); 117 high_memory = (void *)(memory_end & PAGE_MASK);
118#else
119 high_memory = (void *)__va(PFN_PHYS(MAX_LOW_PFN(0)));
127#endif /* CONFIG_MMU */ 120#endif /* CONFIG_MMU */
128 121
129 /* clear the zero-page */ 122 /* clear the zero-page */
130 memset(empty_zero_page, 0, PAGE_SIZE); 123 memset(empty_zero_page, 0, PAGE_SIZE);
131 124
132 /* this will put all low memory onto the freelists */ 125 set_max_mapnr(get_num_physpages());
133 for_each_online_node(nid) 126 free_all_bootmem();
134 free_all_bootmem_node(NODE_DATA(nid));
135
136 mem_init_print_info(NULL); 127 mem_init_print_info(NULL);
137} 128}
138 129