Yeah, a simple but ugly patch for this would probably be
--- linux/include/asm-i386/softirq.h-ori Mon Aug 30 22:31:00 1999
+++ linux/include/asm-i386/softirq.h Mon Aug 30 22:31:04 1999
@@ -85,23 +85,33 @@
extern inline void init_bh(int nr, void (*routine)(void))
{
+#ifdef __SMP__
unsigned long flags;
+#endif
bh_base[nr] = routine;
atomic_set(&bh_mask_count[nr], 0);
+#ifdef __SMP__
spin_lock_irqsave(&i386_bh_lock, flags);
+#endif
bh_mask |= 1 << nr;
+#ifdef __SMP__
spin_unlock_irqrestore(&i386_bh_lock, flags);
+#endif
}
extern inline void remove_bh(int nr)
{
+#ifdef __SMP__
unsigned long flags;
spin_lock_irqsave(&i386_bh_lock, flags);
+#endif
bh_mask &= ~(1 << nr);
+#ifdef __SMP__
spin_unlock_irqrestore(&i386_bh_lock, flags);
+#endif
synchronize_bh();
bh_base[nr] = NULL;
@@ -118,23 +128,31 @@
*/
extern inline void disable_bh(int nr)
{
+#ifdef __SMP__
unsigned long flags;
spin_lock_irqsave(&i386_bh_lock, flags);
+#endif
bh_mask &= ~(1 << nr);
atomic_inc(&bh_mask_count[nr]);
+#ifdef __SMP__
spin_unlock_irqrestore(&i386_bh_lock, flags);
+#endif
synchronize_bh();
}
extern inline void enable_bh(int nr)
{
+#ifdef __SMP__
unsigned long flags;
spin_lock_irqsave(&i386_bh_lock, flags);
+#endif
if (atomic_dec_and_test(&bh_mask_count[nr]))
bh_mask |= 1 << nr;
+#ifdef __SMP__
spin_unlock_irqrestore(&i386_bh_lock, flags);
+#endif
}
#endif /* __ASM_SOFTIRQ_H */
-- Matthew Harrell Behind every great computer sits Bit Twiddlers, Inc. a skinny little geek. mharrell@bittwiddlers.com- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/