diff options
author | jhb <jhb@FreeBSD.org> | 2004-05-28 17:50:07 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-05-28 17:50:07 +0000 |
commit | cb36cda063ae0a95aad46bf415b122fbb3c2e379 (patch) | |
tree | fc0a81ce35042624cf756b6a5410c8bef8d544c6 | |
parent | 576a0c72434fd2e8576be7952ab79a257b6936f1 (diff) | |
download | FreeBSD-src-cb36cda063ae0a95aad46bf415b122fbb3c2e379.zip FreeBSD-src-cb36cda063ae0a95aad46bf415b122fbb3c2e379.tar.gz |
Reenable ithread preemption for interrupts that occur while executing in
the kernel. I accidentally broke this with the new interrupt code that
came in prior to 5.2.
Submitted by: bde
-rw-r--r-- | sys/i386/i386/intr_machdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/i386/intr_machdep.c b/sys/i386/i386/intr_machdep.c index f7f51c0..e23df93 100644 --- a/sys/i386/i386/intr_machdep.c +++ b/sys/i386/i386/intr_machdep.c @@ -183,7 +183,6 @@ intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe) if (vector == 0) clkintr_pending = 1; - critical_enter(); if (ih != NULL && ih->ih_flags & IH_FAST) { /* * Execute fast interrupt handlers directly. @@ -191,6 +190,7 @@ intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe) * with a NULL argument, then we pass it a pointer to * a trapframe as its argument. */ + critical_enter(); TAILQ_FOREACH(ih, &it->it_handlers, ih_next) { MPASS(ih->ih_flags & IH_FAST); CTR3(KTR_INTR, "%s: executing handler %p(%p)", @@ -204,6 +204,7 @@ intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe) } isrc->is_pic->pic_eoi_source(isrc); error = 0; + critical_exit(); } else { /* * For stray and threaded interrupts, we mask and EOI the @@ -216,7 +217,6 @@ intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe) else error = ithread_schedule(it, !cold); } - critical_exit(); if (error == EINVAL) { atomic_add_long(isrc->is_straycount, 1); if (*isrc->is_straycount < MAX_STRAY_LOG) |