Skip to contentSkip to conversation

hwmon: (coretemp) Detect the thermal sensors by CPUID

PATCH Superseded Huaxu Wan 10 participants 37 messages May 7, 2010 – Aug 31, 2010

Subsystems (3)
lore
Share & tools
lore

Huaxu Wan

author
#0 lore raw

PATCH 1/2 hwmon: (coretemp) Detect the thermal sensors by CPUID

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

---
 drivers/hwmon/coretemp.c |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)
drivers/hwmon/coretemp.c +7 -17
index e9b7fbc..237c68d 100644
@@ -440,6 +440,7 @@ static int __init coretemp_init(void)
 {
        int i, err = -ENODEV;
        struct pdev_entry *p, *n;
+       u32 eax;
 
        /* quick check if we run Intel */
        if (cpu_data(0).x86_vendor != X86_VENDOR_INTEL)
@@ -450,23 +451,12 @@ static int __init coretemp_init(void)
                goto exit;
 
        for_each_online_cpu(i) {
-               struct cpuinfo_x86 *c = &cpu_data(i);
-
-               /* check if family 6, models 0xe (Pentium M DC),
-                 0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-                 0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-                 0x1e (Lynnfield) */
-               if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-                   !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
-                       (c->x86_model == 0x16) || (c->x86_model == 0x17) ||
-                       (c->x86_model == 0x1a) || (c->x86_model == 0x1c) ||
-                       (c->x86_model == 0x1e))) {
-
-                       /* supported CPU not found, but report the unknown
-                          family 6 CPU */
-                       if ((c->x86 == 0x6) && (c->x86_model > 0xf))
-                               printk(KERN_WARNING DRVNAME ": Unknown CPU "
-                                       "model 0x%x\n", c->x86_model);
+               /* check if the CPU has thermal sensor */
+               eax = cpuid_eax(0x06);
+               if (!(eax & 0x01)) {
+                       struct cpuinfo_x86 *c = &cpu_data(i);
+                       printk_once(KERN_WARNING DRVNAME ": CPU (model=0x%x)"
+                               " has no thermal sensor!\n", c->x86_model);
                        continue;
                }
 

--
1.6.3.3.363.g725cf7

#1 lore raw

Hi Huawu,

Quoted 3 lines · Huaxu Wan

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

I can see that you are sending these two patches for quite some time and I understand you'd like them to get finally reviewed and merged. Unfortunately I simply don't have the time for this. So please don't wait for my ack, just send your patches to Andrew Morton and hopefully he will take care.

Quoted 50 lines
---
 drivers/hwmon/coretemp.c |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)
