summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1998-05-20 13:38:42 +0000
committerkato <kato@FreeBSD.org>1998-05-20 13:38:42 +0000
commit2f9c119f1e423ac9f7032f159fcc6b1a5dd9c30f (patch)
tree702b0121e82033caa199b8cfe8aa3e0b65ef97c8 /sys/pc98
parenta7cd929d78be097050fad4585f3b7d0010507c05 (diff)
downloadFreeBSD-src-2f9c119f1e423ac9f7032f159fcc6b1a5dd9c30f.zip
FreeBSD-src-2f9c119f1e423ac9f7032f159fcc6b1a5dd9c30f.tar.gz
Sync with sys/i386/isa/clock.c revision 1.120.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/cbus/clock.c27
-rw-r--r--sys/pc98/cbus/pcrtc.c27
-rw-r--r--sys/pc98/pc98/clock.c27
3 files changed, 27 insertions, 54 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c
index ef08286..1137b46 100644
--- a/sys/pc98/cbus/clock.c
+++ b/sys/pc98/cbus/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.52 1998/04/06 03:38:18 kato Exp $
+ * $Id: clock.c,v 1.53 1998/05/04 07:47:24 kato Exp $
*/
/*
@@ -194,15 +194,13 @@ static void rtc_outb __P((int));
#endif
static u_int tsc_present;
-static u_int64_t i8254_get_timecount __P((void));
+static unsigned i8254_get_timecount __P((void));
+static unsigned tsc_get_timecount __P((void));
static void set_timer_freq(u_int freq, int intr_freq);
-static u_int64_t tsc_get_timecount __P((void));
-static u_int32_t tsc_get_timedelta __P((struct timecounter *tc));
static struct timecounter tsc_timecounter[3] = {
- tsc_get_timedelta, /* get_timedelta */
tsc_get_timecount, /* get_timecount */
- ~0, /* counter_mask */
+ ~0u, /* counter_mask */
0, /* frequency */
"TSC" /* name */
};
@@ -211,9 +209,8 @@ SYSCTL_OPAQUE(_debug, OID_AUTO, tsc_timecounter, CTLFLAG_RD,
tsc_timecounter, sizeof(tsc_timecounter), "S,timecounter", "");
static struct timecounter i8254_timecounter[3] = {
- 0, /* get_timedelta */
i8254_get_timecount, /* get_timecount */
- (1ULL << 32) - 1, /* counter_mask */
+ ~0u, /* counter_mask */
0, /* frequency */
"i8254" /* name */
};
@@ -1410,10 +1407,10 @@ sysctl_machdep_tsc_freq SYSCTL_HANDLER_ARGS
SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW,
0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", "");
-static u_int64_t
+static u_int
i8254_get_timecount(void)
{
- u_int32_t count;
+ u_int count;
u_long ef;
u_int high, low;
@@ -1439,14 +1436,8 @@ i8254_get_timecount(void)
return (count);
}
-static u_int64_t
+static u_int
tsc_get_timecount(void)
{
- return ((u_int64_t)rdtsc());
-}
-
-static u_int32_t
-tsc_get_timedelta(struct timecounter *tc)
-{
- return ((u_int64_t)rdtsc() - tc->offset_count);
+ return (rdtsc());
}
diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c
index ef08286..1137b46 100644
--- a/sys/pc98/cbus/pcrtc.c
+++ b/sys/pc98/cbus/pcrtc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.52 1998/04/06 03:38:18 kato Exp $
+ * $Id: clock.c,v 1.53 1998/05/04 07:47:24 kato Exp $
*/
/*
@@ -194,15 +194,13 @@ static void rtc_outb __P((int));
#endif
static u_int tsc_present;
-static u_int64_t i8254_get_timecount __P((void));
+static unsigned i8254_get_timecount __P((void));
+static unsigned tsc_get_timecount __P((void));
static void set_timer_freq(u_int freq, int intr_freq);
-static u_int64_t tsc_get_timecount __P((void));
-static u_int32_t tsc_get_timedelta __P((struct timecounter *tc));
static struct timecounter tsc_timecounter[3] = {
- tsc_get_timedelta, /* get_timedelta */
tsc_get_timecount, /* get_timecount */
- ~0, /* counter_mask */
+ ~0u, /* counter_mask */
0, /* frequency */
"TSC" /* name */
};
@@ -211,9 +209,8 @@ SYSCTL_OPAQUE(_debug, OID_AUTO, tsc_timecounter, CTLFLAG_RD,
tsc_timecounter, sizeof(tsc_timecounter), "S,timecounter", "");
static struct timecounter i8254_timecounter[3] = {
- 0, /* get_timedelta */
i8254_get_timecount, /* get_timecount */
- (1ULL << 32) - 1, /* counter_mask */
+ ~0u, /* counter_mask */
0, /* frequency */
"i8254" /* name */
};
@@ -1410,10 +1407,10 @@ sysctl_machdep_tsc_freq SYSCTL_HANDLER_ARGS
SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW,
0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", "");
-static u_int64_t
+static u_int
i8254_get_timecount(void)
{
- u_int32_t count;
+ u_int count;
u_long ef;
u_int high, low;
@@ -1439,14 +1436,8 @@ i8254_get_timecount(void)
return (count);
}
-static u_int64_t
+static u_int
tsc_get_timecount(void)
{
- return ((u_int64_t)rdtsc());
-}
-
-static u_int32_t
-tsc_get_timedelta(struct timecounter *tc)
-{
- return ((u_int64_t)rdtsc() - tc->offset_count);
+ return (rdtsc());
}
diff --git a/sys/pc98/pc98/clock.c b/sys/pc98/pc98/clock.c
index ef08286..1137b46 100644
--- a/sys/pc98/pc98/clock.c
+++ b/sys/pc98/pc98/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.52 1998/04/06 03:38:18 kato Exp $
+ * $Id: clock.c,v 1.53 1998/05/04 07:47:24 kato Exp $
*/
/*
@@ -194,15 +194,13 @@ static void rtc_outb __P((int));
#endif
static u_int tsc_present;
-static u_int64_t i8254_get_timecount __P((void));
+static unsigned i8254_get_timecount __P((void));
+static unsigned tsc_get_timecount __P((void));
static void set_timer_freq(u_int freq, int intr_freq);
-static u_int64_t tsc_get_timecount __P((void));
-static u_int32_t tsc_get_timedelta __P((struct timecounter *tc));
static struct timecounter tsc_timecounter[3] = {
- tsc_get_timedelta, /* get_timedelta */
tsc_get_timecount, /* get_timecount */
- ~0, /* counter_mask */
+ ~0u, /* counter_mask */
0, /* frequency */
"TSC" /* name */
};
@@ -211,9 +209,8 @@ SYSCTL_OPAQUE(_debug, OID_AUTO, tsc_timecounter, CTLFLAG_RD,
tsc_timecounter, sizeof(tsc_timecounter), "S,timecounter", "");
static struct timecounter i8254_timecounter[3] = {
- 0, /* get_timedelta */
i8254_get_timecount, /* get_timecount */
- (1ULL << 32) - 1, /* counter_mask */
+ ~0u, /* counter_mask */
0, /* frequency */
"i8254" /* name */
};
@@ -1410,10 +1407,10 @@ sysctl_machdep_tsc_freq SYSCTL_HANDLER_ARGS
SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW,
0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", "");
-static u_int64_t
+static u_int
i8254_get_timecount(void)
{
- u_int32_t count;
+ u_int count;
u_long ef;
u_int high, low;
@@ -1439,14 +1436,8 @@ i8254_get_timecount(void)
return (count);
}
-static u_int64_t
+static u_int
tsc_get_timecount(void)
{
- return ((u_int64_t)rdtsc());
-}
-
-static u_int32_t
-tsc_get_timedelta(struct timecounter *tc)
-{
- return ((u_int64_t)rdtsc() - tc->offset_count);
+ return (rdtsc());
}
OpenPOWER on IntegriCloud