diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2001-02-05 19:34:25 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2001-02-05 19:34:25 +0000 |
| commit | f933f020944d061f0ef5c06318733c194b4e8661 (patch) | |
| tree | 35c940217c01c64e1bc730937f819595f499fb9b /sys | |
| parent | 9d72a7a3f8663db8ff19d1ccf983b3f62b2b424d (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/alpha/alpha/interrupt.c | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c index 3df42e930f307..57d0da514ca18 100644 --- a/sys/alpha/alpha/interrupt.c +++ b/sys/alpha/alpha/interrupt.c @@ -504,6 +504,7 @@ alpha_dispatch_intr(void *frame, unsigned long vector) int h = HASHVEC(vector); struct alpha_intr *i; struct ithd *ithd; /* our interrupt thread */ + int saveintr; /* * Walk the hash bucket for this vector looking for this vector's @@ -554,14 +555,11 @@ 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); i->disable(i->vector); } - enable_intr(); mtx_enter(&sched_lock, MTX_SPIN); if (ithd->it_proc->p_stat == SWAIT) { /* not on the run queue and not running */ @@ -571,41 +569,25 @@ alpha_dispatch_intr(void *frame, unsigned long vector) alpha_mb(); /* XXX - ??? */ ithd->it_proc->p_stat = SRUN; setrunqueue(ithd->it_proc); +#ifdef PREEMPTION + /* Does not work on 4100 and PC164 */ if (!cold) { + saveintr = sched_lock.mtx_saveintr; + sched_lock.mtx_saveintr = ALPHA_PSL_IPL_0; if (curproc != PCPU_GET(idleproc)) setrunqueue(curproc); mi_switch(); + sched_lock.mtx_saveintr = saveintr; } - } 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); - 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(); + need_resched(); +#endif } 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); + need_resched(); } mtx_exit(&sched_lock, MTX_SPIN); - - need_resched(); -#endif } void |
