Re: spin_lock_irq vs. spin_lock_irqsave.

From: Pauline Middelink (
Date: Thu Jun 22 2000 - 01:48:14 EST

On Wed, 21 Jun 2000 around 18:47:33 +0100, Tigran Aivazian wrote:
> On Sun, 18 Jun 2000, Andrew Morton wrote:
> > BTW: CPU flags should always be saved and restored in the same function
> > - it's not correct to pass the flags to another function and allow that
> > function to restore them. Breaks on SPARC, apparently. Does Rusty's
> > doc cover this??
> it maybe obvious (definitely is to most) but it may still be worth
> mentioning that 'passing' flags to inline'd functions is ok, otherwise
> people would get very confused when they look at
> __schedule_tail()/reschedule_idle() interaction.

Hmmm, than drivers/usb/serial/digi_acceleport.c
cond_wait_interruptible_timeout_irqrestore() seems
suspect. Its static but not explicitly inlined.

Also line 649/650 seems strange to me, shouldn't the
second one be a normal spinlock() because we know the
irq's are off? (and not overwrite flags)

    Met vriendelijke groet,
        Pauline Middelink

PGP Key fingerprint = DE 6B D0 D9 19 AD A7 A0  58 A3 06 9D B6 34 39 E2
For more details look at my website

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:23 EST