diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-12-27 19:48:32 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-05 08:03:45 -0500 |
commit | f005fe12b90c5b9fe180a09209a893e09affa8aa (patch) | |
tree | f5544ae1780be20c0f6fdef51dd37eee4dc8c7af /arch/x86/mm/init.c | |
parent | 1411e0ec3123ae4c4ead6bfc9fe3ee5a3ae5c327 (diff) |
x86-64: Move out cleanup higmap [_brk_end, _end) out of init_memory_mapping()
It is not related to init_memory_mapping(), and init_memory_mapping() is
getting more bigger.
So make it as seperated function and call it from reserve_brk() and that is
point when _brk_end is concluded.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4D1933E0.7090305@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm/init.c')
-rw-r--r-- | arch/x86/mm/init.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index fa6fe756d912..35ee75d9061a 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -270,25 +270,6 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, | |||
270 | load_cr3(swapper_pg_dir); | 270 | load_cr3(swapper_pg_dir); |
271 | #endif | 271 | #endif |
272 | 272 | ||
273 | #ifdef CONFIG_X86_64 | ||
274 | if (!after_bootmem && !start) { | ||
275 | pud_t *pud; | ||
276 | pmd_t *pmd; | ||
277 | |||
278 | mmu_cr4_features = read_cr4(); | ||
279 | |||
280 | /* | ||
281 | * _brk_end cannot change anymore, but it and _end may be | ||
282 | * located on different 2M pages. cleanup_highmap(), however, | ||
283 | * can only consider _end when it runs, so destroy any | ||
284 | * mappings beyond _brk_end here. | ||
285 | */ | ||
286 | pud = pud_offset(pgd_offset_k(_brk_end), _brk_end); | ||
287 | pmd = pmd_offset(pud, _brk_end - 1); | ||
288 | while (++pmd <= pmd_offset(pud, (unsigned long)_end - 1)) | ||
289 | pmd_clear(pmd); | ||
290 | } | ||
291 | #endif | ||
292 | __flush_tlb_all(); | 273 | __flush_tlb_all(); |
293 | 274 | ||
294 | if (!after_bootmem && e820_table_end > e820_table_start) | 275 | if (!after_bootmem && e820_table_end > e820_table_start) |