From: Thomas Renninger <trenn@suse.de>
To: ak@linux.intel.com
Cc: bjorn.helgaas@hp.com, linux-kernel@vger.kernel.org,
arjan@linux.intel.com, linux-acpi@vger.kernel.org,
ckornacker@suse.de, Thomas Renninger <trenn@suse.de>
Subject: [PATCH 3/3] CPUFREQ: processor.ko: Try to detect old BIOS, not supporting CPU freq on a recent CPU.
Date: Wed, 27 Aug 2008 15:27:11 +0200 [thread overview]
Message-ID: <1219843631-26015-4-git-send-email-trenn@suse.de> (raw)
In-Reply-To: <200808210919.07642.bjorn.helgaas@hp.com>
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 he has a BIOS/firmware problem.
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
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 0133af4..3a2886f 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -38,6 +38,7 @@
#include <asm/uaccess.h>
#endif
+#include <asm/cpufeature.h>
#include <acpi/acpi_bus.h>
#include <acpi/processor.h>
@@ -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;
@@ -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)
--
1.5.4.5
next prev parent reply other threads:[~2008-08-27 13:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-20 17:02 [RFC] Introduce interface to report BIOS bugs Thomas Renninger
2008-08-20 17:02 ` [PATCH 1/3] " Thomas Renninger
2008-08-20 17:37 ` Andi Kleen
2008-08-20 18:37 ` Bjorn Helgaas
2008-08-21 13:52 ` Thomas Renninger
2008-08-21 15:19 ` Bjorn Helgaas
2008-08-27 13:27 ` Introduce interface to report BIOS bugs (reworked, FW_BUG simple solution) Thomas Renninger
2008-08-27 13:34 ` Thomas Renninger
2008-08-27 15:19 ` Andi Kleen
2008-08-30 13:15 ` Pavel Machek
2008-08-27 13:27 ` [PATCH 1/3] Introduce FW_BUG and FW_INFO to consistenly tell users about BIOS bugs Thomas Renninger
2008-08-27 13:27 ` [PATCH 2/3] CPUFREQ: powernow-k8: Try to detect old BIOS, not supporting CPU freq on a recent AMD CPUs Thomas Renninger
2008-08-27 13:27 ` Thomas Renninger [this message]
2008-08-22 10:19 ` [PATCH 1/3] Introduce interface to report BIOS bugs Pavel Machek
2008-08-20 17:02 ` [PATCH 2/3] Powernow-k8: Make use of firmware bug report interface Thomas Renninger
2008-08-22 10:19 ` Pavel Machek
2008-08-20 17:02 ` [PATCH 3/3] acpi-cpufreq: " Thomas Renninger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1219843631-26015-4-git-send-email-trenn@suse.de \
--to=trenn@suse.de \
--cc=ak@linux.intel.com \
--cc=arjan@linux.intel.com \
--cc=bjorn.helgaas@hp.com \
--cc=ckornacker@suse.de \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®