From: mpi Date: Thu, 2 Sep 2021 08:48:22 +0000 (+0000) Subject: Initialize mutex to IPL_NONE. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=daacfc84b4b040daac05ce0aea68645ad60daab4;p=openbsd Initialize mutex to IPL_NONE. ok kettenis@ --- diff --git a/sys/arch/i386/i386/ioapic.c b/sys/arch/i386/i386/ioapic.c index 72783af8038..66e6438ceda 100644 --- a/sys/arch/i386/i386/ioapic.c +++ b/sys/arch/i386/i386/ioapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioapic.c,v 1.41 2018/08/25 16:09:29 kettenis Exp $ */ +/* $OpenBSD: ioapic.c,v 1.42 2021/09/02 08:48:22 mpi Exp $ */ /* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */ /*- @@ -309,6 +309,10 @@ ioapic_attach(struct device *parent, struct device *self, void *aux) sc->sc_reg = (volatile u_int32_t *)(bh + IOAPIC_REG); sc->sc_data = (volatile u_int32_t *)(bh + IOAPIC_DATA); +#ifdef MULTIPROCESSOR + mtx_init(&sc->sc_pic.pic_mutex, IPL_NONE); +#endif + ver_sz = ioapic_read(sc, IOAPIC_VER); sc->sc_apic_vers = (ver_sz & IOAPIC_VER_MASK) >> IOAPIC_VER_SHIFT; sc->sc_apic_sz = (ver_sz & IOAPIC_MAX_MASK) >> IOAPIC_MAX_SHIFT;