diff options
author | Thomas Renninger <trenn@suse.de> | 2008-09-01 08:27:04 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-09-22 18:48:07 -0400 |
commit | 910dfae298f7b3dae0e9a52736182a3b0559ca35 (patch) | |
tree | 6fd4823b6e75afb2861004f464e0842370f983ef /drivers/acpi/processor_perflib.c | |
parent | a0ad05c75aa362c91f4d9cd91ff375a739574dd8 (diff) |
ACPI: cpufreq, processor: Detect old BIOS, not supporting CPU freq on a recent CPU.
On Intel CPUs it is rather common and a good hint that BIOSes which do provide
_PPC func, but not the frequencies itself in _PSS function, are old and need
to be updated for CPU freq support.
Tell the user/vendor he has a BIOS/firmware problem.
Make use of FW_BUG interface to give vendors and users the ability to
automatically check with (or let linuxfirmwarekit do that):
dmesg |grep "Firmware Bug"
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/processor_perflib.c')
-rw-r--r-- | drivers/acpi/processor_perflib.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 80c251ec6d2a..242f8143008a 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
40 | #endif | 40 | #endif |
41 | #include <asm/cpufeature.h> | ||
41 | 42 | ||
42 | #include <acpi/acpi_bus.h> | 43 | #include <acpi/acpi_bus.h> |
43 | #include <acpi/processor.h> | 44 | #include <acpi/processor.h> |
@@ -334,7 +335,6 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) | |||
334 | acpi_status status = AE_OK; | 335 | acpi_status status = AE_OK; |
335 | acpi_handle handle = NULL; | 336 | acpi_handle handle = NULL; |
336 | 337 | ||
337 | |||
338 | if (!pr || !pr->performance || !pr->handle) | 338 | if (!pr || !pr->performance || !pr->handle) |
339 | return -EINVAL; | 339 | return -EINVAL; |
340 | 340 | ||
@@ -347,13 +347,25 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) | |||
347 | 347 | ||
348 | result = acpi_processor_get_performance_control(pr); | 348 | result = acpi_processor_get_performance_control(pr); |
349 | if (result) | 349 | if (result) |
350 | return result; | 350 | goto update_bios; |
351 | 351 | ||
352 | result = acpi_processor_get_performance_states(pr); | 352 | result = acpi_processor_get_performance_states(pr); |
353 | if (result) | 353 | if (result) |
354 | return result; | 354 | goto update_bios; |
355 | 355 | ||
356 | return 0; | 356 | return 0; |
357 | |||
358 | /* | ||
359 | * Having _PPC but missing frequencies (_PSS, _PCT) is a very good hint that | ||
360 | * the BIOS is older than the CPU and does not know its frequencies | ||
361 | */ | ||
362 | update_bios: | ||
363 | if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){ | ||
364 | if(boot_cpu_has(X86_FEATURE_EST)) | ||
365 | printk(KERN_WARNING FW_BUG "BIOS needs update for CPU " | ||
366 | "frequency support\n"); | ||
367 | } | ||
368 | return result; | ||
357 | } | 369 | } |
358 | 370 | ||
359 | int acpi_processor_notify_smm(struct module *calling_module) | 371 | int acpi_processor_notify_smm(struct module *calling_module) |