linux/kernel/power
Rafael J. Wysocki 23f62d7ab2 PM: sleep: Pause cpuidle later and resume it earlier during system transitions
Commit 8651f97bd9 ("PM / cpuidle: System resume hang fix with
cpuidle") that introduced cpuidle pausing during system suspend
did that to work around a platform firmware issue causing systems
to hang during resume if CPUs were allowed to enter idle states
in the system suspend and resume code paths.

However, pausing cpuidle before the last phase of suspending
devices is the source of an otherwise arbitrary difference between
the suspend-to-idle path and other system suspend variants, so it is
cleaner to do that later, before taking secondary CPUs offline (it
is still safer to take secondary CPUs offline with cpuidle paused,
though).

Modify the code accordingly, but in order to avoid code duplication,
introduce new wrapper functions, pm_sleep_disable_secondary_cpus()
and pm_sleep_enable_secondary_cpus(), to combine cpuidle_pause()
and cpuidle_resume(), respectively, with the handling of secondary
CPUs during system-wide transitions to sleep states.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-10-26 15:52:07 +02:00
..
autosleep.c PM: sleep: fix typos in comments 2021-04-08 19:37:21 +02:00
console.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
energy_model.c PM: EM: Increase energy calculation precision 2021-08-06 15:30:42 +02:00
hibernate.c PM: sleep: Pause cpuidle later and resume it earlier during system transitions 2021-10-26 15:52:07 +02:00
Kconfig PM: sleep: remove trailing spaces and tabs 2021-06-11 18:49:09 +02:00
main.c PM: sleep: unmark 'state' functions as kernel-doc 2021-08-16 18:49:39 +02:00
Makefile PM: hibernate: Split off snapshot dev option 2020-05-19 17:48:08 +02:00
power.h PM: sleep: Pause cpuidle later and resume it earlier during system transitions 2021-10-26 15:52:07 +02:00
poweroff.c kernel/power: constify sysrq_key_op 2020-05-15 14:53:20 +02:00
process.c PM: sleep: remove trailing spaces and tabs 2021-06-11 18:49:09 +02:00
qos.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
snapshot.c PM: hibernate: remove leading spaces before tabs 2021-06-11 18:52:05 +02:00
suspend_test.c PM: sleep: check RTC features instead of ops in suspend_test 2021-08-04 20:23:05 +02:00
suspend.c PM: sleep: Pause cpuidle later and resume it earlier during system transitions 2021-10-26 15:52:07 +02:00
swap.c PM: hibernate: Get block device exclusively in swsusp_check() 2021-10-21 19:38:32 +02:00
user.c block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
wakelock.c PM / wakeup: Show wakeup sources stats in sysfs 2019-08-21 00:20:40 +02:00