diff options
-rw-r--r-- | arch/m68k/mm/init.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index 6e0a93869ec9..6b4baa6e4d31 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c | |||
@@ -146,14 +146,11 @@ void __init print_memmap(void) | |||
146 | MLK_ROUNDUP(__bss_start, __bss_stop)); | 146 | MLK_ROUNDUP(__bss_start, __bss_stop)); |
147 | } | 147 | } |
148 | 148 | ||
149 | void __init mem_init(void) | 149 | static inline void init_pointer_tables(void) |
150 | { | 150 | { |
151 | #if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE) | ||
151 | int i; | 152 | int i; |
152 | 153 | ||
153 | /* this will put all memory onto the freelists */ | ||
154 | free_all_bootmem(); | ||
155 | |||
156 | #if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE) | ||
157 | /* insert pointer tables allocated so far into the tablelist */ | 154 | /* insert pointer tables allocated so far into the tablelist */ |
158 | init_pointer_table((unsigned long)kernel_pg_dir); | 155 | init_pointer_table((unsigned long)kernel_pg_dir); |
159 | for (i = 0; i < PTRS_PER_PGD; i++) { | 156 | for (i = 0; i < PTRS_PER_PGD; i++) { |
@@ -165,7 +162,13 @@ void __init mem_init(void) | |||
165 | if (zero_pgtable) | 162 | if (zero_pgtable) |
166 | init_pointer_table((unsigned long)zero_pgtable); | 163 | init_pointer_table((unsigned long)zero_pgtable); |
167 | #endif | 164 | #endif |
165 | } | ||
168 | 166 | ||
167 | void __init mem_init(void) | ||
168 | { | ||
169 | /* this will put all memory onto the freelists */ | ||
170 | free_all_bootmem(); | ||
171 | init_pointer_tables(); | ||
169 | mem_init_print_info(NULL); | 172 | mem_init_print_info(NULL); |
170 | print_memmap(); | 173 | print_memmap(); |
171 | } | 174 | } |