]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Don't trigger NMI watchdog for panic delay
authorAndrew Morton <akpm@osdl.org>
Thu, 7 Aug 2003 04:14:06 +0000 (21:14 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 7 Aug 2003 04:14:06 +0000 (21:14 -0700)
From: Andi Kleen <ak@muc.de>

In some cases panic can be called with interrupts off.  Don't trigger the
NMI watchdog in this case when a panic= parameter is specified.

kernel/panic.c

index 10cfaa18b4ea21cabf7a56f226ded3cfc4fdd4a3..73c45dee8a02f5c62b17ee9cdf86344f5a8f43c2 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/sysrq.h>
 #include <linux/interrupt.h>
+#include <linux/nmi.h>
 
 asmlinkage void sys_sync(void);        /* it's really int */
 
@@ -71,12 +72,16 @@ NORET_TYPE void panic(const char * fmt, ...)
 
        if (panic_timeout > 0)
        {
+               int i;
                /*
                 * Delay timeout seconds before rebooting the machine. 
                 * We can't use the "normal" timers since we just panicked..
                 */
                printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
-               mdelay(panic_timeout*1000);
+               for (i = 0; i < panic_timeout; i++) {
+                       touch_nmi_watchdog();
+                       mdelay(1000);
+               }
                /*
                 *      Should we run the reboot notifier. For the moment Im
                 *      choosing not too. It might crash, be corrupt or do