summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1996-07-01 18:00:47 +0000
committerBruce Evans <bde@FreeBSD.org>1996-07-01 18:00:47 +0000
commitd2700ee6392911abed883fa5911c12f90bfa7cf8 (patch)
tree46936e0983b68d1c70a26e6e7181f769a40c6678
parentf4410298389c96bac6f63da6cdc9d1cf0870aad5 (diff)
Notes
-rw-r--r--sys/amd64/amd64/tsc.c11
-rw-r--r--sys/amd64/isa/clock.c11
-rw-r--r--sys/i386/i386/tsc.c11
-rw-r--r--sys/i386/isa/clock.c11
-rw-r--r--sys/isa/atrtc.c11
5 files changed, 20 insertions, 35 deletions
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index 1b1c2d815091..19e14aa70e08 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.60 1996/06/11 16:11:27 pst Exp $
+ * $Id: clock.c,v 1.61 1996/06/17 12:50:22 bde Exp $
*/
/*
@@ -520,9 +520,10 @@ fail:
static void
set_timer_freq(u_int freq, int intr_freq)
{
- u_long ef;
+ u_long ef;
ef = read_eflags();
+ disable_intr();
timer_freq = freq;
timer0_max_count = hardclock_max_count = TIMER_DIV(intr_freq);
timer0_overflow_threshold = timer0_max_count - TIMER0_LATCH_COUNT;
@@ -544,11 +545,7 @@ startrtclock()
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, RTCSB_24HR);
- /*
- * Temporarily calibrate with a high intr_freq to get a low
- * timer0_max_count to help detect bogus i8254 counts.
- */
- set_timer_freq(timer_freq, 20000);
+ set_timer_freq(timer_freq, hz);
freq = calibrate_clocks();
#ifdef CLK_CALIBRATION_LOOP
if (bootverbose) {
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 1b1c2d815091..19e14aa70e08 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.60 1996/06/11 16:11:27 pst Exp $
+ * $Id: clock.c,v 1.61 1996/06/17 12:50:22 bde Exp $
*/
/*
@@ -520,9 +520,10 @@ fail:
static void
set_timer_freq(u_int freq, int intr_freq)
{
- u_long ef;
+ u_long ef;
ef = read_eflags();
+ disable_intr();
timer_freq = freq;
timer0_max_count = hardclock_max_count = TIMER_DIV(intr_freq);
timer0_overflow_threshold = timer0_max_count - TIMER0_LATCH_COUNT;
@@ -544,11 +545,7 @@ startrtclock()
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, RTCSB_24HR);
- /*
- * Temporarily calibrate with a high intr_freq to get a low
- * timer0_max_count to help detect bogus i8254 counts.
- */
- set_timer_freq(timer_freq, 20000);
+ set_timer_freq(timer_freq, hz);
freq = calibrate_clocks();
#ifdef CLK_CALIBRATION_LOOP
if (bootverbose) {
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c
index 1b1c2d815091..19e14aa70e08 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.60 1996/06/11 16:11:27 pst Exp $
+ * $Id: clock.c,v 1.61 1996/06/17 12:50:22 bde Exp $
*/
/*
@@ -520,9 +520,10 @@ fail:
static void
set_timer_freq(u_int freq, int intr_freq)
{
- u_long ef;
+ u_long ef;
ef = read_eflags();
+ disable_intr();
timer_freq = freq;
timer0_max_count = hardclock_max_count = TIMER_DIV(intr_freq);
timer0_overflow_threshold = timer0_max_count - TIMER0_LATCH_COUNT;
@@ -544,11 +545,7 @@ startrtclock()
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, RTCSB_24HR);
- /*
- * Temporarily calibrate with a high intr_freq to get a low
- * timer0_max_count to help detect bogus i8254 counts.
- */
- set_timer_freq(timer_freq, 20000);
+ set_timer_freq(timer_freq, hz);
freq = calibrate_clocks();
#ifdef CLK_CALIBRATION_LOOP
if (bootverbose) {
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 1b1c2d815091..19e14aa70e08 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.60 1996/06/11 16:11:27 pst Exp $
+ * $Id: clock.c,v 1.61 1996/06/17 12:50:22 bde Exp $
*/
/*
@@ -520,9 +520,10 @@ fail:
static void
set_timer_freq(u_int freq, int intr_freq)
{
- u_long ef;
+ u_long ef;
ef = read_eflags();
+ disable_intr();
timer_freq = freq;
timer0_max_count = hardclock_max_count = TIMER_DIV(intr_freq);
timer0_overflow_threshold = timer0_max_count - TIMER0_LATCH_COUNT;
@@ -544,11 +545,7 @@ startrtclock()
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, RTCSB_24HR);
- /*
- * Temporarily calibrate with a high intr_freq to get a low
- * timer0_max_count to help detect bogus i8254 counts.
- */
- set_timer_freq(timer_freq, 20000);
+ set_timer_freq(timer_freq, hz);
freq = calibrate_clocks();
#ifdef CLK_CALIBRATION_LOOP
if (bootverbose) {
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index 1b1c2d815091..19e14aa70e08 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.60 1996/06/11 16:11:27 pst Exp $
+ * $Id: clock.c,v 1.61 1996/06/17 12:50:22 bde Exp $
*/
/*
@@ -520,9 +520,10 @@ fail:
static void
set_timer_freq(u_int freq, int intr_freq)
{
- u_long ef;
+ u_long ef;
ef = read_eflags();
+ disable_intr();
timer_freq = freq;
timer0_max_count = hardclock_max_count = TIMER_DIV(intr_freq);
timer0_overflow_threshold = timer0_max_count - TIMER0_LATCH_COUNT;
@@ -544,11 +545,7 @@ startrtclock()
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, RTCSB_24HR);
- /*
- * Temporarily calibrate with a high intr_freq to get a low
- * timer0_max_count to help detect bogus i8254 counts.
- */
- set_timer_freq(timer_freq, 20000);
+ set_timer_freq(timer_freq, hz);
freq = calibrate_clocks();
#ifdef CLK_CALIBRATION_LOOP
if (bootverbose) {