Re: [PATCH v6 3/6] genirq/PM: Introduce IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag

From: Doug Anderson
Date: Mon Sep 28 2020 - 17:13:04 EST


Hi,

On Sun, Sep 27, 2020 at 9:32 PM Maulik Shah <mkshah@xxxxxxxxxxxxxx> wrote:
>
> An interrupt that is disabled/masked but set for wakeup still needs to
> be able to wake up the system from sleep states like "suspend to RAM".
>
> This change introduces IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag. If irqchip
> have this flag set then irq PM will enable/unmask irqs that are marked
> for wakeup but are in disabled state.
>
> On resume such irqs will be restored back to disabled state.
>
> Suggested-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Signed-off-by: Maulik Shah <mkshah@xxxxxxxxxxxxxx>
> ---
> include/linux/irq.h | 49 ++++++++++++++++++++++++++++++-------------------
> kernel/irq/debugfs.c | 3 +++
> kernel/irq/pm.c | 34 ++++++++++++++++++++++++++++++----
> 3 files changed, 63 insertions(+), 23 deletions(-)

I will freely admit not being an expert on this code / knowing all the
subtle edge conditions, but this seems reasonable to me.

Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>