Re: tickle nmi watchdog whilst doing serial writes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andi Kleen wrote:
Russell King <[email protected]> writes:


On Sun, May 15, 2005 at 01:38:02PM +0200, Andi Kleen wrote:

Dave Jones <[email protected]> writes:


#include <asm/io.h>
#include <asm/irq.h>
@@ -2099,8 +2100,10 @@ static inline void wait_for_xmitr(struct
	if (up->port.flags & UPF_CONS_FLOW) {
		tmout = 1000000;
		while (--tmout &&
-		       ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0))
+		       ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0)) {
			udelay(1);
+			touch_nmi_watchdog();

Note that touch_nmi_watchdog is not exported on i386 - Linus vetoed
that some time ago. The real fix of course is to use schedule_timeout(),
but that might break printk() with interrupts off :/

Not to mention printk() from atomic contexts and panic().  No,
schedule_timeout() is _not_ a "real fix" but a kludge.

Um... I would think the real fix is to set the UART up to generate the modem status interrupt and eliminate the pole loop. Why can't this be done? I, for one, don't want my cpu looping in the serial driver, even more so with the interrupt system off. This, in my mind, is a real bug in the serial driver and should be so handled.


--
George Anzinger   [email protected]
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux