[PATCH v3 8/9] x86/nmi: Simplify offline microcode handler invocation
From: Chang S. Bae
Date: Thu Oct 15 2026 - 17:45:42 EST
The microcode loader now uses the stop-machine facility for NMI-based
loading. The offline handler is the only remaining user of the microcode
NMI static key.
But the handler already has internal guarding. Offline CPU doesn't matter
how fast it handles anyway, so remove the static key. Instead, check the
build option.
Signed-off-by: Chang S. Bae <chang.seok.bae@xxxxxxxxx>
---
arch/x86/kernel/nmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 066ac297873e..0227387fff54 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -548,7 +548,7 @@ DEFINE_IDTENTRY_RAW(exc_nmi)
raw_atomic_long_inc(&nsp->idt_calls);
if (arch_cpu_is_offline(smp_processor_id())) {
- if (microcode_nmi_handler_enabled())
+ if (IS_ENABLED(CONFIG_MICROCODE_LATE_LOADING))
microcode_offline_nmi_handler();
return;
}
@@ -710,7 +710,7 @@ DEFINE_FREDENTRY_NMI(exc_nmi)
irqentry_state_t irq_state;
if (arch_cpu_is_offline(smp_processor_id())) {
- if (microcode_nmi_handler_enabled())
+ if (IS_ENABLED(CONFIG_MICROCODE_LATE_LOADING))
microcode_offline_nmi_handler();
return;
}
--
2.53.0