]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle
authorArd Biesheuvel <ardb@kernel.org>
Tue, 31 May 2022 08:53:42 +0000 (09:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:16 +0000 (21:24 +0200)
commit75de07b93d991ba3a4c3706cf1009e011259f000
treed845b8743759e80a4ea85415f52a18c15343fb29
parent36dff32c6d3a79d4c1520f72605162100ed43110
ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle

[ Upstream commit bd5bd40db1ecda69f946d52f615c809c9dbd8ab1 ]

Jon reports that the Spectre-BHB init code is filling up the kernel log
with spurious notifications about which mitigation has been enabled,
every time any CPU comes out of a low power state.

Given that Spectre-BHB mitigations are system wide, only a single
mitigation can be enabled, and we already print an error if two types of
CPUs coexist in a single system that require different Spectre-BHB
mitigations.

This means that the pr_info() that describes the selected mitigation
does not need to be emitted for each CPU anyway, and so we can simply
emit it only once.

In order to clarify the above in the log message, update it to describe
that the selected mitigation will be enabled on all CPUs, including ones
that are unaffected. If another CPU comes up later that is affected and
requires a different mitigation, we report an error as before.

Fixes: 404a7a266c1a ("ARM: Spectre-BHB workaround")
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mm/proc-v7-bugs.c