summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/cpufeature.c
diff options
context:
space:
mode:
authorSuzuki K Poulose2018-03-26 16:12:29 +0200
committerWill Deacon2018-03-26 19:01:36 +0200
commit5e91107b06811f0ca147cebbedce53626c9c4443 (patch)
treea9114422e63ff1bb9c390853941b7d8ed4772e8d /arch/arm64/kernel/cpufeature.c
parentarm64: capabilities: Update prototype for enable call back (diff)
downloadkernel-qcow2-linux-5e91107b06811f0ca147cebbedce53626c9c4443.tar.gz
kernel-qcow2-linux-5e91107b06811f0ca147cebbedce53626c9c4443.tar.xz
kernel-qcow2-linux-5e91107b06811f0ca147cebbedce53626c9c4443.zip
arm64: capabilities: Move errata work around check on boot CPU
We trigger CPU errata work around check on the boot CPU from smp_prepare_boot_cpu() to make sure that we run the checks only after the CPU feature infrastructure is initialised. While this is correct, we can also do this from init_cpu_features() which initilises the infrastructure, and is called only on the Boot CPU. This helps to consolidate the CPU capability handling to cpufeature.c. No functional changes. Cc: Will Deacon <will.deacon@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Dave Martin <dave.martin@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/cpufeature.c')
-rw-r--r--arch/arm64/kernel/cpufeature.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index d66f64b81557..b4cbcfe6e00c 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -551,6 +551,12 @@ void __init init_cpu_features(struct cpuinfo_arm64 *info)
init_cpu_ftr_reg(SYS_ZCR_EL1, info->reg_zcr);
sve_init_vq_map();
}
+
+ /*
+ * Run the errata work around checks on the boot CPU, once we have
+ * initialised the cpu feature infrastructure.
+ */
+ update_cpu_errata_workarounds();
}
static void update_cpu_ftr_reg(struct arm64_ftr_reg *reg, u64 new)