From: Shaohua Li Date: Mon, 12 Dec 2005 08:37:02 +0000 (-0800) Subject: [PATCH] x86: fix NMI with CPU hotplug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82584ef75b7c14f22028595b0e8aa904464c5240;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] x86: fix NMI with CPU hotplug With CPU hotplug enabled, NMI watchdog stoped working. It appears the violation is the cpu_online check in nmi handler. local ACPI based NMI watchdog is initialized before we set CPU online for APs. It's quite possible a NMI is fired before we set CPU online, and that's what happens here. Signed-off-by: Shaohua Li Acked-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index c34d1bfc516..f0dffa03fbb 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -650,13 +650,6 @@ fastcall void do_nmi(struct pt_regs * regs, long error_code) cpu = smp_processor_id(); -#ifdef CONFIG_HOTPLUG_CPU - if (!cpu_online(cpu)) { - nmi_exit(); - return; - } -#endif - ++nmi_count(cpu); if (!rcu_dereference(nmi_callback)(regs, cpu))