summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2022-10-12 22:50:17 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-10-25 14:53:19 +0200
commit85850af4fc47132f3f2f0dd698b90f67906600b4 (patch)
tree715b0170c73e185dbf725dc65094f15615f2f176 /kernel
parent247f34f7b80357943234f93f247a1ae6b6c3a740 (diff)
downloadlinux-stable-85850af4fc47132f3f2f0dd698b90f67906600b4.tar.gz
linux-stable-85850af4fc47132f3f2f0dd698b90f67906600b4.tar.bz2
linux-stable-85850af4fc47132f3f2f0dd698b90f67906600b4.zip
PM: hibernate: Allow hybrid sleep to work with s2idle
Hybrid sleep is currently hardcoded to only operate with S3 even on systems that might not support it. Instead of assuming this mode is what the user wants to use, for hybrid sleep follow the setting of `mem_sleep_current` which will respect mem_sleep_default kernel command line and policy decisions made by the presence of the FADT low power idle bit. Fixes: 81d45bdf8913 ("PM / hibernate: Untangle power_down()") Reported-and-tested-by: kolAflash <kolAflash@kolahilft.de> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216574 Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/hibernate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index f58a0aa92310..793c55a2becb 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -645,7 +645,7 @@ static void power_down(void)
int error;
if (hibernation_mode == HIBERNATION_SUSPEND) {
- error = suspend_devices_and_enter(PM_SUSPEND_MEM);
+ error = suspend_devices_and_enter(mem_sleep_current);
if (error) {
hibernation_mode = hibernation_ops ?
HIBERNATION_PLATFORM :