drivers/hwmon/coretemp.c +7 -18
index e9b7fbc..237c68d 100644
@@ -440,6 +440,7 @@ static int __init coretemp_init(void)
 {
        int i, err = -ENODEV;
        struct pdev_entry *p, *n;
+       u32 eax;
 
        /* quick check if we run Intel */
        if (cpu_data(0).x86_vendor != X86_VENDOR_INTEL)
@@ -450,23 +451,12 @@ static int __init coretemp_init(void)
                goto exit;
 
        for_each_online_cpu(i) {
-               struct cpuinfo_x86 *c = &cpu_data(i);
-
-               /* check if family 6, models 0xe (Pentium M DC),
-                 0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-                 0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-                 0x1e (Lynnfield) */
-               if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-                   !((c->x86_model = 0xe) || (c->x86_model = 0xf) ||
-                       (c->x86_model = 0x16) || (c->x86_model = 0x17) ||
-                       (c->x86_model = 0x1a) || (c->x86_model = 0x1c) ||
-                       (c->x86_model = 0x1e))) {
-
-                       /* supported CPU not found, but report the unknown
-                          family 6 CPU */
-                       if ((c->x86 = 0x6) && (c->x86_model > 0xf))
-                               printk(KERN_WARNING DRVNAME ": Unknown CPU "
-                                       "model 0x%x\n", c->x86_model);
+               /* check if the CPU has thermal sensor */
+               eax = cpuid_eax(0x06);
+               if (!(eax & 0x01)) {
+                       struct cpuinfo_x86 *c = &cpu_data(i);
+                       printk_once(KERN_WARNING DRVNAME ": CPU (model=0x%x)"
+                               " has no thermal sensor!\n", c->x86_model);
                        continue;
                }
 
--

1.6.3.3.363.g725cf7

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Huaxu Wan

Hi Huaxu,

Quoted 2 lines

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

Thanks, works great, successfully tested it on an i7 machine.

I would propose to use dev_warn() instead of printk_once(), since all other per-cpu info is also logged this way.

---
 drivers/hwmon/coretemp.c |   23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)
drivers/hwmon/coretemp.c +7 -16
Index: head/drivers/hwmon/coretemp.c
===================================================================
@@ -440,6 +440,7 @@ static int __init coretemp_init(void)
 {
 	int i, err = -ENODEV;
 	struct pdev_entry *p, *n;
+	u32 eax;
 
 	/* quick check if we run Intel */
 	if (cpu_data(0).x86_vendor != X86_VENDOR_INTEL)
@@ -450,23 +451,13 @@ static int __init coretemp_init(void)
 		goto exit;
 
 	for_each_online_cpu(i) {
-		struct cpuinfo_x86 *c = &cpu_data(i);
+		/* check if the CPU has thermal sensor */
+		eax = cpuid_eax(0x06);
+		if (!(eax & 0x01)) {
+			struct cpuinfo_x86 *c = &cpu_data(i);
 
-		/* check if family 6, models 0xe (Pentium M DC),
-		  0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-		  0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-		  0x1e (Lynnfield) */
-		if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-		    !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
-			(c->x86_model == 0x16) || (c->x86_model == 0x17) ||
-			(c->x86_model == 0x1a) || (c->x86_model == 0x1c) ||
-			(c->x86_model == 0x1e))) {
-
-			/* supported CPU not found, but report the unknown
-			   family 6 CPU */
-			if ((c->x86 == 0x6) && (c->x86_model > 0xf))
-				printk(KERN_WARNING DRVNAME ": Unknown CPU "
-					"model 0x%x\n", c->x86_model);
+			dev_warn("CPU (model=0x%x) has no thermal sensor!\n",
+			    c->x86_model);
 			continue;
 		}
 

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

author
#3 lore raw
Quoted 11 lines · Carsten Emde

Hi Huaxu,

Quoted 2 lines

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

Thanks, works great, successfully tested it on an i7 machine.

I would propose to use dev_warn() instead of printk_once(), since all other per-cpu info is also logged this way.

That reminds me that dev_warn is right one on multiple CPU system, especially with different CPUs. Thank you.

Quoted 46 lines
---
 drivers/hwmon/coretemp.c |   23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

Index: head/drivers/hwmon/coretemp.c
===================================================================

drivers/hwmon/coretemp.c +7 -16
@@ -440,6 +440,7 @@ static int __init coretemp_init(void)
 {
 	int i, err = -ENODEV;
 	struct pdev_entry *p, *n;
+	u32 eax;
 
 	/* quick check if we run Intel */
 	if (cpu_data(0).x86_vendor != X86_VENDOR_INTEL)
@@ -450,23 +451,13 @@ static int __init coretemp_init(void)
 		goto exit;
 
 	for_each_online_cpu(i) {
-		struct cpuinfo_x86 *c = &cpu_data(i);
+		/* check if the CPU has thermal sensor */
+		eax = cpuid_eax(0x06);
+		if (!(eax & 0x01)) {
+			struct cpuinfo_x86 *c = &cpu_data(i);
 
-		/* check if family 6, models 0xe (Pentium M DC),
-		  0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-		  0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-		  0x1e (Lynnfield) */
-		if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-		    !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
-			(c->x86_model == 0x16) || (c->x86_model == 0x17) ||
-			(c->x86_model == 0x1a) || (c->x86_model == 0x1c) ||
-			(c->x86_model == 0x1e))) {
-
-			/* supported CPU not found, but report the unknown
-			   family 6 CPU */
-			if ((c->x86 == 0x6) && (c->x86_model > 0xf))
-				printk(KERN_WARNING DRVNAME ": Unknown CPU "
-					"model 0x%x\n", c->x86_model);
+			dev_warn("CPU (model=0x%x) has no thermal sensor!\n",
+			    c->x86_model);
 			continue;
 		}
 
Signature · 2 lines
Thanks
Huaxu
author
#4 lore raw

PATCH v2 1/2 hwmon: (coretemp) Detect the thermal sensors by CPUID

In reply to Huaxu Wan

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

---
 drivers/hwmon/coretemp.c |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)
drivers/hwmon/coretemp.c +7 -17
index e9b7fbc..d194207 100644
@@ -440,6 +440,7 @@ static int __init coretemp_init(void)
 {
 	int i, err = -ENODEV;
 	struct pdev_entry *p, *n;
+	u32 eax;
 
 	/* quick check if we run Intel */
 	if (cpu_data(0).x86_vendor != X86_VENDOR_INTEL)
@@ -450,23 +451,12 @@ static int __init coretemp_init(void)
 		goto exit;
 
 	for_each_online_cpu(i) {
-		struct cpuinfo_x86 *c = &cpu_data(i);
-
-		/* check if family 6, models 0xe (Pentium M DC),
-		  0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-		  0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-		  0x1e (Lynnfield) */
-		if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-		    !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
-			(c->x86_model == 0x16) || (c->x86_model == 0x17) ||
-			(c->x86_model == 0x1a) || (c->x86_model == 0x1c) ||
-			(c->x86_model == 0x1e))) {
-
-			/* supported CPU not found, but report the unknown
-			   family 6 CPU */
-			if ((c->x86 == 0x6) && (c->x86_model > 0xf))
-				printk(KERN_WARNING DRVNAME ": Unknown CPU "
-					"model 0x%x\n", c->x86_model);
+ 		/* check if the CPU has thermal sensor */
+ 		eax = cpuid_eax(0x06);
+ 		if (!(eax & 0x01)) {
+ 			struct cpuinfo_x86 *c = &cpu_data(i);
+ 			printk(KERN_WARNING DRVNAME ": CPU (model=0x%x)"
+ 				" has no thermal sensor!\n", c->x86_model);
 			continue;
 		}
 
Signature · 1 line
1.6.3.3.363.g725cf7
#5 lore raw
Quoted 27 lines · Huaxu Wan

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

---
 drivers/hwmon/coretemp.c |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)
drivers/hwmon/coretemp.c +1 -1
index e9b7fbc..d194207 100644
@@ -440,6 +440,7 @@ static int __init coretemp_init(void)
 {
 	int i, err = -ENODEV;
 	struct pdev_entry *p, *n;
+	u32 eax;
 
 	/* quick check if we run Intel */
 	if (cpu_data(0).x86_vendor != X86_VENDOR_INTEL)
@@ -450,23 +451,12 @@ static int __init coretemp_init(void)
 		goto exit;
 
 	for_each_online_cpu(i) {
-		struct cpuinfo_x86 *c = &cpu_data(i);

drivers/hwmon/coretemp.c static int __init coretemp_init(void) · line 463

Quoted 10 lines
drivers/hwmon/coretemp.c +0 -10
-
-		/* check if family 6, models 0xe (Pentium M DC),
-		  0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-		  0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-		  0x1e (Lynnfield) */
-		if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-		    !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
-			(c->x86_model == 0x16) || (c->x86_model == 0x17) ||
-			(c->x86_model == 0x1a) || (c->x86_model == 0x1c) ||
-			(c->x86_model == 0x1e))) {

So we remove something that checks the CPU level for a model we *expect* to find a thermal sensor, and only throws a KERN_WARNING if we're on a model we don't know about...

drivers/hwmon/coretemp.c static int __init coretemp_init(void) · line 459

Quoted 6 lines
drivers/hwmon/coretemp.c +6 -0
+ 		/* check if the CPU has thermal sensor */
+ 		eax = cpuid_eax(0x06);
+ 		if (!(eax & 0x01)) {
+ 			struct cpuinfo_x86 *c = &cpu_data(i);
+ 			printk(KERN_WARNING DRVNAME ": CPU (model=0x%x)"
+ 				" has no thermal sensor!\n", c->x86_model);

And replace it with a totally unprotected check that's going to fire off a KERN_WARNING on every single CPU that Intel ever made that doesn't include a hardware thermal sensor - including all the family 0-5, and model < 0x0e hardware.

KERN_WARNING is for "We expected to find the hardware but it's gone off for a walk on us". If you wanted to say "Hmm.. this CPU doesn't have one" you probably wanted KERN_DEBUG or *maybe* KERN_INFO.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

author
#6 lore raw
Quoted 23 lines · On 08:45 Mon 10 May, [email protected] wrote:

drivers/hwmon/coretemp.c static int __init coretemp_init(void) · line 463

Quoted 10 lines · Huaxu Wan
drivers/hwmon/coretemp.c +0 -10
-
-		/* check if family 6, models 0xe (Pentium M DC),
-		  0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-		  0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-		  0x1e (Lynnfield) */
-		if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-		    !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
-			(c->x86_model == 0x16) || (c->x86_model == 0x17) ||
-			(c->x86_model == 0x1a) || (c->x86_model == 0x1c) ||
-			(c->x86_model == 0x1e))) {

So we remove something that checks the CPU level for a model we *expect* to find a thermal sensor, and only throws a KERN_WARNING if we're on a model we don't know about...

drivers/hwmon/coretemp.c static int __init coretemp_init(void) · line 459

Quoted 6 lines
drivers/hwmon/coretemp.c +6 -0
+ 		/* check if the CPU has thermal sensor */
+ 		eax = cpuid_eax(0x06);
+ 		if (!(eax & 0x01)) {
+ 			struct cpuinfo_x86 *c = &cpu_data(i);
+ 			printk(KERN_WARNING DRVNAME ": CPU (model=0x%x)"
+ 				" has no thermal sensor!\n", c->x86_model);
Quoted 4 lines

And replace it with a totally unprotected check that's going to fire off a KERN_WARNING on every single CPU that Intel ever made that doesn't include a hardware thermal sensor - including all the family 0-5, and model < 0x0e hardware.

Oops! That's a bug. Thank you!

Quoted 4 lines

KERN_WARNING is for "We expected to find the hardware but it's gone off for a walk on us". If you wanted to say "Hmm.. this CPU doesn't have one" you probably wanted KERN_DEBUG or *maybe* KERN_INFO.

I think the better one is KERN_INFO here.

Signature · 2 lines
Thanks
Huaxu
author
#7 lore raw

PATCH v3 1/2 hwmon: (coretemp) Detect the thermal sensors by CPUID

In reply to Huaxu Wan

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

---
 drivers/hwmon/coretemp.c |   34 +++++++++++++---------------------
 1 files changed, 13 insertions(+), 21 deletions(-)
drivers/hwmon/coretemp.c +13 -21
index e9b7fbc..be0ddcf 100644
@@ -451,28 +451,20 @@ static int __init coretemp_init(void)
 
        for_each_online_cpu(i) {
                struct cpuinfo_x86 *c = &cpu_data(i);
+               /*
+                * CPUID.06H.EAX[0] indicates whether the CPU has thermal
+                * sensors. We check this bit only, all the early CPUs
+                * without thermal sensors will be filtered out.
+                */
+               if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01)) {
+                       err = coretemp_device_add(i);
+                       if (err)
+                               goto exit_devices_unreg;
 
-               /* check if family 6, models 0xe (Pentium M DC),
-                 0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-                 0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-                 0x1e (Lynnfield) */
-               if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-                   !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
-                       (c->x86_model == 0x16) || (c->x86_model == 0x17) ||
-                       (c->x86_model == 0x1a) || (c->x86_model == 0x1c) ||
-                       (c->x86_model == 0x1e))) {
-
-                       /* supported CPU not found, but report the unknown
-                          family 6 CPU */
-                       if ((c->x86 == 0x6) && (c->x86_model > 0xf))
-                               printk(KERN_WARNING DRVNAME ": Unknown CPU "
-                                       "model 0x%x\n", c->x86_model);
-                       continue;
-               }
-
-               err = coretemp_device_add(i);
-               if (err)
-                       goto exit_devices_unreg;
+               } else {
+                       printk(KERN_INFO DRVNAME ": CPU (model=0x%x)"
+                               " has no thermal sensor!\n", c->x86_model);
+               }
        }
        if (list_empty(&pdev_list)) {
                err = -ENODEV;

--
1.6.3.3.363.g725cf7

Reviewed-by on v3 1/2
#8 lore raw
Quoted 16 lines · Huaxu Wan

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

---
 drivers/hwmon/coretemp.c |   34 +++++++++++++---------------------
 1 files changed, 13 insertions(+), 21 deletions(-)
drivers/hwmon/coretemp.c +0 -0
index e9b7fbc..be0ddcf 100644
@@ -451,28 +451,20 @@ static int __init coretemp_init(void)
 
        for_each_online_cpu(i) {

drivers/hwmon/coretemp.c static int __init coretemp_init(void) · line 462

Quoted 10 lines
drivers/hwmon/coretemp.c +9 -0
                struct cpuinfo_x86 *c = &cpu_data(i);
+               /*
+                * CPUID.06H.EAX[0] indicates whether the CPU has thermal
+                * sensors. We check this bit only, all the early CPUs
+                * without thermal sensors will be filtered out.
+                */
+               if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01)) {
+                       err = coretemp_device_add(i);
+                       if (err)
+                               goto exit_devices_unreg;

OK, that looks sane. :) For what it's worth, feel free to stick on a

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#9 lore raw
In reply to Huaxu Wan

