Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9 Update autoconf(9) for recent autoconfigurati...



details:   https://anonhg.NetBSD.org/src/rev/67139bc8ca37
branches:  trunk
changeset: 982839:67139bc8ca37
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Apr 28 00:49:22 2021 +0000

description:
Update autoconf(9) for recent autoconfiguration changes.

diffstat:

 distrib/sets/lists/comp/mi |   38 +++--
 share/man/man9/Makefile    |    9 +-
 share/man/man9/autoconf.9  |  264 +++++++++++++++++++++-----------------------
 3 files changed, 153 insertions(+), 158 deletions(-)

diffs (truncated from 500 to 300 lines):

diff -r b14dbb603649 -r 67139bc8ca37 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Wed Apr 28 00:35:47 2021 +0000
+++ b/distrib/sets/lists/comp/mi        Wed Apr 28 00:49:22 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.2383 2021/04/23 22:50:05 mrg Exp $
+#      $NetBSD: mi,v 1.2384 2021/04/28 00:49:22 thorpej Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp                           comp-sys-root
@@ -11309,7 +11309,7 @@
 ./usr/share/man/cat9/config.0                  comp-sys-catman         .cat
 ./usr/share/man/cat9/config_activate.0         comp-obsolete           obsolete
 ./usr/share/man/cat9/config_attach.0           comp-sys-catman         .cat
-./usr/share/man/cat9/config_attach_loc.0       comp-sys-catman         .cat
+./usr/share/man/cat9/config_attach_loc.0       comp-obsolete           obsolete
 ./usr/share/man/cat9/config_attach_pseudo.0    comp-sys-catman         .cat
 ./usr/share/man/cat9/config_deactivate.0       comp-sys-catman         .cat
 ./usr/share/man/cat9/config_defer.0            comp-sys-catman         .cat
@@ -11318,17 +11318,18 @@
 ./usr/share/man/cat9/config_detach_release.0   comp-sys-catman         .cat
 ./usr/share/man/cat9/config_finalize_register.0 comp-sys-catman                .cat
 ./usr/share/man/cat9/config_found.0            comp-sys-catman         .cat
-./usr/share/man/cat9/config_found_ia.0         comp-sys-catman         .cat
+./usr/share/man/cat9/config_found_ia.0         comp-obsolete           obsolete
 ./usr/share/man/cat9/config_found_sm.0         comp-obsolete           obsolete
-./usr/share/man/cat9/config_found_sm_loc.0     comp-sys-catman         .cat
+./usr/share/man/cat9/config_found_sm_loc.0     comp-obsolete           obsolete
 ./usr/share/man/cat9/config_interrupts.0       comp-sys-catman         .cat
 ./usr/share/man/cat9/config_match.0            comp-sys-catman         .cat
 ./usr/share/man/cat9/config_mountroot.0                comp-sys-catman         .cat
 ./usr/share/man/cat9/config_pending_decr.0     comp-sys-catman         .cat
 ./usr/share/man/cat9/config_pending_incr.0     comp-sys-catman         .cat
-./usr/share/man/cat9/config_search.0           comp-obsolete           obsolete
-./usr/share/man/cat9/config_search_ia.0                comp-sys-catman         .cat
-./usr/share/man/cat9/config_search_loc.0       comp-sys-catman         .cat
+./usr/share/man/cat9/config_probe.0            comp-sys-catman         .cat
+./usr/share/man/cat9/config_search.0           comp-sys-catman         .cat
+./usr/share/man/cat9/config_search_ia.0                comp-obsolete           obsolete
+./usr/share/man/cat9/config_search_loc.0       comp-obsolete           obsolete
 ./usr/share/man/cat9/cons.0                    comp-sys-catman         .cat
 ./usr/share/man/cat9/copy.0                    comp-sys-catman         .cat
 ./usr/share/man/cat9/copyin.0                  comp-sys-catman         .cat
@@ -19507,9 +19508,9 @@
 ./usr/share/man/html9/cnputc.html              comp-sys-htmlman        html
 ./usr/share/man/html9/condvar.html             comp-sys-htmlman        html
 ./usr/share/man/html9/config.html              comp-sys-htmlman        html
