diff options
Diffstat (limited to 'drivers/hwmon/coretemp.c')
-rw-r--r-- | drivers/hwmon/coretemp.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 75e3911810a3..0328382df8fa 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c | |||
@@ -176,6 +176,22 @@ static int __devinit coretemp_probe(struct platform_device *pdev) | |||
176 | goto exit_free; | 176 | goto exit_free; |
177 | } | 177 | } |
178 | 178 | ||
179 | /* Check if we have problem with errata AE18 of Core processors: | ||
180 | Readings might stop update when processor visited too deep sleep, | ||
181 | fixed for stepping D0 (6EC). | ||
182 | */ | ||
183 | |||
184 | if ((c->x86_model == 0xe) && (c->x86_mask < 0xc)) { | ||
185 | /* check for microcode update */ | ||
186 | rdmsr_on_cpu(data->id, MSR_IA32_UCODE_REV, &eax, &edx); | ||
187 | if (edx < 0x39) { | ||
188 | dev_err(&pdev->dev, | ||
189 | "Errata AE18 not fixed, update BIOS or " | ||
190 | "microcode of the CPU!\n"); | ||
191 | goto exit_free; | ||
192 | } | ||
193 | } | ||
194 | |||
179 | /* Some processors have Tjmax 85 following magic should detect it | 195 | /* Some processors have Tjmax 85 following magic should detect it |
180 | Intel won't disclose the information without signed NDA, but | 196 | Intel won't disclose the information without signed NDA, but |
181 | individuals cannot sign it. Catch(ed) 22. | 197 | individuals cannot sign it. Catch(ed) 22. |
@@ -193,6 +209,19 @@ static int __devinit coretemp_probe(struct platform_device *pdev) | |||
193 | } | 209 | } |
194 | } | 210 | } |
195 | 211 | ||
212 | /* Intel says that above should not work for desktop Core2 processors, | ||
213 | but it seems to work. There is no other way how get the absolute | ||
214 | readings. Warn the user about this. First check if are desktop, | ||
215 | bit 50 of MSR_IA32_PLATFORM_ID should be 0. | ||
216 | */ | ||
217 | |||
218 | rdmsr_safe_on_cpu(data->id, MSR_IA32_PLATFORM_ID, &eax, &edx); | ||
219 | |||
220 | if ((c->x86_model == 0xf) && (!(edx & 0x00040000))) { | ||
221 | dev_warn(&pdev->dev, "Using undocumented features, absolute " | ||
222 | "temperature might be wrong!\n"); | ||
223 | } | ||
224 | |||
196 | platform_set_drvdata(pdev, data); | 225 | platform_set_drvdata(pdev, data); |
197 | 226 | ||
198 | if ((err = sysfs_create_group(&pdev->dev.kobj, &coretemp_group))) | 227 | if ((err = sysfs_create_group(&pdev->dev.kobj, &coretemp_group))) |
@@ -330,9 +359,6 @@ static int __init coretemp_init(void) | |||
330 | int i, err = -ENODEV; | 359 | int i, err = -ENODEV; |
331 | struct pdev_entry *p, *n; | 360 | struct pdev_entry *p, *n; |
332 | 361 | ||
333 | printk(KERN_NOTICE DRVNAME ": This driver uses undocumented features " | ||
334 | "of Core CPU. Temperature might be wrong!\n"); | ||
335 | |||
336 | /* quick check if we run Intel */ | 362 | /* quick check if we run Intel */ |
337 | if (cpu_data[0].x86_vendor != X86_VENDOR_INTEL) | 363 | if (cpu_data[0].x86_vendor != X86_VENDOR_INTEL) |
338 | goto exit; | 364 | goto exit; |