Conditionalize the alpha interrupt preemption for now to buy us some

time to sort out the quirks.  Add 'options PREEMPTION' to test it on
the Alpha.

Reviewed by: jhb
This commit is contained in:
Peter Wemm 2001-02-03 03:26:39 +00:00
parent 6a56450bfb
commit acbecce3e1
2 changed files with 28 additions and 0 deletions

View File

@ -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

View File

@ -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