]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/setup.c
Merge tag 'xfs-4.12-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[karo-tx-linux.git] / arch / x86 / kernel / setup.c
index 603a1669a2ecf2ba62f0b24bee93955296a9f97c..f818236950140fa0e3ccfc013e31857676db4f77 100644 (file)
@@ -980,8 +980,6 @@ void __init setup_arch(char **cmdline_p)
         */
        x86_configure_nx();
 
-       simple_udelay_calibration();
-
        parse_early_param();
 
 #ifdef CONFIG_MEMORY_HOTPLUG
@@ -1041,6 +1039,8 @@ void __init setup_arch(char **cmdline_p)
         */
        init_hypervisor_platform();
 
+       simple_udelay_calibration();
+
        x86_init.resources.probe_roms();
 
        /* after parse_early_param, so could debug it */
@@ -1225,6 +1225,21 @@ void __init setup_arch(char **cmdline_p)
 
        kasan_init();
 
+#ifdef CONFIG_X86_32
+       /* sync back kernel address range */
+       clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY,
+                       swapper_pg_dir     + KERNEL_PGD_BOUNDARY,
+                       KERNEL_PGD_PTRS);
+
+       /*
+        * sync back low identity map too.  It is used for example
+        * in the 32-bit EFI stub.
+        */
+       clone_pgd_range(initial_page_table,
+                       swapper_pg_dir     + KERNEL_PGD_BOUNDARY,
+                       min(KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
+#endif
+
        tboot_probe();
 
        map_vsyscall();