summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-09-29 19:12:44 +0000
committerjhb <jhb@FreeBSD.org>2005-09-29 19:12:44 +0000
commit6ad547db3491e5c0f13697953f16ab5b20bf5d97 (patch)
tree75646c6eba6ff9f45d35abc0b6b5d187a01bb831 /sys/alpha
parent5e220185285b98813d6bc4cda240d78cdc5d428e (diff)
downloadFreeBSD-src-6ad547db3491e5c0f13697953f16ab5b20bf5d97.zip
FreeBSD-src-6ad547db3491e5c0f13697953f16ab5b20bf5d97.tar.gz
Remove the hack to clear the owepreempt flag after running a fast
interrupt handler from Alpha. Instead, expand the scheduler pinning in the interrupt handling code so that curthread is pinned while executing fast interrupt handlers. MFC after: 1 week
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/interrupt.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c
index 06beb01..6f812bb 100644
--- a/sys/alpha/alpha/interrupt.c
+++ b/sys/alpha/alpha/interrupt.c
@@ -427,6 +427,13 @@ alpha_dispatch_intr(void *frame, unsigned long vector)
atomic_add_long(i->cntp, 1);
/*
+ * It seems that we need to return from an interrupt back to PAL
+ * on the same CPU that received the interrupt, so pin the interrupted
+ * thread to the current CPU until we return from the interrupt.
+ */
+ sched_pin();
+
+ /*
* Handle a fast interrupt if there is no actual thread for this
* interrupt by calling the handler directly without Giant. Note
* that this means that any fast interrupt handler must be MP safe.
@@ -435,26 +442,18 @@ alpha_dispatch_intr(void *frame, unsigned long vector)
if ((ih->ih_flags & IH_FAST) != 0) {
critical_enter();
ih->ih_handler(ih->ih_argument);
- /* XXX */
- curthread->td_owepreempt = 0;
critical_exit();
- return;
- }
+ } else {
+ if (ithd->it_disable) {
+ CTR1(KTR_INTR,
+ "alpha_dispatch_intr: disabling vector 0x%x",
+ i->vector);
+ ithd->it_disable(ithd->it_vector);
+ }
- if (ithd->it_disable) {
- CTR1(KTR_INTR,
- "alpha_dispatch_intr: disabling vector 0x%x", i->vector);
- ithd->it_disable(ithd->it_vector);
+ error = ithread_schedule(ithd);
+ KASSERT(error == 0, ("got an impossible stray interrupt"));
}
-
- /*
- * It seems that we need to return from an interrupt back to PAL
- * on the same CPU that received the interrupt, so pin the interrupted
- * thread to the current CPU until we return from the interrupt.
- */
- sched_pin();
- error = ithread_schedule(ithd);
- KASSERT(error == 0, ("got an impossible stray interrupt"));
sched_unpin();
}
OpenPOWER on IntegriCloud