powernow-k7 doesn't appear to work with linux-image-2.6.15-7-k7

Bug #26713 reported by Michael Robinson
36
Affects Status Importance Assigned to Milestone
linux-source-2.6.15 (Ubuntu)
Fix Released
Medium
Ben Collins

Bug Description

When restarting powernowd, I get the following:

 * Stopping powernowd:
   ...done.
FATAL: Error inserting powernow_k7
(/lib/modules/2.6.15-7-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k7.ko):
No such device
FATAL: Error inserting acpi_cpufreq
(/lib/modules/2.6.15-7-k7/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko):
No such device
 * Starting powernowd...
 * CPU frequency scaling not supported
   ...done.

My system is a Compaq Evo n115, with a AMD K6-2 (from dmidecode; also detected
by the kernel as "AMD mobile AMD Athlon(tm) 4 Processor stepping 02"). Under
2.6.12-9-k7, things worked fine, and I got CPU scaling happening. Now, no show.

Irritatingly, I also get the following in dmesg:

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

cpufreq_powersave probes OK. As does pcc_acpi.

Revision history for this message
Patrick McFarland (diablod3) wrote :

This is also happening on my laptop. I confirmed that powernow-k7 properly loads
on 2.6.12-9-k7. yet not on any 2.6.15.

Revision history for this message
Ben Collins (ben-collins) wrote :

Can you send dmesg output please?

Revision history for this message
Ben Collins (ben-collins) wrote :

*** Bug 26669 has been marked as a duplicate of this bug. ***

Revision history for this message
Ben Collins (ben-collins) wrote :

Send me the output of /proc/cpu please. I think you should be using powernow-k6.

Revision history for this message
Michael Robinson (michael-livia) wrote :

Created an attachment (id=5329)
Dmesg output from Evo n115 laptop

Afraid it's not that informative. /proc/cpuinfo reports:

processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 6
model name : mobile AMD Athlon(tm) 4 Processor
stepping : 2
cpu MHz : 1195.990
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips : 2394.49

When I try powernow-k6, I get the following:

michaelrlt$ sudo modprobe powernow-k6
FATAL: Error inserting powernow_k6
(/lib/modules/2.6.15-7-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k6.ko):
No such device
michaelrlt$ sudo modprobe powernow-k7
FATAL: Error inserting powernow_k7
(/lib/modules/2.6.15-7-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k7.ko):
No such device

I also get a repeat of the message:

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

when I probe powernow-k7, but not for powernow-k6.

Revision history for this message
Ben Collins (ben-collins) wrote :

> when I probe powernow-k7, but not for powernow-k6.

Based on this, it looks like the powernow-k7 driver succeeds, but it's the
cpufreq driver that is causing the failure.

Please do this:

lsmod | grep cpufreq

rmmod all of the modules listed, including powernow-k7

Then do:

modprobe cpufreq debug=3
modprobe powernow-k7

And attach the full dmesg output

Thanks

Revision history for this message
Michael Robinson (michael-livia) wrote :

Sorry, cpufreq appears to be compiled in.

michaelrlt$ grep 'vmlinux.*cpufreq' /boot/abi-2.6.15-7-k7
vmlinux __cpufreq_driver_target 0x58dee4ae
vmlinux cpufreq_cpu_get 0xe1eef8a2
vmlinux cpufreq_cpu_put 0x025478da
vmlinux cpufreq_driver_target 0xbaa86595
vmlinux cpufreq_get 0x9305f8e6
vmlinux cpufreq_get_policy 0x12201723
vmlinux cpufreq_gov_performance 0x056fe76a
vmlinux cpufreq_governor 0xc2018172
vmlinux cpufreq_notify_transition 0xe6488b47
vmlinux cpufreq_parse_governor 0x7942705e
vmlinux cpufreq_register_driver 0x7bcb44d3
vmlinux cpufreq_register_governor 0x149a0780
vmlinux cpufreq_register_notifier 0xadaa2657
vmlinux cpufreq_set_policy 0xba76b2be
vmlinux cpufreq_unregister_driver 0xea49dd0f
vmlinux cpufreq_unregister_governor 0xecb7c5a4
vmlinux cpufreq_unregister_notifier 0x3b3016d3
vmlinux cpufreq_update_policy 0x8664f62e

