diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-09-15 19:19:46 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-09-15 19:19:46 +0000 |
commit | 4a34109ae54ac520cc98628b80480f2e30b134c0 (patch) | |
tree | 9a51db4b2835fc3ade26ddfd9cb2f777a00aa989 /sys/arch | |
parent | 9664f7692fbd31b9cf02bbeac35d262c1e6cbc47 (diff) |
Make this compile if !MULTIPROCESSOR.
ok brad@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/ioapic.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/ioapic.c b/sys/arch/amd64/amd64/ioapic.c index f16acb9869b..7d401e5e045 100644 --- a/sys/arch/amd64/amd64/ioapic.c +++ b/sys/arch/amd64/amd64/ioapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioapic.c,v 1.13 2008/06/26 05:42:09 ray Exp $ */ +/* $OpenBSD: ioapic.c,v 1.14 2008/09/15 19:19:45 kettenis Exp $ */ /* $NetBSD: ioapic.c,v 1.6 2003/05/15 13:30:31 fvdl Exp $ */ /*- @@ -122,14 +122,18 @@ ioapic_lock(struct ioapic_softc *sc) flags = read_psl(); disable_intr(); +#ifdef MULTIPROCESSOR mtx_enter(&sc->sc_pic.pic_mutex); +#endif return flags; } static __inline void ioapic_unlock(struct ioapic_softc *sc, u_long flags) { +#ifdef MULTIPROCESSOR mtx_leave(&sc->sc_pic.pic_mutex); +#endif write_psl(flags); } @@ -307,7 +311,9 @@ ioapic_attach(struct device *parent, struct device *self, void *aux) sc->sc_data = (volatile u_int32_t *)(bh + IOAPIC_DATA); sc->sc_pic.pic_type = PIC_IOAPIC; +#ifdef MULTIPROCESSOR mtx_init(&sc->sc_pic.pic_mutex, IPL_NONE); +#endif sc->sc_pic.pic_hwmask = ioapic_hwmask; sc->sc_pic.pic_hwunmask = ioapic_hwunmask; sc->sc_pic.pic_addroute = ioapic_addroute; |