summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2000-10-25 10:40:20 +0000
committerps <ps@FreeBSD.org>2000-10-25 10:40:20 +0000
commitfd78b036689b66842fb4fdc879844147a382004b (patch)
treea5a1b1debe534ad9ecdb5acafc08f42f5d69ec53 /sys
parent71ac041c16a03dcf48f36548dd4a0d14c4a65b85 (diff)
downloadFreeBSD-src-fd78b036689b66842fb4fdc879844147a382004b.zip
FreeBSD-src-fd78b036689b66842fb4fdc879844147a382004b.tar.gz
Fast interrupts have no associated process, therefore do not try
and schedule it. This fixes booting machines with broken MP tables.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/isa/intr_machdep.c24
-rw-r--r--sys/amd64/isa/nmi.c24
-rw-r--r--sys/i386/isa/intr_machdep.c24
-rw-r--r--sys/i386/isa/nmi.c24
4 files changed, 52 insertions, 44 deletions
diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c
index f659ee3..01b7669 100644
--- a/sys/amd64/isa/intr_machdep.c
+++ b/sys/amd64/isa/intr_machdep.c
@@ -695,18 +695,20 @@ inthand_remove(struct intrhand *idesc)
icu_unset(ithd->irq, idesc->ih_handler);
ithds[ithd->irq] = NULL;
- mtx_enter(&sched_lock, MTX_SPIN);
- if (ithd->it_proc->p_stat == SWAIT) {
- ithd->it_proc->p_stat = SRUN;
- setrunqueue(ithd->it_proc);
- /*
- * We don't do an ast here because we really
- * don't care when it runs next.
- *
- * XXX: should we lower the threads priority?
- */
+ if ((idesc->ih_flags & INTR_FAST) == 0) {
+ mtx_enter(&sched_lock, MTX_SPIN);
+ if (ithd->it_proc->p_stat == SWAIT) {
+ ithd->it_proc->p_stat = SRUN;
+ setrunqueue(ithd->it_proc);
+ /*
+ * We don't do an ast here because we really
+ * don't care when it runs next.
+ *
+ * XXX: should we lower the threads priority?
+ */
+ }
+ mtx_exit(&sched_lock, MTX_SPIN);
}
- mtx_exit(&sched_lock, MTX_SPIN);
}
free(idesc, M_DEVBUF);
return (0);
diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c
index f659ee3..01b7669 100644
--- a/sys/amd64/isa/nmi.c
+++ b/sys/amd64/isa/nmi.c
@@ -695,18 +695,20 @@ inthand_remove(struct intrhand *idesc)
icu_unset(ithd->irq, idesc->ih_handler);
ithds[ithd->irq] = NULL;
- mtx_enter(&sched_lock, MTX_SPIN);
- if (ithd->it_proc->p_stat == SWAIT) {
- ithd->it_proc->p_stat = SRUN;
- setrunqueue(ithd->it_proc);
- /*
- * We don't do an ast here because we really
- * don't care when it runs next.
- *
- * XXX: should we lower the threads priority?
- */
+ if ((idesc->ih_flags & INTR_FAST) == 0) {
+ mtx_enter(&sched_lock, MTX_SPIN);
+ if (ithd->it_proc->p_stat == SWAIT) {
+ ithd->it_proc->p_stat = SRUN;
+ setrunqueue(ithd->it_proc);
+ /*
+ * We don't do an ast here because we really
+ * don't care when it runs next.
+ *
+ * XXX: should we lower the threads priority?
+ */
+ }
+ mtx_exit(&sched_lock, MTX_SPIN);
}
- mtx_exit(&sched_lock, MTX_SPIN);
}
free(idesc, M_DEVBUF);
return (0);
diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c
index f659ee3..01b7669 100644
--- a/sys/i386/isa/intr_machdep.c
+++ b/sys/i386/isa/intr_machdep.c
@@ -695,18 +695,20 @@ inthand_remove(struct intrhand *idesc)
icu_unset(ithd->irq, idesc->ih_handler);
ithds[ithd->irq] = NULL;
- mtx_enter(&sched_lock, MTX_SPIN);
- if (ithd->it_proc->p_stat == SWAIT) {
- ithd->it_proc->p_stat = SRUN;
- setrunqueue(ithd->it_proc);
- /*
- * We don't do an ast here because we really
- * don't care when it runs next.
- *
- * XXX: should we lower the threads priority?
- */
+ if ((idesc->ih_flags & INTR_FAST) == 0) {
+ mtx_enter(&sched_lock, MTX_SPIN);
+ if (ithd->it_proc->p_stat == SWAIT) {
+ ithd->it_proc->p_stat = SRUN;
+ setrunqueue(ithd->it_proc);
+ /*
+ * We don't do an ast here because we really
+ * don't care when it runs next.
+ *
+ * XXX: should we lower the threads priority?
+ */
+ }
+ mtx_exit(&sched_lock, MTX_SPIN);
}
- mtx_exit(&sched_lock, MTX_SPIN);
}
free(idesc, M_DEVBUF);
return (0);
diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c
index f659ee3..01b7669 100644
--- a/sys/i386/isa/nmi.c
+++ b/sys/i386/isa/nmi.c
@@ -695,18 +695,20 @@ inthand_remove(struct intrhand *idesc)
icu_unset(ithd->irq, idesc->ih_handler);
ithds[ithd->irq] = NULL;
- mtx_enter(&sched_lock, MTX_SPIN);
- if (ithd->it_proc->p_stat == SWAIT) {
- ithd->it_proc->p_stat = SRUN;
- setrunqueue(ithd->it_proc);
- /*
- * We don't do an ast here because we really
- * don't care when it runs next.
- *
- * XXX: should we lower the threads priority?
- */
+ if ((idesc->ih_flags & INTR_FAST) == 0) {
+ mtx_enter(&sched_lock, MTX_SPIN);
+ if (ithd->it_proc->p_stat == SWAIT) {
+ ithd->it_proc->p_stat = SRUN;
+ setrunqueue(ithd->it_proc);
+ /*
+ * We don't do an ast here because we really
+ * don't care when it runs next.
+ *
+ * XXX: should we lower the threads priority?
+ */
+ }
+ mtx_exit(&sched_lock, MTX_SPIN);
}
- mtx_exit(&sched_lock, MTX_SPIN);
}
free(idesc, M_DEVBUF);
return (0);
OpenPOWER on IntegriCloud