serial: mfd: Add nmi_touch_watchdog() into the console write function
authorFeng Tang <feng.tang@intel.com>
Thu, 15 Nov 2012 08:03:16 +0000 (16:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Nov 2012 01:06:10 +0000 (17:06 -0800)
This is following what 8250 driver is doing in console write function,
to avoid the hardware lockup case.

v2: incldudes the <linux/nmi.h>

Signed-off-by: Feng Tang <feng.tang@intel.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mfd.c

index c4b50af46c444b237b0054f454b27b5c9ec2749f..79fe59b6cc4a6ba4d39e36324dbe8025471f57c8 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/serial_mfd.h>
 #include <linux/dma-mapping.h>
 #include <linux/pci.h>
+#include <linux/nmi.h>
 #include <linux/io.h>
 #include <linux/debugfs.h>
 #include <linux/pm_runtime.h>
@@ -1113,6 +1114,8 @@ serial_hsu_console_write(struct console *co, const char *s, unsigned int count)
        unsigned int ier;
        int locked = 1;
 
+       touch_nmi_watchdog();
+
        local_irq_save(flags);
        if (up->port.sysrq)
                locked = 0;