drivers/hwmon/coretemp.c static int __init coretemp_init(void) · line 466

Quoted 2 lines · Huaxu Wan
drivers/hwmon/coretemp.c +2 -0
+                       printk(KERN_INFO DRVNAME ": CPU (model=0x%x)"
+                               " has no thermal sensor!\n", c->x86_model);

IMHO, it is better to drop that "!" since it is now a simple status message, otherwise it still looks like there is something wrong with the CPU not having a thermal sensor.

Minor thing, really, so feel free to ignore this comment.

Signature · 9 lines
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
author
#10 lore raw

PATCH v3 1/2 hwmon: (coretemp) Detect the thermal sensors by CPUID

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

---
 drivers/hwmon/coretemp.c |   34 +++++++++++++---------------------
 1 files changed, 13 insertions(+), 21 deletions(-)
drivers/hwmon/coretemp.c +13 -21
index e9b7fbc..885da2b 100644
@@ -451,28 +451,20 @@ static int __init coretemp_init(void)
 
 	for_each_online_cpu(i) {
 		struct cpuinfo_x86 *c = &cpu_data(i);
+ 		/* 
+		 * CPUID.06H.EAX[0] indicates whether the CPU has thermal
+		 * sensors. We check this bit only, all the early CPUs
+		 * without thermal sensors will be filtered out. 
+		 */
+		if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01)) {
+			err = coretemp_device_add(i);
+			if (err)
+				goto exit_devices_unreg;
 
-		/* check if family 6, models 0xe (Pentium M DC),
-		  0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-		  0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-		  0x1e (Lynnfield) */
-		if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-		    !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
-			(c->x86_model == 0x16) || (c->x86_model == 0x17) ||
-			(c->x86_model == 0x1a) || (c->x86_model == 0x1c) ||
-			(c->x86_model == 0x1e))) {
-
-			/* supported CPU not found, but report the unknown
-			   family 6 CPU */
-			if ((c->x86 == 0x6) && (c->x86_model > 0xf))
-				printk(KERN_WARNING DRVNAME ": Unknown CPU "
-					"model 0x%x\n", c->x86_model);
-			continue;
-		}
-
-		err = coretemp_device_add(i);
-		if (err)
-			goto exit_devices_unreg;
+		} else {
+			printk(KERN_INFO DRVNAME ": CPU (model=0x%x)"
+				" has no thermal sensor.\n", c->x86_model);
+		} 
 	}
 	if (list_empty(&pdev_list)) {
 		err = -ENODEV;
Signature · 1 line
1.6.3.3.363.g725cf7
#11 lore raw

cover hwmon: Update coretemp to current Intel processors

Hi!

Here comes the current version of the coretemp patches. Huaxu did the initial work; Jean suggested to submit them directly to Andrew.

I made some style changes as advised by checkpatch.

The patches have been tested successfully on Core 2 Duo and Quad, and on Nehalem and Nehalem/Westmere where temperature readings were plausible and changed with load as expected. When tested on an Atom processor (N270), the temperature values were identical to previous versions of the coretemp module and also changed with load. However, the readings should be higher by 10 to 15C as compared to the outside temperature of the processor. Huaxu, could you check? I would guess TjMax to be 105 instead of 90C in these processors.

Carsten.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#12 lore raw

PATCH 1/2 Detect the thermal sensors by CPUID

The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0].

