summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pc98/cbus/clock.c')
-rw-r--r--sys/pc98/cbus/clock.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c
index bb651bd..7300593 100644
--- a/sys/pc98/cbus/clock.c
+++ b/sys/pc98/cbus/clock.c
@@ -101,7 +101,7 @@ static u_int32_t i8254_lastcount;
static u_int32_t i8254_offset;
static int (*i8254_pending)(struct intsrc *);
static int i8254_ticked;
-static int using_lapic_timer;
+static enum lapic_clock using_lapic_timer = LAPIC_CLOCK_NONE;
/* Values for timerX_state: */
#define RELEASED 0
@@ -164,7 +164,8 @@ clkintr(struct trapframe *frame)
clkintr_pending = 0;
mtx_unlock_spin(&clock_lock);
}
- KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer"));
+ KASSERT(using_lapic_timer == LAPIC_CLOCK_NONE,
+ ("clk interrupt enabled with lapic timer"));
#ifdef KDTRACE_HOOKS
/*
@@ -360,7 +361,7 @@ set_i8254_freq(u_int freq, int intr_freq)
i8254_timecounter.tc_frequency = freq;
mtx_lock_spin(&clock_lock);
i8254_freq = freq;
- if (using_lapic_timer)
+ if (using_lapic_timer != LAPIC_CLOCK_NONE)
new_i8254_real_max_count = 0x10000;
else
new_i8254_real_max_count = TIMER_DIV(intr_freq);
@@ -443,7 +444,7 @@ cpu_initclocks()
* that it can drive hardclock(). Otherwise, change the 8254
* timecounter to user a simpler algorithm.
*/
- if (!using_lapic_timer) {
+ if (using_lapic_timer == LAPIC_CLOCK_NONE) {
intr_add_handler("clk", 0, (driver_filter_t *)clkintr, NULL,
NULL, INTR_TYPE_CLK, NULL);
i8254_intsrc = intr_lookup_source(0);
OpenPOWER on IntegriCloud