ACPI / PM: Make it possible to ignore the system sleep blacklist
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 15 Nov 2017 01:16:55 +0000 (02:16 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Nov 2017 00:44:24 +0000 (01:44 +0100)
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>
Documentation/admin-guide/kernel-parameters.txt
arch/x86/kernel/acpi/sleep.c
drivers/acpi/sleep.c
include/linux/acpi.h

index 6571fbfdb2a1527c25b3a01e9c4228c84adce639..b125690d5dbcd605d55e69e81d9e3678ece98ccc 100644 (file)
 
        acpi_sleep=     [HW,ACPI] Sleep options
                        Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
-                                 old_ordering, nonvs, sci_force_enable }
+                                 old_ordering, nonvs, sci_force_enable, nobl }
                        See Documentation/power/video.txt for information on
                        s3_bios and s3_mode.
                        s3_beep is for debugging; it makes the PC's speaker beep
                        sci_force_enable causes the kernel to set SCI_EN directly
                        on resume from S1/S3 (which is against the ACPI spec,
                        but some broken systems don't work without it).
+                       nobl causes the internal blacklist of systems known to
+                       behave incorrectly in some ways with respect to system
+                       suspend and resume to be ignored (use wisely).
 
        acpi_use_timer_override [HW,ACPI]
                        Use timer override. For some broken Nvidia NF5 boards
index 7188aea91549bb31450d049b689fda1032b21f5f..f1915b7440522a82642a0b3369df1a570d8c834a 100644 (file)
@@ -138,6 +138,8 @@ static int __init acpi_sleep_setup(char *str)
                        acpi_nvs_nosave_s3();
                if (strncmp(str, "old_ordering", 12) == 0)
                        acpi_old_suspend_ordering();
+               if (strncmp(str, "nobl", 4) == 0)
+                       acpi_sleep_no_blacklist();
                str = strchr(str, ',');
                if (str != NULL)
                        str += strspn(str, ", \t");
index 8082871b409a6d631a80b5d2327e9fcb6a1509d4..15cd862a87c292c82ced070903b6abffd2ed9a00 100644 (file)
@@ -367,10 +367,20 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
        {},
 };
 
+static bool ignore_blacklist;
+
+void __init acpi_sleep_no_blacklist(void)
+{
+       ignore_blacklist = true;
+}
+
 static void __init acpi_sleep_dmi_check(void)
 {
        int year;
 
+       if (ignore_blacklist)
+               return;
+
        if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year >= 2012)
                acpi_nvs_nosave_s3();
 
index dc1ebfeeb5ecc10e248f57084f80c72d32c6c14a..699655a9618be0c22a8f6728ee2c131be6b22c46 100644 (file)
@@ -451,6 +451,7 @@ void __init acpi_no_s4_hw_signature(void);
 void __init acpi_old_suspend_ordering(void);
 void __init acpi_nvs_nosave(void);
 void __init acpi_nvs_nosave_s3(void);
+void __init acpi_sleep_no_blacklist(void);
 #endif /* CONFIG_PM_SLEEP */
 
 struct acpi_osc_context {