]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Run ARCH_WORKAROUND_2 enabling code on all CPUs
authorMarc Zyngier <maz@kernel.org>
Thu, 16 Jul 2020 16:11:10 +0000 (17:11 +0100)
committerWill Deacon <will@kernel.org>
Tue, 29 Sep 2020 15:08:03 +0000 (16:08 +0100)
commita434163c53b025393dac2e3e48581d38c7f0c679
tree1fb641a394750ecc94f49deea972bf3b25f570e0
parent0a253b49322d7b147b40a2d4414b7ef920332c15
arm64: Run ARCH_WORKAROUND_2 enabling code on all CPUs

Commit 6a94715645e5 ("arm64: capabilities: Use linear array for
detection and verification") changed the way we deal with per-CPU errata
by only calling the .matches() callback until one CPU is found to be
affected. At this point, .matches() stop being called, and .cpu_enable()
will be called on all CPUs.

This breaks the ARCH_WORKAROUND_2 handling, as only a single CPU will be
mitigated.

In order to address this, forcefully call the .matches() callback from a
.cpu_enable() callback, which brings us back to the original behaviour.

Fixes: 6a94715645e5 ("arm64: capabilities: Use linear array for detection and verification")
Cc: <stable@vger.kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/cpu_errata.c