diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-10 08:57:14 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-10 08:57:14 +0100 |
commit | 099b4d3b473db012a55ce6bec9ef594d0508e782 (patch) | |
tree | a55980b995612c188d02bd6f47b93f1e17733572 /drivers/hwmon/coretemp.c | |
parent | 09e1e9c4a4009a75c1dd716b6f0797fae3ab4dfd (diff) | |
parent | 7e9f1945213cdd7cd11f29346ded07a81854b5af (diff) | |
download | linux-099b4d3b473db012a55ce6bec9ef594d0508e782.tar.gz linux-099b4d3b473db012a55ce6bec9ef594d0508e782.tar.bz2 linux-099b4d3b473db012a55ce6bec9ef594d0508e782.zip |
Merge branch 'davinci-next' of git://gitorious.org/linux-davinci/linux-davinci into fixes
Diffstat (limited to 'drivers/hwmon/coretemp.c')
-rw-r--r-- | drivers/hwmon/coretemp.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index de3d2465fe24..85e937984ff7 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 > 80 && val < 120) { + if (val) { dev_info(dev, "TjMax is %d C.\n", val); return val * 1000; } @@ -304,24 +304,9 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev) /* * An assumption is made for early CPUs and unreadable MSR. - * NOTE: the given value may not be correct. + * NOTE: the calculated value may not be correct. */ - - switch (c->x86_model) { - case 0xe: - case 0xf: - case 0x16: - case 0x1a: - dev_warn(dev, "TjMax is assumed as 100 C!\n"); - return 100000; - case 0x17: - case 0x1c: /* Atom CPUs */ - return adjust_tjmax(c, id, dev); - default: - dev_warn(dev, "CPU (model=0x%x) is not supported yet," - " using default TjMax of 100C.\n", c->x86_model); - return 100000; - } + return adjust_tjmax(c, id, dev); } static void __devinit get_ucode_rev_on_cpu(void *edx) @@ -341,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); |