All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [lm-sensors] [PATCH] hwmon: (coretemp) Further relax
@ 2011-06-01 18:32 Yu, Fenghua
  2011-06-06 13:57 ` Jean Delvare
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Yu, Fenghua @ 2011-06-01 18:32 UTC (permalink / raw)
  To: lm-sensors

> -----Original Message-----
> From: Guenter Roeck [mailto:guenter.roeck@ericsson.com]
> Sent: Wednesday, June 01, 2011 11:09 AM
> To: lm-sensors@lm-sensors.org
> Cc: Guenter Roeck; Carsten Emde; Yu, Fenghua; Jean Delvare
> Subject: [PATCH] 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>
> ---
>  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 1680977..85e9379 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);
> --
> 1.7.3.1

Acked-by: Fenghua Yu <fenghua.yu@intel.com>


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-06-09 21:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01 18:32 [lm-sensors] [PATCH] hwmon: (coretemp) Further relax Yu, Fenghua
2011-06-06 13:57 ` Jean Delvare
2011-06-06 14:48 ` Guenter Roeck
2011-06-08  9:31 ` Jean Delvare
2011-06-08 10:17 ` R, Durgadoss
2011-06-08 16:45 ` Yu, Fenghua
2011-06-08 18:32 ` Jean Delvare
2011-06-09  1:01 ` Yu, Fenghua
2011-06-09  8:19 ` Jean Delvare
2011-06-09 21:01 ` Yu, Fenghua

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.