From owner-svn-src-head@freebsd.org Fri Sep 11 19:45:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71F473E4615; Fri, 11 Sep 2020 19:45:27 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bp5nz2RQzz3X07; Fri, 11 Sep 2020 19:45:27 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36FBE8EF1; Fri, 11 Sep 2020 19:45:27 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08BJjRvJ094627; Fri, 11 Sep 2020 19:45:27 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08BJjRXC094626; Fri, 11 Sep 2020 19:45:27 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202009111945.08BJjRXC094626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 11 Sep 2020 19:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365641 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 365641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 19:45:27 -0000 Author: scottl Date: Fri Sep 11 19:45:26 2020 New Revision: 365641 URL: https://svnweb.freebsd.org/changeset/base/365641 Log: Improve the documenation for bus_dma templates. Also add notes to make it clear that filters may not work correctly and that their use is deprecated. MFC after: 3 days Modified: head/share/man/man9/bus_dma.9 Modified: head/share/man/man9/bus_dma.9 ============================================================================== --- head/share/man/man9/bus_dma.9 Fri Sep 11 18:09:49 2020 (r365640) +++ head/share/man/man9/bus_dma.9 Fri Sep 11 19:45:26 2020 (r365641) @@ -311,13 +311,13 @@ tag inheriting the restrictions of its parent. This allows all devices along the path of DMA transactions to contribute to the constraints of those transactions. .It Vt bus_dma_template_t -A template structure for creating a +A template is a structure for creating a .Fa bus_dma_tag_t from a set of defaults. Once initialized with .Fn bus_dma_template_init , a driver can over-ride individual fields to suit its needs. -The following fields have the indicated values: +The following fields start with the indicated default values: .Bd -literal alignment 1 boundary 0 @@ -362,6 +362,8 @@ to inclusive. The filter function should return zero if any mapping in this range can be accommodated by the device and non-zero otherwise. +.Pp +.Em Note: The use of filters is deprecated. Proper operation is not guaranteed. .It Vt bus_dma_segment_t A machine-dependent type that describes individual DMA segments. @@ -614,6 +616,8 @@ and cannot adequately describe the constraints of the device. The filter function will be called for every machine page that overlaps the exclusion window. +.Pp +.Em Note: The use of filters is deprecated. Proper operation is not guaranteed. .It Fa filtfuncarg Argument passed to all calls to the filter function for this tag. May be @@ -691,22 +695,23 @@ on success. .It Fn bus_dma_template_init "*template" "parent" Initializes a .Fa bus_dma_template_t -structure and associates it with an optional -.Fa parent . -The -.Fa parent -argument may be NULL. +structure. If the +.Fa parent +argument is non-NULL, values from this tag will be copied into the template, +replacing any defaults. .It Fn bus_dma_template_tag "*template" "*dmat" Unpacks a template into a tag, and returns the tag via the .Fa dmat . All return values are identical to .Fn bus_dma_tag_create . +The template is not modified by this function, and can be reused and/or +freed upon return. .It Fn bus_dma_template_clone "*template" "dmat" -Clones the fields from a tag to a template. -This is useful for cloning tags when paired with -.Fn bus_dma_template_tag . -A template that is filled in as a clone does not need to be initialized -first. +Copies the fields from an existing tag to a template. +The template does not need to be initialized first. All of its fields will +be overwritten by the values contained in the tag. When paired with +.Fn bus_dma_template_tag , +this function is useful for creating copies of tags. .It Fn bus_dmamap_create "dmat" "flags" "*mapp" Allocates and initializes a DMA map. Arguments are as follows: