From fbdfe156202316d02747adbccb61abee12b45e0f Mon Sep 17 00:00:00 2001 From: Paul Saab Date: Wed, 25 Oct 2000 10:40:20 +0000 Subject: [PATCH] Fast interrupts have no associated process, therefore do not try and schedule it. This fixes booting machines with broken MP tables. --- sys/amd64/isa/intr_machdep.c | 24 +++++++++++++----------- sys/amd64/isa/nmi.c | 24 +++++++++++++----------- sys/i386/isa/intr_machdep.c | 24 +++++++++++++----------- sys/i386/isa/nmi.c | 24 +++++++++++++----------- 4 files changed, 52 insertions(+), 44 deletions(-) diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c index f659ee32b099..01b7669f6be1 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 f659ee32b099..01b7669f6be1 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 f659ee32b099..01b7669f6be1 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 f659ee32b099..01b7669f6be1 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);