On Wed, Jan 29, 2014 at 1:58 PM, Maxime Ripard
<[email protected]> wrote:

>
> So, to sum things up, what you see is something like:
>
>         handle_level_irq
>                |              device    device
>                | mask ack     handler irq acked unmask
>                |  |    |         |         |       |
>                v  v    v         v         v       v
>
> NMI -> GIC:
>                +--------+     +---------------------
> ---------------+        +-----+
>
> PMIC -> NMI:
>             +-------------------------+
> ------------+                         +-------------
>
> And you get a "rogue" retrigger because the NMI -> GIC level went up
> again.

I'd say something like:

         handle_level_irq
                |              device    device
                | mask ack     handler irq acked unmask
                |  |    |         |         |       |
                v  v    v         v         v       v

 NMI -> GIC:
                +-----------------------------+
 ---------------+                             +------

 PMIC -> NMI:
             +-------------------------+
 ------------+                         +-------------


> I'm not exactly sure on how to fix this. Maybe by adding a call to the
> irqchip's ack just before the unmask in irq_finalize_oneshot?

That is exactly what the unmask callback in the NMI controller driver does.
The unmask_irq() in irq_finalize_oneshot() calls the unmask callback
in the driver (sunxi_sc_nmi_ack_and_unmask()) that ACKs the line
before unmasking it again.

Best,

-- 
Carlo Caione

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to