Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3990

kernel-2.6.18-194.11.1.el5.src.rpm

From: Aristeu Rozanski <aris@redhat.com>
Date: Wed, 20 Aug 2008 13:17:07 -0400
Subject: [x86] nmi: update check_nmi_watchdog
Message-id: 20080820171651.482272000@redhat.com
O-Subject: [RHEL5.3 PATCH 21/25] nmi: update check_nmi_watchdog on i386
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/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 6028df9..9f8c824 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -162,6 +162,9 @@ static int __init check_nmi_watchdog(void)
 	mdelay((20*1000)/nmi_hz); // wait 20 ticks
 
 	for_each_possible_cpu(cpu) {
+		if (!per_cpu(wd_enabled, cpu))
+			continue;
+
 #ifdef CONFIG_SMP
 		/* Check cpu_callin_map here because that is set
 		   after the timer is started. */
@@ -177,6 +180,7 @@ static int __init check_nmi_watchdog(void)
 				nmi_count(cpu));
 			if (atomic_dec_and_test(&nmi_watchdog_active))
 				nmi_active = 0;
+			per_cpu(wd_enabled, cpu) = 0;
 			kfree(prev_nmi_count);
 			return -1;
 		}