Re: Q: x86 interrupt arrival after cli

Stephen Rothwell (sfr@canb.auug.org.au)
Thu, 16 May 2002 23:39:56 +1000


On Thu, 16 May 2002 14:32:19 +0100 (BST) Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> > Quick question for the x86 gurus:

Not a real x86 guru :-)

> > If a hardware interrupt arrives within a spin_lock_irqsave &
> > spin_unlock_irqrestore will the interrupt handler associated with said
> > interrupt be called immediately after the spinlock is released? =20
>
> It will be called as soon as the cpu hardware gets around to it - which
> should be just after the irq mask flag is cleared.

If memory serves (and Intel hasn't changed things) you get to
at least start the execution of the next instruction which means,
for most instructions, the interrupt will be delivered after the
instruction after the instruction unmasks the irqs.

Actually, this makes no difference at the C level :-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/