-./usr/share/man/html9/config_activate.html     comp-obsolete   obsolete
+./usr/share/man/html9/config_activate.html     comp-obsolete           obsolete
 ./usr/share/man/html9/config_attach.html       comp-sys-htmlman        html
-./usr/share/man/html9/config_attach_loc.html   comp-sys-htmlman        html
+./usr/share/man/html9/config_attach_loc.html   comp-obsolete           obsolete
 ./usr/share/man/html9/config_attach_pseudo.html comp-sys-htmlman       html
 ./usr/share/man/html9/config_deactivate.html   comp-sys-htmlman        html
 ./usr/share/man/html9/config_defer.html                comp-sys-htmlman        html
@@ -19518,16 +19519,18 @@
 ./usr/share/man/html9/config_detach_release.html       comp-sys-htmlman        html
 ./usr/share/man/html9/config_finalize_register.html    comp-sys-htmlman        html
 ./usr/share/man/html9/config_found.html                comp-sys-htmlman        html
-./usr/share/man/html9/config_found_ia.html     comp-sys-htmlman        html
+./usr/share/man/html9/config_found_ia.html     comp-obsolete           obsolete
 ./usr/share/man/html9/config_found_sm.html     comp-obsolete           obsolete
-./usr/share/man/html9/config_found_sm_loc.html comp-sys-htmlman        html
+./usr/share/man/html9/config_found_sm_loc.html comp-obsolete           obsolete
 ./usr/share/man/html9/config_interrupts.html   comp-sys-htmlman        html
 ./usr/share/man/html9/config_match.html                comp-sys-htmlman        html
 ./usr/share/man/html9/config_mountroot.html    comp-sys-htmlman        html
 ./usr/share/man/html9/config_pending_decr.html comp-sys-htmlman        html
 ./usr/share/man/html9/config_pending_incr.html comp-sys-htmlman        html
-./usr/share/man/html9/config_search_ia.html    comp-sys-htmlman        html
-./usr/share/man/html9/config_search_loc.html   comp-sys-htmlman        html
+./usr/share/man/html9/config_probe.html                comp-sys-htmlman        html
+./usr/share/man/html9/config_search.html       comp-sys-htmlman        html
+./usr/share/man/html9/config_search_ia.html    comp-obsolete           obsolete
+./usr/share/man/html9/config_search_loc.html   comp-obsolete           obsolete
 ./usr/share/man/html9/cons.html                        comp-sys-htmlman        html
 ./usr/share/man/html9/copy.html                        comp-sys-htmlman        html
 ./usr/share/man/html9/copyin.html              comp-sys-htmlman        html
@@ -27821,7 +27824,7 @@
 ./usr/share/man/man9/config.9                  comp-sys-man            .man
 ./usr/share/man/man9/config_activate.9         comp-obsolete           obsolete
 ./usr/share/man/man9/config_attach.9           comp-sys-man            .man
-./usr/share/man/man9/config_attach_loc.9       comp-sys-man            .man
+./usr/share/man/man9/config_attach_loc.9       comp-obsolete           obsolete
 ./usr/share/man/man9/config_attach_pseudo.9    comp-sys-man            .man
 ./usr/share/man/man9/config_deactivate.9       comp-sys-man            .man
 ./usr/share/man/man9/config_defer.9            comp-sys-man            .man
@@ -27838,9 +27841,10 @@
 ./usr/share/man/man9/config_mountroot.9                comp-sys-man            .man
 ./usr/share/man/man9/config_pending_decr.9     comp-sys-man            .man
 ./usr/share/man/man9/config_pending_incr.9     comp-sys-man            .man
-./usr/share/man/man9/config_search.9           comp-obsolete           obsolete
-./usr/share/man/man9/config_search_ia.9                comp-sys-man            .man
-./usr/share/man/man9/config_search_loc.9       comp-sys-man            .man
+./usr/share/man/man9/config_probe.9            comp-sys-man            .man
+./usr/share/man/man9/config_search.9           comp-sys-man            .man
+./usr/share/man/man9/config_search_ia.9                comp-obsolete           obsolete
+./usr/share/man/man9/config_search_loc.9       comp-obsolete           obsolete
 ./usr/share/man/man9/cons.9                    comp-sys-man            .man
 ./usr/share/man/man9/copy.9                    comp-sys-man            .man
 ./usr/share/man/man9/copyin.9                  comp-sys-man            .man