CC Andrew Morton <[email protected]>
CC Jean Delvare <[email protected]>
CC Henrique de Moraes Holschuh <[email protected]>
---
 drivers/hwmon/coretemp.c |   34 +++++++++++++---------------------
 1 file changed, 13 insertions(+), 21 deletions(-)

Index: head/drivers/hwmon/coretemp.c =================================--- head.orig/drivers/hwmon/coretemp.c +++ head/drivers/hwmon/coretemp.c
@@ -451,28 +451,20 @@ static int __init coretemp_init(void)

for_each_online_cpu(i) {
struct cpuinfo_x86 *c = &cpu_data(i);
-
- /* check if family 6, models 0xe (Pentium M DC),

-		  0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm),
-		  0x17 (Penryn 45nm), 0x1a (Nehalem), 0x1c (Atom),
-		  0x1e (Lynnfield) */
-		if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
-		    !((c->x86_model = 0xe) || (c->x86_model = 0xf) ||
-			(c->x86_model = 0x16) || (c->x86_model = 0x17) ||
-			(c->x86_model = 0x1a) || (c->x86_model = 0x1c) ||

- (c->x86_model = 0x1e))) {
-
- /* supported CPU not found, but report the unknown
- family 6 CPU */
- if ((c->x86 = 0x6) && (c->x86_model > 0xf))
- printk(KERN_WARNING DRVNAME ": Unknown CPU "
- "model 0x%x\n", c->x86_model);
- continue;
+ /*
+ * CPUID.06H.EAX[0] indicates whether the CPU has thermal
+ * sensors. We check this bit only, all the early CPUs
+ * without thermal sensors will be filtered out.
+ */
+ if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01)) {
+ err = coretemp_device_add(i);
+ if (err)
+ goto exit_devices_unreg;
+
+ } else {
+ printk(KERN_INFO DRVNAME ": CPU (model=0x%x)"
+ " has no thermal sensor.\n", c->x86_model);
}
-
- err = coretemp_device_add(i);
- if (err)
- goto exit_devices_unreg;
}
if (list_empty(&pdev_list)) {
err = -ENODEV;

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#13 lore raw

PATCH 2/2 Get TjMax value from MSR

In reply to Carsten Emde

The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer Intel processors.

---
 arch/x86/include/asm/msr-index.h |    2 +
 drivers/hwmon/coretemp.c         |   61 ++++++++++++++++++++++++++++++++++++---
 2 files changed, 59 insertions(+), 4 deletions(-)

Index: head/arch/x86/include/asm/msr-index.h =================================--- head.orig/arch/x86/include/asm/msr-index.h +++ head/arch/x86/include/asm/msr-index.h
@@ -235,6 +235,8 @@

#define MSR_IA32_MISC_ENABLE 0x000001a0

+#define MSR_IA32_TEMPERATURE_TARGET 0x000001a2
+
/* MISC_ENABLE bits: architectural */
#define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0)
#define MSR_IA32_MISC_ENABLE_TCC (1ULL << 1)
Index: head/drivers/hwmon/coretemp.c =================================--- head.orig/drivers/hwmon/coretemp.c +++ head/drivers/hwmon/coretemp.c
@@ -241,6 +241,55 @@ static int __devinit adjust_tjmax(struct
return tjmax;
}

+static int __devinit get_tjmax(struct cpuinfo_x86 *c, u32 id,
+ struct device *dev)
+{
+ /* The 100C is default for both mobile and non mobile CPUs */
+ int err;
+ u32 eax, edx;
+ u32 val;
+
+ /* A new feature of current Intel(R) processors, the
+ IA32_TEMPERATURE_TARGET contains the TjMax value */
+ err = rdmsr_safe_on_cpu(id, MSR_IA32_TEMPERATURE_TARGET, &eax, &edx);
+ if (err) {
+ dev_warn(dev, "Unable to read TjMax from CPU.\n");
+ } else {
+ val = (eax >> 16) & 0xff;
+ /*
+ * If the TjMax is not plausible, an assumption
+ * will be used
+ */
+ if ((val > 80) && (val < 120)) {
+ dev_info(dev, "TjMax is %d C.\n", val);
+ return val * 1000;
+ }
+ }
+
+ /*
+ * An assumption is made for early CPUs and unreadable MSR.
+ * NOTE: the given 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;
+ break;
+ case 0x17:
+ case 0x1c: /* Atom CPUs */
+ return adjust_tjmax(c, id, dev);
+ break;
+ default:
+ dev_warn(dev, "CPU (model=0x%x) is not supported yet,"
+ " using default TjMax of 100C.\n", c->x86_model);
+ return 100000;
+ }
+}
+
static int __devinit coretemp_probe(struct platform_device *pdev) {
struct coretemp_data *data;
@@ -283,14 +332,18 @@ static int __devinit coretemp_probe(stru
}
}

- data->tjmax = adjust_tjmax(c, data->id, &pdev->dev);
+ data->tjmax = get_tjmax(c, data->id, &pdev->dev);
platform_set_drvdata(pdev, data);

- /* read the still undocumented IA32_TEMPERATURE_TARGET it exists
- on older CPUs but not in this register, Atoms don't have it either */
+ /*
+ * read the still undocumented IA32_TEMPERATURE_TARGET. It exists
+ * on older CPUs but not in this register,
+ * Atoms don't have it either.
+ */

