lkml.org 
[lkml]   [2005]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: tickle nmi watchdog whilst doing serial writes.
    Dave Jones <davej@redhat.com> wrote:
    >
    > This was fun. I inserted a music CD with some obnoxious copy-protection
    > on it into the drive, and lots of SCSI errors went zipping over to
    > the serial console. Unfortunatly, the box was also compiling a kernel,
    > playing oggs, and doing a number of other things at the same time,
    > so this happened..
    >
    > NMI Watchdog detected LOCKUP on CPU2CPU 2

    OK.. But calling touch_nmi_watchdog() at 1MHz seems a bit excessive, and
    might perturb the finely-tuned timing in there.

    How's about this?

    --- 25/drivers/serial/8250.c~tickle-nmi-watchdog-whilst-doing-serial-writes 2005-05-13 23:37:57.000000000 -0700
    +++ 25-akpm/drivers/serial/8250.c 2005-05-13 23:41:36.000000000 -0700
    @@ -40,6 +40,7 @@
    #include <linux/serial_core.h>
    #include <linux/serial.h>
    #include <linux/serial_8250.h>
    +#include <linux/nmi.h>

    #include <asm/io.h>
    #include <asm/irq.h>
    @@ -2098,9 +2099,10 @@ static inline void wait_for_xmitr(struct
    /* Wait up to 1s for flow control if necessary */
    if (up->port.flags & UPF_CONS_FLOW) {
    tmout = 1000000;
    - while (--tmout &&
    - ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0))
    + while (!(serial_in(up, UART_MSR) & UART_MSR_CTS) && --tmout)
    udelay(1);
    + if (tmout < 1000000)
    + touch_nmi_watchdog();
    }
    }

    _
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-05-14 08:48    [W:0.022 / U:301.160 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site