diff options
| author | Zhang Rui <rui.zhang@intel.com> | 2025-05-19 15:09:01 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-04 14:42:20 +0200 |
| commit | 7093887a11fe46a0934009564e683fa96d2d89c9 (patch) | |
| tree | 04d293eb08f31eb6e0d840052f71e5823688c257 /drivers/thermal | |
| parent | f86465626917df3b8bdd2756ec0cc9d179c5af0f (diff) | |
| download | linux-7093887a11fe46a0934009564e683fa96d2d89c9.tar.gz linux-7093887a11fe46a0934009564e683fa96d2d89c9.tar.bz2 linux-7093887a11fe46a0934009564e683fa96d2d89c9.zip | |
thermal: intel: x86_pkg_temp_thermal: Fix bogus trip temperature
commit cf948c8e274e8b406e846cdf6cc48fe47f98cf57 upstream.
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: 8ef0ca4a177d ("Merge back other thermal control material for 6.3.")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reported-by: zhang ning <zhangn1985@outlook.com>
Closes: https://lore.kernel.org/all/TY2PR01MB3786EF0FE24353026293F5ACCD97A@TY2PR01MB3786.jpnprd01.prod.outlook.com/
Tested-by: zhang ning <zhangn1985@outlook.com>
Cc: 6.3+ <stable@vger.kernel.org> # 6.3+
Link: https://patch.msgid.link/20250519070901.1031233-1-rui.zhang@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thermal')
| -rw-r--r-- | drivers/thermal/intel/x86_pkg_temp_thermal.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thermal/intel/x86_pkg_temp_thermal.c b/drivers/thermal/intel/x86_pkg_temp_thermal.c index 61c3d450ee60..2e06b26be4ef 100644 --- a/drivers/thermal/intel/x86_pkg_temp_thermal.c +++ b/drivers/thermal/intel/x86_pkg_temp_thermal.c @@ -331,6 +331,7 @@ static int pkg_temp_thermal_device_add(unsigned int cpu) tj_max = intel_tcc_get_tjmax(cpu); if (tj_max < 0) return tj_max; + tj_max *= 1000; zonedev = kzalloc(sizeof(*zonedev), GFP_KERNEL); if (!zonedev) |
