2003-06-11 22:42:55

by Jeremy Fitzhardinge

[permalink] [raw]
Subject: Pentium M (Centrino) cpufreq device driver (please test me)

This is the latest version of my Enhanced SpeedStep driver for cpufreq.
It supports current Pentium M CPUs.

Intel has not fully documented the MSRs used to control CPU core
frequency and voltage, but they're fairly easy to work out with a bit of
experimentation and from the Intel documentation.

The driver uses built-in tables for all the operating points of known
Pentium M processors, derived from the Table 5 in the Intel Pentium M
datasheet (25261202.pdf). The tables derived from the datasheet exactly
match the tables in ACPI on my 1.3GHz Pentium M IBM ThinkPad X31.

Because this driver is using undocumented registers, it is careful to
only apply to CPUs which I'm confident that it will work with.
Therefore, not only does it look for the EST feature bit, but will only
work on Family 6, Model 9, Stepping 5 processors. It also needs an
exact match on model name when choosing which operating point table to
use.

This is the 3rd iteration of this driver; it adds proper use of the
cpufreq frequency change notifier, which fixes problems with the TSC
changing rate.

It does not (yet) attempt to deal with the processor autonomously
changing performance operating point as part of its automatic thermal
control stuff.

I'm very interested in people trying this on other models of Pentium M
processor. I've had to guess what the model name string is for other
speed grades, and I'm not sure I got it right. I'm fairly sure this
driver can't cause physical damage, but it could well cause instability
and/or outright crashes when enabled, so be careful. It works fine for
me though.

Patch is against 2.5.70-mm8, but it should apply to base 2.5.70.

J


Attachments:
cpufreq-centrino.patch (15.77 kB)

2003-06-12 04:36:21

by mattdm

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

> The driver uses built-in tables for all the operating points of known
> Pentium M processors, derived from the Table 5 in the Intel Pentium M
> datasheet (25261202.pdf). The tables derived from the datasheet exactly
> match the tables in ACPI on my 1.3GHz Pentium M IBM ThinkPad X31.
>
> Because this driver is using undocumented registers, it is careful to
> only apply to CPUs which I'm confident that it will work with.
> Therefore, not only does it look for the EST feature bit, but will only
> work on Family 6, Model 9, Stepping 5 processors. It also needs an
> exact match on model name when choosing which operating point table to
> use.

For what it's worth (maybe not much) I have a Vaio U101 which uses the
"Celeron 600A" processor. This is a sort of bastard-child of the Pentium M
family -- it's not listed on their web site anywhere that I know of --
certainly not in the pdf documents -- and it doesn't have any SpeedStep
ability at all. (It's apparently locked 600Mhz and the lowest voltage. I
have't tried your patch to see what happens -- I can if you want.) Anyway, I
mention it because it *does* report itself as Family 6, Model 9, Stepping 5.
Model name is "Mobile Intel(R) Celeron(R) processor 600MHz".


--
Matthew Miller [email protected] <http://www.mattdm.org/>
Boston University Linux ------> <http://linux.bu.edu/>

2003-06-12 08:16:32

by Anders Karlsson

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

On Wed, 2003-06-11 at 23:50, Jeremy Fitzhardinge wrote:
> This is the latest version of my Enhanced SpeedStep driver for cpufreq.
> It supports current Pentium M CPUs.

Can this be rebased against 2.4.21 and be included in 2.4.22-pre please?
:-)

If the patch could be applied against 2.4.21-rc, I'd be testing it out.
Anything that can make the 'stable' kernel perhaps a bit more stable on
the X31 Thinkpad is IMHO a Good Thing.

/A


Attachments:
signature.asc (198.00 B)
This is a digitally signed message part

2003-06-12 09:26:26

by Jeremy Fitzhardinge

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

On Thu, 2003-06-12 at 01:30, Anders Karlsson wrote:
> If the patch could be applied against 2.4.21-rc, I'd be testing it out.
> Anything that can make the 'stable' kernel perhaps a bit more stable on
> the X31 Thinkpad is IMHO a Good Thing.

It shouldn't have any effect on stability. It only adds a new feature:
CPU speed control.

I've found 2.5 to be very stable on my X31. Except for wireless.

J

2003-06-12 14:40:10

by Dave Jones

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

On Thu, Jun 12, 2003 at 09:30:14AM +0100, Anders Karlsson wrote:
> On Wed, 2003-06-11 at 23:50, Jeremy Fitzhardinge wrote:
> > This is the latest version of my Enhanced SpeedStep driver for cpufreq.
> > It supports current Pentium M CPUs.
>
> Can this be rebased against 2.4.21 and be included in 2.4.22-pre please?
> :-)
>
> If the patch could be applied against 2.4.21-rc, I'd be testing it out.
> Anything that can make the 'stable' kernel perhaps a bit more stable on
> the X31 Thinkpad is IMHO a Good Thing.

