James Bottomley 08dc2ca61e [PARISC] Fix our spinlock implementation
We actually have two separate bad bugs

1. The read_lock implementation spins with disabled interrupts.  This is
completely wrong
2. Our spin_lock_irqsave should check to see if interrupts were enabled
before the call and re-enable interrupts around the inner spin loop.

The problem is that if we spin with interrupts off, we can't receive
IPIs. This has resulted in a bug where SMP machines suddenly spit
smp_call_function timeout messages and hang.

The scenario I've caught is

CPU0 does a flush_tlb_all holding the vmlist_lock for write.
CPU1 tries a cat of /proc/meminfo which tries to acquire vmlist_lock for
     read
CPU1 is now spinning with interrupts disabled
CPU0 tries to execute a smp_call_function to flush the local tlb caches

This is now a deadlock because CPU1 is spinning with interrupts disabled
and can never receive the IPI

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:35:09 -05:00
..
2005-11-13 18:14:16 -08:00
2005-11-13 18:14:16 -08:00
2005-11-13 18:14:16 -08:00
2005-11-13 18:14:16 -08:00
2005-11-14 19:56:02 -08:00
2005-11-13 18:14:16 -08:00
2005-11-13 18:14:16 -08:00
2005-11-07 07:53:42 -08:00
2005-11-13 18:14:16 -08:00
2005-11-17 16:23:57 +00:00
2005-11-13 18:14:16 -08:00
2005-11-13 18:14:16 -08:00
2005-11-13 18:14:16 -08:00
2005-11-13 18:14:16 -08:00
2005-11-13 18:14:16 -08:00
2005-11-14 19:56:02 -08:00
2005-11-13 18:14:16 -08:00
2005-11-15 15:17:10 -08:00
2005-10-30 17:37:32 -08:00
2005-11-07 14:35:14 +01:00