[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2818730.mvXUDI8C0e@rafael.j.wysocki>
Date: Wed, 07 Jan 2026 16:14:55 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Linux ACPI <linux-acpi@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux PM <linux-pm@...r.kernel.org>,
Mario Limonciello <mario.limonciello@....com>
Subject:
[PATCH v1] ACPI: PM: s2idle: Add missing checks to acpi_s2idle_begin_lps0()
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Commit 32ece31db4df ("ACPI: PM: s2idle: Only retrieve constraints
when needed"), that attempted to avoid useless evaluation of LPS0 _DSM
Function 1 in lps0_device_attach(), forgot to add checks for
lps0_device_handle and sleep_no_lps0 to acpi_s2idle_begin_lps0()
where they should be done before calling lpi_device_get_constraints()
or lpi_device_get_constraints_amd().
Add the missing checks.
Fixes: 32ece31db4df ("ACPI: PM: s2idle: Only retrieve constraints when needed")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
drivers/acpi/x86/s2idle.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -515,7 +515,8 @@ static struct acpi_scan_handler lps0_han
static int acpi_s2idle_begin_lps0(void)
{
- if (pm_debug_messages_on && !lpi_constraints_table) {
+ if (lps0_device_handle && !sleep_no_lps0 && pm_debug_messages_on &&
+ !lpi_constraints_table) {
if (acpi_s2idle_vendor_amd())
lpi_device_get_constraints_amd();
else
Powered by blists - more mailing lists