]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: errata: Fix handling of 1418040 with late CPU onlining
authorWill Deacon <will@kernel.org>
Fri, 6 Nov 2020 11:14:26 +0000 (11:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:38:53 +0000 (13:38 +0100)
commit6d4183dfadace80c7d70b2e56ccbac38e31bf237
tree571bdd4d1069d88316487910b8da87b36da64aad
parent0d995094ef9a16d66fec8e506b98a951ced3e00d
arm64: errata: Fix handling of 1418040 with late CPU onlining

[ Upstream commit f969f03888b9438fdb227b6460d99ede5737326d ]

In a surprising turn of events, it transpires that CPU capabilities
configured as ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE are never set as the
result of late-onlining. Therefore our handling of erratum 1418040 does
not get activated if it is not required by any of the boot CPUs, even
though we allow late-onlining of an affected CPU.

In order to get things working again, replace the cpus_have_const_cap()
invocation with an explicit check for the current CPU using
this_cpu_has_cap().

Cc: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Cc: Stephen Boyd <swboyd@chromium.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201106114952.10032-1-will@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/process.c