x86/hotplug: Silence APIC and NMI when CPU is dead
[linux-2.6-microblaze.git] / arch / x86 / kernel / nmi.c
index 4df7705..e676a99 100644 (file)
@@ -512,6 +512,9 @@ NOKPROBE_SYMBOL(is_debug_stack);
 dotraplinkage notrace void
 do_nmi(struct pt_regs *regs, long error_code)
 {
+       if (IS_ENABLED(CONFIG_SMP) && cpu_is_offline(smp_processor_id()))
+               return;
+
        if (this_cpu_read(nmi_state) != NMI_NOT_RUNNING) {
                this_cpu_write(nmi_state, NMI_LATCHED);
                return;