hwmon: (k10temp) Do not blacklist known
Subsystems (2)
PATCH 1/1 hwmon: (k10temp) Do not blacklist known
When detecting AM2+ or AM3 socket with DDR2, only blacklist cores which are known to exist in AM2+ format.
--- drivers/hwmon/k10temp.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/hwmon/k10temp.c +13 -2
@@ -112,11 +112,22 @@ static bool __devinit has_erratum_319(stif (pkg_type !=CPUID_PKGTYPE_AM2R2_AM3 )return false; -/* Differentiate between AM2+ (bad) and AM3 (good) */ +/* DDR3 memory implies socket AM3, which is good */ pci_bus_read_config_dword (pdev->bus,PCI_DEVFN (PCI_SLOT (pdev->devfn),2 ),REG_DCT0_CONFIG_HIGH , ®_dram_cfg); -return !(reg_dram_cfg &DDR3_MODE ); +if (reg_dram_cfg &DDR3_MODE ) +return false; + +/* +* Unfortunately it is possible to run a socket AM3 CPU with DDR2 +* memory. We blacklist all the cores which do exist in socket AM2+ +* format. It still isn't perfect, as RB-C2 cores exist in both AM2+ +* and AM3 formats, but that's the best we can do. +*/ +return boot_cpu_data.x86_model <4 || + (boot_cpu_data.x86_model =4 && boot_cpu_data.x86_mask <=2 ); + } static int __devinit k10temp_probe(struct pci_dev *pdev,
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 6 lines · Jean Delvare
When detecting AM2+ or AM3 socket with DDR2, only blacklist cores which are known to exist in AM2+ format.
Signed-off-by Jean Delvare <[email protected]>Cc Clemens Ladisch <[email protected]>Cc Andreas Herrmann <[email protected]>
drivers/hwmon/k10temp.c static bool __devinit has_erratum_319(st · line 130
Quoted 3 lines
drivers/hwmon/k10temp.c +3
-0+return boot_cpu_data.x86_model <4 || + (boot_cpu_data.x86_model =4 && boot_cpu_data.x86_mask <=2 ); +
but that empty line is superfluous
Regards,
Clemens
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 8 lines · Clemens Ladisch
Quoted 6 lines · Jean Delvare
When detecting AM2+ or AM3 socket with DDR2, only blacklist cores which are known to exist in AM2+ format.
Signed-off-by Jean Delvare <[email protected]>Cc Clemens Ladisch <[email protected]>Cc Andreas Herrmann <[email protected]>
Quoted 7 lines
Acked-by Clemens Ladisch <[email protected]>drivers/hwmon/k10temp.c static bool __devinit has_erratum_319(st · line 130
Quoted 3 lines
drivers/hwmon/k10temp.c +3
-0+return boot_cpu_data.x86_model <4 || + (boot_cpu_data.x86_model =4 && boot_cpu_data.x86_mask <=2 ); +but that empty line is superfluous
Oh, good catch. Fixed, thank you!
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors