diff options
author | wollman <wollman@FreeBSD.org> | 1994-04-23 21:39:18 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-04-23 21:39:18 +0000 |
commit | 7745e6da4c90dbd319a1fb2a8107568a52493998 (patch) | |
tree | 63ef61c82cc8ba8a6a26e39dc9dd3173325b756f /sys | |
parent | 0378205e1d862cc9ac94462a0d9e3d28c7e52d3d (diff) | |
download | FreeBSD-src-7745e6da4c90dbd319a1fb2a8107568a52493998.zip FreeBSD-src-7745e6da4c90dbd319a1fb2a8107568a52493998.tar.gz |
Define new option, INACCURATE_MICROTIME_IS_OK. When this is defined,
the NTP kernel PLL is disabled, and acquire_timer0() is enabled, thus
opening the door for microtime() (and hence gettimeofday()) to return
bogus timestamps. This option is necessary for the `pca' driver to
work, but is implemented to underscore the fact that accurate timekeeping
and the `pca' driver are incompatible at present. If someone writes a version
of microtime() that works when the `pca' driver is being used, this can get
junked.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/tsc.c | 6 | ||||
-rw-r--r-- | sys/amd64/isa/clock.c | 6 | ||||
-rw-r--r-- | sys/conf/NOTES | 12 | ||||
-rw-r--r-- | sys/i386/conf/LINT | 12 | ||||
-rw-r--r-- | sys/i386/conf/NOTES | 12 | ||||
-rw-r--r-- | sys/i386/i386/tsc.c | 6 | ||||
-rw-r--r-- | sys/i386/isa/clock.c | 6 | ||||
-rw-r--r-- | sys/isa/atrtc.c | 6 |
8 files changed, 52 insertions, 14 deletions
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index 511edca..b974ea9 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.6 1994/02/06 22:48:13 davidg Exp $ + * $Id: clock.c,v 1.7 1994/04/21 14:19:16 sos Exp $ */ /* @@ -85,6 +85,9 @@ timerintr(struct intrframe frame) int acquire_timer0(int rate, void (*function)() ) { +#ifndef INACCURATE_MICROTIME_IS_OK + return -1; +#else if (timer0_in_use) /* XXX || (rate < 20000 && rate % hz)) */ return -1; timer0_in_use = 1; @@ -97,6 +100,7 @@ acquire_timer0(int rate, void (*function)() ) if (function) timer_func = function; return 0; +#endif } diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 511edca..b974ea9 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.6 1994/02/06 22:48:13 davidg Exp $ + * $Id: clock.c,v 1.7 1994/04/21 14:19:16 sos Exp $ */ /* @@ -85,6 +85,9 @@ timerintr(struct intrframe frame) int acquire_timer0(int rate, void (*function)() ) { +#ifndef INACCURATE_MICROTIME_IS_OK + return -1; +#else if (timer0_in_use) /* XXX || (rate < 20000 && rate % hz)) */ return -1; timer0_in_use = 1; @@ -97,6 +100,7 @@ acquire_timer0(int rate, void (*function)() ) if (function) timer_func = function; return 0; +#endif } diff --git a/sys/conf/NOTES b/sys/conf/NOTES index a7bb755..16def71 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -4,7 +4,7 @@ # # This kernel is NOT MEANT to be runnable! # -# $Id: LINT,v 1.62 1994/04/13 01:29:14 ache Exp $ +# $Id: LINT,v 1.63 1994/04/23 12:13:27 ache Exp $ # machine "i386" @@ -26,7 +26,7 @@ options "COM_MULTIPORT" #Multiport support in sys/isa/sio.c options "FIFO_TRIGGER=FIFO_TRIGGER_1" #Use this fifo value in sio.c options "COMPAT_43" #compatible with BSD 4.3 -options "SYMTAB_SPACE=112466" #This kernel needs LOTS of symtable +options "SYMTAB_SPACE=113498" #This kernel needs LOTS of symtable options GATEWAY #internetwork gateway options KTRACE #kernel tracing @@ -177,7 +177,13 @@ device snd1 at isa? port 0x388 device pca0 at isa? tty # +# The following option must be enabled in order for the pca driver to +# work. WARNING! BEWARE! CAUTION! ACHTUNG! VAROKAA! +# Enabling this option will result in the microtime() function (and hence +# gettimeofday(2) asnd the timestamps in bpf) giving incorrect results. +# DO NOT attempt to run NTP while playing audio with this driver. # +#options INACCURATE_MICROTIME_IS_OK + # options that have not been resolved yet -# pseudo-device log diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT index a7bb755..16def71 100644 --- a/sys/i386/conf/LINT +++ b/sys/i386/conf/LINT @@ -4,7 +4,7 @@ # # This kernel is NOT MEANT to be runnable! # -# $Id: LINT,v 1.62 1994/04/13 01:29:14 ache Exp $ +# $Id: LINT,v 1.63 1994/04/23 12:13:27 ache Exp $ # machine "i386" @@ -26,7 +26,7 @@ options "COM_MULTIPORT" #Multiport support in sys/isa/sio.c options "FIFO_TRIGGER=FIFO_TRIGGER_1" #Use this fifo value in sio.c options "COMPAT_43" #compatible with BSD 4.3 -options "SYMTAB_SPACE=112466" #This kernel needs LOTS of symtable +options "SYMTAB_SPACE=113498" #This kernel needs LOTS of symtable options GATEWAY #internetwork gateway options KTRACE #kernel tracing @@ -177,7 +177,13 @@ device snd1 at isa? port 0x388 device pca0 at isa? tty # +# The following option must be enabled in order for the pca driver to +# work. WARNING! BEWARE! CAUTION! ACHTUNG! VAROKAA! +# Enabling this option will result in the microtime() function (and hence +# gettimeofday(2) asnd the timestamps in bpf) giving incorrect results. +# DO NOT attempt to run NTP while playing audio with this driver. # +#options INACCURATE_MICROTIME_IS_OK + # options that have not been resolved yet -# pseudo-device log diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index a7bb755..16def71 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -4,7 +4,7 @@ # # This kernel is NOT MEANT to be runnable! # -# $Id: LINT,v 1.62 1994/04/13 01:29:14 ache Exp $ +# $Id: LINT,v 1.63 1994/04/23 12:13:27 ache Exp $ # machine "i386" @@ -26,7 +26,7 @@ options "COM_MULTIPORT" #Multiport support in sys/isa/sio.c options "FIFO_TRIGGER=FIFO_TRIGGER_1" #Use this fifo value in sio.c options "COMPAT_43" #compatible with BSD 4.3 -options "SYMTAB_SPACE=112466" #This kernel needs LOTS of symtable +options "SYMTAB_SPACE=113498" #This kernel needs LOTS of symtable options GATEWAY #internetwork gateway options KTRACE #kernel tracing @@ -177,7 +177,13 @@ device snd1 at isa? port 0x388 device pca0 at isa? tty # +# The following option must be enabled in order for the pca driver to +# work. WARNING! BEWARE! CAUTION! ACHTUNG! VAROKAA! +# Enabling this option will result in the microtime() function (and hence +# gettimeofday(2) asnd the timestamps in bpf) giving incorrect results. +# DO NOT attempt to run NTP while playing audio with this driver. # +#options INACCURATE_MICROTIME_IS_OK + # options that have not been resolved yet -# pseudo-device log diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index 511edca..b974ea9 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.6 1994/02/06 22:48:13 davidg Exp $ + * $Id: clock.c,v 1.7 1994/04/21 14:19:16 sos Exp $ */ /* @@ -85,6 +85,9 @@ timerintr(struct intrframe frame) int acquire_timer0(int rate, void (*function)() ) { +#ifndef INACCURATE_MICROTIME_IS_OK + return -1; +#else if (timer0_in_use) /* XXX || (rate < 20000 && rate % hz)) */ return -1; timer0_in_use = 1; @@ -97,6 +100,7 @@ acquire_timer0(int rate, void (*function)() ) if (function) timer_func = function; return 0; +#endif } diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 511edca..b974ea9 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.6 1994/02/06 22:48:13 davidg Exp $ + * $Id: clock.c,v 1.7 1994/04/21 14:19:16 sos Exp $ */ /* @@ -85,6 +85,9 @@ timerintr(struct intrframe frame) int acquire_timer0(int rate, void (*function)() ) { +#ifndef INACCURATE_MICROTIME_IS_OK + return -1; +#else if (timer0_in_use) /* XXX || (rate < 20000 && rate % hz)) */ return -1; timer0_in_use = 1; @@ -97,6 +100,7 @@ acquire_timer0(int rate, void (*function)() ) if (function) timer_func = function; return 0; +#endif } diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 511edca..b974ea9 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.6 1994/02/06 22:48:13 davidg Exp $ + * $Id: clock.c,v 1.7 1994/04/21 14:19:16 sos Exp $ */ /* @@ -85,6 +85,9 @@ timerintr(struct intrframe frame) int acquire_timer0(int rate, void (*function)() ) { +#ifndef INACCURATE_MICROTIME_IS_OK + return -1; +#else if (timer0_in_use) /* XXX || (rate < 20000 && rate % hz)) */ return -1; timer0_in_use = 1; @@ -97,6 +100,7 @@ acquire_timer0(int rate, void (*function)() ) if (function) timer_func = function; return 0; +#endif } |