]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
thermal/intel: Fix intel_tcc_get_temp() to support negative CPU temperature
authorZhang Rui <rui.zhang@intel.com>
Tue, 6 Feb 2024 01:54:09 +0000 (09:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:18 +0000 (15:28 +0200)
commit9df6a7a3c951e5745480b659db2389dee5bf41f6
tree75dbdeb088724309957b8f3e69ad4c8adabe75ef
parent868e3264f236ab9a14d62cd09d797f0c10a9823b
thermal/intel: Fix intel_tcc_get_temp() to support negative CPU temperature

[ Upstream commit 7251b9e8a007ddd834aa81f8c7ea338884629fec ]

CPU temperature can be negative in some cases. Thus the negative CPU
temperature should not be considered as a failure.

Fix intel_tcc_get_temp() and its users to support negative CPU
temperature.

Fixes: a3c1f066e1c5 ("thermal/intel: Introduce Intel TCC library")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Cc: 6.3+ <stable@vger.kernel.org> # 6.3+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c
drivers/thermal/intel/intel_tcc.c
drivers/thermal/intel/x86_pkg_temp_thermal.c
include/linux/intel_tcc.h