ARM: 8937/1: spectre-v2: remove Brahma-B53 from hardening
authorDoug Berger <opendmb@gmail.com>
Mon, 11 Nov 2019 03:32:04 +0000 (04:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Jan 2020 18:12:59 +0000 (19:12 +0100)
commit18f3ad4b97c7ee40c5c7a496d349e79b6477a814
treefd4a13330268c416713254cf27a73cc7d9baa7bf
parentf490b51a3b3d2b576ec30fcf5e43cb333d62a86a
ARM: 8937/1: spectre-v2: remove Brahma-B53 from hardening

[ Upstream commit 4ae5061a19b550dfe25397843427ed2ebab16b16 ]

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 <opendmb@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mm/proc-v7-bugs.c