1
0
Fork 0
mirror of https://github.com/followmsi/android_kernel_google_msm.git synced 2024-11-06 23:17:41 +00:00

genirq: chip: set pending only for edge interrupts

The IRQS_PENDING flag is meant to record an edge interrupt trigger event
when that interrupt is disabled.

When an edge triggered interrupt is enabled, check_irq_resend() retriggers
that irq and resets the flag to zero if set. Note that check_irq_resend()
only does this for edge triggered interrupts.

For level triggered interrupts it is expected that the interrupt remains
active and doesn't need this PENDING flag assistance from software for
re-triggering it.

However, handle_fasteoi_irq flow handler sets the PENDING flag even for
a disabled level interrupt. This causes an adverse effect if that level
interrupt is marked wakeup. The suspend code sees the pending flag on a
wakeup interrupt and aborts suspend whereas check_irq_resend does not reset
it to 0 (as it is a level interrupt). The end result is that the PENDING
flag on this level triggered wakeup interrupt never clears and the system
 keeps aborting suspend.

Fix this by setting IRQS_PENDING flag only for edge interrupts in the
handle_fasteoi_irq.

CRs-Fixed: 314344
Change-Id: I775d40f434f9309fd9672bae372b0f0fb5b91627
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
Abhijeet Dharmapurikar 2011-10-21 19:59:05 -07:00 committed by Rohit Vaswani
parent 68cfba07e7
commit c9cf77ff7e

View file

@ -436,7 +436,8 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
* then mask it and get out of here:
*/
if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) {
desc->istate |= IRQS_PENDING;
if (!irq_settings_is_level(desc))
desc->istate |= IRQS_PENDING;
mask_irq(desc);
goto out;
}