diff options
-rw-r--r-- | sys/alpha/alpha/interrupt.c | 27 | ||||
-rw-r--r-- | sys/conf/options.alpha | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c index 852358b..3df42e9 100644 --- a/sys/alpha/alpha/interrupt.c +++ b/sys/alpha/alpha/interrupt.c @@ -34,6 +34,7 @@ */ #include "opt_ddb.h" +#include "opt_preemption.h" #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ @@ -553,6 +554,8 @@ alpha_dispatch_intr(void *frame, unsigned long vector) * is higher priority than their current thread, it gets run now. */ ithd->it_need = 1; +#ifdef PREEMPTION + /* Does not work on 4100 and PC164 */ if (i->disable) { CTR1(KTR_INTR, "alpha_dispatch_intr: disabling vector 0x%x", i->vector); @@ -579,6 +582,30 @@ alpha_dispatch_intr(void *frame, unsigned long vector) need_resched(); } mtx_exit(&sched_lock, MTX_SPIN); +#else + mtx_enter(&sched_lock, MTX_SPIN); + if (ithd->it_proc->p_stat == SWAIT) { + /* not on the run queue and not running */ + CTR1(KTR_INTR, "alpha_dispatch_intr: setrunqueue %d", + ithd->it_proc->p_pid); + + alpha_mb(); /* XXX - ??? */ + ithd->it_proc->p_stat = SRUN; + setrunqueue(ithd->it_proc); + aston(); + } else { + CTR3(KTR_INTR, "alpha_dispatch_intr: %d: it_need %d, state %d", + ithd->it_proc->p_pid, ithd->it_need, ithd->it_proc->p_stat); + } + if (i->disable) { + CTR1(KTR_INTR, + "alpha_dispatch_intr: disabling vector 0x%x", i->vector); + i->disable(i->vector); + } + mtx_exit(&sched_lock, MTX_SPIN); + + need_resched(); +#endif } void diff --git a/sys/conf/options.alpha b/sys/conf/options.alpha index 41d733c..9456c7b 100644 --- a/sys/conf/options.alpha +++ b/sys/conf/options.alpha @@ -20,6 +20,7 @@ API_UP1000 opt_cpu.h PPC_PROBE_CHIPSET opt_ppc.h PPC_DEBUG opt_ppc.h +PREEMPTION SHOW_BUSYBUFS PANIC_REBOOT_WAIT_TIME opt_panic.h |