linux/kernel/power
Rafael J. Wysocki 87cbde8d90 PM / s2idle: Invoke the ->wake() platform callback earlier
The role of the ->wake() platform callback for suspend-to-idle is to
deal with possible spurious wakeups, among other things.  The ACPI
implementation of it, acpi_s2idle_wake(), additionally checks the
conditions for entering the Low Power S0 Idle state by the platform
and reports the ones that have not been met.

However, the ->wake() platform callback is invoked after calling
dpm_noirq_resume_devices(), which means that the power states of some
devices may have changed since s2idle_enter() returned, so some unmet
Low Power S0 Idle conditions may be reported incorrectly as a result
of that.

To avoid these false positives, reorder the invocations of the
dpm_noirq_resume_devices() routine and the ->wake() platform callback
in s2idle_loop().

Fixes: 726fb6b4f2 (ACPI / PM: Check low power idle constraints for debug only)
Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-09-29 01:26:13 +02:00
..
autosleep.c PM / Sleep: avoid 'autosleep' in shutdown progress 2013-07-15 01:31:37 +02:00
console.c PM / sleep: Make pm_prepare_console() return void 2016-06-15 01:26:04 +02:00
hibernate.c PM / sleep: Mark suspend/hibernation start and finish 2017-07-22 02:33:03 +02:00
Kconfig PM / sleep: Increase default DPM watchdog timeout to 120 2016-09-13 02:15:58 +02:00
main.c ACPI / PM: Check low power idle constraints for debug only 2017-08-18 01:54:22 +02:00
Makefile PM / Hibernate: Don't let kasan instrument snapshot.c 2016-06-14 00:38:56 +02:00
power.h ACPI / PM: Prefer suspend-to-idle over S3 on some systems 2017-08-05 01:51:26 +02:00
poweroff.c power/sysrq: fix inconstistent help message of sysrq key 2013-04-30 17:04:10 -07:00
process.c sched/cpuset/pm: Fix cpuset vs. suspend-resume bugs 2017-09-07 11:45:21 +02:00
qos.c power, workqueue: remove keventd_up() usage 2016-09-17 13:18:21 -04:00
snapshot.c mm: fix global NR_SLAB_.*CLAIMABLE counter reads 2017-08-10 15:54:06 -07:00
suspend_test.c PM / s2idle: Rename PM_SUSPEND_FREEZE to PM_SUSPEND_TO_IDLE 2017-08-11 01:29:55 +02:00
suspend.c PM / s2idle: Invoke the ->wake() platform callback earlier 2017-09-29 01:26:13 +02:00
swap.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
user.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
wakelock.c PM / autosleep: Use workqueue for user space wakeup sources garbage collector 2015-07-14 21:04:48 +02:00