aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hwmon/coretemp.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 467488c278e9..42de98d73ff5 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -289,6 +289,15 @@ static int __devinit get_tjmax(struct cpuinfo_x86 *c, u32 id,
289 } 289 }
290} 290}
291 291
292static void __devinit get_ucode_rev_on_cpu(void *edx)
293{
294 u32 eax;
295
296 wrmsr(MSR_IA32_UCODE_REV, 0, 0);
297 sync_core();
298 rdmsr(MSR_IA32_UCODE_REV, eax, *(u32 *)edx);
299}
300
292static int __devinit coretemp_probe(struct platform_device *pdev) 301static int __devinit coretemp_probe(struct platform_device *pdev)
293{ 302{
294 struct coretemp_data *data; 303 struct coretemp_data *data;
@@ -324,8 +333,15 @@ static int __devinit coretemp_probe(struct platform_device *pdev)
324 333
325 if ((c->x86_model == 0xe) && (c->x86_mask < 0xc)) { 334 if ((c->x86_model == 0xe) && (c->x86_mask < 0xc)) {
326 /* check for microcode update */ 335 /* check for microcode update */
327 rdmsr_on_cpu(data->id, MSR_IA32_UCODE_REV, &eax, &edx); 336 err = smp_call_function_single(data->id, get_ucode_rev_on_cpu,
328 if (edx < 0x39) { 337 &edx, 1);
338 if (err) {
339 dev_err(&pdev->dev,
340 "Cannot determine microcode revision of "
341 "CPU#%u (%d)!\n", data->id, err);
342 err = -ENODEV;
343 goto exit_free;
344 } else if (edx < 0x39) {
329 err = -ENODEV; 345 err = -ENODEV;
330 dev_err(&pdev->dev, 346 dev_err(&pdev->dev,
331 "Errata AE18 not fixed, update BIOS or " 347 "Errata AE18 not fixed, update BIOS or "