From 5946d70b07c7ddcea72b083f0c55689cf7770ed6 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 22 May 1999 09:39:31 +0000 Subject: Recover from removing the last (unshared) interrupt handler. PR: 11806 Submitted by: Assar Westerlund --- sys/i386/isa/nmi.c | 39 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) (limited to 'sys/i386/isa/nmi.c') diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c index cfb6b54..7076748 100644 --- a/sys/i386/isa/nmi.c +++ b/sys/i386/isa/nmi.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: intr_machdep.c,v 1.20 1999/04/23 21:01:19 peter Exp $ + * $Id: intr_machdep.c,v 1.21 1999/05/04 21:18:20 dfr Exp $ */ /* * This file contains an aggregated module marked: @@ -63,7 +63,6 @@ #include #include /** FAST_HI */ #endif /* APIC_IO */ -#include #ifdef PC98 #include #include @@ -113,12 +112,12 @@ static inthand_t *fastintr[ICU_LEN] = { &IDTVEC(fastintr8), &IDTVEC(fastintr9), &IDTVEC(fastintr10), &IDTVEC(fastintr11), &IDTVEC(fastintr12), &IDTVEC(fastintr13), - &IDTVEC(fastintr14), &IDTVEC(fastintr15) + &IDTVEC(fastintr14), &IDTVEC(fastintr15), #if defined(APIC_IO) - , &IDTVEC(fastintr16), &IDTVEC(fastintr17), + &IDTVEC(fastintr16), &IDTVEC(fastintr17), &IDTVEC(fastintr18), &IDTVEC(fastintr19), &IDTVEC(fastintr20), &IDTVEC(fastintr21), - &IDTVEC(fastintr22), &IDTVEC(fastintr23) + &IDTVEC(fastintr22), &IDTVEC(fastintr23), #endif /* APIC_IO */ }; @@ -126,10 +125,10 @@ static inthand_t *slowintr[ICU_LEN] = { &IDTVEC(intr0), &IDTVEC(intr1), &IDTVEC(intr2), &IDTVEC(intr3), &IDTVEC(intr4), &IDTVEC(intr5), &IDTVEC(intr6), &IDTVEC(intr7), &IDTVEC(intr8), &IDTVEC(intr9), &IDTVEC(intr10), &IDTVEC(intr11), - &IDTVEC(intr12), &IDTVEC(intr13), &IDTVEC(intr14), &IDTVEC(intr15) + &IDTVEC(intr12), &IDTVEC(intr13), &IDTVEC(intr14), &IDTVEC(intr15), #if defined(APIC_IO) - , &IDTVEC(intr16), &IDTVEC(intr17), &IDTVEC(intr18), &IDTVEC(intr19), - &IDTVEC(intr20), &IDTVEC(intr21), &IDTVEC(intr22), &IDTVEC(intr23) + &IDTVEC(intr16), &IDTVEC(intr17), &IDTVEC(intr18), &IDTVEC(intr19), + &IDTVEC(intr20), &IDTVEC(intr21), &IDTVEC(intr22), &IDTVEC(intr23), #endif /* APIC_IO */ }; @@ -446,20 +445,6 @@ icu_setup(int intr, inthand2_t *handler, void *arg, u_int *maskptr, int flags) return (0); } -void -register_imask(dvp, mask) - struct isa_device *dvp; - u_int mask; -{ - if (dvp->id_alive && dvp->id_irq) { - int intr; - - intr = ffs(dvp->id_irq) - 1; - intr_mask[intr] = mask | (1 <next != NULL) { /* install the multiplex handler with new list head as argument */ errcode = icu_setup(irq, intr_mux, head, 0, 0); @@ -842,11 +825,13 @@ inthand_remove(intrec *idesc) if (errcode == 0) update_intrname(irq, head->name); } + } else { + /* revert to old handler, eg: strayintr */ + icu_unset(irq, idesc->handler); } splx(oldspl); } update_masks(idesc->maskptr, irq); - free(idesc, M_DEVBUF); return (0); } -- cgit v1.1