]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Run ARCH_WORKAROUND_1 enabling code on all CPUs
authorMarc Zyngier <maz@kernel.org>
Thu, 16 Jul 2020 16:11:09 +0000 (17:11 +0100)
committerWill Deacon <will@kernel.org>
Mon, 21 Sep 2020 17:31:09 +0000 (18:31 +0100)
commit53f0172224882f79b9db204d6bdb937a698e2d84
tree0c948041974249c493d9b251ca32b4478f6c0ed8
parentb4edfb96c9eeea22379e793f707735981ee4f562
arm64: Run ARCH_WORKAROUND_1 enabling code on all CPUs

Commit b5e63f7dafef ("arm64: Advertise mitigation of Spectre-v2, or lack
thereof") changed the way we deal with ARCH_WORKAROUND_1, by moving most
of the enabling code to the .matches() callback.

This has the unfortunate effect that the workaround gets only enabled on
the first affected CPU, and no other.

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

Fixes: b5e63f7dafef ("arm64: Advertise mitigation of Spectre-v2, or lack thereof")
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