Skip to content

Commit 3441362

Browse files
committed
ACPI: PM: s2idle: Print type of wakeup debug messages
Since acpi_s2idle_wake() knows the category of wakeup causing the system to resume from suspend-to-idle, make it print a unique message for each of them to help diagnose wakeup issues. Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 9cb1fd0 commit 3441362

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

drivers/acpi/sleep.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -992,23 +992,31 @@ static bool acpi_s2idle_wake(void)
992992
* wakeup is pending anyway and the SCI is not the source of
993993
* it).
994994
*/
995-
if (irqd_is_wakeup_armed(irq_get_irq_data(acpi_sci_irq)))
995+
if (irqd_is_wakeup_armed(irq_get_irq_data(acpi_sci_irq))) {
996+
pm_pr_dbg("Wakeup unrelated to ACPI SCI\n");
996997
return true;
998+
}
997999

9981000
/*
9991001
* If the status bit of any enabled fixed event is set, the
10001002
* wakeup is regarded as valid.
10011003
*/
1002-
if (acpi_any_fixed_event_status_set())
1004+
if (acpi_any_fixed_event_status_set()) {
1005+
pm_pr_dbg("ACPI fixed event wakeup\n");
10031006
return true;
1007+
}
10041008

10051009
/* Check wakeups from drivers sharing the SCI. */
1006-
if (acpi_check_wakeup_handlers())
1010+
if (acpi_check_wakeup_handlers()) {
1011+
pm_pr_dbg("ACPI custom handler wakeup\n");
10071012
return true;
1013+
}
10081014

10091015
/* Check non-EC GPE wakeups and dispatch the EC GPE. */
1010-
if (acpi_ec_dispatch_gpe())
1016+
if (acpi_ec_dispatch_gpe()) {
1017+
pm_pr_dbg("ACPI non-EC GPE wakeup\n");
10111018
return true;
1019+
}
10121020

10131021
/*
10141022
* Cancel the SCI wakeup and process all pending events in case
@@ -1027,8 +1035,10 @@ static bool acpi_s2idle_wake(void)
10271035
* are pending here, they must be resulting from the processing
10281036
* of EC events above or coming from somewhere else.
10291037
*/
1030-
if (pm_wakeup_pending())
1038+
if (pm_wakeup_pending()) {
1039+
pm_pr_dbg("Wakeup after ACPI Notify sync\n");
10311040
return true;
1041+
}
10321042

10331043
rearm_wake_irq(acpi_sci_irq);
10341044
}

0 commit comments

Comments
 (0)