summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-11 09:33:06 +0200
committerIngo Molnar <mingo@elte.hu>2009-05-11 09:33:15 +0200
commit134cbf35c739bf89c51fd975a33a6b87507482c4 (patch)
treec30536dcbb6e99a0f204879bbe5a19bfb27cccf8 /arch/x86/mm/init.c
parent2feceeff1e771850e49f9074307f071964fd9e3e (diff)
parent091bf7624d1c90cec9e578a18529f615213ff847 (diff)
downloadtalos-op-linux-134cbf35c739bf89c51fd975a33a6b87507482c4.tar.gz
talos-op-linux-134cbf35c739bf89c51fd975a33a6b87507482c4.zip
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.c18
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 @@
#include <asm/page.h>
#include <asm/page_types.h>
#include <asm/sections.h>
+#include <asm/setup.h>
#include <asm/system.h>
#include <asm/tlbflush.h>
#include <asm/tlb.h>
@@ -366,8 +367,23 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
#endif
#ifdef CONFIG_X86_64
- if (!after_bootmem)
+ if (!after_bootmem && !start) {
+ pud_t *pud;
+ pmd_t *pmd;
+
mmu_cr4_features = read_cr4();
+
+ /*
+ * _brk_end cannot change anymore, but it and _end may be
+ * located on different 2M pages. cleanup_highmap(), however,
+ * can only consider _end when it runs, so destroy any
+ * mappings beyond _brk_end here.
+ */
+ pud = pud_offset(pgd_offset_k(_brk_end), _brk_end);
+ pmd = pmd_offset(pud, _brk_end - 1);
+ while (++pmd <= pmd_offset(pud, (unsigned long)_end - 1))
+ pmd_clear(pmd);
+ }
#endif
__flush_tlb_all();
OpenPOWER on IntegriCloud