Skip to contentSkip to conversation

CPUFreq sysfs interface MIA?

DISCUSSION Daniel Pittman 2 participants 7 messages May 6, 2003 – May 8, 2003 CPU hotplug

lore
Share & tools
lore
#0 lore raw

Under both 2.5.68 and 2.5.69 the CPUFreq /sys interface seems to be missing for my machine (IBM A31p), with an Intel 845 Brookdale chipset and SpeedStep support.

It was certainly present around 2.5.67 or so, but seems to have vanished since that point. I have not yet tracked down exactly where it went MIA.

Since I couldn't work out from either the documentation or the code if there should be a /sys/devices/sys/cpu0/cpufreq directory when the code is compiled in, but not active, I couldn't tell if this was failing to find the SpeedStep support now or if it simply lost the sysfs interface.

When I compiled in the debug information to the SpeedStep driver, I only get the following output in dmesg:

cpufreq: Intel(R) SpeedStep(TM) support $Revision: 1.70 $

The ACPI P-States driver and the P4 clock modulation driver don't work, or cause the interface directory to show either, but I have never had either of those two working before -- I tried them to try and eliminate a cause.

The content of /sys/devices/sys/cpu0 is:
/sys/devices/sys/cpu0
|-- name
`-- power

0 directories, 2 files

Daniel

Signature · 3 lines
That's the point of quotations you know; one can use another's words
to be insulting.
        -- Amanda Cross
#1 lore raw
Quoted 5 lines · Daniel Pittman

The content of /sys/devices/sys/cpu0 is:
/sys/devices/sys/cpu0
|-- name
`-- power

What does /sys/class/cpu show?

thanks,

greg k-h

#2 lore raw
Quoted 8 lines · Greg KH
Quoted 5 lines · Daniel Pittman

The content of /sys/devices/sys/cpu0 is:
/sys/devices/sys/cpu0
|-- name
`-- power

What does /sys/class/cpu show?

/sys/class/cpu
`-- cpu0

    `-- device -> ../../../devices/sys/cpu0

2 directories, 0 files

Daniel

Signature · 3 lines
He uses hate as a weapon to defend himself; had he been strong,
he would never have needed that kind of weapon.
        -- Kahlil Gibran
#3 lore raw
Quoted 8 lines · Daniel Pittman
Quoted 7 lines · Greg KH
Quoted 5 lines · Daniel Pittman

The content of /sys/devices/sys/cpu0 is:
/sys/devices/sys/cpu0
|-- name
`-- power

Quoted 5 lines
Quoted 1 line

What does /sys/class/cpu show?

/sys/class/cpu
`-- cpu0

    `-- device -> ../../../devices/sys/cpu0

Oops, forgot to hook up stuff... Does the following patch from Jonathan Corbet fix this?

thanks,

greg k-h

# cpufreq class fix
include/linux/cpu.h +1 -0
diff -Nru a/include/linux/cpu.h b/include/linux/cpu.h
@@ -29,6 +29,7 @@
 };
 
 extern int register_cpu(struct cpu *, int, struct node *);
+extern struct class cpu_class;
 
 /* Stop CPUs going up and down. */
 extern struct semaphore cpucontrol;
kernel/cpufreq.c +2 -0
diff -Nru a/kernel/cpufreq.c b/kernel/cpufreq.c
@@ -22,6 +22,7 @@
 #include <linux/spinlock.h>
 #include <linux/device.h>
 #include <linux/slab.h>
+#include <linux/cpu.h>
 
 /**
  * The "cpufreq driver" - the arch- or hardware-dependend low
@@ -115,6 +116,7 @@
 extern struct device_class cpu_devclass;
 
 static struct class_interface cpufreq_interface = {
+        .class =	&cpu_class,
         .add =		&cpufreq_add_dev,
         .remove =	&cpufreq_remove_dev,
 };
#4 lore raw
Quoted 9 lines · Greg KH
Quoted 8 lines · Daniel Pittman
Quoted 7 lines · Greg KH
Quoted 5 lines · Daniel Pittman

The content of /sys/devices/sys/cpu0 is:
/sys/devices/sys/cpu0
|-- name
`-- power

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

What does /sys/class/cpu show?

/sys/class/cpu
`-- cpu0

    `-- device -> ../../../devices/sys/cpu0

Oops, forgot to hook up stuff... Does the following patch from Jonathan Corbet fix this?

I tested this patch earlier and, no, it does not resolve the issue. I have exactly the same issue with it applied as before.

Daniel

Signature · 3 lines
If you want to make sense...you should never use the world *should* or
*ought* until after you've used the word *if.*
        -- Todd Andrews, speaking in John Barth's _The Floating Opera_
#5 lore raw
Quoted 16 lines · Daniel Pittman
Quoted 15 lines · Greg KH
Quoted 13 lines · Daniel Pittman
Quoted 8 lines · Greg KH
Quoted 5 lines · Daniel Pittman

The content of /sys/devices/sys/cpu0 is:
/sys/devices/sys/cpu0
|-- name
`-- power

What does /sys/class/cpu show?

/sys/class/cpu
`-- cpu0

    `-- device -> ../../../devices/sys/cpu0
Quoted 5 lines
Quoted 2 lines

Oops, forgot to hook up stuff... Does the following patch from Jonathan Corbet fix this?

I tested this patch earlier and, no, it does not resolve the issue. I have exactly the same issue with it applied as before.

Hm, I just applied this patch, and dug up some hardware that will work with cpufreq, and it shows up just fine for me. I don't know what's wrong, sorry.

greg k-h

#6 lore raw
Quoted 20 lines · Greg KH
Quoted 19 lines · Daniel Pittman
Quoted 17 lines · Greg KH
Quoted 8 lines · Daniel Pittman
Quoted 7 lines · Greg KH
Quoted 5 lines · Daniel Pittman

The content of /sys/devices/sys/cpu0 is:
/sys/devices/sys/cpu0
|-- name
`-- power

Quoted 5 lines
Quoted 1 line

What does /sys/class/cpu show?

/sys/class/cpu
`-- cpu0

    `-- device -> ../../../devices/sys/cpu0

Oops, forgot to hook up stuff... Does the following patch from Jonathan Corbet fix this?

Quoted 6 lines
Quoted 2 lines

I tested this patch earlier and, no, it does not resolve the issue. I have exactly the same issue with it applied as before.

Hm, I just applied this patch, and dug up some hardware that will work with cpufreq, and it shows up just fine for me. I don't know what's wrong, sorry.

Sorry, the cpufreq interface changed location and I didn't look closely enough into it. With the patch applied, the cpufreq support is available and works correctly.

So, this was a fault on my part and the patch works. Sorry.

Daniel

Signature · 3 lines
I have never seen a bad television program, because I refuse to.
God gave me a mind, and a wrist that turns things off.
        -- Jack Paar