diff options
author | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-06-01 11:03:41 -0700 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-06-01 20:10:40 -0700 |
commit | bb9973e4e73f43bd86698483d0c3f7a362ff94ce (patch) | |
tree | 2595ca9c4a1dad5c12ad21947bf07bccb9c32a4c /drivers/hwmon/coretemp.c | |
parent | 4f5f71a7abe329bdad81ee6a8e4545054a7cc30a (diff) |
hwmon: (coretemp) Further relax temperature range checks
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 <C.Emde@osadl.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Fenghua Yu <fenghua.yu@intel.com>
Diffstat (limited to 'drivers/hwmon/coretemp.c')
-rw-r--r-- | drivers/hwmon/coretemp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 1680977cfba..85e937984ff 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -296,7 +296,7 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev) * 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; } @@ -326,7 +326,7 @@ static int get_pkg_tjmax(unsigned int cpu, struct device *dev) 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); |