Date: Thu, 22 Jan 2009 10:16:57 -0500 From: John Baldwin <jhb@freebsd.org> To: Jeff Roberson <jroberson@jroberson.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r187576 - in head/sys/dev: ppbus ppc Message-ID: <200901221016.58349.jhb@freebsd.org> In-Reply-To: <20090121204615.H983@desktop> References: <200901212310.n0LNA6cM093944@svn.freebsd.org> <20090121204615.H983@desktop>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 22 January 2009 1:48:43 am Jeff Roberson wrote: > On Wed, 21 Jan 2009, John Baldwin wrote: > > > Author: jhb > > Date: Wed Jan 21 23:10:06 2009 > > New Revision: 187576 > > URL: http://svn.freebsd.org/changeset/base/187576 > > > > Log: > > Add locking to ppc and ppbus and mark the whole lot MPSAFE: > > Looks like there might be some kinks still: > > ppc0: <Parallel port> port 0x378-0x37f,0x778-0x77f irq 7 drq 3 on acpi0 > ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode > ppc0: FIFO with 16/16/9 bytes threshold > ppc0: [ITHREAD] > ppbus0: <Parallel port bus> on ppc0 > panic: mutex ppc0 not owned at ../../../dev/ppc/ppc.c:1983 > cpuid = 0 > KDB: enter: panic > [thread pid 0 tid 100000 ] > Stopped at kdb_enter+0x3d: movq $0,0x652ea8(%rip) > _mtx_assert() at _mtx_assert+0xdc > ppc_write_ivar() at ppc_write_ivar+0x6e > ppbus_attach() at ppbus_attach+0x14b Grrr, I had booted this a while ago. This should fix that particular assertion: --- //depot/user/jhb/acpipci/dev/ppbus/ppbconf.c#20 +++ /home/jhb/work/p4/acpipci/dev/ppbus/ppbconf.c @@ -393,8 +393,10 @@ ppb->ppc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE); if (ppb->ppc_irq_res != NULL) { + mtx_lock(ppb->ppc_lock); error = BUS_WRITE_IVAR(device_get_parent(dev), dev, PPC_IVAR_INTR_HANDLER, (uintptr_t)&ppbus_intr); + mtx_unlock(ppb->ppc_lock); if (error) { device_printf(dev, "Unable to set interrupt handler\n"); return (error); -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901221016.58349.jhb>