[2.5.35] CPUfreq documentation (4/5)
PATCH 1/1 [2.5.35] CPUfreq documentation (4/5)
CPUFreq documentation for 2.5.35:
CREDITS one further CREDIT entryDocumentation/cpufreq documentation of CPU frequency and voltage scaling
support in the Linux kernel.MAINTAINERS one further MAINTAINERS entryarch/i386/Config.help Config.help texts for i386 CPUFreq drivers
CREDITS +7 -0
@@ -438,6 +438,13 @@ S: 411 13 Goteborg S: Sweden +N: Dominik Brodowski +E: [email protected] +W: http://www.brodo.de/ +P: 1024D/725B37C6 190F 3E77 9C89 3B6D BECD 46EE 67C3 0308 725B 37C6 +D: parts of CPUFreq code, ACPI bugfixes +S: Tuebingen, Germany + N: Andries Brouwer E: [email protected] D: random Linux hacker
Documentation/cpufreq +362 -0
362 lines not on this page · raw message
MAINTAINERS +5 -0
@@ -364,6 +364,11 @@ W: http://www.fi.muni.cz/~kas/cosa/ S: Maintained +CPU FREQUENCY DRIVERS +L: [email protected] +W: http://www.brodo.de/cpufreq/ +S: Maintained + CPUID/MSR DRIVER P: H. Peter Anvin M: [email protected]
arch/i386/Config.help +69 -1
76 lines not on this page · raw message
Documentation/cpufreq line 81
Quoted 8 lines · Dominik Brodowski
Documentation/cpufreq +8
-0+P4 CPU Clock Modulation: + Intel Pentium 4 Xeon processors +--------------------------------- + Note that you can only switch the speed of two logical CPUs at + once - but each phyiscal CPU may have different throttling levels. + Unfortunately, the cpu_khz value + +
It seems like there is a glitch here. The sentence isn't terminated properly.
Documentation/cpufreq line 230
Quoted 6 lines · Dominik Brodowski
Documentation/cpufreq +6
-0+The third argument, a void *pointer, points to a struct cpufreq_freqs +consisting of five values: cpu, min, max, policy and max_cpu_freq. Min +and max are the lower and upper frequencies (in kHz) of the new +policy, policy the new policy, cpu the number of the affected CPU or +CPUFREQ_ALL_CPUS for all CPUs; and max_cpu_freq the maximum supported +CPU frequency. This value is given for informational purposes only.
- Why choosing a void* ? that doesn't validate type ..
- The struct cpufreq_freqs actually consists of only three values (cpu, old, new). The five values you cite here are in the struct cpufreq_policy.
Quoted 10 lines · Xavier Bestel
Documentation/cpufreq line 230
Quoted 6 lines · Dominik Brodowski
Documentation/cpufreq +6
-0+The third argument, a void *pointer, points to a struct cpufreq_freqs +consisting of five values: cpu, min, max, policy and max_cpu_freq. Min +and max are the lower and upper frequencies (in kHz) of the new +policy, policy the new policy, cpu the number of the affected CPU or +CPUFREQ_ALL_CPUS for all CPUs; and max_cpu_freq the maximum supported +CPU frequency. This value is given for informational purposes only.- Why choosing a void* ? that doesn't validate type ..
That's the type specified by the notifier code. You have two choices:
int notifier_foo(struct notifier_block *nb, int foo, void *bar)
{
struct my_bar *my = bar;
}struct notifier_block nb = {
.notifier_call = notifier_foo,
};
OR:
int notifier_foo(struct notifier_block *nb, int foo, struct my_bar *my) {
}
struct notifier_block nb = {
.notifier_call = (int (*)(struct notifier_block *, int, void *))notifier_foo,
};
So, you end up with a cast in one place or the other. I know which one I prefer.
Quoted 3 lines
- The struct
cpufreq_freqsactually consists of only three values (cpu, old, new). The five values you cite here are in the structcpufreq_policy.
Yep, it's a little unclear.
The policy notifiers are called with struct cpufreq_policy, which have five values. The transition notifiers are called with struct cpufreq_freqs, which has three values.
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
[PATCH] Re: CPUfreq documentation (4/5)
In reply to Xavier BestelHi Xavier,
Thanks for the two corrections!
Quoted 8 lines · Xavier Bestel
Review
Quoted 2 lines · Dominik Brodowski
(quoted diff) +2
-0+The third argument, a void *pointer, points to a struct cpufreq_freqs +consisting of five values: cpu, min, max, policy and max_cpu_freq. Min- The struct
cpufreq_freqsactually consists of only three values (cpu, old, new). The five values you cite here are in the structcpufreq_policy.
Dominik
Documentation/cpufreq renamed from Documentation/cpufreq.original +1 -2
@@ -76,7 +76,6 @@ --------------------------------- Note that you can only switch the speed of two logical CPUs at once - but each phyiscal CPU may have different throttling levels. - Unfortunately, the cpu_khz value PowerNow! K6:
@@ -222,7 +221,7 @@ The phase is specified in the second argument to the notifier. -The third argument, a void *pointer, points to a struct cpufreq_freqs +The third argument, a void *pointer, points to a struct cpufreq_policy consisting of five values: cpu, min, max, policy and max_cpu_freq. Min and max are the lower and upper frequencies (in kHz) of the new policy, policy the new policy, cpu the number of the affected CPU or