Messages in this thread | | | Date | Tue, 1 Jul 2008 02:37:05 +0400 | From | Anton Vorontsov <> | Subject | Re: [RT] MPIC edge sensitive issues with hardirq preemption (was: Re: [PATCH v2 -rt] ide: workaround buggy hardware issues with preemptable hardirqs) |
| |
On Tue, Jul 01, 2008 at 07:59:57AM +1000, Benjamin Herrenschmidt wrote: > > > > Thanks for the idea. With hardirq preempton, fasteoi path does not replay > > edge interrupts indeed (at least for MPIC). > > > > Here how I tested this: I have external interrupt connected to the button > > on this board, thus I registered irq handler which is doing exactly this > > (irq is edge sensitive): > > > > printk("handled\n"); mdelay(2000); > > > > Without hardirq preemption: pressing button twice prints two messages. > > With hardirq preemption: pressing button twice prints just one message. > > > > This happens because: > > - irq has come; > > - fasteoi handler mask()s it, and wakes up the thread; > > Do we eoi first ? We should.
Yup. I just left over this small detail.
Without my patch the code was firstly masking the IRQ, then sending EOI. Now we don't mask it, but simply send an EOI. If the edge IRQ came again (while we were processing the same IRQ), non-threaded handler marks IRQ that it should be replayed, then masks it and sends EOI. When thread awakes, it unmasks the IRQ before handle_IRQ_event, so that we can catch next edge IRQ. That is, we handle EOI quite correctly.
-- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2
| |