summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-04-28 21:11:20 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-04-28 21:11:20 +0000
commitccb0652ea43a23d7197f3b4861775b83cc0b5909 (patch)
treeefb9cd3cae420f0ea18f0ebb4e0dccc41388ff6c /sys/arch
parentf1197b307581a2ec1d4e6616b959e4d38b48ecbe (diff)
Only use Pentium instruction counter of we have been compiled with NTP
support, otherwise we won't get the counter reset at the top of every second and will return highly inaccurate values.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/microtime.s6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/microtime.s b/sys/arch/i386/i386/microtime.s
index 918a9de229c..c3ebff8c3f6 100644
--- a/sys/arch/i386/i386/microtime.s
+++ b/sys/arch/i386/i386/microtime.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: microtime.s,v 1.4 1996/03/19 21:09:20 mickey Exp $ */
+/* $OpenBSD: microtime.s,v 1.5 1996/04/28 21:11:19 tholo Exp $ */
/* $NetBSD: microtime.s,v 1.16 1995/04/17 12:06:47 cgd Exp $ */
/*-
@@ -48,7 +48,7 @@
#ifndef HZ
ENTRY(microtime)
-#ifdef I586_CPU
+#if defined(I586_CPU) && defined(NTP)
movl _pentium_mhz, %ecx
testl %ecx, %ecx
jne pentium_microtime
@@ -138,7 +138,7 @@ common_microtime:
ret
-#ifdef I586_CPU
+#if defined(I586_CPU) && defined(NTP)
.align 2, 0x90
pentium_microtime:
cli