Skip to content

Commit fdde0ff

Browse files
committed
ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system
If the platform triggers a spurious SCI even though the status bit is not set for any GPE when the system is suspended to idle, it will be treated as a genuine wakeup, so avoid that by checking if any GPEs are active at all before returning 'true' from acpi_s2idle_wake(). Link: https://bugzilla.kernel.org/show_bug.cgi?id=206413 Fixes: 56b9918 ("PM: sleep: Simplify suspend-to-idle control flow") Reported-by: Tsuchiya Yuto <[email protected]> Cc: 5.4+ <[email protected]> # 5.4+ Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent ea12883 commit fdde0ff

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/acpi/sleep.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,10 +1006,16 @@ static bool acpi_s2idle_wake(void)
10061006
return true;
10071007

10081008
/*
1009-
* If there are no EC events to process, the wakeup is regarded
1010-
* as a genuine one.
1009+
* If there are no EC events to process and at least one of the
1010+
* other enabled GPEs is active, the wakeup is regarded as a
1011+
* genuine one.
1012+
*
1013+
* Note that the checks below must be carried out in this order
1014+
* to avoid returning prematurely due to a change of the EC GPE
1015+
* status bit from unset to set between the checks with the
1016+
* status bits of all the other GPEs unset.
10111017
*/
1012-
if (!acpi_ec_dispatch_gpe())
1018+
if (acpi_any_gpe_status_set() && !acpi_ec_dispatch_gpe())
10131019
return true;
10141020

10151021
/*

0 commit comments

Comments
 (0)