android_kernel_samsung_msm8976/kernel/irq
Thomas Gleixner d209a699a0 genirq: Add chip flag to force mask on suspend
On suspend we disable all interrupts in the core code, but this does
not mask the interrupt line in the default implementation as we use a
lazy disable approach. That means we mark the interrupt disabled, but
leave the hardware unmasked. That's an optimization because we avoid
the hardware access for the common case where no interrupt happens
after we marked it disabled. If an interrupt happens, then the
interrupt flow handler masks the line at the hardware level and marks
it pending.

Suspend makes use of this delayed disable as it "disables" all
interrupts when preparing the suspend transition. Right before the
system goes into hardware suspend state it checks whether one of the
interrupts which is marked as a wakeup interrupt came in after
disabling it.

Most interrupt chips have a separate register which selects the
interrupts which can wake up the system from suspend, so we don't have
to mask any on the non wakeup interrupts.

But now we have to deal with brilliant designed hardware which lacks
such a wakeup configuration facility. For such hardware it's necessary
to mask all non wakeup interrupts before going into suspend in order
to avoid the wakeup from random interrupts.

Rather than working around this in the affected interrupt chip
implementations we can solve this elegant in the core code itself.

Add a flag IRQCHIP_MASK_ON_SUSPEND which can be set by the irq chip
implementation to indicate, that the interrupts which are not selected
as wakeup sources must be masked in the suspend path. Mask them in the
loop which checks the wakeup interrupts pending flag.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
LKML-Reference: <alpine.LFD.2.00.1103112112310.2787@localhost6.localdomain6>
2011-03-12 11:12:58 +01:00
..
autoprobe.c genirq: Remove real old transition functions 2011-02-19 12:58:23 +01:00
chip.c genirq: Fixup fasteoi handler for oneshot mode 2011-03-02 11:49:21 +01:00
compat.h genirq: Move IRQ_AFFINITY_SET to core 2011-02-19 12:58:20 +01:00
debug.h genirq: Move debug code to separate header 2011-02-19 12:58:19 +01:00
devres.c devres/irq: Fix devm_irq_match comment 2010-02-11 16:01:02 +01:00
dummychip.c genirq: Fix CONFIG_GENIRQ_NO_DEPRECATED=y build 2010-10-12 21:59:55 +02:00
handle.c genirq: Prepare the handling of shared oneshot interrupts 2011-02-25 20:24:21 +01:00
internals.h genirq: Provide forced interrupt threading 2011-02-26 11:57:18 +01:00
irqdesc.c genirq: Use IRQ_BITMAP_BITS as search size in irq_alloc_descs() 2011-02-21 21:20:00 +01:00
Kconfig genirq: Add comments to Kconfig switches 2011-03-08 19:52:55 +01:00
Makefile genirq: Remove the now unused sparse irq leftovers 2010-10-12 16:53:44 +02:00
manage.c genirq: Provide forced interrupt threading 2011-02-26 11:57:18 +01:00
migration.c genirq: Implement irq_data based move_*_irq() versions 2011-02-19 12:58:25 +01:00
pm.c genirq: Add chip flag to force mask on suspend 2011-03-12 11:12:58 +01:00
proc.c genirq: Reuse existing can set affinty check 2011-02-19 12:58:20 +01:00
resend.c genirq: Mirror irq trigger type bits in irq_data.state 2011-02-19 12:58:20 +01:00
settings.h genirq: Remove desc->status when GENERIC_HARDIRQS_NO_COMPAT=y 2011-02-19 12:58:22 +01:00
spurious.c genirq: Wrap the remaning IRQ_* flags 2011-02-19 12:58:21 +01:00