arm64: Add AMPERE1 to the Spectre-BHB affected list
authorD Scott Phillips <scott@os.amperecomputing.com>
Tue, 11 Oct 2022 02:21:40 +0000 (19:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:59:20 +0000 (23:59 +0900)
commit52c2329147cf5d956dcaa3a91c886c550e7bdd39
treeda736e02a6ff994df9cf4a230830b297cd13e6c0
parent5397ea6a08a530685e715d91b5cca09ff7cda166
arm64: Add AMPERE1 to the Spectre-BHB affected list

[ Upstream commit 0e5d5ae837c8ce04d2ddb874ec5f920118bd9d31 ]

Per AmpereOne erratum AC03_CPU_12, "Branch history may allow control of
speculative execution across software contexts," the AMPERE1 core needs the
bhb clearing loop to mitigate Spectre-BHB, with a loop iteration count of
11.

Signed-off-by: D Scott Phillips <scott@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20221011022140.432370-1-scott@os.amperecomputing.com
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/include/asm/cputype.h
arch/arm64/kernel/proton-pack.c