On Fri, 12 Oct 2012, Liu, Chuansheng wrote:
> > > But IRQS_ONESHOT does not work well for edge interrupt.
> > > And pasting the IRQS_ONESHOT description:
> > > * IRQS_ONESHOT                    - irq is not unmasked in primary handler
> > 
> > Right, and edge type interrupts doe not support it.
>
> Can we do something? Thanks your sharing.

No, we cannot do anything. The edge handler is not going to
change. End of story.

> In request_thread_irq() case with FLAG IRQS_ONESHOT, for edge interrupt,
> in function irq_finalize_oneshot():
>       if (!desc->threads_oneshot && !irqd_irq_disabled(&desc->irq_data) &&
>           irqd_irq_masked(&desc->irq_data))
>               unmask_irq(desc);
> 
> It is possible unmask_irq() is called, but the below code is just
> aiming for masking action in irq handler, so I guess if I called the
> mask_irq() in non-core code, when irq_finalize_oneshot is called,
> the unmask_irq is called, and it is not we wanted, right? Do not
> test this case:)

You're guessing wrong again. Non core code CANNOT call mask_irq()
except via irq_disable(). No have a look at irq_disable() and then
read the above condition again.

Thanks,

        tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to