diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-01-19 21:25:34 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-01-19 21:33:57 -0500 |
commit | e326ce013a8e851193eb337aafb1aa396c533a61 (patch) | |
tree | 89881910be88052e8f9a08aad7cafdfbce9337b1 | |
parent | 9320f95c0b8f1d074f570385e6855d4554f693e4 (diff) |
Revert "PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0 flag"
Revert commit 08b98d329165 (PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0
flag) as it caused system suspend (in the default configuration) to fail
on Dell XPS13 (9360) with the Kaby Lake processor.
Fixes: 08b98d329165 (PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0 flag)
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | Documentation/power/states.txt | 4 | ||||
-rw-r--r-- | drivers/acpi/sleep.c | 8 | ||||
-rw-r--r-- | include/linux/suspend.h | 2 | ||||
-rw-r--r-- | kernel/power/suspend.c | 4 |
4 files changed, 3 insertions, 15 deletions
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt index 8a39ce45d8a0..008ecb588317 100644 --- a/Documentation/power/states.txt +++ b/Documentation/power/states.txt | |||
@@ -35,9 +35,7 @@ only one way to cause the system to go into the Suspend-To-RAM state (write | |||
35 | The default suspend mode (ie. the one to be used without writing anything into | 35 | The default suspend mode (ie. the one to be used without writing anything into |
36 | /sys/power/mem_sleep) is either "deep" (if Suspend-To-RAM is supported) or | 36 | /sys/power/mem_sleep) is either "deep" (if Suspend-To-RAM is supported) or |
37 | "s2idle", but it can be overridden by the value of the "mem_sleep_default" | 37 | "s2idle", but it can be overridden by the value of the "mem_sleep_default" |
38 | parameter in the kernel command line. On some ACPI-based systems, depending on | 38 | parameter in the kernel command line. |
39 | the information in the FADT, the default may be "s2idle" even if Suspend-To-RAM | ||
40 | is supported. | ||
41 | 39 | ||
42 | The properties of all of the sleep states are described below. | 40 | The properties of all of the sleep states are described below. |
43 | 41 | ||
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index ce1855fd584b..deb0ff78eba8 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -691,14 +691,6 @@ static void acpi_sleep_suspend_setup(void) | |||
691 | if (acpi_sleep_state_supported(i)) | 691 | if (acpi_sleep_state_supported(i)) |
692 | sleep_states[i] = 1; | 692 | sleep_states[i] = 1; |
693 | 693 | ||
694 | /* | ||
695 | * Use suspend-to-idle by default if ACPI_FADT_LOW_POWER_S0 is set and | ||
696 | * the default suspend mode was not selected from the command line. | ||
697 | */ | ||
698 | if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0 && | ||
699 | mem_sleep_default > PM_SUSPEND_MEM) | ||
700 | mem_sleep_default = PM_SUSPEND_FREEZE; | ||
701 | |||
702 | suspend_set_ops(old_suspend_ordering ? | 694 | suspend_set_ops(old_suspend_ordering ? |
703 | &acpi_suspend_ops_old : &acpi_suspend_ops); | 695 | &acpi_suspend_ops_old : &acpi_suspend_ops); |
704 | freeze_set_ops(&acpi_freeze_ops); | 696 | freeze_set_ops(&acpi_freeze_ops); |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 0c729c3c8549..d9718378a8be 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -194,8 +194,6 @@ struct platform_freeze_ops { | |||
194 | }; | 194 | }; |
195 | 195 | ||
196 | #ifdef CONFIG_SUSPEND | 196 | #ifdef CONFIG_SUSPEND |
197 | extern suspend_state_t mem_sleep_default; | ||
198 | |||
199 | /** | 197 | /** |
200 | * suspend_set_ops - set platform dependent suspend operations | 198 | * suspend_set_ops - set platform dependent suspend operations |
201 | * @ops: The new suspend operations to set. | 199 | * @ops: The new suspend operations to set. |
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index f67ceb7768b8..15e6baef5c73 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c | |||
@@ -46,7 +46,7 @@ static const char * const mem_sleep_labels[] = { | |||
46 | const char *mem_sleep_states[PM_SUSPEND_MAX]; | 46 | const char *mem_sleep_states[PM_SUSPEND_MAX]; |
47 | 47 | ||
48 | suspend_state_t mem_sleep_current = PM_SUSPEND_FREEZE; | 48 | suspend_state_t mem_sleep_current = PM_SUSPEND_FREEZE; |
49 | suspend_state_t mem_sleep_default = PM_SUSPEND_MAX; | 49 | static suspend_state_t mem_sleep_default = PM_SUSPEND_MEM; |
50 | 50 | ||
51 | unsigned int pm_suspend_global_flags; | 51 | unsigned int pm_suspend_global_flags; |
52 | EXPORT_SYMBOL_GPL(pm_suspend_global_flags); | 52 | EXPORT_SYMBOL_GPL(pm_suspend_global_flags); |
@@ -168,7 +168,7 @@ void suspend_set_ops(const struct platform_suspend_ops *ops) | |||
168 | } | 168 | } |
169 | if (valid_state(PM_SUSPEND_MEM)) { | 169 | if (valid_state(PM_SUSPEND_MEM)) { |
170 | mem_sleep_states[PM_SUSPEND_MEM] = mem_sleep_labels[PM_SUSPEND_MEM]; | 170 | mem_sleep_states[PM_SUSPEND_MEM] = mem_sleep_labels[PM_SUSPEND_MEM]; |
171 | if (mem_sleep_default >= PM_SUSPEND_MEM) | 171 | if (mem_sleep_default == PM_SUSPEND_MEM) |
172 | mem_sleep_current = PM_SUSPEND_MEM; | 172 | mem_sleep_current = PM_SUSPEND_MEM; |
173 | } | 173 | } |
174 | 174 | ||