[PATCH] irqchip/meson-gpio: Allow the GPIO interrupts to wake the system
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Wed Oct 7 15:04:29 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] irqchip: meson-gpio: spurious wakeups due to missing IRQCHIP_MASK_ON_SUSPEND
--
commit 39ce695188f00617d3597fd256c103a4df7428f7
Author: Igor Velkov <iav at iav.lv>
irqchip/meson-gpio: Allow the GPIO interrupts to wake the system
This commit adds the IRQCHIP_SKIP_SET_WAKE flag to the meson_gpio_irq_chip
definition. This prevents enable_irq_wake() from failing and allows GPIO
interrupts routed through this controller to wake the system from suspend.
> diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
> index 91a9c337fe6d9..e0329ef5e4a21 100644
> --- a/drivers/irqchip/irq-meson-gpio.c
> +++ b/drivers/irqchip/irq-meson-gpio.c
> @@ -538,7 +538,7 @@ static struct irq_chip meson_gpio_irq_chip = {
> #ifdef CONFIG_SMP
> .irq_set_affinity = irq_chip_set_affinity_parent,
> #endif
> - .flags = IRQCHIP_SET_TYPE_MASKED,
> + .flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_SKIP_SET_WAKE,
[Severity: Medium]
Will this cause spurious wakeups from non-wakeup GPIO interrupts during
system suspend?
During suspend, suspend_device_irqs() lazily disables non-wakeup interrupts
by setting IRQD_IRQ_DISABLED, but without calling .irq_mask() because the
parent GIC lacks an .irq_disable() callback. The core IRQ power management
code only physically masks the interrupt if the top-level irq_chip provides
the IRQCHIP_MASK_ON_SUSPEND flag.
Since meson_gpio_irq_chip does not set IRQCHIP_MASK_ON_SUSPEND, non-wakeup
GPIO interrupts might remain unmasked at the GIC level. If a non-wakeup
interrupt triggers while the system is asleep, the GIC will forward it to
the CPU, potentially leading to an unintended wakeup and power drain.
Does this flag definition need to include IRQCHIP_MASK_ON_SUSPEND as well?
> };
>
> static int meson_gpio_irq_domain_translate(struct irq_domain *domain,
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261008-meson-gpio-wake-v1-1-fec8a1f5d830@iav.lv?part=1
More information about the linux-amlogic
mailing list