lkml.org 
[lkml]   [2005]   [May]   [15]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: tickle nmi watchdog whilst doing serial writes.
FromAndi Kleen <>
DateSun, 15 May 2005 14:20:14 +0200
Russell King <rmk+lkml@arm.linux.org.uk> writes:

> On Sun, May 15, 2005 at 01:38:02PM +0200, Andi Kleen wrote:
>> Dave Jones <davej@redhat.com> 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.

Then someone needs to convince Linus to export touch_nmi_watchdog
again. 

Or how about checking if interrupts are off here (iirc we have 
a generic function for that now) and then using
a smaller timeout and otherwise schedule_timeout() ?

-Andi
-
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-15 14:24    [from the cache]
©2003-2008