Re: Laptops & CPU frequency

From: Dave Jones
Date: Wed Jan 14 2004 - 00:03:21 EST


On Sun, Jan 11, 2004 at 12:54:51PM -0500, Robert Love wrote:
> On Sun, 2004-01-11 at 12:44, Matthew Garrett wrote:
>
> > Is there any realistic way of noticing this sort of change?
>
> Sure. That is how Speedstep works, right? We have an interface for
> Speedstep, so the kernel knows about it. We do not have an interface
> for the proprietary BIOS stuff, I assume, so the kernel is oblivious.

Speedstep support is one way right now. We tell the CPU "switch to this mode"
and it does. What we don't know how to do in cpufreq is detect when someone pulls
the power out, or plugs back in. BIOS SMM magick happens, and it all
gets taken care of transparently without us having a clue that anything
happened.

We *could* hook into the APM 'power source changed' notifiers, (and I
guess ACPI has something similar somewhere). That should take care of things.

> But if you had the docs, I suppose you could code a solution and tie it
> into the cpufreq code, just as we have proper support for Speedstep,
> Longrun, etc.

Of all the implementations I've played with (longhaul/powernow/speedstep-smi)
speedstep is the only one that does funky shit with SMM. The others are quite
dumb (and friendly) in comparison. (Ie, nothing happens on power source change)

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/