From: Doug Berger Date: Mon, 11 Nov 2019 03:32:04 +0000 (+0100) Subject: ARM: 8937/1: spectre-v2: remove Brahma-B53 from hardening X-Git-Tag: v5.10.7~3684^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ae5061a19b550dfe25397843427ed2ebab16b16;p=platform%2Fkernel%2Flinux-rpi.git ARM: 8937/1: spectre-v2: remove Brahma-B53 from hardening When the default processor handling was added to the function cpu_v7_spectre_init() it only excluded other ARM implemented processor cores. The Broadcom Brahma B53 core is not implemented by ARM so it ended up falling through into the set of processors that attempt to use the ARM_SMCCC_ARCH_WORKAROUND_1 service to harden the branch predictor. Since this workaround is not necessary for the Brahma-B53 this commit explicitly checks for it and prevents it from applying a branch predictor hardening workaround. Fixes: 10115105cb3a ("ARM: spectre-v2: add firmware based hardening") Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Russell King --- diff --git a/arch/arm/mm/proc-v7-bugs.c b/arch/arm/mm/proc-v7-bugs.c index 9a07916..a6554fd 100644 --- a/arch/arm/mm/proc-v7-bugs.c +++ b/arch/arm/mm/proc-v7-bugs.c @@ -65,6 +65,9 @@ static void cpu_v7_spectre_init(void) break; #ifdef CONFIG_ARM_PSCI + case ARM_CPU_PART_BRAHMA_B53: + /* Requires no workaround */ + break; default: /* Other ARM CPUs require no workaround */ if (read_cpuid_implementor() == ARM_CPU_IMP_ARM)