watchdog/hpwdt: Disable NMI in Crash Kernel
[sfrench/cifs-2.6.git] / drivers / watchdog / hpwdt.c
index 7d34bcf1c45b4eb012f3fd1f42d832fac7adc672..eeb4df24a7e799978ba745fd8b63209d202accac 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/types.h>
 #include <linux/watchdog.h>
 #include <asm/nmi.h>
+#include <linux/crash_dump.h>
 
 #define HPWDT_VERSION                  "2.0.3"
 #define SECS_TO_TICKS(secs)            ((secs) * 1000 / 128)
@@ -334,6 +335,11 @@ static int hpwdt_init_one(struct pci_dev *dev,
        watchdog_set_nowayout(&hpwdt_dev, nowayout);
        watchdog_init_timeout(&hpwdt_dev, soft_margin, NULL);
 
+       if (is_kdump_kernel()) {
+               pretimeout = 0;
+               kdumptimeout = 0;
+       }
+
        if (pretimeout && hpwdt_dev.timeout <= PRETIMEOUT_SEC) {
                dev_warn(&dev->dev, "timeout <= pretimeout. Setting pretimeout to zero\n");
                pretimeout = 0;