diff options
author | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-05-31 09:54:21 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-06-01 23:10:31 -0400 |
commit | 4f5f71a7abe329bdad81ee6a8e4545054a7cc30a (patch) | |
tree | e7d907a27fa72bd1c706a4f8a0eb2ca246ad26e5 /drivers | |
parent | 4c6e0f8101e62d8b2d01dc94b835a98b191a1454 (diff) |
hwmon: (coretemp) Fix TjMax detection for older CPUs
Commit a321cedb12904114e2ba5041a3673ca24deb09c9 excludes CPU models 0xe, 0xf,
0x16, and 0x1a from TjMax temperature adjustment, even though several of those
CPUs are known to have TiMax other than 100 degrees C, and even though the code
in adjust_tjmax() explicitly handles those CPUs and points to a Web document
listing several of the affected CPU IDs.
Reinstate original TjMax adjustment if TjMax can not be determined using the
IA32_TEMPERATURE_TARGET register.
https://bugzilla.kernel.org/show_bug.cgi?id=32582
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Huaxu Wan <huaxu.wan@linux.intel.com>
Cc: Carsten Emde <C.Emde@osadl.org>
Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Yong Wang <yong.y.wang@linux.intel.com>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Tested-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Fenghua Yu <fenghua.yu@intel.com>
Cc: <stable@kernel.org> # .35.x .36.x .37.x .38.x .39.x
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/coretemp.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 0eeff46c0ea6..1680977cfbaa 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c | |||
@@ -304,24 +304,9 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev) | |||
304 | 304 | ||
305 | /* | 305 | /* |
306 | * An assumption is made for early CPUs and unreadable MSR. | 306 | * An assumption is made for early CPUs and unreadable MSR. |
307 | * NOTE: the given value may not be correct. | 307 | * NOTE: the calculated value may not be correct. |
308 | */ | 308 | */ |
309 | 309 | return adjust_tjmax(c, id, dev); | |
310 | switch (c->x86_model) { | ||
311 | case 0xe: | ||
312 | case 0xf: | ||
313 | case 0x16: | ||
314 | case 0x1a: | ||
315 | dev_warn(dev, "TjMax is assumed as 100 C!\n"); | ||
316 | return 100000; | ||
317 | case 0x17: | ||
318 | case 0x1c: /* Atom CPUs */ | ||
319 | return adjust_tjmax(c, id, dev); | ||
320 | default: | ||
321 | dev_warn(dev, "CPU (model=0x%x) is not supported yet," | ||
322 | " using default TjMax of 100C.\n", c->x86_model); | ||
323 | return 100000; | ||
324 | } | ||
325 | } | 310 | } |
326 | 311 | ||
327 | static void __devinit get_ucode_rev_on_cpu(void *edx) | 312 | static void __devinit get_ucode_rev_on_cpu(void *edx) |