Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern If using kernel PLL (for NTP), initialize "fixtick"...



details:   https://anonhg.NetBSD.org/src/rev/51370e41c61a
branches:  trunk
changeset: 476114:51370e41c61a
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Mon Sep 06 20:44:02 1999 +0000

description:
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).

diffstat:

 sys/kern/kern_clock.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 824d67ef77f9 -r 51370e41c61a sys/kern/kern_clock.c
--- a/sys/kern/kern_clock.c     Mon Sep 06 20:28:19 1999 +0000
+++ b/sys/kern/kern_clock.c     Mon Sep 06 20:44:02 1999 +0000
@@ -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 @@
        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
 }
 



Home | Main Index | Thread Index | Old Index