From: Jeremy S. <js...@mv...> - 2001-08-30 21:34:37
|
I've been having a problem with recent kernels, apparently due to the definition of include/asm-sh/system.h:__save_and_cli(); looks like "volatile" was inadvertently left out, resulting in the occasional demise of the cli due to compiler optimization... [In my case, the netif_rx() reference to __cpu_raise_softirq() expanded to an unprotected set_bit(): a timer interrupt right at that point scheduled the tasklet but lost the softirq; timer_bh would then never run until some other interrupt caused another HI_SOFTIRQ... but I suspect other things could go wrong too.] Any reason NOT to commit the following patch? (It's really just adding volatile; the rest is whitespace ;-) --- system.h~ Tue Jul 31 03:12:05 2001 +++ system.h Thu Aug 30 12:11:54 2001 @@ -136,13 +136,15 @@ { unsigned long flags, __dummy; - __asm__("stc sr, %1\n\t" - "mov %1, %0\n\t" - "or #0xf0, %0\n\t" - "ldc %0, sr\n\t" - "mov %1, %0\n\t" - "and #0xf0, %0" - : "=&z" (flags), "=&r" (__dummy) :/**/: "memory" ); + __asm__ __volatile__ ("stc sr, %1\n\t" + "mov %1, %0\n\t" + "or #0xf0, %0\n\t" + "ldc %0, sr\n\t" + "mov %1, %0\n\t" + "and #0xf0, %0" + : "=&z" (flags), "=&r" (__dummy) + :/**/ + : "memory"); return flags; } |