Skip to content

Commit 0609e20

Browse files
ardbiesheuvelRussell King (Oracle)
authored andcommitted
ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle
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: b9baf5c ("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>
1 parent f2906aa commit 0609e20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm/mm/proc-v7-bugs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ static int spectre_bhb_install_workaround(int method)
209209
return SPECTRE_VULNERABLE;
210210

211211
spectre_bhb_method = method;
212-
}
213212

214-
pr_info("CPU%u: Spectre BHB: using %s workaround\n",
215-
smp_processor_id(), spectre_bhb_method_name(method));
213+
pr_info("CPU%u: Spectre BHB: enabling %s workaround for all CPUs\n",
214+
smp_processor_id(), spectre_bhb_method_name(method));
215+
}
216216

217217
return SPECTRE_MITIGATED;
218218
}

0 commit comments

Comments
 (0)