1. 26 Jun, 2018 1 commit
    • 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
  2. 25 Jun, 2018 3 commits
  3. 22 Jun, 2018 1 commit
  4. 12 Jun, 2018 35 commits