summaryrefslogtreecommitdiff
path: root/arch/x86/realmode/init.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2013-01-25 00:19:50 +0400
committerH. Peter Anvin <hpa@linux.intel.com>2013-01-30 03:12:30 +0400
commit9735e91e9c29c0d8fe432aef1152e43e50bdb316 (patch)
tree778616a43f3734ee2411a10ca089712e6fc6f9f4 /arch/x86/realmode/init.c
parentfa2bbce985ca97943305cdc81d9626e6810ed7f2 (diff)
downloadlinux-9735e91e9c29c0d8fe432aef1152e43e50bdb316.tar.xz
x86, 64bit, realmode: Use init_level4_pgt to set trampoline_pgd directly
with #PF handler way to set early page table, level3_ident will go away with 64bit native path. So just use entries in init_level4_pgt to set them in trampoline_pgd. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1359058816-7615-10-git-send-email-yinghai@kernel.org Cc: Jarkko Sakkinen <jarkko.sakkinen@intel.com> Acked-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/realmode/init.c')
-rw-r--r--arch/x86/realmode/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c
index c44ea7cf5741..ffee06ac7de9 100644
--- a/arch/x86/realmode/init.c
+++ b/arch/x86/realmode/init.c
@@ -78,8 +78,8 @@ void __init setup_real_mode(void)
*trampoline_cr4_features = read_cr4();
trampoline_pgd = (u64 *) __va(real_mode_header->trampoline_pgd);
- trampoline_pgd[0] = __pa(level3_ident_pgt) + _KERNPG_TABLE;
- trampoline_pgd[511] = __pa(level3_kernel_pgt) + _KERNPG_TABLE;
+ trampoline_pgd[0] = init_level4_pgt[pgd_index(__PAGE_OFFSET)].pgd;
+ trampoline_pgd[511] = init_level4_pgt[511].pgd;
#endif
}