Skip to contentSkip to conversation

Revert "hwmon: (coretemp) Refine TjMax detection"

PATCH Jean Delvare 1 participant 1 message May 1, 2014

lore
Share & tools
lore

Jean Delvare

author Reviewed-by
#0 lore raw

Hi Guenter,

Quoted 4 lines · Guenter Roeck

This reverts commit 9fb6c9c73b11bef65ba80a362547fd116c1e1c9d.

Tjmax on some Intel CPUs is below 85 degrees C. One known example is L5630 with Tjmax of 71 degrees C. Also, the Intel IA32 System Programming

Looking at the coretemp driver documentation file, there are more Xeon series processors which have TjMax below 85°C. 80°C and 70°C appear to be common values.

Quoted 6 lines

document states that the temperature target is in bits 23:16 of MSR 0x1a2 (MSR_TEMPERATURE_TARGET), which that's 8 bits, not 7.

So even if turbostst uses similar checks to validate Tjmax, there is no evidence that the checks are actually required. On the contrary, the checks are known to cause problems and therefore need to be removed.

Therefore I think turbostat needs to be fixed too. I'll send a patch later today.

Also, a reference to the bugzilla report which is fixed by this revert should be included in the commit message.

Quoted 17 lines
Fixes 9fb6c9c hwmon: (coretemp) Refine TjMax detection

---
I'll add Cc: stable when pushing the patch.

 drivers/hwmon/coretemp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/coretemp.c +0 -1
index 6d02e3b..d76f0b7 100644
@@ -365,12 +365,12 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)
 		if (cpu_has_tjmax(c))
 			dev_warn(dev, "Unable to read TjMax from CPU %u\n", id);
 	} else {
-		val = (eax >> 16) & 0x7f;

drivers/hwmon/coretemp.c static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev) · line 376

Quoted 10 lines
drivers/hwmon/coretemp.c +2 -1
+		val = (eax >> 16) & 0xff;
 		/*
 		 * If the TjMax is not plausible, an assumption
 		 * will be used
 		 */
-		if (val >= 85) {
+		if (val) {
 			dev_dbg(dev, "TjMax is %d degrees C\n", val);
 			return val * 1000;
 		}
Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors