aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-11-14 20:16:55 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-11-26 19:44:24 -0500
commit57044031b0cb11325e1034394a4721484f9dc9fe (patch)
tree2dc4c299fdc81861b8c101c538c2f702e5cc4e2f
parentdb68daff90ef79761cc0bba16f775b6027ea3a83 (diff)
ACPI / PM: Make it possible to ignore the system sleep blacklist
The ACPI code supporting system transitions to sleep states uses an internal blacklist to apply special handling to some machines reported to behave incorrectly in some ways. However, some entries of that blacklist cover problematic as well as non-problematic systems, so give the users of the latter a chance to ignore the blacklist and run their systems in the default way by adding acpi_sleep=nobl to the kernel command line. For example, that allows the users of Dell XPS13 9360 systems not affected by the issue that caused the blacklist entry for this machine to be added by commit 71630b7a832f (ACPI / PM: Blacklist Low Power S0 Idle _DSM for Dell XPS13 9360) to use suspend-to-idle with the Low Power S0 Idle _DSM interface which in principle should be more energy-efficient than S3 on them. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt5
-rw-r--r--arch/x86/kernel/acpi/sleep.c2
-rw-r--r--drivers/acpi/sleep.c10
-rw-r--r--include/linux/acpi.h1
4 files changed, 17 insertions, 1 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 6571fbfdb2a1..b125690d5dbc 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -223,7 +223,7 @@
223 223
224 acpi_sleep= [HW,ACPI] Sleep options 224 acpi_sleep= [HW,ACPI] Sleep options
225 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, 225 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
226 old_ordering, nonvs, sci_force_enable } 226 old_ordering, nonvs, sci_force_enable, nobl }
227 See Documentation/power/video.txt for information on 227 See Documentation/power/video.txt for information on
228 s3_bios and s3_mode. 228 s3_bios and s3_mode.
229 s3_beep is for debugging; it makes the PC's speaker beep 229 s3_beep is for debugging; it makes the PC's speaker beep
@@ -239,6 +239,9 @@
239 sci_force_enable causes the kernel to set SCI_EN directly 239 sci_force_enable causes the kernel to set SCI_EN directly
240 on resume from S1/S3 (which is against the ACPI spec, 240 on resume from S1/S3 (which is against the ACPI spec,
241 but some broken systems don't work without it). 241 but some broken systems don't work without it).
242 nobl causes the internal blacklist of systems known to
243 behave incorrectly in some ways with respect to system
244 suspend and resume to be ignored (use wisely).
242 245
243 acpi_use_timer_override [HW,ACPI] 246 acpi_use_timer_override [HW,ACPI]
244 Use timer override. For some broken Nvidia NF5 boards 247 Use timer override. For some broken Nvidia NF5 boards
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 7188aea91549..f1915b744052 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -138,6 +138,8 @@ static int __init acpi_sleep_setup(char *str)
138 acpi_nvs_nosave_s3(); 138 acpi_nvs_nosave_s3();
139 if (strncmp(str, "old_ordering", 12) == 0) 139 if (strncmp(str, "old_ordering", 12) == 0)
140 acpi_old_suspend_ordering(); 140 acpi_old_suspend_ordering();
141 if (strncmp(str, "nobl", 4) == 0)
142 acpi_sleep_no_blacklist();
141 str = strchr(str, ','); 143 str = strchr(str, ',');
142 if (str != NULL) 144 if (str != NULL)
143 str += strspn(str, ", \t"); 145 str += strspn(str, ", \t");
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 8082871b409a..15cd862a87c2 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -367,10 +367,20 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
367 {}, 367 {},
368}; 368};
369 369
370static bool ignore_blacklist;
371
372void __init acpi_sleep_no_blacklist(void)
373{
374 ignore_blacklist = true;
375}
376
370static void __init acpi_sleep_dmi_check(void) 377static void __init acpi_sleep_dmi_check(void)
371{ 378{
372 int year; 379 int year;
373 380
381 if (ignore_blacklist)
382 return;
383
374 if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year >= 2012) 384 if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year >= 2012)
375 acpi_nvs_nosave_s3(); 385 acpi_nvs_nosave_s3();
376 386
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index dc1ebfeeb5ec..699655a9618b 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -451,6 +451,7 @@ void __init acpi_no_s4_hw_signature(void);
451void __init acpi_old_suspend_ordering(void); 451void __init acpi_old_suspend_ordering(void);
452void __init acpi_nvs_nosave(void); 452void __init acpi_nvs_nosave(void);
453void __init acpi_nvs_nosave_s3(void); 453void __init acpi_nvs_nosave_s3(void);
454void __init acpi_sleep_no_blacklist(void);
454#endif /* CONFIG_PM_SLEEP */ 455#endif /* CONFIG_PM_SLEEP */
455 456
456struct acpi_osc_context { 457struct acpi_osc_context {