From owner-cvs-all@FreeBSD.ORG Wed Feb 21 17:23:36 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 463C116F879; Wed, 21 Feb 2007 17:23:36 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id 2400F13C494; Wed, 21 Feb 2007 17:23:36 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l1LHNWY6090937; Wed, 21 Feb 2007 09:23:32 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l1LHNWxo090936; Wed, 21 Feb 2007 09:23:32 -0800 (PST) (envelope-from rizzo) Date: Wed, 21 Feb 2007 09:23:32 -0800 From: Luigi Rizzo To: Andrew Gallatin Message-ID: <20070221092332.A90766@xorpc.icir.org> References: <200702151721.l1FHLWno019525@repoman.freebsd.org> <20070221121302.A20229@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20070221121302.A20229@grasshopper.cs.duke.edu>; from gallatin@cs.duke.edu on Wed, Feb 21, 2007 at 12:13:02PM -0500 Cc: cvs-src@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/arm/xscale/ixp425 ixp425_npe.c src/sys/dev/ipw if_ipw.c if_ipwvar.h src/sys/dev/isp isp_freebsd.h src/sys/dev/iwi if_iwi.c if_iwivar.h src/sys/dev/mxge if_mxge.c src/sys/kern subr_firmware.c src/sys/sys firmware.h src/sys/tools fw_stub.awk X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2007 17:23:36 -0000 On Wed, Feb 21, 2007 at 12:13:02PM -0500, Andrew Gallatin wrote: > Luigi Rizzo [luigi@FreeBSD.org] wrote: > > > Cleanup and document the implementation of firmware(9) based on > > a version that i posted earlier on the -current mailing list, > > and subsequent feedback received. > > > > At least for me, firmware(9) has been broken ever since the kld_mtx > was replaced with an sx lock last June. The problem is that there is > an exclusive lock of kld_sx taken when loading a driver, and then > firmware_get() triggers another xlock of it, leading to a deadlock: ... > > I've been using a patch > (http://people.freebsd.org/~gallatin/firmware_sx_recurse.diff) > which works around the problem. Do you think it would be > possible to commit this? i suppose it is ok... "iwi" uses a similar technique to avoid recursive locking. I wonder how common is this practice, and whether it makes sense to define some standard macros to implement this. cheers luigi