Messages in this thread | | | Date | Mon, 13 Sep 2004 09:10:22 +0100 | From | Russell King <> | Subject | Re: [PATCH] irq_enter/irq_exit consolidation |
| |
On Sun, Sep 12, 2004 at 03:57:20PM -0700, David S. Miller wrote: > On Sun, 12 Sep 2004 12:44:48 +0100 > Russell King <rmk+lkml@arm.linux.org.uk> wrote: > > > This guarantee must also exist on every other architecture, otherwise: > > > > > ===== include/linux/hardirq.h 1.1 vs edited ===== > > > --- 1.1/include/linux/hardirq.h 2004-09-08 08:32:57 +02:00 > > > +++ edited/include/linux/hardirq.h 2004-09-11 21:26:28 +02:00 > > > +#define irq_exit() \ > > > +do { \ > > > + preempt_count() -= IRQ_EXIT_OFFSET; \ > > > > would be buggy - it's an inherently non-atomic operation. > > It works out actually, if we take an interrupt in the middle > of the operation, that's fine because the preemption count > will be precisely the same as we first read it by the time > we return from that interrupt, work out some example cases > as I think that makes it easier to understand.
I realise that, and it's precisely why I wrote the sentence following the one you quoted above.
However, ARM ain't buggy whatever.
-- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core - 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/
| |