summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-12-20 20:57:33 +0000
committerwollman <wollman@FreeBSD.org>1995-12-20 20:57:33 +0000
commit19914706e411f628cfd36b7f46094cb62d6b815e (patch)
treeca88a33b984ce6cbb043c04f8e340a8cdeb15911 /sys
parentd1c087d3d5f89d423c124b7cc55fa3e76bcf733d (diff)
downloadFreeBSD-src-19914706e411f628cfd36b7f46094cb62d6b815e.zip
FreeBSD-src-19914706e411f628cfd36b7f46094cb62d6b815e.tar.gz
Increase Pentium cyclecounter calibration time to 131072 us. This
experimentally seems to give better results on my machine.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/tsc.c4
-rw-r--r--sys/amd64/isa/clock.c4
-rw-r--r--sys/i386/i386/tsc.c4
-rw-r--r--sys/i386/isa/clock.c4
-rw-r--r--sys/isa/atrtc.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index b7c56b7..65668d1 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.40 1995/12/10 13:38:23 phk Exp $
+ * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $
*/
/*
@@ -295,7 +295,7 @@ calibrate_cyclecounter(void)
*/
unsigned long long count;
-#define howlong ((unsigned)4*tick)
+#define howlong 131072UL
__asm __volatile(".byte 0x0f, 0x30" : : "A"(0LL), "c" (0x10));
DELAY(howlong);
__asm __volatile(".byte 0xf,0x31" : "=A" (count));
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index b7c56b7..65668d1 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.40 1995/12/10 13:38:23 phk Exp $
+ * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $
*/
/*
@@ -295,7 +295,7 @@ calibrate_cyclecounter(void)
*/
unsigned long long count;
-#define howlong ((unsigned)4*tick)
+#define howlong 131072UL
__asm __volatile(".byte 0x0f, 0x30" : : "A"(0LL), "c" (0x10));
DELAY(howlong);
__asm __volatile(".byte 0xf,0x31" : "=A" (count));
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c
index b7c56b7..65668d1 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.40 1995/12/10 13:38:23 phk Exp $
+ * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $
*/
/*
@@ -295,7 +295,7 @@ calibrate_cyclecounter(void)
*/
unsigned long long count;
-#define howlong ((unsigned)4*tick)
+#define howlong 131072UL
__asm __volatile(".byte 0x0f, 0x30" : : "A"(0LL), "c" (0x10));
DELAY(howlong);
__asm __volatile(".byte 0xf,0x31" : "=A" (count));
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index b7c56b7..65668d1 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.40 1995/12/10 13:38:23 phk Exp $
+ * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $
*/
/*
@@ -295,7 +295,7 @@ calibrate_cyclecounter(void)
*/
unsigned long long count;
-#define howlong ((unsigned)4*tick)
+#define howlong 131072UL
__asm __volatile(".byte 0x0f, 0x30" : : "A"(0LL), "c" (0x10));
DELAY(howlong);
__asm __volatile(".byte 0xf,0x31" : "=A" (count));
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index b7c56b7..65668d1 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.40 1995/12/10 13:38:23 phk Exp $
+ * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $
*/
/*
@@ -295,7 +295,7 @@ calibrate_cyclecounter(void)
*/
unsigned long long count;
-#define howlong ((unsigned)4*tick)
+#define howlong 131072UL
__asm __volatile(".byte 0x0f, 0x30" : : "A"(0LL), "c" (0x10));
DELAY(howlong);
__asm __volatile(".byte 0xf,0x31" : "=A" (count));
OpenPOWER on IntegriCloud