if ((c->x86_model > 0xe) && (c->x86_model != 0x1c)) {
- err = rdmsr_safe_on_cpu(data->id, 0x1a2, &eax, &edx);
+ err = rdmsr_safe_on_cpu(data->id, MSR_IA32_TEMPERATURE_TARGET,
+ &eax, &edx);
if (err) {
dev_warn(&pdev->dev, "Unable to read"
" IA32_TEMPERATURE_TARGET MSR\n");

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#14 lore raw

Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current

In reply to Carsten Emde

Hi!

Quoted 8 lines · Carsten Emde

Hi!

Here comes the current version of the coretemp patches. Huaxu did the initial
work; Jean suggested to submit them directly to Andrew.

I made some style changes as advised by checkpatch.

Quoted 11 lines

The patches have been tested successfully on Core 2 Duo and Quad, and on Nehalem and Nehalem/Westmere where temperature readings were plausible and changed with load as expected. When tested on an Atom processor (N270), the temperature values were identical to previous versions of the coretemp module and also changed with load. However, the readings should be higher by 10 to 15C as compared to the outside temperature of the processor. Huaxu,
could you check? I would guess TjMax to be 105 instead of 90C in these processors.

I apologize, if I ask a stupid question, but are you saying that TjMax in coretemp.c should be set to higher value than Tcase-max value specified in Intel documents?

Thanks!

Signature · 2 lines
DG
NJ

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#15 lore raw

Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors

Dmitry,

Quoted 13 lines
Quoted 5 lines

Here comes the current version of the coretemp patches. Huaxu did the initial work; Jean suggested to submit them directly to Andrew.

I made some style changes as advised by checkpatch.

Quoted 8 lines

The patches have been tested successfully on Core 2 Duo and Quad, and on Nehalem and Nehalem/Westmere where temperature readings were plausible and changed with load as expected. When tested on an Atom processor (N270), the temperature values were identical to previous versions of the coretemp module and also changed with load. However, the readings should be higher by 10 to 15C as compared to the outside temperature of the processor. Huaxu, could you check? I would guess TjMax to be 105 instead of 90C in these processors.

Quoted 3 lines

I apologize, if I ask a stupid question, but are you saying that TjMax in coretemp.c should be set to higher value than Tcase-max value specified in Intel documents?

Hmm, no. I am saying that I would like the reading to be correct. I have measured the outside temperature of the case with an infrared thermometer [1] and found it to be higher than the readings returned by the coretemp module. In all other CPUs I have, the coretemp readings are higher than the case temperature.

Carsten.

[1] http://www.osadl.org/uploads/media/IPCworld-2008-4.pdf

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#16 lore raw

Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors

Hi!

Quoted 23 lines · Carsten Emde

Dmitry,

Quoted 17 lines
Quoted 5 lines

Here comes the current version of the coretemp patches. Huaxu did the initial work; Jean suggested to submit them directly to Andrew.

I made some style changes as advised by checkpatch.

Quoted 11 lines

The patches have been tested successfully on Core 2 Duo and Quad, and on Nehalem and Nehalem/Westmere where temperature readings were plausible and
changed with load as expected. When tested on an Atom processor (N270), the
temperature values were identical to previous versions of the coretemp module and also changed with load. However, the readings should be higher by 10 to 15C as compared to the outside temperature of the processor. Huaxu, could you check? I would guess TjMax to be 105 instead of 90C in these
processors.

Quoted 3 lines

I apologize, if I ask a stupid question, but are you saying that TjMax in coretemp.c should be set to higher value than Tcase-max value specified in Intel documents?

Quoted 6 lines

Hmm, no. I am saying that I would like the reading to be correct. I have measured the outside temperature of the case with an infrared thermometer
[1] and found it to be higher than the readings returned by the coretemp module. In all other CPUs I have, the coretemp readings are higher than the case temperature.

Thank you very much for an explanation, Carsten.

Signature · 7 lines
DG
NJ

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
author
#17 lore raw

Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors

In reply to Carsten Emde
Quoted 18 lines · Carsten Emde

Dmitry,

Quoted 13 lines
Quoted 5 lines

Here comes the current version of the coretemp patches. Huaxu did the initial work; Jean suggested to submit them directly to Andrew.

I made some style changes as advised by checkpatch.

Quoted 8 lines

The patches have been tested successfully on Core 2 Duo and Quad, and on Nehalem and Nehalem/Westmere where temperature readings were plausible and changed with load as expected. When tested on an Atom processor (N270), the temperature values were identical to previous versions of the coretemp module and also changed with load. However, the readings should be higher by 10 to 15C as compared to the outside temperature of the processor. Huaxu, could you check? I would guess TjMax to be 105 instead of 90C in these processors.

Quoted 3 lines

I apologize, if I ask a stupid question, but are you saying that TjMax in coretemp.c should be set to higher value than Tcase-max value specified in Intel documents?

Quoted 8 lines

Hmm, no. I am saying that I would like the reading to be correct. I have measured the outside temperature of the case with an infrared thermometer [1] and found it to be higher than the readings returned by the coretemp module. In all other CPUs I have, the coretemp readings are higher than the case temperature.

[1] http://www.osadl.org/uploads/media/IPCworld-2008-4.pdf

Hi Carsten,

I have no N270 and infrared thermometer in hand, so I can't check it by myself. I'll find a channel and file this issue to them.

Thank you.

Huaxu

#18 lore raw

Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current

In reply to Carsten Emde

Hi,

The TjMax of N270 is 90C, according the official documents [1][2].

. [1]http://ark.intel.com/Product.aspx?id=36331&processor=N270&spec-codes=SLB73 [2]http://download.intel.com/design/processor/datashts/319977.pdf

Thanks
Huaxu

________________________________
From: Dmitry Gromov [mailto:[email protected]]
Sent: Tuesday, May 18, 2010 12:48 PM
To: Carsten Emde
Cc: Andrew Morton; LKML; LM Sensors; Wan, Huaxu
Subject: Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors

Hi!

On Mon, May 17, 2010 at 05:41, Carsten Emde <[email protected]<mailto:[email protected]>> wrote:
Hi!

Here comes the current version of the coretemp patches. Huaxu did the initial work; Jean suggested to submit them directly to Andrew.

I made some style changes as advised by checkpatch.

The patches have been tested successfully on Core 2 Duo and Quad, and on Nehalem and Nehalem/Westmere where temperature readings were plausible and changed with load as expected. When tested on an Atom processor (N270), the temperature values were identical to previous versions of the coretemp module and also changed with load. However, the readings should be higher by 10 to 15C as compared to the outside temperature of the processor. Huaxu, could you check? I would guess TjMax to be 105 instead of 90C in these processors.

I apologize, if I ask a stupid question, but are you saying that TjMax in coretemp.c should be set to higher value than Tcase-max value specified in Intel documents?

Thanks!

--
DG
NJ

#19 lore raw

Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current

In reply to Carsten Emde

Hi!

Quoted 9 lines · Huaxu

Hi,

The TjMax of N270 is 90C, according the official documents [1][2].

.
[1]
http://ark.intel.com/Product.aspx?id=36331&processor=N270&spec-codes=SLB73
[2]http://download.intel.com/design/processor/datashts/319977.pdf

Quoted 4 lines

Thanks
Huaxu

Thank you, this is exactly why I;m asking. I think, "guessing" values here

can be dangerous - who knows what critical apps they will relied upon.

And 90C seems to be good for N200 series of Atom CPUs only - I could not find TjMax value published for N330 Dual Core (quite popular one). Intel only published Tcase for it:
http://ark.intel.com/Product.aspx?id=35641
So, if for N270 Tcase = TjMax = 90C, then, I'd suggest to use Tcase = 85.2C for N330 TjMax value.

Signature · 2 lines
DG
NJ

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#20 lore raw

Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors

Quoted 6 lines · Dmitry Gromov
Quoted 4 lines · Huaxu

The TjMax of N270 is 90C, according the official documents [1][2].
[1] http://ark.intel.com/Product.aspx?id6331&processor=N270&spec-codes=SLB73
[2] http://download.intel.com/design/processor/datashts/319977.pdf
Thank you, this is exactly why I'm asking. I think, "guessing" values here

can be dangerous - who knows what critical apps they will relied upon.

Yes, of course. I never wanted to use a guessed and not documented value. I only wanted the temperature reading to be plausible.

Quoted 6 lines

And 90C seems to be good for N200 series of Atom CPUs only - I could not find TjMax value published for N330 Dual Core (quite popular one). Intel only published Tcase for it:
http://ark.intel.com/Product.aspx?id5641
So, if for N270 Tcase = TjMax = 90C, then, I'd suggest to use Tcase = 85.2C for N330 TjMax value.

They have the same CPU model ID:

# grep model /proc/cpuinfo
model		: 28
model name	: Intel(R) Atom(TM) CPU N270   @ 1.60GHz
# grep model /proc/cpuinfo
model		: 28
model name	: Intel(R) Atom(TM) CPU  330   @ 1.60GHz

I would like to propose to use the patch as it is. It's the best version we ever had.

Carsten.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

author
#21 lore raw

Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors

In reply to Dmitry Gromov
Quoted 8 lines · Dmitry Gromov

Hi!

And 90C seems to be good for N200 series of Atom CPUs only - I could not find TjMax value published for N330 Dual Core (quite popular one). Intel only published Tcase for it:
http://ark.intel.com/Product.aspx?id5641
So, if for N270 Tcase = TjMax = 90C, then, I'd suggest to use Tcase = 85.2C for N330 TjMax value.

Quoted a sentence from [1], "Unless specified otherwise, all specifications for the processor are at TJ = 90°C", I believe the TjMax of 330 is 90C too.

[1]http://download.intel.com/design/processor/datashts/320528.pdf

Thanks
Huaxu

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#22 lore raw

Re: [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors

Hi!

Quoted 10 lines · Huaxu Wan
Quoted 8 lines · Dmitry Gromov

Hi!

And 90C seems to be good for N200 series of Atom CPUs only - I could not find TjMax value published for N330 Dual Core  (quite popular one). Intel only published Tcase for it:
http://ark.intel.com/Product.aspx?id5641
So, if for N270 Tcase = TjMax = 90C, then, I'd suggest to use Tcase = 85.2C for N330 TjMax value.

Quoted 3 lines

Quoted a sentence from [1], "Unless specified otherwise, all specifications for the processor are at TJ = 90°C", I believe the TjMax of 330 is 90C too.

Well, that refers for the values in that specific table and entire document (which I went through as well) does not specify TjMax :( Similar document for N270 series does specify TjMax explicitly in Table 14:
http://download.intel.com/design/processor/datashts/320032.pdf

Another document, "Thermal and Mechanical Design Guidelines" for Atom 300 series:
http://download.intel.com/design/processor/designex/320530.pdf
specifies Tcase-max = 85.2C
Thinking about this a bit, I think Tcase-max should be lower than TjMax, which probably is still 90C.
The document itself is a good reading too.

Anyway, thank you very much for your help, Huaxu!

Signature · 7 lines
DG
NJ

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
author
#23 lore raw

PATCH 2/2 hwmon: (coretemp) Get TjMax value from MSR

The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer processers.

---
 drivers/hwmon/coretemp.c |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 44 insertions(+), 1 deletions(-)
drivers/hwmon/coretemp.c +44 -1
index 237c68d..7a01032 100644
@@ -241,6 +241,49 @@ static int __devinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *
        return tjmax;
 }
 
+static int __devinit get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)
+{
+       /* The 100C is default for both mobile and non mobile CPUs */
+       int err;
+       u32 eax, edx;
+       u32 val;
+
+       /* A new feature of current Intel(R) processors, the
+          IA32_TEMPERATURE_TARGET(0x1a2) contains the TjMax value */
+       err = rdmsr_safe_on_cpu(id, 0x1a2, &eax, &edx);
+       if (err){
+               printk_once(KERN_WARNING DRVNAME  " : Unable to read TjMax from CPU.\n");
+       } else {
+               val = (eax >> 16 ) & 0xff;
+               /* If the TjMax is not reasonable, an assumption value
+                  will be used */
+               if (( val > 80) && (val < 120)){
+                       printk_once(KERN_INFO DRVNAME " : The TjMax is %d C. \n", val);
+                       return val * 1000;
+               }
+       }
+
+       /* For the early CPUs, an approximation is given.
+        NOTE: the given value may not be correct. */
+       switch(c->x86_model){
+       case 0xe :
+       case 0xf :
+       case 0x16 :
+       case 0x1a :
+               printk_once(KERN_WARNING DRVNAME  " : TjMax is assumed as 100 C! \n");
+               return 100000;
+               break;
+       case 0x17 :
+       case 0x1c :             /* Atom CPUs */
+               return adjust_tjmax(c, id, dev);
+               break;
+       default :
+               printk_once(KERN_WARNING DRVNAME " : Your CPU is not support yet,"
+                       "using the default TjMax: 100 C.\n");
+               return 100000;
+       }
+}
+
 static int __devinit coretemp_probe(struct platform_device *pdev)
 {
        struct coretemp_data *data;
@@ -283,7 +326,7 @@ static int __devinit coretemp_probe(struct platform_device *pdev)
                }
        }
 
-       data->tjmax = adjust_tjmax(c, data->id, &pdev->dev);
+       data->tjmax = get_tjmax(c, data->id, &pdev->dev);
        platform_set_drvdata(pdev, data);
 
        /* read the still undocumented IA32_TEMPERATURE_TARGET it exists

--
1.6.3.3.363.g725cf7

#24 lore raw

Re: [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

Hi Huaxu,

Quoted 2 lines

The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer processers.

I took the liberty to make some very minor changes to your patch:
- Unified and adapted messages and comments
- Added a definition of MSR_IA32_TEMPERATURE_TARGET to the arch header
- Replaced 0x1a2 by MSR_IA32_TEMPERATURE_TARGET
- Applied changes suggested by checkpatch

Hope you like it.

---
 arch/x86/include/asm/msr-index.h |    3 ++
 drivers/hwmon/coretemp.c         |   54 ++++++++++++++++++++++++++++++++++++---
 2 files changed, 53 insertions(+), 4 deletions(-)
arch/x86/include/asm/msr-index.h +3 -0
Index: head/arch/x86/include/asm/msr-index.h
===================================================================
@@ -277,6 +277,9 @@
 #define MSR_IA32_MCG_EIP		0x00000189
 #define MSR_IA32_MCG_RESERVED		0x0000018a
 
+/* Specific to i series processors */
+#define MSR_IA32_TEMPERATURE_TARGET	0x000001a2
+
 /* Pentium IV performance counter MSRs */
 #define MSR_P4_BPU_PERFCTR0		0x00000300
 #define MSR_P4_BPU_PERFCTR1		0x00000301
drivers/hwmon/coretemp.c +50 -4

77 lines not on this page · raw message

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

author
#25 lore raw

Re: [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

Quoted 4 lines · Carsten Emde
drivers/hwmon/coretemp.c +4 -0
+	err = rdmsr_safe_on_cpu(id, MSR_IA32_TEMPERATURE_TARGET, &eax, &edx);
+	if (err)
+		dev_warn(dev, "Unable to read TjMax from CPU.\n");
+	else {

drivers/hwmon/coretemp.c static int __devinit adjust_tjmax(struct · line 265

Quoted 10 lines
drivers/hwmon/coretemp.c +10 -0
+		val = (eax >> 16) & 0xff;
+		if (val > 80 && val < 120) {
+			dev_info(dev, "TjMax is %dC.\n", val);
+			return val * 1000;
+		} else {
+			dev_warn(dev, "TjMax of %dC not plausible,"
+			    " using 100C instead." , val);
+			return 100000;
+		}
+	}

The CPU, in the following case switch, may return no err at the above rdmsr. The val is 0 with CPU model 0x0f in my test. The function should not return when (val > 80 && val < 120) is false.

Quoted 23 lines
drivers/hwmon/coretemp.c +23 -0
+
+	/*
+	 * An assumption is made for early CPUs and unreadable MSR.
+	 * NOTE: the given value may not be correct.
+	 */
+	switch (c->x86_model) {
+	case 0x0e:
+	case 0x0f:
+	case 0x16:
+	case 0x1a:
+		dev_warn(dev, "TjMax is assumed as 100C!\n");
+		return 100000;
+		break;
+	case 0x17:
+	case 0x1c: /* Atom CPUs */
+		return adjust_tjmax(c, id, dev);
+		break;
+	default:
+		dev_warn(dev, "CPU (model=0x%x) is not supported yet,"
+		    " using default TjMax of 100C.\n", c->x86_model);
+		return 100000;
+	}
+}
Signature · 2 lines
Thanks
Huaxu
author
#26 lore raw

PATCH v2 2/2 hwmon: (coretemp) Get TjMax value from MSR

In reply to Huaxu Wan

The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer processers.

---
 arch/x86/include/asm/msr-index.h |    2 +
 drivers/hwmon/coretemp.c         |   52 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 52 insertions(+), 2 deletions(-)
arch/x86/include/asm/msr-index.h +2 -0
index 4604e6a..9bc0cf8 100644
@@ -232,6 +232,8 @@
 
 #define MSR_IA32_MISC_ENABLE		0x000001a0
 
+#define MSR_IA32_TEMPERATURE_TARGET	0x000001a2
+
 /* MISC_ENABLE bits: architectural */
 #define MSR_IA32_MISC_ENABLE_FAST_STRING	(1ULL << 0)
 #define MSR_IA32_MISC_ENABLE_TCC		(1ULL << 1)
drivers/hwmon/coretemp.c +50 -2

70 lines not on this page · raw message

Signature · 1 line
1.6.3.3.363.g725cf7
#27 lore raw

Re: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

In reply to Huaxu Wan
Quoted 2 lines · Huaxu Wan

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

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#28 lore raw

Re: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

Quoted 4 lines · Maxim Levitsky
Quoted 2 lines · Huaxu Wan

The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer processers.

Quoted 8 lines

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 <[email protected]>
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

drivers/hwmon/coretemp.c +0 -0
index 2988da1..fb100a4 100644
@@ -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:

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

author
#29 lore raw

Re: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

In reply to Maxim Levitsky
Quoted 4 lines · Maxim Levitsky
Quoted 2 lines · Huaxu Wan

The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer processers.

Quoted 8 lines

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

Quoted 59 lines

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

#30 lore raw

Re: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

Quoted 12 lines · Huaxu Wan
Quoted 10 lines · Maxim Levitsky
Quoted 2 lines · Huaxu Wan

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.

Quoted 4 lines

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?id0787&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

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#31 lore raw

Re: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

Quoted 23 lines · Maxim Levitsky
Quoted 12 lines · Huaxu Wan
Quoted 10 lines · Maxim Levitsky
Quoted 2 lines · Huaxu Wan

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.

Quoted 4 lines

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?id0787&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

Quoted 8 lines

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

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#32 lore raw

Re: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

Quoted 30 lines · Maxim Levitsky
Quoted 29 lines · Maxim Levitsky
Quoted 12 lines · Huaxu Wan
Quoted 10 lines · Maxim Levitsky
Quoted 2 lines · Huaxu Wan

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.

Quoted 4 lines

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?id0787&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).

Quoted 8 lines
Quoted 2 lines

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

Any update?

Quoted 5 lines

Best regards,
Maxim Levitsky

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#33 lore raw

RE: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

Quoted 44 lines · Maxim Levitsky
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Huaxu Wan
Quoted 3 lines · Maxim Levitsky
Quoted 2 lines · Huaxu Wan
Quoted 1 line

The MSR IA32_TEMPERATURE_TARGET contains the TjMax

value in the newer

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

processers.

I know that TjMax on my system is 85, and now coretemp

reports wrong

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

temperatures.
First of all BIOS using stupid tricks actualy reports

CPU temperature

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

85C.

From the list at [1], the TjMax(Tjunction) of T5450 is

100C. Does anyone

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

here can make a double check?

[1]

http://ark.intel.com/Product.aspx?id0787&processor=T5450&spec
-codes=SLA4F

Quoted 4 lines
Quoted 4 lines

This is very interesting.

With TjMax 85C, the CPUs idle temperature is reported at

around 45~50C

Quoted 5 lines
Quoted 5 lines

GPU temperature that is around 50C

BIOS also reports 45~50C.

BIOS hooks an SMI to CPU thermal report, and stores the

temperature it

Quoted 7 lines
Quoted 5 lines

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).

