Level irq clear has latency

buyitian buyit at live.cn
Sat Jul 11 21:39:45 EDT 2015


Hi Experts:

My SOC has a RTC module which has a level irq connected to ARM GIC interrupt controller.
Once RTC irq is triggered, it will pull high the pin to GIC so that GIC will notify ARM core and at last RTC irq handler will be called, inside handler, I will write a RTC register to clear this irq, RTC HW will pull low the pin to GIC, however, the latency between the writing to RTC register and RTC pull low the pin to GIC is big, let's assume it needs 10ms to complete this, that means I cannot return from RTC irq handler directly because the level irq has not been cleared really, and it needs 10ms to be cleared.
I have some choices:
1. Call disable_irq in RTC irq handler, start a timer and then return from irq handler. When timer expires, check RTC irq status again and enable_irq.

2. Pulling RTC irq status register inside RTC irq handler. Which register shall I pull? The GIC irq pending register? Or the RTC module register?

3. Use threaded irq, pulling inside threaded irq handler.

Is there any existing code or document or discussion about this irq clear issue?
Thanks in advance.



Best Regards


More information about the Kernelnewbies mailing list