[PATCH v2 2/3] x86/cpu/intel: Simplify F00F bug notice using pr_notice_once()
From: Sohil Mehta
Date: Thu May 14 2026 - 20:33:06 EST
The F00F bug workaround goes through a lot of effort to print the kernel
notice exactly once. Replace it with pr_notice_once(), which precisely
does that.
Signed-off-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>
---
v2:
- New patch
---
arch/x86/kernel/cpu/intel.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index e957c5a1501c..84a652a7dd41 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -396,13 +396,8 @@ static void intel_workarounds(struct cpuinfo_x86 *c)
* The Quark is also family 5, but does not have the same bug.
*/
if (c->x86_vfm >= INTEL_FAM5_START && c->x86_vfm < INTEL_QUARK_X1000) {
- static int f00f_workaround_enabled;
-
set_cpu_bug(c, X86_BUG_F00F);
- if (!f00f_workaround_enabled) {
- pr_notice("Intel Pentium with F0 0F bug - workaround enabled.\n");
- f00f_workaround_enabled = 1;
- }
+ pr_notice_once("Intel Pentium with F0 0F bug - workaround enabled.\n");
}
#endif
--
2.43.0