From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 15:41:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E36FA1065670; Thu, 22 Jan 2009 15:41:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B61078FC18; Thu, 22 Jan 2009 15:41:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 5AF0E46B0C; Thu, 22 Jan 2009 10:41:54 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n0MFfgo0043174; Thu, 22 Jan 2009 10:41:48 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Jeff Roberson Date: Thu, 22 Jan 2009 10:16:57 -0500 User-Agent: KMail/1.9.7 References: <200901212310.n0LNA6cM093944@svn.freebsd.org> <20090121204615.H983@desktop> In-Reply-To: <20090121204615.H983@desktop> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901221016.58349.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 22 Jan 2009 10:41:48 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8892/Thu Jan 22 09:34:53 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 15:41:55 -0000 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: 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: 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