On Thu, 7 Jul 2005 [email protected] wrote:
>
> int main() {
> unsigned int index, frequency, voltage
>
> index = (((frequency)/100) << 8) | ((voltage - 700) / 16);
> printf ("%u\n", index);
> }
>
> frequency is expressed in MHz, voltage in mV, index is the value for
> centrino_model[cpu]->op_points[y].index
Few days ago I discussed on the cpufreq mailing list that the above formula
is not the correct way to compute the index. Instead of frequency, one
should use a multiplier, i.e.:
index = (multiplier << 8) | ((voltage - 700) / 16);
and the multiplier is computed as multiplier = frequency/fsb_speed.
On older systems fsb_speed = 100 MHz and that's why the original formula
was working. But for the Sonoma (Centrino 2) Pentium M processors
fsb_speed = 133 MHz.
To give an example, take a CPU speed of 800MHz and a front side bus of
133MHz. Using the original formula we will use the value
frequency/100 = 800/100 = 8
which is wrong. The correct value is:
multiplier = frequency/fsb_speed = 800/133 = 6.
Nikolay
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|