summaryrefslogtreecommitdiffstats
path: root/arch/x86/realmode
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-15 21:29:54 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-15 21:29:54 +0100
commitbe354f40812314dee2b1e3aa272528c056bb827d (patch)
tree3261b6858619fddf2779499e3f0591a5677e6313 /arch/x86/realmode
parentMerge tag 'disintegrate-x86-20121214' of git://git.infradead.org/users/dhowel... (diff)
downloadlinux-be354f40812314dee2b1e3aa272528c056bb827d.tar.xz
linux-be354f40812314dee2b1e3aa272528c056bb827d.zip
Revert "x86, mm: Include the entire kernel memory map in trampoline_pgd"
This reverts commit 53b87cf088e2ea68d7c59619d0214cc15bb76133. It causes odd bootup problems on x86-64. Markus Trippelsdorf gets a repeatable oops, and I see a non-repeatable oops (or constant stream of messages that scroll off too quickly to read) that seems to go away with this commit reverted. So we don't know exactly what is wrong with the commit, but it's definitely problematic, and worth reverting sooner rather than later. Bisected-by: Markus Trippelsdorf <markus@trippelsdorf.de> Cc: H Peter Anvin <hpa@zytor.com> Cc: Jan Beulich <jbeulich@suse.com> Cc: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/realmode')
-rw-r--r--arch/x86/realmode/init.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c
index 8e6ab6137852..cbca565af5bd 100644
--- a/arch/x86/realmode/init.c
+++ b/arch/x86/realmode/init.c
@@ -78,21 +78,8 @@ void __init setup_real_mode(void)
*trampoline_cr4_features = read_cr4();
trampoline_pgd = (u64 *) __va(real_mode_header->trampoline_pgd);
-
- /*
- * Create an identity mapping for all of physical memory.
- */
- for (i = 0; i <= pgd_index(max_pfn << PAGE_SHIFT); i++) {
- int index = pgd_index(PAGE_OFFSET) + i;
-
- trampoline_pgd[i] = (u64)pgd_val(swapper_pg_dir[index]);
- }
-
- /*
- * Copy the upper-half of the kernel pages tables.
- */
- for (i = pgd_index(PAGE_OFFSET); i < PTRS_PER_PGD; i++)
- trampoline_pgd[i] = (u64)pgd_val(swapper_pg_dir[i]);
+ trampoline_pgd[0] = __pa(level3_ident_pgt) + _KERNPG_TABLE;
+ trampoline_pgd[511] = __pa(level3_kernel_pgt) + _KERNPG_TABLE;
#endif
}