Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129705
b: refs/heads/master
c: a2e066b
h: refs/heads/master
i:
  129703: 27d62eb
v: v3
  • Loading branch information
Andreas Herrmann authored and Jean Delvare committed Jan 15, 2009
1 parent 0001351 commit b959202
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb9a35f293a3c8b5d57253cdfe2f29fa2627e1b9
refs/heads/master: a2e066bba2aad6583e3ff648bf28339d6c9f0898
9 changes: 9 additions & 0 deletions trunk/drivers/hwmon/k8temp.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ struct k8temp_data {
/* registers values */
u8 sensorsp; /* sensor presence bits - SEL_CORE & SEL_PLACE */
u32 temp[2][2]; /* core, place */
u8 swap_core_select; /* meaning of SEL_CORE is inverted */
};

static struct k8temp_data *k8temp_update_device(struct device *dev)
Expand Down Expand Up @@ -117,6 +118,9 @@ static ssize_t show_temp(struct device *dev,
int place = attr->index;
struct k8temp_data *data = k8temp_update_device(dev);

if (data->swap_core_select)
core = core ? 0 : 1;

return sprintf(buf, "%d\n",
TEMP_FROM_REG(data->temp[core][place]));
}
Expand Down Expand Up @@ -162,7 +166,12 @@ static int __devinit k8temp_probe(struct pci_dev *pdev,
goto exit_free;
}

/*
* AMD NPT family 0fh, i.e. RevF and RevG:
* meaning of SEL_CORE bit is inverted
*/
if (model >= 0x40) {
data->swap_core_select = 1;
dev_warn(&pdev->dev, "Temperature readouts might be "
"wrong - check erratum #141\n");
}
Expand Down

0 comments on commit b959202

Please sign in to comment.