From: Aristeu Rozanski <aris@redhat.com> Date: Wed, 20 Aug 2008 13:16:55 -0400 Subject: [x86_64] nmi: update check_nmi_watchdog Message-id: 20080820171648.659511000@redhat.com O-Subject: [RHEL5.3 PATCH 09/25] nmi: update check_nmi_watchdog Bugzilla: 447618 https://bugzilla.redhat.com/show_bug.cgi?id=447618 update check_nmi_watchdog to use per-cpu wd_enabled. upstream: f2802e7f571c05f9a901b1f5bd144aa730ccc88e diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index e5766aa..5c13e7f 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c @@ -180,6 +180,9 @@ int __init check_nmi_watchdog (void) mdelay((20*1000)/nmi_hz); // wait 20 ticks for_each_online_cpu(cpu) { + if (!per_cpu(wd_enabled, cpu)) + continue; + if (cpu_pda(cpu)->__nmi_count - counts[cpu] <= 5) { endflag = 1; printk(KERN_WARNING "WARNING: CPU#%d: NMI " @@ -190,6 +193,7 @@ int __init check_nmi_watchdog (void) if (atomic_dec_and_test(&nmi_watchdog_active)) nmi_active = 0; nmi_perfctr_msr = 0; + per_cpu(wd_enabled, cpu) = 0; kfree(counts); return -1; }