Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4

bert hubert
2006-07-30T19:19:53Z

On Sun, Jul 30, 2006 at 03:01:33PM -0400, Dave Jones wrote:

> Normally, if the necessary BIOS bits aren't there, then acpi-cpufreq will
> fail to register. For some reason it sounds like it believes that everything
> went ok. I wonder if something changed in acpi recently that caused this
> change in behaviour ? Len ?

As far as I can see, acpi_cpufreq does not pass on any errors it sees during
init:

static int __init acpi_cpufreq_init (void)
{
int result = 0;

dprintk("acpi_cpufreq_init\n");

result = acpi_cpufreq_early_init_acpi();
...

And from acpi_cpufreq_early_init_acpi():

static int acpi_cpufreq_early_init_acpi(void)
{
struct acpi_processor_performance *data;
unsigned int i, j;

dprintk("acpi_cpufreq_early_init\n");

( some memory allocations, does not look at acpi or bios )

/* Do initialization in ACPI core */
acpi_processor_preregister_performance(acpi_perf_data);
return 0;
}

Note how any error from acpi_processor_preregister_performance is ignored.

Ghetto patch which "fixes" the problem for me:

--- ./arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c~orig 2006-07-30 21:14:43.000000000 +0200
+++ ./arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 2006-07-30 21:11:34.000000000 +0200
@@ -384,8 +384,7 @@
}

/* Do initialization in ACPI core */
- acpi_processor_preregister_performance(acpi_perf_data);
- return 0;
+ return acpi_processor_preregister_performance(acpi_perf_data);
}

But tonight I have no speedstep laptop available to check if this does not
kill acpi_cpufreq when it can work.

Thanks for the hint, dave!

--
http://www.PowerDNS.com Open source, database driven DNS Software
http://netherlabs.nl Open and Closed source services