Commit 9643e13c authored by Dave Jones's avatar Dave Jones

Merge tetrachloride.(none):/mnt/raid/src/kernel/2.5/bk-linus

into tetrachloride.(none):/mnt/raid/src/kernel/2.5/cpufreq
parents b84ba662 a31d5068
...@@ -35,7 +35,7 @@ Contents: ...@@ -35,7 +35,7 @@ Contents:
So, you just got a brand-new CPU / chipset with datasheets and want to So, you just got a brand-new CPU / chipset with datasheets and want to
add cpufreq support for this CPU / chipset? Great. Here are some hints add cpufreq support for this CPU / chipset? Great. Here are some hints
on what is neccessary: on what is necessary:
1.1 Initialization 1.1 Initialization
...@@ -54,7 +54,7 @@ cpufreq_driver.name - The name of this driver. ...@@ -54,7 +54,7 @@ cpufreq_driver.name - The name of this driver.
cpufreq_driver.init - A pointer to the per-CPU initialization cpufreq_driver.init - A pointer to the per-CPU initialization
function. function.
cpufreq_driver.verify - A pointer to a "verfication" funciton. cpufreq_driver.verify - A pointer to a "verification" funciton.
cpufreq_driver.setpolicy _or_ cpufreq_driver.setpolicy _or_
cpufreq_driver.target - See below on the differences. cpufreq_driver.target - See below on the differences.
...@@ -72,7 +72,7 @@ cpufreq_driver.attr - A pointer to a NULL-terminated list of ...@@ -72,7 +72,7 @@ cpufreq_driver.attr - A pointer to a NULL-terminated list of
-------------------------- --------------------------
Whenever a new CPU is registered with the device model, or after the Whenever a new CPU is registered with the device model, or after the
cpufreq driver registers itself, the per-CPU initialization fucntion cpufreq driver registers itself, the per-CPU initialization function
cpufreq_driver.init is called. It takes a struct cpufreq_policy cpufreq_driver.init is called. It takes a struct cpufreq_policy
*policy as argument. What to do now? *policy as argument. What to do now?
...@@ -94,7 +94,7 @@ policy->cur The current operating frequency of ...@@ -94,7 +94,7 @@ policy->cur The current operating frequency of
this CPU (if appropriate) this CPU (if appropriate)
policy->min, policy->min,
policy->max, policy->max,
policy->policy and, if neccessary, policy->policy and, if necessary,
policy->governor must contain the "default policy" for policy->governor must contain the "default policy" for
this CPU. A few moments later, this CPU. A few moments later,
cpufreq_driver.verify and either cpufreq_driver.verify and either
......
...@@ -98,7 +98,7 @@ scaling_max_freq. ...@@ -98,7 +98,7 @@ scaling_max_freq.
------------- -------------
The CPUfreq governor "userspace" allows the user, or any userspace The CPUfreq governor "userspace" allows the user, or any userspace
program running with UID "root", to set the CPU to a specifc frequency program running with UID "root", to set the CPU to a specific frequency
by making a sysfs file "scaling_setspeed" available in the CPU-device by making a sysfs file "scaling_setspeed" available in the CPU-device
directory. directory.
......
...@@ -58,7 +58,8 @@ Intel mobile PIII [*] and Intel mobile PIII-M on certain chipsets ...@@ -58,7 +58,8 @@ Intel mobile PIII [*] and Intel mobile PIII-M on certain chipsets
Intel Pentium 4, Intel Xeon Intel Pentium 4, Intel Xeon
National Semiconductors Geode GX National Semiconductors Geode GX
Transmeta Crusoe Transmeta Crusoe
varios processors on some ACPI 2.0-compatible systems [**] VIA Cyrix 3 / C3
various processors on some ACPI 2.0-compatible systems [**]
[*] only certain Intel mobile PIII processors are supported. If you [*] only certain Intel mobile PIII processors are supported. If you
know that you own a speedstep-capable processor, pass the option know that you own a speedstep-capable processor, pass the option
...@@ -81,9 +82,9 @@ UltraSPARC-III ...@@ -81,9 +82,9 @@ UltraSPARC-III
2. "Policy" / "Governor" ? 2. "Policy" / "Governor" ?
========================== ==========================
Some CPU frequency scaling-capable processor switch between varios Some CPU frequency scaling-capable processor switch between various
frequencies and operating voltages "on the fly" without any kernel or frequencies and operating voltages "on the fly" without any kernel or
user involvement. This guarantuees very fast switching to a frequency user involvement. This guarantees very fast switching to a frequency
which is high enough to serve the user's needs, but low enough to save which is high enough to serve the user's needs, but low enough to save
power. power.
...@@ -93,7 +94,7 @@ power. ...@@ -93,7 +94,7 @@ power.
On these systems, all you can do is select the lower and upper On these systems, all you can do is select the lower and upper
frequency limit as well as whether you want more aggressive frequency limit as well as whether you want more aggressive
power-saving or more instantly avaialble processing power. power-saving or more instantly available processing power.
2.2 Governor 2.2 Governor
......
...@@ -239,12 +239,17 @@ static void change_speed (unsigned int index) ...@@ -239,12 +239,17 @@ static void change_speed (unsigned int index)
__asm__("\tcli\n"); __asm__("\tcli\n");
rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
fidvidctl.bits.SGTC = latency; /* Stop grant timeout counter */ fidvidctl.bits.SGTC = latency; /* Stop grant timeout counter */
fidvidctl.bits.FID = fid; fidvidctl.bits.FID = fid;
fidvidctl.bits.VID = vid;
/* Note, we could set these lazily. Ie, only do voltage transition
if its changed since last time (Some speeds have the same voltage) */
fidvidctl.bits.FIDC = 1; fidvidctl.bits.FIDC = 1;
/* Set the voltage lazily. Ie, only do voltage transition
if its changed since last time (Some speeds have the same voltage) */
if (fidvidctl.bits.VID != vid) {
fidvidctl.bits.VID = vid;
fidvidctl.bits.VIDC = 1; fidvidctl.bits.VIDC = 1;
}
wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
if (have_a0 == 1) if (have_a0 == 1)
__asm__("\tsti\n"); __asm__("\tsti\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment