Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217102
b: refs/heads/master
c: 3247800
h: refs/heads/master
v: v3
  • Loading branch information
Jan Beulich authored and Guenter Roeck committed Oct 25, 2010
1 parent d7d057a commit 4e713ff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17c10d61c750619324ee2a46c5a9e03a435fe212
refs/heads/master: 3247800676c4a04352cde72b9935b57ffc72ce15
20 changes: 18 additions & 2 deletions trunk/drivers/hwmon/coretemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@ static int __devinit get_tjmax(struct cpuinfo_x86 *c, u32 id,
}
}

static void __devinit get_ucode_rev_on_cpu(void *edx)
{
u32 eax;

wrmsr(MSR_IA32_UCODE_REV, 0, 0);
sync_core();
rdmsr(MSR_IA32_UCODE_REV, eax, *(u32 *)edx);
}

static int __devinit coretemp_probe(struct platform_device *pdev)
{
struct coretemp_data *data;
Expand Down Expand Up @@ -324,8 +333,15 @@ static int __devinit coretemp_probe(struct platform_device *pdev)

if ((c->x86_model == 0xe) && (c->x86_mask < 0xc)) {
/* check for microcode update */
rdmsr_on_cpu(data->id, MSR_IA32_UCODE_REV, &eax, &edx);
if (edx < 0x39) {
err = smp_call_function_single(data->id, get_ucode_rev_on_cpu,
&edx, 1);
if (err) {
dev_err(&pdev->dev,
"Cannot determine microcode revision of "
"CPU#%u (%d)!\n", data->id, err);
err = -ENODEV;
goto exit_free;
} else if (edx < 0x39) {
err = -ENODEV;
dev_err(&pdev->dev,
"Errata AE18 not fixed, update BIOS or "
Expand Down

0 comments on commit 4e713ff

Please sign in to comment.