Re: [PATCH] Powernow-k8 buggy BIOS override for 2.6.6
From: Tony Lindgren
Date: Thu May 13 2004 - 12:20:21 EST
* Pavel Machek <pavel@xxxxxx> [040513 09:26]:
> Hi!
>
> > Following is the updated patch to make the powernow-k8 driver work on
> > machines with buggy BIOS, such as emachines m6805.
> >
> > The patch overrides the PST table only if check_pst_table() fails.
> >
> > The minimum value for the override is 800MHz, which is the lowest value
> > on all x86_64 systems AFAIK. The max value is the current running value.
> >
> > This patch should be safe to apply, even if Pavel's ACPI table check is
> > added to the driver. Or does anybody see a problem with it?
>
> Well, there may be problems with that.
That works good now, see my recent posting to the thread on the cpufreq list
for more details. I had ACPI processor as module, and that made the
powernow-k8 ACPI detection to fail. I fixed it with the following little
patch, attaching it here too for reference.
> BIOSen sometimes run cpu at too high voltage. Plus, for changing
> frequency you need to run at even higher voltage... and that may be
> too high.
>
> Is there some problem with ACPI on your system?
Works now, from cpufreq point of view. As of 2.6.6 the ACPI processor
module hangs the system if compiled in. Loading it as module after init
does not hang.
Regards,
Tony
diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c Thu May 13 09:58:24 2004
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c Thu May 13 09:58:24 2004
@@ -32,7 +32,7 @@
#include <asm/io.h>
#include <asm/delay.h>
-#ifdef CONFIG_ACPI_PROCESSOR
+#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
#include <linux/acpi.h>
#include <acpi/processor.h>
#endif
@@ -666,7 +696,7 @@
return -ENODEV;
}
-#ifdef CONFIG_ACPI_PROCESSOR
+#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index)
{
if (!data->acpi_data.state_count)
diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h Thu May 13 09:58:24 2004
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h Thu May 13 09:58:24 2004
@@ -29,7 +29,7 @@
* frequency is in kHz */
struct cpufreq_frequency_table *powernow_table;
-#ifdef CONFIG_ACPI_PROCESSOR
+#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
/* the acpi table needs to be kept. it's only available if ACPI was
* used to determine valid frequency/vid/fid states */
struct acpi_processor_performance acpi_data;