diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-05-16 19:26:05 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-05-16 19:26:05 +0000 |
commit | 6554a6921bfa3d3903eeea601beb22088b02273a (patch) | |
tree | 3e092a1f21e75c043fd090b47d6262f870dc62bc /sys/arch/i386/isa | |
parent | 4feef0c81a9728fd079125ca763dcf683534af4c (diff) |
Implement a mechanism to establish interrupt handlers that don't grab the
kernel lock upon entry through a new IPL_MPSAFE flag/level.
Diffstat (limited to 'sys/arch/i386/isa')
-rw-r--r-- | sys/arch/i386/isa/isa_machdep.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c index 5457f2ddd1d..ad2b74f6796 100644 --- a/sys/arch/i386/isa/isa_machdep.c +++ b/sys/arch/i386/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isa_machdep.c,v 1.72 2011/04/16 00:40:58 deraadt Exp $ */ +/* $OpenBSD: isa_machdep.c,v 1.73 2013/05/16 19:26:04 kettenis Exp $ */ /* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */ /*- @@ -460,6 +460,7 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level, { struct intrhand **p, *q, *ih; static struct intrhand fakehand = {fakeintr}; + int flags; #if NIOAPIC > 0 struct mp_intr_map *mip; @@ -496,6 +497,10 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level, ih_arg, ih_what)); } #endif + + flags = level & IPL_MPSAFE; + level &= ~IPL_MPSAFE; + /* no point in sleeping unless someone can free memory. */ ih = malloc(sizeof *ih, M_DEVBUF, cold ? M_NOWAIT : M_WAITOK); if (ih == NULL) { @@ -555,6 +560,7 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level, ih->ih_arg = ih_arg; ih->ih_next = NULL; ih->ih_level = level; + ih->ih_flags = flags; ih->ih_irq = irq; evcount_attach(&ih->ih_count, ih_what, &ih->ih_irq); *p = ih; |