diff options
author | Maulik Shah <quic_mkshah@quicinc.com> | 2024-02-29 12:14:59 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-02-29 20:33:00 +0100 |
commit | 9bc4ffd32ef8943f5c5a42c9637cfd04771d021b (patch) | |
tree | 70ae2ccadfc00ff4127392295e720165fd9404a1 /kernel | |
parent | f4311756a83fb01c28a9bf841cbb7eb2b318eebf (diff) | |
download | linux-stable-9bc4ffd32ef8943f5c5a42c9637cfd04771d021b.tar.gz linux-stable-9bc4ffd32ef8943f5c5a42c9637cfd04771d021b.tar.bz2 linux-stable-9bc4ffd32ef8943f5c5a42c9637cfd04771d021b.zip |
PM: suspend: Set mem_sleep_current during kernel command line setup
psci_init_system_suspend() invokes suspend_set_ops() very early during
bootup even before kernel command line for mem_sleep_default is setup.
This leads to kernel command line mem_sleep_default=s2idle not working
as mem_sleep_current gets changed to deep via suspend_set_ops() and never
changes back to s2idle.
Set mem_sleep_current along with mem_sleep_default during kernel command
line setup as default suspend mode.
Fixes: faf7ec4a92c0 ("drivers: firmware: psci: add system suspend support")
CC: stable@vger.kernel.org # 5.4+
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/suspend.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 742eb26618cc..e3ae93bbcb9b 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -192,6 +192,7 @@ static int __init mem_sleep_default_setup(char *str) if (mem_sleep_labels[state] && !strcmp(str, mem_sleep_labels[state])) { mem_sleep_default = state; + mem_sleep_current = state; break; } |