Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 7f18bd4

Browse files
committed
thermal: ACPI: Invalidate trip points with temperature of 0 or below
It is reported that commit 9502108 ("thermal: core: Drop trips_disabled bitmask") causes the maximum frequency of CPUs to drop further down with every system sleep-wake cycle on Intel Core i7-4710HQ. This turns out to be due to a trip point whose temperature is equal to 0 degrees Celsius which is acted on every time the system wakes from sleep. Before commit 9502108 this trip point would be disabled wia the trips_disabled bitmask, but now it is treated as a valid one. Since ACPI thermal control is generally about protection against overheating, trip points with temperature of 0 centigrade or below are not particularly useful there, so initialize them all as invalid which fixes the problem at hand. Fixes: 9502108 ("thermal: core: Drop trips_disabled bitmask") Closes: https://lore.kernel.org/linux-pm/3f71747b-f852-4ee0-b384-cf46b2aefa3f@gmx.com Reported-by: Tibor Billes <tbilles@gmx.com> Tested-by: Tibor Billes <tbilles@gmx.com> Cc: 6.7+ <stable@vger.kernel.org> # 6.7+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 1af89de commit 7f18bd4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/acpi/thermal.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,17 @@ static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz)
168168

169169
static int acpi_thermal_temp(struct acpi_thermal *tz, int temp_deci_k)
170170
{
171+
int temp;
172+
171173
if (temp_deci_k == THERMAL_TEMP_INVALID)
172174
return THERMAL_TEMP_INVALID;
173175

174-
return deci_kelvin_to_millicelsius_with_offset(temp_deci_k,
176+
temp = deci_kelvin_to_millicelsius_with_offset(temp_deci_k,
175177
tz->kelvin_offset);
178+
if (temp <= 0)
179+
return THERMAL_TEMP_INVALID;
180+
181+
return temp;
176182
}
177183

178184
static bool acpi_thermal_trip_valid(struct acpi_thermal_trip *acpi_trip)

0 commit comments

Comments
 (0)