Skip to contentSkip to conversation

ARM: spectre-v2: remove Brahma-B53 from hardening

PATCH In review Florian Fainelli 1 participant 2 messages Oct 31, 2019 – Nov 11, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: spectre-v2: remove Brahma-B53 from hardening

From: Doug Berger <[email protected]>

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")
---
 arch/arm/mm/proc-v7-bugs.c | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/mm/proc-v7-bugs.c +3 -0
index 9a07916af8dd..a6554fdb56c5 100644
@@ -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)
Signature · 1 line
2.17.1
#1 lore raw
Quoted 8 lines · Florian Fainelli

From: Doug Berger <[email protected]>

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.

Quoted 7 lines

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")

Submitted:

https://www.armlinux.org.uk/developer/patches/viewpatch.php?id=8937/1

Signature · 1 line
Florian