diff -r b14dbb603649 -r 67139bc8ca37 share/man/man9/Makefile
--- a/share/man/man9/Makefile   Wed Apr 28 00:35:47 2021 +0000
+++ b/share/man/man9/Makefile   Wed Apr 28 00:49:22 2021 +0000
@@ -1,4 +1,4 @@
-#       $NetBSD: Makefile,v 1.457 2021/04/16 07:45:41 msaitoh Exp $
+#       $NetBSD: Makefile,v 1.458 2021/04/28 00:49:22 thorpej Exp $
 
 #      Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -120,13 +120,9 @@
 MLINKS+=accept_filter.9 accept_filt_get.9
 
 MLINKS+=arp.9 arp_ifinit.9 arp.9 arpresolve.9 arp.9 arpintr.9
-MLINKS+=autoconf.9 config_search_loc.9 \
-       autoconf.9 config_search_ia.9 \
-       autoconf.9 config_found_sm_loc.9 \
-       autoconf.9 config_found_ia.9 \
+MLINKS+=autoconf.9 config_search.9 \
        autoconf.9 config_found.9 \
        autoconf.9 config_match.9 \
-       autoconf.9 config_attach_loc.9 \
        autoconf.9 config_attach.9 \
        autoconf.9 config_attach_pseudo.9 \
        autoconf.9 config_detach.9 \
@@ -138,6 +134,7 @@
        autoconf.9 config_mountroot.9 \
        autoconf.9 config_pending_incr.9 \
        autoconf.9 config_pending_decr.9 \
+       autoconf.9 config_probe.9 \
        autoconf.9 config_finalize_register.9
 MLINKS+=bcdtobin.9 bintobcd.9
 MLINKS+=bintime_add.9 bintime_addx.9 \
diff -r b14dbb603649 -r 67139bc8ca37 share/man/man9/autoconf.9
--- a/share/man/man9/autoconf.9 Wed Apr 28 00:35:47 2021 +0000
+++ b/share/man/man9/autoconf.9 Wed Apr 28 00:49:22 2021 +0000
@@ -1,6 +1,6 @@
-.\"     $NetBSD: autoconf.9,v 1.30 2013/03/13 00:09:21 riastradh Exp $
+.\"     $NetBSD: autoconf.9,v 1.31 2021/04/28 00:49:22 thorpej Exp $
 .\"
-.\" Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2001, 2002, 2021 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -27,18 +27,14 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 17, 2012
+.Dd April 28, 2021
 .Dt AUTOCONF 9
 .Os
 .Sh NAME
 .Nm autoconf ,
-.Nm config_search_loc ,
-.Nm config_search_ia ,
-.Nm config_found_sm_loc ,
-.Nm config_found_ia ,
+.Nm config_search ,
 .Nm config_found ,
 .Nm config_match ,
-.Nm config_attach_loc ,
 .Nm config_attach ,
 .Nm config_attach_pseudo ,
 .Nm config_detach ,
@@ -56,27 +52,17 @@
 .In sys/device.h
 .In sys/errno.h
 .Ft cfdata_t
-.Fn config_search_loc "cfsubmatch_t func" "device_t parent" "const char *ia" \
-"const int *locs" "void *aux"
-.Ft cfdata_t
-.Fn config_search_ia "cfsubmatch_t func" "device_t parent" "const char *ia" \
-"void *aux"
+.Fn config_search "device_t parent" "void *aux" "cfarg_t tag" "..."
 .Ft device_t
-.Fn config_found_sm_loc "device_t parent" "const char *ia" "const int *locs" \
-"void *aux" "cfprint_t print" "cfsubmatch_t submatch"
-.Ft device_t
-.Fn config_found_ia "device_t parent" "const char *ia" "void *aux" \
-"cfprint_t print"
-.Ft device_t
-.Fn config_found "device_t parent" "void *aux" "cfprint_t print"
+.Fn config_found "device_t parent" "void *aux" "cfprint_t print" \
+"cfarg_t tag" "..."
 .Ft int
 .Fn config_match "device_t parent" "cfdata_t cf" "void *aux"
