Skip to content

Commit aec89ef

Browse files
sudeep-hollaKAGA-KOKO
authored andcommitted
irqchip/gic: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND
The GIC controller doesn't provides any facility to configure the wakeup sources. For the same reason, GIC chip implementation can't provide irq_set_wake functionality, but that results in the irqchip core preventing the systems from entering sleep states like "suspend to RAM". The GICv1/v2 controllers support wakeup events. They signal these wakeup events even when CPU interface is disabled which means the wakeup outputs are always enabled with the required logic in always-on domain. An implementation can powerdown the GIC completely, but then the wake-up must be relayed to some control logic within the power controller that acts as wake-up interrupt controller. Setting the IRQCHIP_SKIP_SET_WAKE flags will ensure that the interrupts from GIC can work as wakeup interrupts and resume from suspend-to-{idle, ram}. The wakeup interrupt sources need to use enable_irq_wake() and the irqchip core will then set the IRQD_WAKEUP_STATE flag. Also it's always safer to mask all the non wakeup interrupts are masked at the chip level when suspending. The irqchip infrastructure can handle masking of those interrupts at the chip level. The chip implementation just have to indicate that with IRQCHIP_MASK_ON_SUSPEND. This patch enables IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND so that the irqchip core allows and handles the power managemant wake up modes. Signed-off-by: Sudeep Holla <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Simon Horman <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Michal Simek <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Magnus Damm <[email protected]> Cc: Gregory CLEMENT <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent df6e23a commit aec89ef

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/irqchip/irq-gic.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,9 @@ static struct irq_chip gic_chip = {
324324
#endif
325325
.irq_get_irqchip_state = gic_irq_get_irqchip_state,
326326
.irq_set_irqchip_state = gic_irq_set_irqchip_state,
327-
.flags = IRQCHIP_SET_TYPE_MASKED,
327+
.flags = IRQCHIP_SET_TYPE_MASKED |
328+
IRQCHIP_SKIP_SET_WAKE |
329+
IRQCHIP_MASK_ON_SUSPEND,
328330
};
329331

330332
void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq)

drivers/irqchip/irq-hip04.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ static struct irq_chip hip04_irq_chip = {
202202
#ifdef CONFIG_SMP
203203
.irq_set_affinity = hip04_irq_set_affinity,
204204
#endif
205-
.flags = IRQCHIP_SET_TYPE_MASKED,
205+
.flags = IRQCHIP_SET_TYPE_MASKED |
206+
IRQCHIP_SKIP_SET_WAKE |
207+
IRQCHIP_MASK_ON_SUSPEND,
206208
};
207209

208210
static u16 hip04_get_cpumask(struct hip04_irq_data *intc)

0 commit comments

Comments
 (0)