Skip to content

Commit e547d4f

Browse files
committed
Merge tag 'acpi-6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki: "Add checks missed by a previous recent update to the ACPI suspend-to-idle code and add a debug module parameter to it to work around a platform firmware issue exposed by that update (Rafael Wysocki)" * tag 'acpi-6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: s2idle: Add module parameter for LPS0 constraints checking ACPI: PM: s2idle: Add missing checks to acpi_s2idle_begin_lps0()
2 parents 711673f + 7edf6f7 commit e547d4f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

drivers/acpi/x86/s2idle.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ static bool sleep_no_lps0 __read_mostly;
2828
module_param(sleep_no_lps0, bool, 0644);
2929
MODULE_PARM_DESC(sleep_no_lps0, "Do not use the special LPS0 device interface");
3030

31+
static bool check_lps0_constraints __read_mostly;
32+
module_param(check_lps0_constraints, bool, 0644);
33+
MODULE_PARM_DESC(check_lps0_constraints, "Check LPS0 device constraints");
34+
3135
static const struct acpi_device_id lps0_device_ids[] = {
3236
{"PNP0D80", },
3337
{"", },
@@ -515,7 +519,8 @@ static struct acpi_scan_handler lps0_handler = {
515519

516520
static int acpi_s2idle_begin_lps0(void)
517521
{
518-
if (pm_debug_messages_on && !lpi_constraints_table) {
522+
if (lps0_device_handle && !sleep_no_lps0 && check_lps0_constraints &&
523+
!lpi_constraints_table) {
519524
if (acpi_s2idle_vendor_amd())
520525
lpi_device_get_constraints_amd();
521526
else
@@ -539,7 +544,7 @@ static int acpi_s2idle_prepare_late_lps0(void)
539544
if (!lps0_device_handle || sleep_no_lps0)
540545
return 0;
541546

542-
if (pm_debug_messages_on)
547+
if (check_lps0_constraints)
543548
lpi_check_constraints();
544549

545550
/* Screen off */

0 commit comments

Comments
 (0)