• Philippe Gerum's avatar
    ipipe: work around: force all interrupts to unlazy disable mode · a1bd0cc7
    Philippe Gerum authored
    We don't cope well with lazy disabling simply because we neither track
    nor update the descriptor state bits for reflecting the state of the
    irqchip regarding interrupts channels. Which is definitely wrong for
    multiple reasons.
    
    Since proper lazy disabling relies on the masked/unmasked interrupt
    state flag advertised by the descriptor, which is not updated by the
    pipeline entry code when masking before event deferral, we may end up
    with IRQ lines permanently masked.
    
    Such bug is typically triggered by drivers which disable IRQs on the
    fly directly from the interrupt handler as part of their PM logic,
    e.g.:
    
    <irq> (edge-triggered, lazy disable)
       __ipipe_ack_fasteoi_irq()
           irqchip.irq_hold()
              <irq masked in controller>
       ...
       handle_fasteoi_irq()
          handle_irq_event()
             driver: disable_irq(irq), schedule PM resume
    	    <irq lazily disabled, not set as masked>
          cond_unmask_eoi_irq()
             <irq disabled, no unmask>
    ...
    PM runtime resume
       enable_irq(irq)
         <irq seen as disabled but unmasked due to laziness, nop>
    
    irq is now permantenly masked: BUG.
    
    This change is a limited workaround, forcing all interrupts to unlazy
    disable mode when the pipeline is built in. The only sane fix would be
    to overhaul the pipelined interrupt flow handling entirely, in order
    to fully integrate that logic into the regular flow handlers, sharing
    the locking, descriptor state and status management with them.
    
    This is basically what dovetail is aiming at:
    http://lab.xenomai.org/linux-dovetail.git/
    a1bd0cc7
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...