From: Maxim Levitsky on
On Fri, 2010-05-07 at 17:59 +0800, Huaxu Wan wrote:
> The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer
> processers.

I know that TjMax on my system is 85, and now coretemp reports wrong
temperatures.
First of all BIOS using stupid tricks actualy reports CPU temperature
through ACPI, and assuming it was correct TjMax is 85.
It also shuts down the system if I 'lie' to it that cpu temperature is
85C.

Coretemp was working correctly in 2.6.34

cat /proc/cpuinfo

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz
stepping : 13
cpu MHz : 1667.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
bogomips : 3324.70
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz
stepping : 13
cpu MHz : 1667.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
bogomips : 3324.99
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:


Best regards,
Maxim Levitsky

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Maxim Levitsky on
On Sat, 2010-05-29 at 08:39 +0300, Maxim Levitsky wrote:
> On Fri, 2010-05-07 at 17:59 +0800, Huaxu Wan wrote:
> > The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer
> > processers.
>
> I know that TjMax on my system is 85, and now coretemp reports wrong
> temperatures.
> First of all BIOS using stupid tricks actualy reports CPU temperature
> through ACPI, and assuming it was correct TjMax is 85.
> It also shuts down the system if I 'lie' to it that cpu temperature is
> 85C.
>
> Coretemp was working correctly in 2.6.34

The following patch unbreaks the driver:


commit 8ff4f666908dd208a10f1b6b38286303fdb774fc
Author: Maxim Levitsky <maximlevitsky(a)gmail.com>
Date: Sat May 29 08:57:09 2010 +0300

coretemp: unbreak tjmax reports on Core2 CPUs

Core2 CPUS don't report TjMax, but its not always 100C

Signed-off-by: Maxim Levitsky <maximlevitsky(a)gmail.com>


diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 2988da1..fb100a4 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -276,11 +276,8 @@ static int __devinit get_tjmax(struct cpuinfo_x86
*c, u32 id,
case 0xf:
case 0x16:
case 0x1a:
- dev_warn(dev, "TjMax is assumed as 100 C!\n");
- return 100000;
- break;
case 0x17:
- case 0x1c: /* Atom CPUs */
+ case 0x1c:
return adjust_tjmax(c, id, dev);
break;
default:


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Huaxu Wan on
On 08:39 Sat 29 May, Maxim Levitsky wrote:
> On Fri, 2010-05-07 at 17:59 +0800, Huaxu Wan wrote:
> > The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer
> > processers.
>
> I know that TjMax on my system is 85, and now coretemp reports wrong
> temperatures.
> First of all BIOS using stupid tricks actualy reports CPU temperature
> through ACPI, and assuming it was correct TjMax is 85.
> It also shuts down the system if I 'lie' to it that cpu temperature is
> 85C.

From the list at [1], the TjMax(Tjunction) of T5450 is 100C. Does anyone
here can make a double check?

[1] http://ark.intel.com/Product.aspx?id=30787&processor=T5450&spec-codes=SLA4F

Thanks
Huaxu



>
> Coretemp was working correctly in 2.6.34
>
> cat /proc/cpuinfo
>
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 6
> model : 15
> model name : Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz
> stepping : 13
> cpu MHz : 1667.000
> cache size : 2048 KB
> physical id : 0
> siblings : 2
> core id : 0
> cpu cores : 2
> apicid : 0
> initial apicid : 0
> fpu : yes
> fpu_exception : yes
> cpuid level : 10
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
> bogomips : 3324.70
> clflush size : 64
> cache_alignment : 64
> address sizes : 36 bits physical, 48 bits virtual
> power management:
>
> processor : 1
> vendor_id : GenuineIntel
> cpu family : 6
> model : 15
> model name : Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz
> stepping : 13
> cpu MHz : 1667.000
> cache size : 2048 KB
> physical id : 0
> siblings : 2
> core id : 1
> cpu cores : 2
> apicid : 1
> initial apicid : 1
> fpu : yes
> fpu_exception : yes
> cpuid level : 10
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
> bogomips : 3324.99
> clflush size : 64
> cache_alignment : 64
> address sizes : 36 bits physical, 48 bits virtual
> power management:
>
>
> Best regards,
> Maxim Levitsky
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Maxim Levitsky on
On Mon, 2010-05-31 at 09:39 +0800, Huaxu Wan wrote:
> On 08:39 Sat 29 May, Maxim Levitsky wrote:
> > On Fri, 2010-05-07 at 17:59 +0800, Huaxu Wan wrote:
> > > The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer
> > > processers.
> >
> > I know that TjMax on my system is 85, and now coretemp reports wrong
> > temperatures.
> > First of all BIOS using stupid tricks actualy reports CPU temperature
> > through ACPI, and assuming it was correct TjMax is 85.
> > It also shuts down the system if I 'lie' to it that cpu temperature is
> > 85C.
>
> From the list at [1], the TjMax(Tjunction) of T5450 is 100C. Does anyone
> here can make a double check?
>
> [1] http://ark.intel.com/Product.aspx?id=30787&processor=T5450&spec-codes=SLA4F

This is very interesting.

With TjMax 85C, the CPUs idle temperature is reported at around 45~50C
GPU temperature that is around 60C

BIOS also reports 45~50C.

BIOS hooks an SMI to CPU thermal report, and stores the temperature it
read in ram, then ACPI code reads it, reports and passes to the EC
(embedded controller).

If I write myself 85 to embedded controller, systems shuts down.
(values less that 85, eg 84 don't shut system).

Thats all I know.

Best regards,
Maxim Levitsky

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Maxim Levitsky on
On Wed, 2010-06-02 at 19:34 +0300, Maxim Levitsky wrote:
> On Mon, 2010-05-31 at 09:39 +0800, Huaxu Wan wrote:
> > On 08:39 Sat 29 May, Maxim Levitsky wrote:
> > > On Fri, 2010-05-07 at 17:59 +0800, Huaxu Wan wrote:
> > > > The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer
> > > > processers.
> > >
> > > I know that TjMax on my system is 85, and now coretemp reports wrong
> > > temperatures.
> > > First of all BIOS using stupid tricks actualy reports CPU temperature
> > > through ACPI, and assuming it was correct TjMax is 85.
> > > It also shuts down the system if I 'lie' to it that cpu temperature is
> > > 85C.
> >
> > From the list at [1], the TjMax(Tjunction) of T5450 is 100C. Does anyone
> > here can make a double check?
> >
> > [1] http://ark.intel.com/Product.aspx?id=30787&processor=T5450&spec-codes=SLA4F
>
> This is very interesting.
>
> With TjMax 85C, the CPUs idle temperature is reported at around 45~50C
> GPU temperature that is around 60C
>
> BIOS also reports 45~50C.
>
> BIOS hooks an SMI to CPU thermal report, and stores the temperature it
> read in ram, then ACPI code reads it, reports and passes to the EC
> (embedded controller).
>
> If I write myself 85 to embedded controller, systems shuts down.
> (values less that 85, eg 84 don't shut system).


Another clue is that right after resume from ram, after long delay
(~hour) the displayed temperature with TjMax 85 is 33C. Since room
temperature here is around 27C, this seems more plausible that
33 + 15 = 48C


Best regards,
Maxim Levitsky

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/