From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 21:07:12 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 A93361065670; Mon, 26 Jan 2009 21:07:12 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from mx-01queue01.mts.net (mx-01queue01.mts.net [142.161.3.10]) by mx1.freebsd.org (Postfix) with ESMTP id 1B6668FC18; Mon, 26 Jan 2009 21:07:12 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from wnpgmb021pw-sp03.mts.net ([10.204.128.23]) by mx-02mtaout02.mts.net with ESMTP id <20090126205530.DGQQ3962.mx-02mtaout02.mts.net@wnpgmb021pw-sp03.mts.net>; Mon, 26 Jan 2009 14:55:30 -0600 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkcFAGyyfUmOoTnP/2dsb2JhbACBbcdehUs X-IronPort-AV: E=Sophos;i="4.37,327,1231135200"; d="diff'?scan'208";a="58314245" Received: from wnpgmb1309w-ad05-57-207.dynamic.mts.net (HELO jnz.my.domain) ([142.161.57.207]) by wnpgmb021pw-sp03.mts.net with ESMTP; 26 Jan 2009 14:55:30 -0600 Received: from jnz.my.domain (localhost [127.0.0.1]) by jnz.my.domain (8.14.3/8.14.2) with ESMTP id n0QKtUQj044650; Mon, 26 Jan 2009 14:55:30 -0600 (CST) (envelope-from csjp@jnz.my.domain) Received: (from csjp@localhost) by jnz.my.domain (8.14.3/8.14.2/Submit) id n0QKtU6o044649; Mon, 26 Jan 2009 14:55:30 -0600 (CST) (envelope-from csjp) Date: Mon, 26 Jan 2009 14:55:29 -0600 From: Christian Peron To: John Baldwin Message-ID: <20090126205529.GA44291@jnz.sqrt.ca> References: <200901261412.n0QECDLO052207@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: <200901261412.n0QECDLO052207@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r187714 - head/sys/dev/ppbus 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: Mon, 26 Jan 2009 21:07:13 -0000 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline John I think I found another issue relating to these changes. The patch I have attached fixes a panic on bootup in lpt. Any objections? On Mon, Jan 26, 2009 at 02:12:13PM +0000, John Baldwin wrote: > Author: jhb > Date: Mon Jan 26 14:12:12 2009 > New Revision: 187714 > URL: http://svn.freebsd.org/changeset/base/187714 > > Log: > Add missing locking around setting the ppc interrupt handler IVAR. > > Reported by: many > > Modified: > head/sys/dev/ppbus/ppbconf.c > > Modified: head/sys/dev/ppbus/ppbconf.c > ============================================================================== > --- head/sys/dev/ppbus/ppbconf.c Mon Jan 26 14:03:39 2009 (r187713) > +++ head/sys/dev/ppbus/ppbconf.c Mon Jan 26 14:12:12 2009 (r187714) > @@ -393,8 +393,10 @@ ppbus_attach(device_t dev) > 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); --Kj7319i9nmIyA2yE Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="lpt.c.diff" Index: lpt.c =================================================================== --- lpt.c (revision 187723) +++ lpt.c (working copy) @@ -380,9 +380,8 @@ } ppb_wctr(ppbus, LPC_NINIT); - ppb_unlock(ppbus); lpt_release_ppbus(dev); - + ppb_unlock(ppbus); /* declare our interrupt handler */ sc->sc_intr_resource = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE); --Kj7319i9nmIyA2yE--