[lm-sensors] Support for Family 10h CPUs - Not all sensors are defect.
Jean Delvare
khali at linux-fr.org
Mon Nov 23 10:28:57 CET 2009
On Mon, 23 Nov 2009 08:58:37 +0100, Clemens Ladisch wrote:
> Jean Delvare wrote:
> > On Sat, 21 Nov 2009 18:28:25 +0100, Jan Bessai wrote:
> > > according to AMD (
> > > http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/41322.pdf
> > > ) not all AMD K10 CPUs have defect sensors. In fact only DR-* revisions
> > > are affected. All CPUs with Socket AM3 as well as all Phenom II Processors
> > > and some Opterons are unaffected (DA-*, RB-*, HY-*).
> > > Please reconsider the statement "Embedded sensors are known to be
> > > unreliable, and won't be supported ever.".
> >
> > We can do that. But how does this translate into CPUID numbers?
>
> Family 0xF, extended family 1, model 2.
>
> Or, to quote a certain driver that happend to be posted on this list
> recently:
>
> static bool __devinit has_erratum_319(void)
> {
> /*
> * Erratum 319: The thermal sensor of older Family 10h processors
> * (B steppings) may be unreliable.
> */
> return boot_cpu_data.x86 == 0x10 && boot_cpu_data.x86_model <= 2;
> }
OK, this would lead to the following patch for sensors-detect. Can you
please test it?
Index: CHANGES
===================================================================
--- CHANGES (révision 5799)
+++ CHANGES (copie de travail)
@@ -25,7 +25,7 @@
The SMSC LPC47M233 isn't currently supported
Support upcoming sysfs path to i2c adapters
Rename the modprobe configuration file to lm_sensors.conf
- Drop AMD K10 detection (unreliable sensors)
+ Only report AMD Family 10h CPU with model > 2
Add detection for AMD Family 11h thermal sensors
Add detection for Intel Atom thermal sensors
Add detection for National Semiconductor LM73
Index: prog/detect/sensors-detect
===================================================================
--- prog/detect/sensors-detect (révision 5799)
+++ prog/detect/sensors-detect (copie de travail)
@@ -1878,6 +1878,10 @@
driver => "k8temp",
detect => \&k8temp_pci_detect,
}, {
+ name => "AMD Family 10h thermal sensors",
+ driver => "to-be-written",
+ detect => \&fam10h_pci_detect,
+ }, {
name => "AMD Family 11h thermal sensors",
driver => "to-be-written",
detect => \&fam11h_pci_detect,
@@ -5334,6 +5338,25 @@
return 9;
}
+sub fam10h_pci_detect
+{
+ return unless exists $pci_list{'1022:1203'};
+
+ # Errata 319 (Inaccurate Temperature Measurement) affects
+ # revisions DR-BA, DR-B2 and DR-B3, all have model number = 2.
+ # So we only pick CPU with model number > 2.
+ my $probecpu;
+ foreach $probecpu (@cpu) {
+ if ($probecpu->{vendor_id} eq 'AuthenticAMC' &&
+ $probecpu->{'cpu family'} == 0x10 &&
+ $probecpu->{model} > 2) {
+ return 9;
+ }
+ }
+
+ return;
+}
+
sub fam11h_pci_detect
{
return unless exists $pci_list{'1022:1303'};
I have also updated wiki/Devices.
--
Jean Delvare
More information about the lm-sensors
mailing list