If using kernel PLL (for NTP), initialize "fixtick" to a reasonable

approximation of reality if the MD code doesn't.  This variable is the
equivalent of "tickfix" for the non-NTP path.

This allows an alpha kernel (where hz=1024) with "options NTP" to
synch up quite nicely (as opposed to having an frequency error of
~560ppm, which is outside the capture range of the PLL).
This commit is contained in:
sommerfeld 1999-09-06 20:44:02 +00:00
parent 571b8b6e41
commit c450ebbbe7

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_clock.c,v 1.49 1999/08/05 18:08:15 thorpej Exp $ */
/* $NetBSD: kern_clock.c,v 1.50 1999/09/06 20:44:02 sommerfeld Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@ -347,6 +347,10 @@ initclocks()
default:
panic("weird hz");
}
if (fixtick == 0) {
/* give MD code a chance to set this to a better value; but, if it doesn't, we should.. */
fixtick = (1000000 - (hz*tick));
}
#endif
}