summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2010-01-22 14:25:17 +0000
committerrrs <rrs@FreeBSD.org>2010-01-22 14:25:17 +0000
commit3fd28198182dca18f62ac1e2ffad3502926699a3 (patch)
tree3f8f1cb13385e6ae1ed0fe4ddab42ddadc998d2c /sys/mips
parent48300c30dd41552171602ae03b36e07d3f89d2ed (diff)
downloadFreeBSD-src-3fd28198182dca18f62ac1e2ffad3502926699a3.zip
FreeBSD-src-3fd28198182dca18f62ac1e2ffad3502926699a3.tar.gz
This hopefully will fix the network problem I was seeing.
Basically the msg ring interrupt was being re-enabled inside a spinlock as the thread set it self up for rescheduling. This won't work since inside the re-enable is another spin lock.. which means on return from the reenable the interrupts have been reenabled. Thus you would get a clock int and end up panicing holding a spin lock to long :-o
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/rmi/xlr_machdep.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/mips/rmi/xlr_machdep.c b/sys/mips/rmi/xlr_machdep.c
index 80827b5..108d2e8 100644
--- a/sys/mips/rmi/xlr_machdep.c
+++ b/sys/mips/rmi/xlr_machdep.c
@@ -618,18 +618,14 @@ msgring_process_fast_intr(void *arg)
*/
disable_msgring_int(NULL);
it->i_pending = 1;
+ thread_lock(td);
if (TD_AWAITING_INTR(td)) {
- thread_lock(td);
CTR3(KTR_INTR, "%s: schedule pid %d (%s)", __func__, p->p_pid,
p->p_comm);
TD_CLR_IWAIT(td);
sched_add(td, SRQ_INTR);
- thread_unlock(td);
- } else {
- CTR4(KTR_INTR, "%s: pid %d (%s): state %d",
- __func__, p->p_pid, p->p_comm, td->td_state);
}
-
+ thread_unlock(td);
}
#define MIT_DEAD 4
@@ -668,13 +664,17 @@ msgring_process(void *arg)
atomic_store_rel_int(&ithd->i_pending, 0);
xlr_msgring_handler(NULL);
}
+ enable_msgring_int(NULL);
if (!ithd->i_pending && !(ithd->i_flags & MIT_DEAD)) {
thread_lock(td);
+ if (ithd->i_pending) {
+ thread_unlock(td);
+ continue;
+ }
sched_class(td, PRI_ITHD);
TD_SET_IWAIT(td);
- thread_unlock(td);
- enable_msgring_int(NULL);
mi_switch(SW_VOL, NULL);
+ thread_unlock(td);
}
}
OpenPOWER on IntegriCloud