lkml.org 
[lkml]   [2008]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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


    \
     
     \ /
      Last update: 2008-07-01 00:39    [W:2.466 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site