Quoted 7 lines
Quoted 4 lines

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

Any update?

I'm occupied by other things, sorry for slow response. But, as said in a spec, I can't remember which one now, there are too many, the relative value read from DTS is accurate approaching to TjMax. The accuracy deteriorates to +-10C at 50C. Any DTS reading below 50C should be considered to indicate only a temperature below 50C and not a specific temperature.

So, the value around 50C can't be taken as real chip temperature. I would like this issue could be confirmed by more users to avoid it as a particular case. At the meantime, I still looking for a laptop with T5450, this may take some time.

Thanks
Huaxu
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#34 lore raw

RE: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

Quoted 59 lines · Huaxu
Quoted 44 lines · Maxim Levitsky
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Huaxu Wan
Quoted 3 lines · Maxim Levitsky
Quoted 2 lines · Huaxu Wan
Quoted 1 line

The MSR IA32_TEMPERATURE_TARGET contains the TjMax

value in the newer

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

processers.

I know that TjMax on my system is 85, and now coretemp

reports wrong

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

temperatures.
First of all BIOS using stupid tricks actualy reports

CPU temperature

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

85C.

From the list at [1], the TjMax(Tjunction) of T5450 is

100C. Does anyone

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

here can make a double check?

[1]

http://ark.intel.com/Product.aspx?id0787&processor=T5450&spec
-codes=SLA4F

