Merge branch 'locking/atomics' into locking/core, to pick up WIP commits
[sfrench/cifs-2.6.git] / arch / arm64 / include / asm / mmu.h
index ac352accb3d98dd00b32f266ae71b3b9b4cb494b..3e8063f4f9d341d127e00fb5e4b86e1322817075 100644 (file)
@@ -60,8 +60,11 @@ static inline bool arm64_kernel_use_ng_mappings(void)
         * later determine that kpti is required, then
         * kpti_install_ng_mappings() will make them non-global.
         */
+       if (arm64_kernel_unmapped_at_el0())
+               return true;
+
        if (!IS_ENABLED(CONFIG_RANDOMIZE_BASE))
-               return arm64_kernel_unmapped_at_el0();
+               return false;
 
        /*
         * KASLR is enabled so we're going to be enabling kpti on non-broken