Skip to contentSkip to conversation

Enable coretemp driver on Intel Atom

PATCH In review Michael Riepe 3 participants 4 messages Apr 16, 2009 – Jun 21, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Enable coretemp driver on Intel Atom

Hi!

This small patch enables the coretemp driver on an Intel Atom. I'm not sure if the readings are correct, however - on my 330, the driver reports values between 27 and 41 °C (with core1 being about 8°C hotter than core0, given the same load). Maybe the maximum temperature of 100 °C is wrong for Atom CPUs.

Signature · 2 lines
Michael "Tired" Riepe <[email protected]>
X-Tired: Each morning I get up I die a little

Index: drivers/hwmon/coretemp.c
===================================================================
RCS file: /var/cvs/sys/kernel/linux-2.6/drivers/hwmon/coretemp.c,v retrieving revision 1.1.1.5

hwmon/coretemp.c +2 -2
diff -u -r1.1.1.5 coretemp.c
@@ -185,7 +185,7 @@
 		}
 	}
 
-	if (ismobile) {
+	if (ismobile || c->x86_model == 0x1c) {
 
 		err = rdmsr_safe_on_cpu(id, 0xee, &eax, &edx);
 		if (err) {
@@ -417,7 +417,7 @@
 		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 == 0x1A) || (c->x86_model == 0x1c))) {
 
 			/* supported CPU not found, but report the unknown
 			   family 6 CPU */
#1 lore raw
Quoted 31 lines · On Fri, 17 Apr 2009 01:46:18 +0200 Michael Riepe…

This small patch enables the coretemp driver on an Intel Atom. I'm not sure if the readings are correct, however - on my 330, the driver reports values between 27 and 41 __C (with core1 being about 8__C hotter than core0, given the same load). Maybe the maximum temperature of 100 __C is wrong for Atom CPUs.

Signature · 11 lines
Michael "Tired" Riepe <[email protected]>
X-Tired: Each morning I get up I die a little


[linux-2.6.29.1-coretemp-atom.diff  text/plain (916B)]
Signed-off-by: Michael Riepe <[email protected]>

Index: drivers/hwmon/coretemp.c
=================================> RCS file: /var/cvs/sys/kernel/linux-2.6/drivers/hwmon/coretemp.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 coretemp.c
hwmon/coretemp.c +1 -1
@@ -185,7 +185,7 @@
 		}
 	}
 
-	if (ismobile) {
+	if (ismobile || c->x86_model = 0x1c) {
 
 		err = rdmsr_safe_on_cpu(id, 0xee, &eax, &edx);
 		if (err) {

hwmon/coretemp.c line 423

Quoted 8 lines
hwmon/coretemp.c +1 -1
@@ -417,7 +417,7 @@
 		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 = 0x1A) || (c->x86_model = 0x1c))) {
 
 			/* supported CPU not found, but report the unknown
 			   family 6 CPU */

I'm not 100% sure what to do about this patch. I'm inclined to merge it, even though you think it might be giving the wrong numbers, because then someone might fix it.

otoh, if giving the wrong numbers leads to people's machines needlessly shutting down or something like that, then that's not so good.

Opinions are sought?

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

#2 lore raw

Hi!

Quoted 3 lines · Andrew Morton

I'm not 100% sure what to do about this patch. I'm inclined to merge it, even though you think it might be giving the wrong numbers, because then someone might fix it.

That was the basic idea :-)

Quoted 2 lines

otoh, if giving the wrong numbers leads to people's machines needlessly shutting down or something like that, then that's not so good.

I don't think that that will happen. Core temperatures on my 330 are lower than those reported by the other sensors (core 0/1: 27/35 °C on an idle system - hardly alarming in my opinion).

Signature · 7 lines
Michael "Tired" Riepe <[email protected]>
X-Tired: Each morning I get up I die a little

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