diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-05-17 18:26:38 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-05-17 18:26:38 +0000 |
commit | e4cd83a56a360f734e9ba7092609e5b077e403e6 (patch) | |
tree | 54faf902bca9964b22103f56d02b91fe7ceaa6af /sys/arch/sparc64 | |
parent | 1a10ffd5461f5357253d853ac4f370e59d382e47 (diff) |
Implement IPL_MPSAFE for pci bus interrupt handlers.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/pci_machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/sparc64/include/intr.h | 6 |
2 files changed, 13 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/pci_machdep.c b/sys/arch/sparc64/dev/pci_machdep.c index 8ef8af1d4b3..adc0e447a63 100644 --- a/sys/arch/sparc64/dev/pci_machdep.c +++ b/sys/arch/sparc64/dev/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.42 2011/07/06 05:08:50 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.43 2013/05/17 18:26:37 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.22 2001/07/20 00:07:13 eeh Exp $ */ /* @@ -450,10 +450,17 @@ pci_intr_establish(pc, ih, level, func, arg, what) const char *what; { void *cookie; + int flags = 0; + + if (level & IPL_MPSAFE) { + flags |= BUS_INTR_ESTABLISH_MPSAFE; + level &= ~IPL_MPSAFE; + } DPRINTF(SPDB_INTR, ("pci_intr_establish: ih %lu; level %d", (u_long)ih, level)); - cookie = bus_intr_establish(pc->bustag, ih, level, 0, func, arg, what); + cookie = bus_intr_establish(pc->bustag, ih, level, flags, + func, arg, what); DPRINTF(SPDB_INTR, ("; returning handle %p\n", cookie)); return (cookie); diff --git a/sys/arch/sparc64/include/intr.h b/sys/arch/sparc64/include/intr.h index 31be2096fc3..82d6333539e 100644 --- a/sys/arch/sparc64/include/intr.h +++ b/sys/arch/sparc64/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.15 2013/05/13 17:46:42 kettenis Exp $ */ +/* $OpenBSD: intr.h,v 1.16 2013/05/17 18:26:37 kettenis Exp $ */ /* $NetBSD: intr.h,v 1.8 2001/01/14 23:50:30 thorpej Exp $ */ /*- @@ -79,9 +79,11 @@ void intr_establish(int, struct intrhand *); #define IPL_SERIAL PIL_SER /* serial */ #define IPL_SCHED PIL_SCHED /* scheduler */ #define IPL_LOCK PIL_LOCK /* locks */ -#define IPL_STATCLOCK PIL_STATCLOCK /* statclock */ +#define IPL_STATCLOCK PIL_STATCLOCK /* statclock */ #define IPL_HIGH PIL_HIGH /* everything */ +#define IPL_MPSAFE 0x100 + void *softintr_establish(int, void (*)(void *), void *); void softintr_disestablish(void *); void softintr_schedule(void *); |