• Thomas Gleixner's avatar
    genirq: Sanitize spurious interrupt detection of threaded irqs · 72aeabd7
    Thomas Gleixner authored
    commit 1e77d0a1 upstream.
    
    Till reported that the spurious interrupt detection of threaded
    interrupts is broken in two ways:
    
    - note_interrupt() is called for each action thread of a shared
      interrupt line. That's wrong as we are only interested whether none
      of the device drivers felt responsible for the interrupt, but by
      calling multiple times for a single interrupt line we account
      IRQ_NONE even if one of the drivers felt responsible.
    
    - note_interrupt() when called from the thread handler is not
      serialized. That leaves the members of irq_desc which are used for
      the spurious detection unprotected.
    
    To solve this we need to defer the spurious detection of a threaded
    interrupt to the next hardware interrupt context where we have
    implicit serialization.
    
    If note_interrupt is called with action_ret == IRQ_WAKE_THREAD, we
    check whether the previous interrupt requested a deferred check. If
    not, we request ...
    72aeabd7
spurious.c 11.8 KB