diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-04-30 01:12:30 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-04-30 01:12:30 +0000 |
commit | 88066c9a0811bfa66b9e85d8790cbfab53d8d481 (patch) | |
tree | ad08df2b2e5d355769383393b043398e0c0dc4b0 /sys/arch/sparc/dev/if_ie.c | |
parent | 953dd9ca5783b67d25ed99deab898083deb94c3f (diff) |
Fix an ancient problem in how sparc interrupts are handled.
There are many interrupt handlers that assume that they don't need to do
any spl protection in their code because the interrupt of some level can't
be interrupted by an interrupt of the same level. The problem is that some
interrupt handlers have hardware levels that are lower then their "software"
levels.
Fix this by adding an additional field to struct intrhand that specifies which
"software" level an interrupt handler has and blocks that level while handling
the interrupt. This new field is initialized in intr_establish which gets
an additional argument (which can be -1 meaning that the interrupt handler
doesn't need to block any additional level).
ok deraadt@
Diffstat (limited to 'sys/arch/sparc/dev/if_ie.c')
-rw-r--r-- | sys/arch/sparc/dev/if_ie.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c index c6000e5adc6..c510d08b17f 100644 --- a/sys/arch/sparc/dev/if_ie.c +++ b/sys/arch/sparc/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.23 2002/03/14 01:26:43 millert Exp $ */ +/* $OpenBSD: if_ie.c,v 1.24 2002/04/30 01:12:29 art Exp $ */ /* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */ /*- @@ -669,14 +669,14 @@ ieattach(parent, self, aux) case BUS_OBIO: sc->sc_ih.ih_fun = ieintr; sc->sc_ih.ih_arg = sc; - intr_establish(pri, &sc->sc_ih); + intr_establish(pri, &sc->sc_ih, IPL_NET); break; case BUS_VME16: case BUS_VME32: sc->sc_ih.ih_fun = ieintr; sc->sc_ih.ih_arg = sc; vmeintr_establish(ca->ca_ra.ra_intr[0].int_vec, pri, - &sc->sc_ih); + &sc->sc_ih, IPL_NET); break; #endif /* SUN4 */ } |