Re: [PATCH v5] Report interrupt(s) that caused system wakeup

From: Rafael J. Wysocki
Date: Tue Aug 18 2015 - 11:54:00 EST


On Tue, Aug 18, 2015 at 2:56 PM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> On Tue, 18 Aug 2015, Rafael J. Wysocki wrote:
>> The original point was that if two wakeup interrupts happened at the same time,
>> it would be kind of moot which one was the "real" wakeup, but now that I think
>> about it, reporting the first one should be enough to catch suprious wakeups
>> anyway.
>
> So we can simply do the following:
>
> diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
> index d22786a6dbde..46068a1e0e07 100644
> --- a/kernel/irq/pm.c
> +++ b/kernel/irq/pm.c
> @@ -21,7 +21,7 @@ bool irq_pm_check_wakeup(struct irq_desc *desc)
> desc->istate |= IRQS_SUSPENDED | IRQS_PENDING;
> desc->depth++;
> irq_disable(desc);
> - pm_system_wakeup();
> + pm_system_irq_wakeup(irq_desc_get_irq(desc));
> return true;
> }
> return false;
>
> and manage the storage in the PM code.

Right.

That's exactly the approach we're going to follow. :-)

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/