Further relax temperature range checks after reading the IA32_TEMPERATURE_TARGET
register. If the register returns a value other than 0 in bits 16..32, assume
that the returned value is correct.
This change applies to both packet and core temperature limits.
Cc: Carsten Emde <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Fenghua Yu <[email protected]>
* If the TjMax is not plausible, an assumption
* will be used
*/
- if (val >= 70 && val <= 125) {
+ if (val) {
dev_info(dev, "TjMax is %d C.\n", val);
return val * 1000;
}
err = rdmsr_safe_on_cpu(cpu, MSR_IA32_TEMPERATURE_TARGET, &eax, &edx);
if (!err) {
val = (eax >> 16) & 0xff;
- if (val > 80 && val < 120)
+ if (val)
return val * 1000;
}
dev_warn(dev, "Unable to read Pkg-TjMax from CPU:%u\n", cpu);