aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Wolf <[email protected]>2025-04-10 16:54:55 +0000
committerRafael J. Wysocki <[email protected]>2025-05-16 13:53:26 +0000
commit3f7cd28ae3d1a1d6f151178469cfaef1b07fdbcc (patch)
treee317d99388d41890a83e4c336aada5befe9e4d75
parentACPI: OSI: Stop advertising support for "3.0 _SCP Extensions" (diff)
downloadkernel-3f7cd28ae3d1a1d6f151178469cfaef1b07fdbcc.tar.gz
kernel-3f7cd28ae3d1a1d6f151178469cfaef1b07fdbcc.zip
ACPI: thermal: Execute _SCP before reading trip points
As specified in section 11.4.13 of the ACPI specification the operating system is required to evaluate the _ACx and _PSV objects after executing the _SCP control method. Move the execution of the _SCP control method before the invocation of acpi_thermal_get_trip_points() to avoid missing updates to the _ACx and _PSV objects. Fixes: b09872a652d3 ("ACPI: thermal: Fold acpi_thermal_get_info() into its caller") Signed-off-by: Armin Wolf <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]>
-rw-r--r--drivers/acpi/thermal.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 0c874186f8ae..5c2defe55898 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -803,6 +803,12 @@ static int acpi_thermal_add(struct acpi_device *device)
acpi_thermal_aml_dependency_fix(tz);
+ /*
+ * Set the cooling mode [_SCP] to active cooling. This needs to happen before
+ * we retrieve the trip point values.
+ */
+ acpi_execute_simple_method(tz->device->handle, "_SCP", ACPI_THERMAL_MODE_ACTIVE);
+
/* Get trip points [_ACi, _PSV, etc.] (required). */
acpi_thermal_get_trip_points(tz);
@@ -814,10 +820,6 @@ static int acpi_thermal_add(struct acpi_device *device)
if (result)
goto free_memory;
- /* Set the cooling mode [_SCP] to active cooling. */
- acpi_execute_simple_method(tz->device->handle, "_SCP",
- ACPI_THERMAL_MODE_ACTIVE);
-
/* Determine the default polling frequency [_TZP]. */
if (tzp)
tz->polling_frequency = tzp;