Re: clock rate probing - final patch

Stephan Meyer (sensei@wiesel.de)
Wed, 5 Feb 1997 13:44:47 +0100 (MET)


On Sun, 2 Feb 1997, William Sowerbutts wrote:
> 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.

Caught with our pants down? Why would we? Plz explain.

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

Array??? What kind of array??? Which values??? Who will keep them up to
date???
Also, you're missing the fact that some people will overclock their
processors. This is not bad and it should not be punished by sticking to
some array.
The return value is off by one MHz at most. probing a few times and taking
the average is a good idea, but this takes time. The lowest resolution I
can use is 1/10 second. If you probe five times, that's half a second and
I know people (including me) who would hate that slow-down.

Again for boot-up probing. To my knowledge and from looking around in the
kernel code, I get the feeling, that there is no init code in arch/i386
that is called after the jiffies have been put in place. That means that
it would be necessary to put nasty-looking-machine-dependent-#define-code
in main/init.c. If someone knows a better solution, please tell me. I
don't.

Sinc., Stephan

> _________________________________________________________________________
> 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));}
>
>
>

-----------------------------------------------
Stephan Meyer
+49-89-4301114
Stephan.Meyer@munich.netsurf.de
http://fatman.mathematik.tu-muenchen.de/~meyer/
-----------------------------------------------