-.Ft device_t
-.Fn config_attach_loc "device_t parent" "cfdata_t cf" "const int *locs" \
-"void *aux" "cfprint_t print"
+.Ft int
+.Fn config_probe "device_t parent" "cfdata_t cf" "void *aux"
 .Ft device_t
 .Fn config_attach "device_t parent" "cfdata_t cf" "void *aux" \
-"cfprint_t print"
+"cfprint_t print" "cfarg_t tag" "..."
 .Ft device_t
 .Fn config_attach_pseudo "cfdata_t cf"
 .Ft int
@@ -132,105 +118,125 @@
 The unit number identifies an instance of the driver.
 Device data structures are allocated dynamically during
 autoconfiguration, giving a unique address for each instance.
+.Pp
+Several of the autoconfiguration functions take a variadic list of
+tag-value arguments to pass information from driver autoconfiguration
+functions to the kernel's autoconfiguration system.
+Each tag is followed by a tag-specific value.
+The end of the argument list must be terminated with the tag
+.Dv CFARG_EOL .
+Passing an invalid tag or an inappropriate value for a tag results
+in undefined behavior and may cause a kernel panic.
+.Bl -tag -width "CFARG_DEVHANDLE"
+.It Dv CFARG_SUBMATCH
+A pointer to a
+.Sq submatch
+function used in direct configuration.
+.It Dv CFARG_SEARCH
+A pointer to a
+.Sq search
+function used in indirect configuration.
+.It Dv CFARG_IATTR
+A pointer to a constant C string
+.Pq const char *
+specifying an interface attribute.
+If a parent device carries only a single interface attribute, then this
+tag-value pair may be omitted.
+If an interface attribute is specified that the parent device does not
+carry, or no interface attribute is specifies and the parent device carries
+more than one, behavior is undefined.
+On kernels built with the
+.Dv DIAGNOSTIC
+option, this may result in an assertion panic.
+.It Dv CFARG_LOCATORS
+A pointer an a constant array of type
+.Sq int
+.Pq const int *
+containing interface attribute-specific locators.
+.It Dv CFARG_DEVHANDLE
+A devhandle_t
+.Pq passed by value
+corresponding to the device being attached.
+.El
 .Sh FUNCTIONS
 .Bl -tag -width compact
-.It Fn config_search_loc "func" "parent" "ia" "locs" "aux"
+.It Fn config_search "parent" "aux" "tag" "..."
 Performs indirect configuration of physical devices.
-.Fn config_search_loc
+Tag-value arguments consumed:
+.Dv CFARG_SEARCH ,
+.Dv CFARG_IATTR ,
+.Dv CFARG_LOCATORS .
+.Fn config_search
 iterates over all potential children, calling the given
-function
-.Fa func
-for each one.
-If
-.Fa func
-is
-.Dv NULL ,
-.Fn config_search_loc
-applies each child's match function instead.
+search function
+If no search function is specified,
+.fn config_search
+applies the potential child's match function instead.
 The argument
 .Fa parent
 is the pointer to the parent's device structure.
-The argument
-.Fa ia
-is the interface attribute on which the potential children should attach.
-It can be
-.Dv NULL ,
-in which case all children attaching to any attribute are considered.
-The
-.Fa locs
-argument lists the locator values for the device and are passed to function
-.Fa func .
+If an interface attribute is specified, only potential children eligible to
+attach to that interface attribute will be consulted.
+If specified,
+the locators argument lists the locator values for the device and are passed
+to the search function.
 The given
 .Fa aux
 argument describes the device that has been found and is simply passed
-on through
-.Fa func
-to the child.
-.Fn config_search_loc
-returns a pointer to the best-matched child or
+on through the search function to the child.
+.Fn config_search
+returns a pointer to the configuration data that indicates the best-matched
+child or
 .Dv NULL
 otherwise.



Home | Main Index | Thread Index | Old Index