From owner-svn-src-user@FreeBSD.ORG Wed May 20 19:51:44 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50A021065676; Wed, 20 May 2009 19:51:44 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E8AC8FC1D; Wed, 20 May 2009 19:51:44 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4KJpi13041786; Wed, 20 May 2009 19:51:44 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4KJpiPC041783; Wed, 20 May 2009 19:51:44 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200905201951.n4KJpiPC041783@svn.freebsd.org> From: Kip Macy Date: Wed, 20 May 2009 19:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192466 - user/kmacy/releng_7_2_fcs/share/man/man9 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2009 19:51:44 -0000 Author: kmacy Date: Wed May 20 19:51:43 2009 New Revision: 192466 URL: http://svn.freebsd.org/changeset/base/192466 Log: update for new mbuf and firmware interface Modified: user/kmacy/releng_7_2_fcs/share/man/man9/firmware.9 user/kmacy/releng_7_2_fcs/share/man/man9/mbuf.9 Modified: user/kmacy/releng_7_2_fcs/share/man/man9/firmware.9 ============================================================================== --- user/kmacy/releng_7_2_fcs/share/man/man9/firmware.9 Wed May 20 19:40:57 2009 (r192465) +++ user/kmacy/releng_7_2_fcs/share/man/man9/firmware.9 Wed May 20 19:51:43 2009 (r192466) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2006 +.Dd May 18, 2008 .Os .Dt FIRMWARE 9 .Sh NAME @@ -31,6 +31,7 @@ .Nm firmware_unregister , .Nm firmware_get , .Nm firmware_put +.Nm firmware_drain .Nd firmware image loading and management .Sh SYNOPSIS .In sys/param.h @@ -59,6 +60,8 @@ struct firmware { .Fn firmware_get "const char *imagename" .Ft void .Fn firmware_put "const struct firmware *fp" "int flags" +.Ft void +.Fn firmware_drain "void" .Sh DESCRIPTION The .Nm firmware @@ -137,8 +140,11 @@ This involves the linker subsystem and d .Fn firmware_get must not be called with any locks (except for .Va Giant ) . -The caller must also have a process context so filesystem state such as -the root vnode is defined (e.g. you cannot load from a taskqueue thread). +Note also that if the firmware image is loaded from a filesystem +it must already be mounted. +In particular this means that it may be necessary to defer requests +from a driver attach method unless it is known the root filesystem is +already mounted. .Pp On success, .Fn firmware_get @@ -154,6 +160,21 @@ argument may be set to to indicate that firmware_put is free to reclaim resources associated with the firmware image if this is the last reference. +By default a firmware image will be deferred to a +.Xr taskqueue 9 +thread so the call may be done while holding a lock. +In certain cases, such as on driver detach, this cannot be allowed. +If the +.Dv FIRMWARE_WAIT +flag is or'd into +.Fa flags +then +.Fn firmware_put +will wait for the asynchronous operation to complete. +This can also be accomplished by calling the +.Fn firmware_drain +routine after +.Fn firmware_put . .Sh FIRMWARE LOADING MECHANISMS As mentioned before, any component of the system can register firmware images at any time by simply calling @@ -238,11 +259,7 @@ IxNpeMicrocode.fwo optional npe_fw clean "IxNpeMicrocode.fwo" IxNpeMicrocode.dat optional npe_fw \\ dependency ".PHONY" \\ - compile-with "if [ -e $S/arm/xscale/ixp425/IxNpeMicrocode.dat ]; \\ - then \\ - ln -sf $S/arm/xscale/ixp425/IxNpeMicrocode.dat .; \\ - else echo 'WARNING, no IxNpeMicrocode.dat file; you must obtain this from the Intel web site'; false; \\ - fi" \\ + compile-with "uudecode < $S/contrib/dev/npe/IxNpeMicrocode.dat.uu" \\ no-obj no-implicit-rule \\ clean "IxNpeMicrocode.dat" .Ed Modified: user/kmacy/releng_7_2_fcs/share/man/man9/mbuf.9 ============================================================================== --- user/kmacy/releng_7_2_fcs/share/man/man9/mbuf.9 Wed May 20 19:40:57 2009 (r192465) +++ user/kmacy/releng_7_2_fcs/share/man/man9/mbuf.9 Wed May 20 19:51:43 2009 (r192466) @@ -45,8 +45,9 @@ .Fa "struct mbuf *mbuf" .Fa "caddr_t buf" .Fa "u_int size" -.Fa "void (*free)(void *opt_args)" -.Fa "void *opt_args" +.Fa "void (*free)(void *opt_arg1, void *opt_arg2)" +.Fa "void *opt_arg1" +.Fa "void *opt_arg2" .Fa "short flags" .Fa "int type" .Fc