2003-05-06 07:16:46

by Daniel Pittman

[permalink] [raw]
Subject: CPUFreq sysfs interface MIA?

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

--
That's the point of quotations you know; one can use another's words
to be insulting.
-- Amanda Cross


2003-05-06 21:28:39

by Greg KH

[permalink] [raw]
Subject: Re: CPUFreq sysfs interface MIA?

On Tue, May 06, 2003 at 05:29:15PM +1000, Daniel Pittman wrote:
>
> The content of /sys/devices/sys/cpu0 is:
> /sys/devices/sys/cpu0
> |-- name
> `-- power

What does /sys/class/cpu show?

thanks,

greg k-h

2003-05-07 00:25:47

by Daniel Pittman

[permalink] [raw]
Subject: Re: CPUFreq sysfs interface MIA?

On Tue, 6 May 2003, Greg KH wrote:
> On Tue, May 06, 2003 at 05:29:15PM +1000, Daniel Pittman wrote:
>>
>> 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

--
He uses hate as a weapon to defend himself; had he been strong,
he would never have needed that kind of weapon.
-- Kahlil Gibran

2003-05-07 23:23:27

by Greg KH

[permalink] [raw]
Subject: Re: CPUFreq sysfs interface MIA?

On Wed, May 07, 2003 at 10:36:09AM +1000, Daniel Pittman wrote:
> On Tue, 6 May 2003, Greg KH wrote:
> > On Tue, May 06, 2003 at 05:29:15PM +1000, Daniel Pittman wrote:
> >>
> >> 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

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

thanks,

greg k-h


# cpufreq class fix

diff -Nru a/include/linux/cpu.h b/include/linux/cpu.h
--- a/include/linux/cpu.h Wed May 7 16:29:37 2003
+++ b/include/linux/cpu.h Wed May 7 16:29:37 2003
@@ -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;
diff -Nru a/kernel/cpufreq.c b/kernel/cpufreq.c
--- a/kernel/cpufreq.c Wed May 7 16:29:37 2003
+++ b/kernel/cpufreq.c Wed May 7 16:29:37 2003
@@ -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,
};

2003-05-08 00:11:01

by Daniel Pittman

[permalink] [raw]
Subject: Re: CPUFreq sysfs interface MIA?

On Wed, 7 May 2003, Greg KH wrote:
> On Wed, May 07, 2003 at 10:36:09AM +1000, Daniel Pittman wrote:
>> On Tue, 6 May 2003, Greg KH wrote:
>> > On Tue, May 06, 2003 at 05:29:15PM +1000, Daniel Pittman wrote:
>> >>
>> >> 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
>
> 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

--
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_

2003-05-08 00:20:14

by Greg KH

[permalink] [raw]
Subject: Re: CPUFreq sysfs interface MIA?

On Thu, May 08, 2003 at 10:23:33AM +1000, Daniel Pittman wrote:
> On Wed, 7 May 2003, Greg KH wrote:
> > On Wed, May 07, 2003 at 10:36:09AM +1000, Daniel Pittman wrote:
> >> On Tue, 6 May 2003, Greg KH wrote:
> >> > On Tue, May 06, 2003 at 05:29:15PM +1000, Daniel Pittman wrote:
> >> >>
> >> >> 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
> >
> > 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

2003-05-08 01:50:13

by Daniel Pittman

[permalink] [raw]
Subject: Re: CPUFreq sysfs interface MIA?

On Wed, 7 May 2003, Greg KH wrote:
> On Thu, May 08, 2003 at 10:23:33AM +1000, Daniel Pittman wrote:
>> On Wed, 7 May 2003, Greg KH wrote:
>> > On Wed, May 07, 2003 at 10:36:09AM +1000, Daniel Pittman wrote:
>> >> On Tue, 6 May 2003, Greg KH wrote:
>> >> > On Tue, May 06, 2003 at 05:29:15PM +1000, Daniel Pittman wrote:
>> >> >>
>> >> >> 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
>> >
>> > 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.

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

--
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