cpufreq inclusion into 2.4 probably won't happen. There is an older
patch in -ac, but has no-one is updating the 2.4 cpufreq branch any
more, it's lacking quite a lot of fixes that have gone into 2.5.

Dave

2003-06-12 18:32:15

by Bill Nottingham

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

Anders Karlsson ([email protected]) said:
> On Wed, 2003-06-11 at 23:50, Jeremy Fitzhardinge wrote:
> > This is the latest version of my Enhanced SpeedStep driver for cpufreq.
> > It supports current Pentium M CPUs.
>
> Can this be rebased against 2.4.21 and be included in 2.4.22-pre please?
> :-)

http://people.redhat.com/notting/cpufreq-centrino.patch

Rebased against something vaguely 2.4.21-pre-ish.

Bill

2003-06-12 19:57:23

by Bill Nottingham

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

Bill Nottingham ([email protected]) said:
> Anders Karlsson ([email protected]) said:
> > On Wed, 2003-06-11 at 23:50, Jeremy Fitzhardinge wrote:
> > > This is the latest version of my Enhanced SpeedStep driver for cpufreq.
> > > It supports current Pentium M CPUs.
> >
> > Can this be rebased against 2.4.21 and be included in 2.4.22-pre please?
> > :-)
>
> http://people.redhat.com/notting/cpufreq-centrino.patch
>
> Rebased against something vaguely 2.4.21-pre-ish.

... which happens to have updated cpufreq already in it, and
therefore requires it. Oops.

http://people.redhat.com/notting/linux-2.4.20-cpufreq.patch

Bill

2003-06-13 00:29:55

by John Goerzen

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

Bill Nottingham <[email protected]> writes:

>> > Can this be rebased against 2.4.21 and be included in 2.4.22-pre please?
>> > :-)
>>
>> http://people.redhat.com/notting/cpufreq-centrino.patch
>>
>> Rebased against something vaguely 2.4.21-pre-ish.
>
> ... which happens to have updated cpufreq already in it, and
> therefore requires it. Oops.

Umm, no it doesn't. Perhaps you're using an ac kernel?

I'd be happy to test this against vanilla 2.4.21-rc8, but it has no
cpufreq at all, so neither of these patches are going to work.

-- John

>
> http://people.redhat.com/notting/linux-2.4.20-cpufreq.patch
>
> Bill

2003-06-13 01:07:19

by Bill Nottingham

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

John Goerzen ([email protected]) said:
> Bill Nottingham <[email protected]> writes:
>
> >> > Can this be rebased against 2.4.21 and be included in 2.4.22-pre please?
> >> > :-)
> >>
> >> http://people.redhat.com/notting/cpufreq-centrino.patch
> >>
> >> Rebased against something vaguely 2.4.21-pre-ish.
> >
> > ... which happens to have updated cpufreq already in it, and
> > therefore requires it. Oops.
>
> Umm, no it doesn't. Perhaps you're using an ac kernel?

Yeah, way too many patch dependencies. 2.4.21-pre-ac, +
the below patch, and then the centrino patch.

> > http://people.redhat.com/notting/linux-2.4.20-cpufreq.patch

Apologies for the confusion.

Bill

2003-06-13 09:29:50

by Alan

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

On Iau, 2003-06-12 at 15:53, Dave Jones wrote:
> cpufreq inclusion into 2.4 probably won't happen. There is an older
> patch in -ac, but has no-one is updating the 2.4 cpufreq branch any
> more, it's lacking quite a lot of fixes that have gone into 2.5.

Its basically up to someone who uses the 2.4 one and wants to backport
the updates for athlon/centrino etc. Candidates can apply online 8)

2003-06-13 09:49:36

by Arjan van de Ven

[permalink] [raw]
Subject: Re: Pentium M (Centrino) cpufreq device driver (please test me)

On Fri, 2003-06-13 at 11:41, Alan Cox wrote:
> On Iau, 2003-06-12 at 15:53, Dave Jones wrote:
> > cpufreq inclusion into 2.4 probably won't happen. There is an older
> > patch in -ac, but has no-one is updating the 2.4 cpufreq branch any
> > more, it's lacking quite a lot of fixes that have gone into 2.5.
>
> Its basically up to someone who uses the 2.4 one and wants to backport
> the updates for athlon/centrino etc. Candidates can apply online 8)

I sent you a patch before to do this.......


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part