[parisc-linux] kernel panic

Matthew Wilcox matthew@wil.cx
Wed, 23 May 2001 20:13:17 +0100


On Wed, May 23, 2001 at 12:59:57PM -0600, Grant Grundler wrote:
> Exactly. But if the driver is mucking with IRQ enable/disable,
> does that mean the enable/disable code has to keep reference counts?
> Don't recall any archs doing that when we did the initial implementation. 

cli -> disables irqs on all processors
__cli -> disables irqs on local processor
sti -> enables irqs on all processors
__sti -> enable irqs on local processor

spin_lock_irqsave -> disables interrupts locally, puts the previous
state into the state variable you supplied and acquires the spinlock
spin_lock_irqrestore -> releases the spinlock and restores previous
state from state variable

no need to keep enable/disable counts, the previous state gets stored
for you.  if you're using cli and sti inappropriately, you lose.

-- 
Revolutions do not require corporate support.