Merge remote-tracking branch 'tip/sched/arm64' into for-next/core
[linux-2.6-microblaze.git] / arch / arm64 / kernel / cpufeature.c
index 77b2149..b2770d7 100644 (file)
@@ -1587,8 +1587,6 @@ kpti_install_ng_mappings(const struct arm64_cpu_capabilities *__unused)
 
        if (!cpu)
                arm64_use_ng_mappings = true;
-
-       return;
 }
 #else
 static void
@@ -1760,7 +1758,7 @@ static void cpu_has_fwb(const struct arm64_cpu_capabilities *__unused)
        u64 val = read_sysreg_s(SYS_CLIDR_EL1);
 
        /* Check that CLIDR_EL1.LOU{U,IS} are both 0 */
-       WARN_ON(val & (7 << 27 | 7 << 21));
+       WARN_ON(CLIDR_LOUU(val) || CLIDR_LOUIS(val));
 }
 
 #ifdef CONFIG_ARM64_PAN
@@ -1869,6 +1867,9 @@ static void bti_enable(const struct arm64_cpu_capabilities *__unused)
 #ifdef CONFIG_ARM64_MTE
 static void cpu_enable_mte(struct arm64_cpu_capabilities const *cap)
 {
+       sysreg_clear_set(sctlr_el1, 0, SCTLR_ELx_ATA | SCTLR_EL1_ATA0);
+       isb();
+
        /*
         * Clear the tags in the zero page. This needs to be done via the
         * linear map which has the Tagged attribute.