]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hwmon: (coretemp) Replace x86_model checks with VFM ones
authorDave Hansen <dave.hansen@linux.intel.com>
Thu, 28 Aug 2025 20:17:29 +0000 (13:17 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 7 Sep 2025 23:33:47 +0000 (16:33 -0700)
commit468a20df2ba62ab55feabc4e4306e70824bcb26c
tree685d00a8c0ad4c4a694fa39a053cb2834daf9d08
parent3d5fcffcdf6266ddf070110eb7d8a6387fd9d291
hwmon: (coretemp) Replace x86_model checks with VFM ones

Intel CPUs have been using Family 6 for a while. The Family-model checks
in the coretemp driver implicitly assume Family 6. With the upcoming
Family 18 and 19 models, some of these checks fall apart.

While reading the temperature target MSR, cpu_has_tjmax() performs model
checks only to determine if a device warning should be printed. Instead
of expanding the checks, get rid of the function and print the warning
once unconditionally if the MSR read fails. The checks aren't worth
preventing a single line warning to dmesg.

Update the rest of the x86_model checks with VFM ones to make them more
robust. This automatically covers the upcoming Family 18 and 19 as well
as any future extended families.

Add a code comment to reflect that none of the CPUs in Family 5 or
Family 15 set X86_FEATURE_DTHERM. The VFM checks do not impact these
CPUs since the driver does not load on them.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Sohil Mehta <sohil.mehta@intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20250828201729.1145420-1-sohil.mehta@intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/coretemp.c