michaelrlt$ lsmod | grep cpufreq
cpufreq_stats 6912 0
cpufreq_powersave 2240 0
cpufreq_ondemand 8104 0
cpufreq_conservative 9256 0
cpufreq_userspace 6816 0
freq_table 5152 1 cpufreq_stats

michaelrlt$ sudo modprobe cpufreq debug=3
FATAL: Module cpufreq not found.
michaelrlt$ sudo modprobe powernow-k7
FATAL: Error inserting powernow_k7
(/lib/modules/2.6.15-7-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k7.ko):
No such device

Only output in dmesg is:

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

(Obviously enough!)

Is there any way to change the debug parameter for the compiled in module?

Revision history for this message
Ben Collins (ben-collins) wrote :

(In reply to comment #7)
> Sorry, cpufreq appears to be compiled in.

Ah, right. Try booting the kernel with cpufreq_debug=3

Revision history for this message
Michael Robinson (michael-livia) wrote :

Hmmm. Doesn't seem to change anything, probably because:

michaelrlt$ grep CPU_FREQ.*DEBUG /boot/config-2.6.15-7-k7
# CONFIG_CPU_FREQ_DEBUG is not set

Ooops.

Roll me own kernel time, I suppose. I'll try -8-k7 first, which I notice has
just become available; then I guess it's download kernel-package, and
linux-source-2.6.15 and reuse the config with the DEBUG flag on this time?

Revision history for this message
David Schleef (dschleef) wrote :

See also:

http://www.ubuntuforums.org/showthread.php?t=105696

Also happens with -9-k7.

Revision history for this message
Ben Collins (ben-collins) wrote :

(In reply to comment #10)
> See also:
>
> http://www.ubuntuforums.org/showthread.php?t=105696
>
> Also happens with -9-k7.

Interesting. It seems that p4, k8 and a couple of others have some sort of SMP
support in them. I'm very surprised that k7 doesn't work when there's only one
CPU available. The powernow-k7 driver is built, so I would expect it to work,
even if only limited.

Revision history for this message
Ben Collins (ben-collins) wrote :

Thanks for the pointer. Given that information, I was able to easily modify
powernow-k7 driver to work on UP systems, even in the SMP kernel.

Revision history for this message
Ben Collins (ben-collins) wrote :

Fix as of atleast 2.6.15-11.16

Revision history for this message
Snark (julien-puydt) wrote :

I'm not convinced it is fixed : I still had the error message about cpu scaling
not being supported when logging in.

Here is some data, if that helps :

$ uname -a
Linux hilbert 2.6.15-11-k7 #1 SMP PREEMPT Wed Jan 4 07:38:50 UTC 2006 i686 GNU/Linux

$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : mobile AMD Athlon(tm) XP-M 2800+
stepping : 0
cpu MHz : 2133.353
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 4268.43

# modprobe powernow-k6
FATAL: Error inserting powernow_k6
(/lib/modules/2.6.15-11-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k6.ko):
No such device

# modprobe powernow-k7
FATAL: Error inserting powernow_k7
(/lib/modules/2.6.15-11-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k7.ko):
No such device

# modprobe powernow-k8
FATAL: Error inserting powernow_k8
(/lib/modules/2.6.15-11-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k8.ko):
No such device

The following can probably be helpful :

$ dmesg | grep owern
[4295258.432000] powernow-k8: Processor cpuid 6a0 not supported

Can I do more ?

Revision history for this message
David Schleef (dschleef) wrote :

Yup, not working here either.

Revision history for this message
MuratE (murate) wrote :

It is not working for me either.
root@Dexxx~# modprobe -v powernow-k8
insmod /lib/modules/2.6.15-11-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k8.ko
FATAL: Error inserting powernow_k8
(/lib/modules/2.6.15-11-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k8.ko):
No such device
root@Dexxx:~# modprobe -v powernow-k7
insmod /lib/modules/2.6.15-11-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k7.ko
FATAL: Error inserting powernow_k7
(/lib/modules/2.6.15-11-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k7.ko):
No such device
root@Dexxx:~# modprobe -v powernow-k6
insmod /lib/modules/2.6.15-11-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k6.ko
FATAL: Error inserting powernow_k6
(/lib/modules/2.6.15-11-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k6.ko):
No such device

output of /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : mobile AMD Athlon(tm) XP2000+
stepping : 1
cpu MHz : 1656.402
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 3313.94

Revision history for this message
David Schleef (dschleef) wrote :

This section of code is where the modprobe is failing on my system:

        /* Does not support multi-cpu systems */
        if (num_online_cpus() != 1 || num_possible_cpus() != 1)
                return -ENODEV;

Since I clearly only have one (online) CPU, I'm assuming that
num_possible_cpus() is not 1. (Or, the macros don't evaluate to a simple
expression.)

Revision history for this message
Ben Collins (ben-collins) wrote :

(In reply to comment #17)
> This section of code is where the modprobe is failing on my system:
>
> /* Does not support multi-cpu systems */
> if (num_online_cpus() != 1 || num_possible_cpus() != 1)
> return -ENODEV;
>
> Since I clearly only have one (online) CPU, I'm assuming that
> num_possible_cpus() is not 1. (Or, the macros don't evaluate to a simple
> expression.)

Are you able to compile modules? If so can you compile powernow-k7.ko with the
above section of code commented out?

Revision history for this message
David Schleef (dschleef) wrote :

It's the 'num_possible_cpus() != 1' that fails in that line, which seems rather odd since this is a laptop with (you guessed it) exactly 1 CPU.

Anyway, recompiled without this line, and it now fails in drivers/cpufreq/cpufreq.c around line 1500:

                /* check for at least one working CPU */
                for (i=0; i<NR_CPUS; i++)
                        if (cpufreq_cpu_data[i])
                                ret = 0;

None of the cpufreq_cpu_data[] array elements are set. It's unclear to me as to why. I'm trying to enable CONFIG_CPU_FREQ_DEBUG=y in the .config, but the package build system is a bit opaque in this process.

Revision history for this message
Martin Ammermüller (martin-ammermueller) wrote : confirm

I can confirm this bug with 6.04 development branch of today. I am using the package linux-image-2.6.15-12-k7. The contents of /proc/cpuinfo:

processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : mobile AMD Athlon(tm) XP-M 2000+
stepping : 1
cpu MHz : 1659.002
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 3319.31

The error message is:

FATAL: Error inserting powernow_k7 (/lib/modules/2.6.15-12-k7/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k7.ko): No such device

HTH

Revision history for this message
Martin Ammermüller (martin-ammermueller) wrote : confirm 2

sorry, forgot to add this one:

martin@lotophag:~$ dmesg |grep powernow
[4314772.537000] powernow-k8: Processor cpuid 681 not supported

The strange thing is: with kernel version 2.6.12 and breezy, powernow-k7 is loaded (and works).

Revision history for this message
Patrick McFarland (diablod3) wrote :

kernel-image-2.6.15-12-386 loads powernow-k7 fine

Revision history for this message
Ben Collins (ben-collins) wrote :

Please send this:

ls -lR /sys/devices/system/cpu/cpu0

Revision history for this message
Snark (julien-puydt) wrote :

jpuydt@hilbert:~$ ls -lR /sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu0:
total 0
-rw------- 1 root root 4096 2006-01-20 07:37 online

(still with : jpuydt@hilbert:~$ uname -a
Linux hilbert 2.6.15-12-k7 #1 SMP PREEMPT Fri Jan 13 07:10:00 UTC 2006 i686 GNU/Linux)

Revision history for this message
Patrick McFarland (diablod3) wrote :

And on my -386 kernel running system.....
[diablo@absolute ~]$ ls -lR /sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu0:
total 0
drwxr-xr-x 3 root root 0 2006-01-22 18:13 cpufreq

/sys/devices/system/cpu/cpu0/cpufreq:
total 0
-r--r--r-- 1 root root 4096 2006-01-22 18:13 affected_cpus
-r-------- 1 root root 4096 2006-01-22 18:13 cpuinfo_cur_freq
-r--r--r-- 1 root root 4096 2006-01-22 18:13 cpuinfo_max_freq
-r--r--r-- 1 root root 4096 2006-01-22 18:13 cpuinfo_min_freq
-r--r--r-- 1 root root 4096 2006-01-22 18:13 scaling_available_frequencies
-r--r--r-- 1 root root 4096 2006-01-22 18:13 scaling_available_governors
-r--r--r-- 1 root root 4096 2006-01-22 18:13 scaling_cur_freq
-r--r--r-- 1 root root 4096 2006-01-22 18:13 scaling_driver
-rw-r--r-- 1 root root 4096 2006-01-22 17:55 scaling_governor
-rw-r--r-- 1 root root 4096 2006-01-22 18:13 scaling_max_freq
-rw-r--r-- 1 root root 4096 2006-01-22 18:13 scaling_min_freq
drwxr-xr-x 2 root root 0 2006-01-22 17:54 stats

/sys/devices/system/cpu/cpu0/cpufreq/stats:
total 0
-r--r--r-- 1 root root 4096 2006-01-22 18:13 time_in_state
-r--r--r-- 1 root root 4096 2006-01-22 18:13 total_trans
-r--r--r-- 1 root root 4096 2006-01-22 18:13 trans_table

[diablo@absolute ~]$ uname -a
Linux absolute 2.6.15-13-386 #1 PREEMPT Thu Jan 19 16:24:40 UTC 2006 i686 GNU/Linux

Revision history for this message
Patrick McFarland (diablod3) wrote :

Er, apparently I fail at formatting. Doh.

Revision history for this message
Guillermo Gutiérrez (capitanterrex) wrote :

Recompiling the 2.6.15-k7 kernel manually using make-kpkg and provided dapper .config but unmarking SMP support solved this problem for me. [HP Pavilion ze4334EA, AMD Athlon xp 2200+ (1.8GHz)]

Please do not compile future non-smp kernels with smp support.

Revision history for this message
Ben Collins (ben-collins) wrote :

Everyone reporting "works with non-smp" can just stop. I already know this.

And -k7 is an SMP kernel. It's meant to be multi-purpose, since it has code that disables SMP functionality (locking, etc) at boot.

However, powernow-k7 is the only cpu frequency driver that doesn't work when compiled for SMP. All the other cpu frequency scaling drivers work fine.

So the thing that I am working on is to make powernow-k7 work with SMP. Disabling SMP is not an option.

Revision history for this message
Francis Provencher (francis-tzone) wrote :

A patch was submitted to the kernel mailing list for this problem:
http://seclists.org/lists/linux-kernel/2006/Jan/1180.html

It is also included in Andrew Morton's version:
http://lwn.net/Articles/166495/

Revision history for this message
Ben Collins (ben-collins) wrote : Re: [Bug 26713] powernow-k7 doesn't appear to work with linux-image-2.6.15-7-k7

On Mon, 2006-01-30 at 11:26 +0000, Francis Provencher wrote:
> A patch was submitted to the kernel mailing list for this problem:
> http://seclists.org/lists/linux-kernel/2006/Jan/1180.html
>
> It is also included in Andrew Morton's version:
> http://lwn.net/Articles/166495/

You should pay more attention to things :) That's my patch. The one that
isn't working. The real fix is in my tree now.

--
Ben Collins
Kernel Developer - Ubuntu Linux

Changed in linux-source-2.6.15:
status: Confirmed → Fix Committed
Changed in linux-source-2.6.15:
status: Fix Committed → Fix Released
Revision history for this message
Martin Ammermüller (martin-ammermueller) wrote :

With kernel-package version 2.6.15-15-k7 scaling the frequency is working now. But AFAICS only /sys/devices/system/cpu/cpu0/cpufreq/ gets updated properly, but not /proc/cpuinfo:
------
$ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
663600
$ cat /proc/cpuinfo |grep MHz
cpu MHz : 1659.002
-----------

What's strange, too: the frequency as reported in /proc/cpuinfo is now 3.998 Hz lower :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.