Quoted 4 lines
Quoted 4 lines

This is very interesting.

With TjMax 85C, the CPUs idle temperature is reported at

around 45~50C

Quoted 5 lines
Quoted 5 lines

GPU temperature that is around 50C

BIOS also reports 45~50C.

BIOS hooks an SMI to CPU thermal report, and stores the

temperature it

Quoted 7 lines
Quoted 5 lines

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).

Quoted 7 lines
Quoted 4 lines

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

Any update?

I'm occupied by other things, sorry for slow response. But, as said in a spec, I can't remember which one now, there are too many, the relative value read from DTS is accurate approaching to TjMax. The accuracy deteriorates to +-10C at 50C. Any DTS reading below 50C should be considered to indicate only a temperature below 50C and not a specific temperature.

Quoted 7 lines

So, the value around 50C can't be taken as real chip temperature. I would like this issue could be confirmed by more users to avoid it as a particular case. At the meantime, I still looking for a laptop with T5450, this may take some time.

Thanks
Huaxu

Any update?

Best regards,
Maxim Levitsky

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

author
#35 lore raw

RE: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

CC Fenghua.

Could you found a Laptop with T5450 at hand? I can't found anywhere.

-Huaxu

Quoted 73 lines · Maxim Levitsky
Quoted 59 lines · Huaxu
Quoted 44 lines · Maxim Levitsky
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Huaxu Wan
Quoted 3 lines · Maxim Levitsky
Quoted 2 lines · Huaxu Wan
Quoted 1 line

