irqchip/qcom-pdc: Do not toggle IRQ_ENABLE during mask/unmask
authorLina Iyer <ilina@codeaurora.org>
Fri, 15 Nov 2019 22:11:46 +0000 (15:11 -0700)
committerMarc Zyngier <maz@kernel.org>
Sat, 16 Nov 2019 10:20:49 +0000 (10:20 +0000)
commitda3f875a4189e643f8eec7f0bffa39c90d3418c6
tree297b0ddd5408c3c13d7c2aa06cb13e8c30fda89c
parentb2bb01ed0894c6d5d31cfa8aafb6ddbd7df2dd3f
irqchip/qcom-pdc: Do not toggle IRQ_ENABLE during mask/unmask

When an interrupt is to be serviced, the convention is to mask the
interrupt at the chip and unmask after servicing the interrupt. Enabling
and disabling the interrupt at the PDC irqchip causes an interrupt storm
due to the way dual edge interrupts are handled in hardware.

Skip configuring the PDC when the IRQ is masked and unmasked, instead
use the irq_enable/irq_disable callbacks to toggle the IRQ_ENABLE
register at the PDC. The PDC's IRQ_ENABLE register is only used during
the monitoring mode when the system is asleep and is not needed for
active mode detection.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/1573855915-9841-4-git-send-email-ilina@codeaurora.org
drivers/irqchip/qcom-pdc.c