diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-11 03:33:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-11 03:33:15 -0400 |
commit | 134cbf35c739bf89c51fd975a33a6b87507482c4 (patch) | |
tree | c30536dcbb6e99a0f204879bbe5a19bfb27cccf8 /arch/x86/mm/init.c | |
parent | 2feceeff1e771850e49f9074307f071964fd9e3e (diff) | |
parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) |
Merge commit 'v2.6.30-rc5' into x86/mm
Merge reason: this branch was on a .30-rc2 base - sync it up with
all the latest fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/init.c')
-rw-r--r-- | arch/x86/mm/init.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 4d67c33a2e16..95f5ecf2be50 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <asm/page.h> | 7 | #include <asm/page.h> |
8 | #include <asm/page_types.h> | 8 | #include <asm/page_types.h> |
9 | #include <asm/sections.h> | 9 | #include <asm/sections.h> |
10 | #include <asm/setup.h> | ||
10 | #include <asm/system.h> | 11 | #include <asm/system.h> |
11 | #include <asm/tlbflush.h> | 12 | #include <asm/tlbflush.h> |
12 | #include <asm/tlb.h> | 13 | #include <asm/tlb.h> |
@@ -366,8 +367,23 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, | |||
366 | #endif | 367 | #endif |
367 | 368 | ||
368 | #ifdef CONFIG_X86_64 | 369 | #ifdef CONFIG_X86_64 |
369 | if (!after_bootmem) | 370 | if (!after_bootmem && !start) { |
371 | pud_t *pud; | ||
372 | pmd_t *pmd; | ||
373 | |||
370 | mmu_cr4_features = read_cr4(); | 374 | mmu_cr4_features = read_cr4(); |
375 | |||
376 | /* | ||
377 | * _brk_end cannot change anymore, but it and _end may be | ||
378 | * located on different 2M pages. cleanup_highmap(), however, | ||
379 | * can only consider _end when it runs, so destroy any | ||
380 | * mappings beyond _brk_end here. | ||
381 | */ | ||
382 | pud = pud_offset(pgd_offset_k(_brk_end), _brk_end); | ||
383 | pmd = pmd_offset(pud, _brk_end - 1); | ||
384 | while (++pmd <= pmd_offset(pud, (unsigned long)_end - 1)) | ||
385 | pmd_clear(pmd); | ||
386 | } | ||
371 | #endif | 387 | #endif |
372 | __flush_tlb_all(); | 388 | __flush_tlb_all(); |
373 | 389 | ||