2006-09-09 14:22:06

by Thiago Galesi

[permalink] [raw]
Subject: Cpufreq not working in 2.6.18-rc6

Hello

Cpufreq is not working for me in 2.6.18-rc6 (as it worked flawlessly
in 2.6.17.7 and earlier versions)

I cannot insmod powernow-k7, it only shows (in dmesg):

powernow: PowerNOW! Technology present. Can scale: frequency and voltage.

But then insmod fails with EBUSY (or better: init_module(0x804b018,
11352, "") = -1 EBUSY (Device or resource busy))

I traced this to cpufreq_register_driver returning -0x16

I disabled APM for this kernel, previous kernel version had APM
enabled (AFAIK, shouldn't be relevant; ACPI is enabled)

I tried to enable APM only to discover it does not work to compile APM
as a module :/ (complains about default_idle and machine_real_restart
being "unknown symbols")

Will try with builtin APM later

Relevant config info is below:

#
# APM (Advanced Power Management) BIOS Support
#
# CONFIG_APM is not set

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=m
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

#
# CPUFreq processor drivers
#
CONFIG_X86_ACPI_CPUFREQ=m
# CONFIG_X86_POWERNOW_K6 is not set
CONFIG_X86_POWERNOW_K7=m
CONFIG_X86_POWERNOW_K7_ACPI=y
CONFIG_X86_POWERNOW_K8=m
CONFIG_X86_POWERNOW_K8_ACPI=y
# CONFIG_X86_GX_SUSPMOD is not set

CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
# CONFIG_ACPI_HOTKEY is not set
CONFIG_ACPI_FAN=m
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_IBM is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=m
# CONFIG_ACPI_SBS is not set

Thanks in advance
--
-
Thiago Galesi


2006-09-09 14:40:35

by Dave Jones

[permalink] [raw]
Subject: Re: Cpufreq not working in 2.6.18-rc6

On Sat, Sep 09, 2006 at 11:22:02AM -0300, Thiago Galesi wrote:
> Hello
>
> Cpufreq is not working for me in 2.6.18-rc6 (as it worked flawlessly
> in 2.6.17.7 and earlier versions)
>
> I cannot insmod powernow-k7, it only shows (in dmesg):
>
> powernow: PowerNOW! Technology present. Can scale: frequency and voltage.
>
> But then insmod fails with EBUSY (or better: init_module(0x804b018,
> 11352, "") = -1 EBUSY (Device or resource busy))
>
> I traced this to cpufreq_register_driver returning -0x16
>
> I disabled APM for this kernel, previous kernel version had APM
> enabled (AFAIK, shouldn't be relevant; ACPI is enabled)
>
> I tried to enable APM only to discover it does not work to compile APM
> as a module :/ (complains about default_idle and machine_real_restart
> being "unknown symbols")
>
> ...
>
> CONFIG_X86_POWERNOW_K7_ACPI=y
> ..
> CONFIG_ACPI_PROCESSOR=m

Does it start working again if you change ACPI_PROCESSOR=y ?

Dave

2006-09-09 15:13:57

by Thiago Galesi

[permalink] [raw]
Subject: Re: Cpufreq not working in 2.6.18-rc6

> >
> > CONFIG_X86_POWERNOW_K7_ACPI=y
> > ..
> > CONFIG_ACPI_PROCESSOR=m
>
> Does it start working again if you change ACPI_PROCESSOR=y ?

No. nothing changes

--
-
Thiago Galesi

2006-09-10 14:34:56

by Thiago Galesi

[permalink] [raw]
Subject: Re: Cpufreq not working in 2.6.18-rc6

Ok, apparently it is my fault...

I traced the failure to

if (cpufreq_driver) {
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
return -EBUSY;
}

(cpufreq_register_driver in drivers/cpufreq/cpufreq.c)

Turns out I was modprobing acpi-cpufreq before modprobing cpufreq-k7.
This worked in previous kernels and apparently, not in this one.

If I do not modprobe acpi-cpufreq, it works.

Thiago

On 9/9/06, Thiago Galesi <[email protected]> wrote:
> > >
> > > CONFIG_X86_POWERNOW_K7_ACPI=y
> > > ..
> > > CONFIG_ACPI_PROCESSOR=m
> >
> > Does it start working again if you change ACPI_PROCESSOR=y ?
>
> No. nothing changes
>
> --
> -
> Thiago Galesi
>