The MSR IA32_TEMPERATURE_TARGET contains the TjMax

value in the newer

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

processers.

I know that TjMax on my system is 85, and now coretemp

reports wrong

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

temperatures.
First of all BIOS using stupid tricks actualy reports

CPU temperature

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

85C.

From the list at [1], the TjMax(Tjunction) of T5450 is

100C. Does anyone

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

here can make a double check?

[1]

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

Quoted 4 lines
Quoted 4 lines

This is very interesting.

With TjMax 85C, the CPUs idle temperature is reported at

around 45~50C

Quoted 5 lines
Quoted 5 lines

GPU temperature that is around 50C

BIOS also reports 45~50C.

BIOS hooks an SMI to CPU thermal report, and stores the

temperature it

Quoted 7 lines
Quoted 5 lines

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).

Quoted 7 lines
Quoted 4 lines

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

Any update?

I'm occupied by other things, sorry for slow response. But, as said in a spec, I can't remember which one now, there are too many, the relative value read from DTS is accurate approaching to TjMax. The accuracy deteriorates to +-10C at 50C. Any DTS reading below 50C should be considered to indicate only a temperature below 50C and not a specific temperature.

Quoted 7 lines

So, the value around 50C can't be taken as real chip temperature. I would like this issue could be confirmed by more users to avoid it as a particular case. At the meantime, I still looking for a laptop with T5450, this may take some time.

Thanks
Huaxu

Any update?

Best regards,
Maxim Levitsky

#36 lore raw

Re: [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR

Quoted 61 lines · Huaxu Wan
Quoted 60 lines · Maxim Levitsky
Quoted 59 lines · Huaxu
Quoted 44 lines · Maxim Levitsky
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Huaxu Wan
Quoted 3 lines · Maxim Levitsky
Quoted 2 lines · Huaxu Wan
Quoted 1 line

The MSR IA32_TEMPERATURE_TARGET contains the TjMax

value in the newer

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

processers.

I know that TjMax on my system is 85, and now coretemp

reports wrong

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

temperatures.
First of all BIOS using stupid tricks actualy reports

CPU temperature

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

85C.

From the list at [1], the TjMax(Tjunction) of T5450 is

100C. Does anyone

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

here can make a double check?

[1]

http://ark.intel.com/Product.aspx?id0787&processor=T5450&spec
-codes=SLA4F

Quoted 4 lines
Quoted 4 lines

This is very interesting.

With TjMax 85C, the CPUs idle temperature is reported at

around 45~50C

Quoted 5 lines
Quoted 5 lines

GPU temperature that is around 50C

BIOS also reports 45~50C.

BIOS hooks an SMI to CPU thermal report, and stores the

temperature it

Quoted 7 lines
Quoted 5 lines

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).

Quoted 7 lines
Quoted 4 lines

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

Any update?

I'm occupied by other things, sorry for slow response. But, as said in a spec, I can't remember which one now, there are too many, the relative value read from DTS is accurate approaching to TjMax. The accuracy deteriorates to +-10C at 50C. Any DTS reading below 50C should be considered to indicate only a temperature below 50C and not a specific temperature.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

So, the value around 50C can't be taken as real chip temperature. I would like this issue could be confirmed by more users to avoid it as a particular case. At the meantime, I still looking for a laptop with T5450, this may take some time.

Hi, Maxim,

Could you send out thermal zone info under /proc/acpi/thermal_zone/TZ*?

Thanks.

-Fenghua

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors