From be799124f8ed6e8a99285c096bee638e5362b02f Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 14 Dec 2009 10:02:53 +0000 Subject: [PATCH] Differentiate between Intel Core and Atom. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5810 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index f9089269..63291fe3 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -1893,7 +1893,11 @@ use vars qw(@cpu_ids); }, { name => "Intel Core family thermal sensor", driver => "coretemp", - detect => \&coretemp_detect, + detect => sub { coretemp_detect(0); }, + }, { + name => "Intel Atom thermal sensor", + driver => "coretemp", + detect => sub { coretemp_detect(1); }, }, { name => "Intel AMB FB-DIMM thermal sensor", driver => "i5k_amb", @@ -5390,18 +5394,20 @@ sub intel_amb_detect sub coretemp_detect { + my $chip = shift; my $probecpu; + foreach $probecpu (@cpu) { - if ($probecpu->{vendor_id} eq 'GenuineIntel' && - $probecpu->{'cpu family'} == 6 && - ($probecpu->{model} == 14 || # Pentium M DC - $probecpu->{model} == 15 || # Core 2 DC 65nm - $probecpu->{model} == 0x16 || # Core 2 SC 65nm - $probecpu->{model} == 0x17 || # Penryn 45nm - $probecpu->{model} == 0x1a || # Nehalem - $probecpu->{model} == 0x1c)) { # Atom - return 9; - } + next unless $probecpu->{vendor_id} eq 'GenuineIntel' && + $probecpu->{'cpu family'} == 6; + return 9 if $chip == 0 && + ($probecpu->{model} == 14 || # Pentium M DC + $probecpu->{model} == 15 || # Core 2 DC 65nm + $probecpu->{model} == 0x16 || # Core 2 SC 65nm + $probecpu->{model} == 0x17 || # Penryn 45nm + $probecpu->{model} == 0x1a); # Nehalem + return 9 if $chip == 1 && + ($probecpu->{model} == 0x1c); # Atom } return; }