Skip to content

Commit

Permalink
ACPI: cpufreq, processor: Detect old BIOS, not supporting CPU freq on…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Thomas Renninger authored and Len Brown committed Sep 22, 2008
1 parent a0ad05c commit 910dfae
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions drivers/acpi/processor_perflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include <asm/uaccess.h>
#endif
#include <asm/cpufeature.h>

#include <acpi/acpi_bus.h>
#include <acpi/processor.h>
Expand Down Expand Up @@ -334,7 +335,6 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
acpi_status status = AE_OK;
acpi_handle handle = NULL;


if (!pr || !pr->performance || !pr->handle)
return -EINVAL;

Expand All @@ -347,13 +347,25 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)

result = acpi_processor_get_performance_control(pr);
if (result)
return result;
goto update_bios;

result = acpi_processor_get_performance_states(pr);
if (result)
return result;
goto update_bios;

return 0;

/*
* Having _PPC but missing frequencies (_PSS, _PCT) is a very good hint that
* the BIOS is older than the CPU and does not know its frequencies
*/
update_bios:
if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){
if(boot_cpu_has(X86_FEATURE_EST))
printk(KERN_WARNING FW_BUG "BIOS needs update for CPU "
"frequency support\n");
}
return result;
}

int acpi_processor_notify_smm(struct module *calling_module)
Expand Down

0 comments on commit 910dfae

Please sign in to comment.