Skip to content

Commit cf948c8

Browse files
zhang-ruirafaeljw
authored andcommitted
thermal: intel: x86_pkg_temp_thermal: Fix bogus trip temperature
The tj_max value obtained from the Intel TCC library are in Celsius, whereas the thermal subsystem operates in milli-Celsius. This discrepancy leads to incorrect trip temperature calculations. Fix bogus trip temperature by converting tj_max to milli-Celsius Unit. Fixes: 8ef0ca4 ("Merge back other thermal control material for 6.3.") Signed-off-by: Zhang Rui <[email protected]> Reported-by: zhang ning <[email protected]> Closes: https://lore.kernel.org/all/TY2PR01MB3786EF0FE24353026293F5ACCD97A@TY2PR01MB3786.jpnprd01.prod.outlook.com/ Tested-by: zhang ning <[email protected]> Cc: 6.3+ <[email protected]> # 6.3+ Link: https://patch.msgid.link/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent a5806cd commit cf948c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/thermal/intel/x86_pkg_temp_thermal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ static int pkg_temp_thermal_device_add(unsigned int cpu)
329329
tj_max = intel_tcc_get_tjmax(cpu);
330330
if (tj_max < 0)
331331
return tj_max;
332+
tj_max *= 1000;
332333

333334
zonedev = kzalloc(sizeof(*zonedev), GFP_KERNEL);
334335
if (!zonedev)

0 commit comments

Comments
 (0)