arm64: unmap idmap earlier
[cascardo/linux.git] / arch / arm64 / kernel / setup.c
index f6621ba..cfed56f 100644 (file)
@@ -314,6 +314,12 @@ void __init setup_arch(char **cmdline_p)
         */
        local_async_enable();
 
+       /*
+        * TTBR0 is only used for the identity mapping at this stage. Make it
+        * point to zero page to avoid speculatively fetching new entries.
+        */
+       cpu_uninstall_idmap();
+
        efi_init();
        arm64_memblock_init();