Merge tag 'tty-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[linux-2.6-microblaze.git] / arch / arm64 / kernel / setup.c
index 2a86676..a34890b 100644 (file)
@@ -285,6 +285,13 @@ void __init setup_arch(char **cmdline_p)
 
        *cmdline_p = boot_command_line;
 
+       /*
+        * If know now we are going to need KPTI then use non-global
+        * mappings from the start, avoiding the cost of rewriting
+        * everything later.
+        */
+       arm64_use_ng_mappings = kaslr_requires_kpti();
+
        early_fixmap_init();
        early_ioremap_init();