From cbb095815a0317e7decd1b0023c17ee523dbcd4f Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Mon, 6 Jan 2003 01:39:25 +0000 Subject: [PATCH] Replace the hardcoding of 255 as the clock interrupt vector with CLOCK_VECTOR and define it as 254, not 255. Vector 255 is already in use as the AP wakeup vector on the HP rx2600. This needs to be made more dynamic. The likelyhood of vector 254 being in use is pretty small, but we already have code to assign vectors to IPIs (see sal.c) and it's preobably better to have a centralized "vector manager" that hands out vectors based on some imput (like priority). --- sys/ia64/ia64/clock.c | 2 +- sys/ia64/ia64/interrupt.c | 2 +- sys/ia64/ia64/mp_machdep.c | 2 +- sys/ia64/include/clock.h | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/ia64/ia64/clock.c b/sys/ia64/ia64/clock.c index 06c96c33fa2..41d8dc4c67c 100644 --- a/sys/ia64/ia64/clock.c +++ b/sys/ia64/ia64/clock.c @@ -193,7 +193,7 @@ cpu_initclocks() itm_reload = (itc_frequency + hz/2) / hz; ia64_set_itm(ia64_get_itc() + itm_reload); - ia64_set_itv(255); /* highest priority class */ + ia64_set_itv(CLOCK_VECTOR); /* highest priority class */ stathz = 128; } diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c index d59b4bcdec8..7452bca9b2a 100644 --- a/sys/ia64/ia64/interrupt.c +++ b/sys/ia64/ia64/interrupt.c @@ -113,7 +113,7 @@ interrupt(u_int64_t vector, struct trapframe *framep) printf("ExtINT interrupt: vector=%ld\n", vector); } - if (vector == 255) {/* clock interrupt */ + if (vector == CLOCK_VECTOR) {/* clock interrupt */ /* CTR0(KTR_INTR, "clock interrupt"); */ cnt.v_intr++; diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c index 391e350f77f..4ef629bdcbe 100644 --- a/sys/ia64/ia64/mp_machdep.c +++ b/sys/ia64/ia64/mp_machdep.c @@ -120,7 +120,7 @@ ia64_ap_startup(void) /* kick off the clock on this AP */ ia64_set_itm(ia64_get_itc() + itm_reload); - ia64_set_itv(255); + ia64_set_itv(CLOCK_VECTOR); ia64_set_tpr(0); cpu_throw(); panic("ia64_ap_startup: cpu_throw() returned"); diff --git a/sys/ia64/include/clock.h b/sys/ia64/include/clock.h index 65673c086b5..41e3bf6c902 100644 --- a/sys/ia64/include/clock.h +++ b/sys/ia64/include/clock.h @@ -11,6 +11,8 @@ #ifdef _KERNEL +#define CLOCK_VECTOR 254 + extern int disable_rtc_set; extern int wall_cmos_clock; extern int adjkerntz;