All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM: wakeup: Add extra debugging statement for multiple active IRQs
@ 2022-08-25  1:36 Mario Limonciello
  2022-09-03 18:05 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2022-08-25  1:36 UTC (permalink / raw)
  To: rafael, len.brown, pavel; +Cc: linux-pm, linux-kernel, Mario Limonciello

Since commit cb1f65c1e1424 ("PM: s2idle: ACPI: Fix wakeup interrupts
handling") was introduced the kernel can now handle multiple
simultaneous interrupts during wakeup.  Ths uncovered some existing
subtle firmware bugs where multiple IRQs are unintentionally active.

To help with fixing those bugs add an extra message when PM debugging
is enabled that can show the individual IRQs triggered as if a variety
are fired they'll potentially be lost as /sys/power/pm_wakeup_irq only
contains the first one that triggered the wakeup after resume is
complete but all may be needed to demonstrate the whole picture.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=215770
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/base/power/wakeup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index e3befa2c1b661..dcd06eac30afd 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -943,6 +943,7 @@ void pm_system_irq_wakeup(unsigned int irq_number)
 		wakeup_irq[1] = irq_number;
 	else
 		irq_number = 0;
+	pm_pr_dbg("Triggering wakeup from IRQ %d\n", irq_number);
 
 	raw_spin_unlock_irqrestore(&wakeup_irq_lock, flags);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PM: wakeup: Add extra debugging statement for multiple active IRQs
  2022-08-25  1:36 [PATCH] PM: wakeup: Add extra debugging statement for multiple active IRQs Mario Limonciello
@ 2022-09-03 18:05 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2022-09-03 18:05 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Rafael J. Wysocki, Len Brown, Pavel Machek, Linux PM,
	Linux Kernel Mailing List

On Thu, Aug 25, 2022 at 3:36 AM Mario Limonciello
<mario.limonciello@amd.com> wrote:
>
> Since commit cb1f65c1e1424 ("PM: s2idle: ACPI: Fix wakeup interrupts
> handling") was introduced the kernel can now handle multiple
> simultaneous interrupts during wakeup.  Ths uncovered some existing
> subtle firmware bugs where multiple IRQs are unintentionally active.
>
> To help with fixing those bugs add an extra message when PM debugging
> is enabled that can show the individual IRQs triggered as if a variety
> are fired they'll potentially be lost as /sys/power/pm_wakeup_irq only
> contains the first one that triggered the wakeup after resume is
> complete but all may be needed to demonstrate the whole picture.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=215770
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/base/power/wakeup.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
> index e3befa2c1b661..dcd06eac30afd 100644
> --- a/drivers/base/power/wakeup.c
> +++ b/drivers/base/power/wakeup.c
> @@ -943,6 +943,7 @@ void pm_system_irq_wakeup(unsigned int irq_number)
>                 wakeup_irq[1] = irq_number;
>         else
>                 irq_number = 0;
> +       pm_pr_dbg("Triggering wakeup from IRQ %d\n", irq_number);
>
>         raw_spin_unlock_irqrestore(&wakeup_irq_lock, flags);
>
> --

Applied as 6.1 material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-03 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25  1:36 [PATCH] PM: wakeup: Add extra debugging statement for multiple active IRQs Mario Limonciello
2022-09-03 18:05 ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.