aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kernel/nmi.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-20 02:16:23 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-20 02:16:23 -0500
commit5b2ffed906a3ebd4e52a5bbef06b99a517c53e4b (patch)
tree2f900f89d93db6b0822d8bdf4f49851c581c12a6 /arch/x86_64/kernel/nmi.c
parentf1b318793dcd2d9ff6b5ac06e7762098fa079cee (diff)
parentbd71c2b17468a2531fb4c81ec1d73520845e97e1 (diff)
Merge branch 'master'
Diffstat (limited to 'arch/x86_64/kernel/nmi.c')
-rw-r--r--arch/x86_64/kernel/nmi.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
index 8be407a1f62..5bf17e41cd2 100644
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -236,6 +236,7 @@ static void enable_lapic_nmi_watchdog(void)
{
if (nmi_active < 0) {
nmi_watchdog = NMI_LOCAL_APIC;
+ touch_nmi_watchdog();
setup_apic_nmi_watchdog();
}
}
@@ -456,15 +457,17 @@ static DEFINE_PER_CPU(int, nmi_touch);
void touch_nmi_watchdog (void)
{
- int i;
+ if (nmi_watchdog > 0) {
+ unsigned cpu;
- /*
- * Tell other CPUs to reset their alert counters. We cannot
- * do it ourselves because the alert count increase is not
- * atomic.
- */
- for (i = 0; i < NR_CPUS; i++)
- per_cpu(nmi_touch, i) = 1;
+ /*
+ * Tell other CPUs to reset their alert counters. We cannot
+ * do it ourselves because the alert count increase is not
+ * atomic.
+ */
+ for_each_present_cpu (cpu)
+ per_cpu(nmi_touch, cpu) = 1;
+ }
touch_softlockup_watchdog();
}