Commit d94b2049 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (k8temp) Bypass core swapping on single-core processors
  hwmon: (i5k_amb) Fix sysfs attribute for lockdep
  hwmon: (k10temp) Do not blacklist known working CPU models
parents 064c946a cd4de21f
...@@ -289,6 +289,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev) ...@@ -289,6 +289,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev)
iattr->s_attr.dev_attr.attr.mode = S_IRUGO; iattr->s_attr.dev_attr.attr.mode = S_IRUGO;
iattr->s_attr.dev_attr.show = show_label; iattr->s_attr.dev_attr.show = show_label;
iattr->s_attr.index = k; iattr->s_attr.index = k;
sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
res = device_create_file(&pdev->dev, res = device_create_file(&pdev->dev,
&iattr->s_attr.dev_attr); &iattr->s_attr.dev_attr);
if (res) if (res)
...@@ -303,6 +304,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev) ...@@ -303,6 +304,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev)
iattr->s_attr.dev_attr.attr.mode = S_IRUGO; iattr->s_attr.dev_attr.attr.mode = S_IRUGO;
iattr->s_attr.dev_attr.show = show_amb_temp; iattr->s_attr.dev_attr.show = show_amb_temp;
iattr->s_attr.index = k; iattr->s_attr.index = k;
sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
res = device_create_file(&pdev->dev, res = device_create_file(&pdev->dev,
&iattr->s_attr.dev_attr); &iattr->s_attr.dev_attr);
if (res) if (res)
...@@ -318,6 +320,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev) ...@@ -318,6 +320,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev)
iattr->s_attr.dev_attr.show = show_amb_min; iattr->s_attr.dev_attr.show = show_amb_min;
iattr->s_attr.dev_attr.store = store_amb_min; iattr->s_attr.dev_attr.store = store_amb_min;
iattr->s_attr.index = k; iattr->s_attr.index = k;
sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
res = device_create_file(&pdev->dev, res = device_create_file(&pdev->dev,
&iattr->s_attr.dev_attr); &iattr->s_attr.dev_attr);
if (res) if (res)
...@@ -333,6 +336,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev) ...@@ -333,6 +336,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev)
iattr->s_attr.dev_attr.show = show_amb_mid; iattr->s_attr.dev_attr.show = show_amb_mid;
iattr->s_attr.dev_attr.store = store_amb_mid; iattr->s_attr.dev_attr.store = store_amb_mid;
iattr->s_attr.index = k; iattr->s_attr.index = k;
sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
res = device_create_file(&pdev->dev, res = device_create_file(&pdev->dev,
&iattr->s_attr.dev_attr); &iattr->s_attr.dev_attr);
if (res) if (res)
...@@ -348,6 +352,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev) ...@@ -348,6 +352,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev)
iattr->s_attr.dev_attr.show = show_amb_max; iattr->s_attr.dev_attr.show = show_amb_max;
iattr->s_attr.dev_attr.store = store_amb_max; iattr->s_attr.dev_attr.store = store_amb_max;
iattr->s_attr.index = k; iattr->s_attr.index = k;
sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
res = device_create_file(&pdev->dev, res = device_create_file(&pdev->dev,
&iattr->s_attr.dev_attr); &iattr->s_attr.dev_attr);
if (res) if (res)
...@@ -362,6 +367,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev) ...@@ -362,6 +367,7 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev)
iattr->s_attr.dev_attr.attr.mode = S_IRUGO; iattr->s_attr.dev_attr.attr.mode = S_IRUGO;
iattr->s_attr.dev_attr.show = show_amb_alarm; iattr->s_attr.dev_attr.show = show_amb_alarm;
iattr->s_attr.index = k; iattr->s_attr.index = k;
sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
res = device_create_file(&pdev->dev, res = device_create_file(&pdev->dev,
&iattr->s_attr.dev_attr); &iattr->s_attr.dev_attr);
if (res) if (res)
......
...@@ -112,11 +112,21 @@ static bool __devinit has_erratum_319(struct pci_dev *pdev) ...@@ -112,11 +112,21 @@ static bool __devinit has_erratum_319(struct pci_dev *pdev)
if (pkg_type != CPUID_PKGTYPE_AM2R2_AM3) if (pkg_type != CPUID_PKGTYPE_AM2R2_AM3)
return false; 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_bus_read_config_dword(pdev->bus,
PCI_DEVFN(PCI_SLOT(pdev->devfn), 2), PCI_DEVFN(PCI_SLOT(pdev->devfn), 2),
REG_DCT0_CONFIG_HIGH, &reg_dram_cfg); REG_DCT0_CONFIG_HIGH, &reg_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, static int __devinit k10temp_probe(struct pci_dev *pdev,
......
...@@ -120,7 +120,7 @@ static ssize_t show_temp(struct device *dev, ...@@ -120,7 +120,7 @@ static ssize_t show_temp(struct device *dev,
int temp; int temp;
struct k8temp_data *data = k8temp_update_device(dev); struct k8temp_data *data = k8temp_update_device(dev);
if (data->swap_core_select) if (data->swap_core_select && (data->sensorsp & SEL_CORE))
core = core ? 0 : 1; core = core ? 0 : 1;
temp = TEMP_FROM_REG(data->temp[core][place]) + data->temp_offset; temp = TEMP_FROM_REG(data->temp[core][place]) + data->temp_offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment