Re: clock rate probing - final patch

William Sowerbutts (btg@thepentagon.com)
Sun, 02 Feb 1997 23:00:10 +0000


At 18:03 29/01/97 +0000, David Woodhouse wrote:
>On Wed, 29 Jan 1997, Stephan Meyer wrote:
>
>> I kept on-the-fly calculation for two reasons:
>> - Sometimes, you get values which are off by one or two and would be
>> annoying to see in /proc/cpuinfo all the time.
>> - There might be people who "tune" their CPU while the computer is on :)
>>
>
>OTOH, the former could be fixed by rounding to sensible values, the latter
>frightens me too much to contemplate too deeply, and if you were to do the
>probe earlier, it might not cause a complete lockup on SMP systems when
>it's done.

how about you probe once at boot, then compare the value returned to see if
it's near enough (2 or 3Mhz?) to a value stored in an array. If it's far
out, probe a few more times and take the most frequently returned value to
be the true Mhz. That way, when Intel release 463Mhz chips, we won't be
caught with our pants down, so to speak.

Or am I too late, and this has already been done?

_________________________________________________________________________
William R Sowerbutts (BtG) btg@thepentagon.com
Coder / Guru / Nrrrd http://www.users.dircon.co.uk/~guru/
main(){char*s=">#=0> ^#X@#@^7=";int c=0,m;for(;c<15;c++)for
(m=-1;m<7;putchar(m++/6&c%3/2?10:s[c]-31&1<<m?42:32));}