]> git.ipfire.org Git - thirdparty/linux.git/commit
ACPI: PM: s2idle: Only retrieve constraints when needed
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 9 Oct 2025 19:27:11 +0000 (21:27 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 20 Oct 2025 18:39:33 +0000 (20:39 +0200)
commit32ece31db4df792c36bbabb8a1d263a5e1f5017a
tree4c60719cea28fdd8c0c021e69c14c658257ac0fd
parentbfc09902debd036e672148343c0caeab20924c9d
ACPI: PM: s2idle: Only retrieve constraints when needed

The evaluation of LPS0 _DSM Function 1 in lps0_device_attach() may be
useless if pm_debug_messages_on is never set.

For this reason, instead of evaluating it in lps0_device_attach(), do
that in a new .begin() callback for s2idle, acpi_s2idle_begin_lps0(),
only when pm_debug_messages_on is set at that point.

However, never attempt to evaluate LPS0 _DSM Function 1 more than once
to avoid recurring failures.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/3027060.e9J7NaK4W3@rafael.j.wysocki
drivers/acpi/x86/s2idle.c