CVS commit: src/share/man/man9

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 13:56:36 UTC 2016

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
bump date for the typo fix


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man9/pci_msi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.12 src/share/man/man9/pci_msi.9:1.13
--- src/share/man/man9/pci_msi.9:1.12	Thu Sep 15 09:41:33 2016
+++ src/share/man/man9/pci_msi.9	Fri Sep 16 13:56:36 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci_msi.9,v 1.12 2016/09/15 09:41:33 jdolecek Exp $
+.\" $NetBSD: pci_msi.9,v 1.13 2016/09/16 13:56:36 jdolecek Exp $
 .\"
 .\" Copyright (c) 2015 Internet Initiative Japan Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 12, 2016
+.Dd September 15, 2016
 .Dt PCI_MSI 9
 .Os
 .Sh NAME



CVS commit: src/share/man/man9

2016-09-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Sep 16 08:26:16 UTC 2016

Modified Files:
src/share/man/man9: bus_space.9

Log Message:
Use Nm instead of Xr to itself. Add missing space. Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/share/man/man9/bus_space.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/bus_space.9
diff -u src/share/man/man9/bus_space.9:1.49 src/share/man/man9/bus_space.9:1.50
--- src/share/man/man9/bus_space.9:1.49	Thu Sep 15 21:47:26 2016
+++ src/share/man/man9/bus_space.9	Fri Sep 16 08:26:16 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_space.9,v 1.49 2016/09/15 21:47:26 jdolecek Exp $
+.\" $NetBSD: bus_space.9,v 1.50 2016/09/16 08:26:16 wiz Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 1, 2016
+.Dd September 15, 2016
 .Dt BUS_SPACE 9
 .Os
 .Sh NAME
@@ -1363,12 +1363,12 @@ Supported flags are:
 .Bl -tag -width BUS_SPACE_BARRIER_WRITE -offset indent
 .It Dv BUS_SPACE_BARRIER_READ
 Force all
-.Xr bus_space 9
+.Nm
 operations before the barrier to complete before any reads
 after the barrier may be issued.
 .It Dv BUS_SPACE_BARRIER_WRITE
 Force all
-.Xr bus_space 9
+.Nm
 operations before the barrier to complete before any writes
 after the barrier may be issued.
 .El
@@ -1984,7 +1984,7 @@ developer
 community.
 Primary contributors and implementors were
 .An Chris Demetriou ,
-.An Jason Thorpe,
+.An Jason Thorpe ,
 and
 .An Charles Hannum ,
 but the rest of the



CVS commit: src/share/man/man9

2016-09-15 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Sep 15 21:47:26 UTC 2016

Modified Files:
src/share/man/man9: bus_space.9

Log Message:
update manpage with reality WRT BUS_SPACE_BARRIER_SYNC and
BUS_SPACE_BARRIER_X_BEFORE_Y flags


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/share/man/man9/bus_space.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/bus_space.9
diff -u src/share/man/man9/bus_space.9:1.48 src/share/man/man9/bus_space.9:1.49
--- src/share/man/man9/bus_space.9:1.48	Wed Jun  1 08:17:33 2016
+++ src/share/man/man9/bus_space.9	Thu Sep 15 21:47:26 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_space.9,v 1.48 2016/06/01 08:17:33 wiz Exp $
+.\" $NetBSD: bus_space.9,v 1.49 2016/09/15 21:47:26 jdolecek Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -1360,22 +1360,17 @@ The
 .Fa flags
 argument controls what types of operations are to be ordered.
 Supported flags are:
-.Bl -tag -width BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE -offset indent
-.It Dv BUS_SPACE_BARRIER_READ_BEFORE_READ
-Force all reads before the barrier to complete before any reads
-after the barrier may be issued.
-.It Dv BUS_SPACE_BARRIER_READ_BEFORE_WRITE
-Force all reads before the barrier to complete before any writes
-after the barrier may be issued.
-.It Dv BUS_SPACE_BARRIER_WRITE_BEFORE_READ
-Force all writes before the barrier to complete before any reads
+.Bl -tag -width BUS_SPACE_BARRIER_WRITE -offset indent
+.It Dv BUS_SPACE_BARRIER_READ
+Force all
+.Xr bus_space 9
+operations before the barrier to complete before any reads
 after the barrier may be issued.
-.It Dv BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE
-Force all writes before the barrier to complete before any writes
+.It Dv BUS_SPACE_BARRIER_WRITE
+Force all
+.Xr bus_space 9
+operations before the barrier to complete before any writes
 after the barrier may be issued.
-.It Dv BUS_SPACE_BARRIER_SYNC
-Force all memory operations and any pending exceptions to be
-completed before any instructions after the barrier may be issued.
 .El
 .Pp
 Those flags can be combined (or-ed together) to enforce ordering on
@@ -1400,11 +1395,11 @@ those two data bytes back would be:
  * space.
  */
 bus_space_write_1(t, h, 0, data0);
-bus_space_barrier(t, h, 0, 1, BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE); /* 1 */
+bus_space_barrier(t, h, 0, 1, BUS_SPACE_BARRIER_WRITE); /* 1 */
 bus_space_write_1(t, h, 0, data1);
-bus_space_barrier(t, h, 0, 2, BUS_SPACE_BARRIER_WRITE_BEFORE_READ);  /* 2 */
+bus_space_barrier(t, h, 0, 2, BUS_SPACE_BARRIER_WRITE);  /* 2 */
 ndata1 = bus_space_read_1(t, h, 1);
-bus_space_barrier(t, h, 1, 1, BUS_SPACE_BARRIER_READ_BEFORE_READ);   /* 3 */
+bus_space_barrier(t, h, 1, 1, BUS_SPACE_BARRIER_READ);   /* 3 */
 ndata0 = bus_space_read_1(t, h, 1);
 /* data0 == ndata0, data1 == ndata1 */
 .Ed
@@ -1429,14 +1424,6 @@ minimum number of bus space locations.
 It is correct (and often easier) to make barrier operations cover the
 device's whole range of bus space, that is, to specify an offset of zero
 and the size of the whole region.
-.Pp
-The following barrier operations are obsolete and should be removed
-from existing code:
-.Bl -tag -width BUS_SPACE_BARRIER_WRITE -offset indent
-.It Dv BUS_SPACE_BARRIER_READ
-Synchronize read operations.
-.It Dv BUS_SPACE_BARRIER_WRITE
-Synchronize write operations.
 .El
 .El
 .Sh REGION OPERATIONS



CVS commit: src/share/man/man9

2016-09-15 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Sep 15 09:41:33 UTC 2016

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
fix typo in function names


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man9/pci_msi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.11 src/share/man/man9/pci_msi.9:1.12
--- src/share/man/man9/pci_msi.9:1.11	Mon Aug 29 02:48:56 2016
+++ src/share/man/man9/pci_msi.9	Thu Sep 15 09:41:33 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci_msi.9,v 1.11 2016/08/29 02:48:56 knakahara Exp $
+.\" $NetBSD: pci_msi.9,v 1.12 2016/09/15 09:41:33 jdolecek Exp $
 .\"
 .\" Copyright (c) 2015 Internet Initiative Japan Inc.
 .\" All rights reserved.
@@ -50,7 +50,7 @@
 .Fn pci_msi_alloc  "const struct pci_attach_args *pa" \
 "pci_intr_handle_t **ihps" "int *count"
 .Ft int
-.Fn pci_msi_alloc_exect "const struct pci_attach_args *pa" \
+.Fn pci_msi_alloc_exact "const struct pci_attach_args *pa" \
 "pci_intr_handle_t **ihps" "int count"
 .Ft int
 .Fn pci_msix_count "pci_chipset_tag_t pc" \
@@ -59,7 +59,7 @@
 .Fn pci_msix_alloc  "const struct pci_attach_args *pa" \
 "pci_intr_handle_t **ihps" "int *count"
 .Ft int
-.Fn pci_msix_alloc_exect "const struct pci_attach_args *pa" \
+.Fn pci_msix_alloc_exact "const struct pci_attach_args *pa" \
 "pci_intr_handle_t **ihps" "int count"
 .Ft int
 .Fn pci_msix_alloc_map "const struct pci_attach_args *pa" \



CVS commit: src/share/man/man9

2016-08-28 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Aug 29 02:48:56 UTC 2016

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
specify when pci_intr_release(9) is called as "pih" is NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/pci_msi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.10 src/share/man/man9/pci_msi.9:1.11
--- src/share/man/man9/pci_msi.9:1.10	Tue Jul 12 03:39:55 2016
+++ src/share/man/man9/pci_msi.9	Mon Aug 29 02:48:56 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci_msi.9,v 1.10 2016/07/12 03:39:55 knakahara Exp $
+.\" $NetBSD: pci_msi.9,v 1.11 2016/08/29 02:48:56 knakahara Exp $
 .\"
 .\" Copyright (c) 2015 Internet Initiative Japan Inc.
 .\" All rights reserved.
@@ -159,6 +159,11 @@ when the driver is no longer interested 
 After that, the driver should also call
 .Fn pci_intr_release
 to free resources about MSI as well as INTx and MSI-X.
+If
+.Fa pih
+is NULL,
+.Fn pci_intr_release
+does nothing.
 .Pp
 If a driver wishes to establish an MSI-X handler for the device,
 it is almost the same as MSI.



CVS commit: src/share/man/man9

2016-08-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Aug 20 12:41:31 UTC 2016

Modified Files:
src/share/man/man9: vnode.9

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/share/man/man9/vnode.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/vnode.9
diff -u src/share/man/man9/vnode.9:1.71 src/share/man/man9/vnode.9:1.72
--- src/share/man/man9/vnode.9:1.71	Sat Aug 20 12:37:06 2016
+++ src/share/man/man9/vnode.9	Sat Aug 20 12:41:31 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: vnode.9,v 1.71 2016/08/20 12:37:06 hannken Exp $
+.\" $NetBSD: vnode.9,v 1.72 2016/08/20 12:41:31 wiz Exp $
 .\"
 .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 12, 2015
+.Dd August 20, 2016
 .Dt VNODE 9
 .Os
 .Sh NAME



CVS commit: src/share/man/man9

2016-07-29 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Fri Jul 29 19:27:45 UTC 2016

Modified Files:
src/share/man/man9: scsipi.9

Log Message:
scsipi(9): Removed duplicate "for"


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/share/man/man9/scsipi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/scsipi.9
diff -u src/share/man/man9/scsipi.9:1.27 src/share/man/man9/scsipi.9:1.28
--- src/share/man/man9/scsipi.9:1.27	Wed Jun  1 08:17:47 2016
+++ src/share/man/man9/scsipi.9	Fri Jul 29 19:27:45 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: scsipi.9,v 1.27 2016/06/01 08:17:47 wiz Exp $
+.\"	$NetBSD: scsipi.9,v 1.28 2016/07/29 19:27:45 palle Exp $
 .\"
 .\"
 .\" Copyright (c) 2001 Manuel Bouyer.
@@ -339,7 +339,7 @@ This request is called from the kernel c
 .Fa arg
 must be ignored.
 .It Dv ADAPTER_REQ_SET_XFER_MODE
-set the xfer mode for a for I_T Nexus.
+set the xfer mode for a I_T Nexus.
 This will be called once all LUNs of a target have been probed.
 .Fa arg
 points to a



CVS commit: src/share/man/man9

2016-07-19 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jul 19 17:01:36 UTC 2016

Modified Files:
src/share/man/man9: driver.9

Log Message:
Don't reference older CFATTACH_DECL


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/share/man/man9/driver.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/driver.9
diff -u src/share/man/man9/driver.9:1.27 src/share/man/man9/driver.9:1.28
--- src/share/man/man9/driver.9:1.27	Sat Jul 23 16:04:35 2011
+++ src/share/man/man9/driver.9	Tue Jul 19 17:01:36 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: driver.9,v 1.27 2011/07/23 16:04:35 jym Exp $
+.\" $NetBSD: driver.9,v 1.28 2016/07/19 17:01:36 maya Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 23, 2011
+.Dd July 19, 2016
 .Dt DRIVER 9
 .Os
 .Sh NAME
@@ -64,7 +64,7 @@ For example, the interface to driver
 is defined with:
 .Pp
 .Bd -literal
-CFATTACH_DECL(foo, 			/* driver name */
+CFATTACH_DECL_NEW(foo, 			/* driver name */
 	sizeof(struct foo_softc),	/* size of instance data */
 	foo_match,			/* match/probe function */
 	foo_attach,			/* attach function */



CVS commit: src/share/man/man9

2016-07-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 12 09:50:36 UTC 2016

Modified Files:
src/share/man/man9: pci.9

Log Message:
Use Nm instead of Xr to itself.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/share/man/man9/pci.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci.9
diff -u src/share/man/man9/pci.9:1.44 src/share/man/man9/pci.9:1.45
--- src/share/man/man9/pci.9:1.44	Tue Jul 12 03:39:55 2016
+++ src/share/man/man9/pci.9	Tue Jul 12 09:50:36 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci.9,v 1.44 2016/07/12 03:39:55 knakahara Exp $
+.\" $NetBSD: pci.9,v 1.45 2016/07/12 09:50:36 wiz Exp $
 .\"
 .\" Copyright (c) 2001, 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -246,7 +246,7 @@ It contains the following member:
 .It Fa struct pci_overrides
 Stores pointers to functions that override the architecture's
 default
-.Xr pci 9
+.Nm
 and
 .Xr pci_intr 9
 implementation.



CVS commit: src/share/man/man9

2016-07-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jul 11 10:47:52 UTC 2016

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
Bump date for function prototype change.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/pci_msi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.8 src/share/man/man9/pci_msi.9:1.9
--- src/share/man/man9/pci_msi.9:1.8	Mon Jul 11 06:14:51 2016
+++ src/share/man/man9/pci_msi.9	Mon Jul 11 10:47:52 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci_msi.9,v 1.8 2016/07/11 06:14:51 knakahara Exp $
+.\" $NetBSD: pci_msi.9,v 1.9 2016/07/11 10:47:52 wiz Exp $
 .\"
 .\" Copyright (c) 2015 Internet Initiative Japan Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 13, 2015
+.Dd July 11, 2016
 .Dt PCI_MSI 9
 .Os
 .Sh NAME



CVS commit: src/share/man/man9

2016-06-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jun  1 08:17:12 UTC 2016

Modified Files:
src/share/man/man9: ubc.9

Log Message:
Use Mt for email addresses.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/ubc.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/ubc.9
diff -u src/share/man/man9/ubc.9:1.8 src/share/man/man9/ubc.9:1.9
--- src/share/man/man9/ubc.9:1.8	Wed Jun  1 02:05:10 2016
+++ src/share/man/man9/ubc.9	Wed Jun  1 08:17:12 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ubc.9,v 1.8 2016/06/01 02:05:10 pgoyette Exp $
+.\"	$NetBSD: ubc.9,v 1.9 2016/06/01 08:17:12 wiz Exp $
 .\"
 .\" Copyright (c) 1998 Matthew R. Green
 .\" All rights reserved.
@@ -146,6 +146,6 @@ UBC first appeared in
 .Nx 1.6 .
 .Sh AUTHORS
 .An Chuck Silvers
-.Aq c...@chuq.com
+.Aq Mt c...@chuq.com
 designed and implemented the UBC part of UVM, which uses UVM pages
 to cache vnode data rather than the traditional buffer cache buffers.



CVS commit: src/share/man/man9

2016-06-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jun  1 08:17:33 UTC 2016

Modified Files:
src/share/man/man9: bus_space.9

Log Message:
Fix typo. Use .An -nosplit.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/share/man/man9/bus_space.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/bus_space.9
diff -u src/share/man/man9/bus_space.9:1.47 src/share/man/man9/bus_space.9:1.48
--- src/share/man/man9/bus_space.9:1.47	Wed Jun  1 01:57:31 2016
+++ src/share/man/man9/bus_space.9	Wed Jun  1 08:17:33 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_space.9,v 1.47 2016/06/01 01:57:31 pgoyette Exp $
+.\" $NetBSD: bus_space.9,v 1.48 2016/06/01 08:17:33 wiz Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -1988,6 +1988,7 @@ This document was written later during t
 development cycle and the specification was updated to fix some
 consistency problems and to add some missing functionality.
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 interfaces were designed and implemented by the
@@ -2003,5 +2004,5 @@ but the rest of the
 .Nx
 developers and the user community played a significant role in development.
 .Pp
-,An Chris Demetriou
+.An Chris Demetriou
 wrote this manual page.



CVS commit: src/share/man/man9

2016-06-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jun  1 08:17:47 UTC 2016

Modified Files:
src/share/man/man9: bus_dma.9 pfil.9 pmc.9 rt_timer.9 scsipi.9

Log Message:
Use .An -nosplit.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/share/man/man9/bus_dma.9
cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/pfil.9
cvs rdiff -u -r1.13 -r1.14 src/share/man/man9/pmc.9
cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/rt_timer.9
cvs rdiff -u -r1.26 -r1.27 src/share/man/man9/scsipi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/bus_dma.9
diff -u src/share/man/man9/bus_dma.9:1.60 src/share/man/man9/bus_dma.9:1.61
--- src/share/man/man9/bus_dma.9:1.60	Wed Jun  1 01:55:18 2016
+++ src/share/man/man9/bus_dma.9	Wed Jun  1 08:17:47 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_dma.9,v 1.60 2016/06/01 01:55:18 pgoyette Exp $
+.\" $NetBSD: bus_dma.9,v 1.61 2016/06/01 08:17:47 wiz Exp $
 .\"
 .\" Copyright (c) 1996, 1997, 1998, 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -839,6 +839,7 @@ The
 interface appeared in
 .Nx 1.3 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 interface was designed and implemented by

Index: src/share/man/man9/pfil.9
diff -u src/share/man/man9/pfil.9:1.34 src/share/man/man9/pfil.9:1.35
--- src/share/man/man9/pfil.9:1.34	Wed Jun  1 02:00:10 2016
+++ src/share/man/man9/pfil.9	Wed Jun  1 08:17:47 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pfil.9,v 1.34 2016/06/01 02:00:10 pgoyette Exp $
+.\"	$NetBSD: pfil.9,v 1.35 2016/06/01 08:17:47 wiz Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -172,6 +172,7 @@ In 1.5K, the
 framework was changed to work with an arbitrary number of filtering points,
 as well as be less IP-centric.
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 interface was designed and implemented by

Index: src/share/man/man9/pmc.9
diff -u src/share/man/man9/pmc.9:1.13 src/share/man/man9/pmc.9:1.14
--- src/share/man/man9/pmc.9:1.13	Wed Jun  1 02:02:11 2016
+++ src/share/man/man9/pmc.9	Wed Jun  1 08:17:47 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pmc.9,v 1.13 2016/06/01 02:02:11 pgoyette Exp $
+.\" $NetBSD: pmc.9,v 1.14 2016/06/01 08:17:47 wiz Exp $
 .\"
 .\" Copyright (c) 2002, 2005 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -251,6 +251,7 @@ The
 interface appeared in
 .Nx 2.0 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 interface was designed and implemented by

Index: src/share/man/man9/rt_timer.9
diff -u src/share/man/man9/rt_timer.9:1.14 src/share/man/man9/rt_timer.9:1.15
--- src/share/man/man9/rt_timer.9:1.14	Wed Jun  1 02:05:10 2016
+++ src/share/man/man9/rt_timer.9	Wed Jun  1 08:17:47 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rt_timer.9,v 1.14 2016/06/01 02:05:10 pgoyette Exp $
+.\"	$NetBSD: rt_timer.9,v 1.15 2016/06/01 08:17:47 wiz Exp $
 .\"
 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -127,6 +127,7 @@ The
 interface appeared in
 .Nx 1.4 .
 .Sh AUTHORS
+.An -nosplit
 This interface is roughly based on (but, alas, not compatible with) one
 designed by David Borman of BSDI.
 This implementation is by

Index: src/share/man/man9/scsipi.9
diff -u src/share/man/man9/scsipi.9:1.26 src/share/man/man9/scsipi.9:1.27
--- src/share/man/man9/scsipi.9:1.26	Wed Jun  1 02:05:10 2016
+++ src/share/man/man9/scsipi.9	Wed Jun  1 08:17:47 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: scsipi.9,v 1.26 2016/06/01 02:05:10 pgoyette Exp $
+.\"	$NetBSD: scsipi.9,v 1.27 2016/06/01 08:17:47 wiz Exp $
 .\"
 .\"
 .\" Copyright (c) 2001 Manuel Bouyer.
@@ -594,6 +594,7 @@ The
 interface appeared in
 .Nx 1.6 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 interface was designed and implemented by



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:06:54 UTC 2016

Modified Files:
src/share/man/man9: sysmon_pswitch.9

Log Message:
Fix spello.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/sysmon_pswitch.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/sysmon_pswitch.9
diff -u src/share/man/man9/sysmon_pswitch.9:1.6 src/share/man/man9/sysmon_pswitch.9:1.7
--- src/share/man/man9/sysmon_pswitch.9:1.6	Tue Jan  6 15:39:54 2015
+++ src/share/man/man9/sysmon_pswitch.9	Wed Jun  1 02:06:54 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: sysmon_pswitch.9,v 1.6 2015/01/06 15:39:54 bouyer Exp $
+.\" $NetBSD: sysmon_pswitch.9,v 1.7 2016/06/01 02:06:54 pgoyette Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -45,7 +45,7 @@
 The machine-independent
 .Nm
 provides a framework for power management.
-The interface has been largely superceded by the
+The interface has been largely superseded by the
 .Xr pmf 9
 framework, but
 .Nm



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:05:10 UTC 2016

Modified Files:
src/share/man/man9: rt_timer.9 scsipi.9 ubc.9

Log Message:
Use .An for authors.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man9/rt_timer.9
cvs rdiff -u -r1.25 -r1.26 src/share/man/man9/scsipi.9
cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/ubc.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/rt_timer.9
diff -u src/share/man/man9/rt_timer.9:1.13 src/share/man/man9/rt_timer.9:1.14
--- src/share/man/man9/rt_timer.9:1.13	Tue Sep 17 19:58:03 2013
+++ src/share/man/man9/rt_timer.9	Wed Jun  1 02:05:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rt_timer.9,v 1.13 2013/09/17 19:58:03 wiz Exp $
+.\"	$NetBSD: rt_timer.9,v 1.14 2016/06/01 02:05:10 pgoyette Exp $
 .\"
 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 23, 1998
+.Dd June 1, 2016
 .Dt RT_TIMER 9
 .Os
 .Sh NAME
@@ -129,5 +129,6 @@ interface appeared in
 .Sh AUTHORS
 This interface is roughly based on (but, alas, not compatible with) one
 designed by David Borman of BSDI.
-This implementation is by Kevin Lahey of the Numerical Aerospace
-Simulation Facility, NASA Ames Research Center.
+This implementation is by
+.An Kevin Lahey
+of the Numerical Aerospace Simulation Facility, NASA Ames Research Center.

Index: src/share/man/man9/scsipi.9
diff -u src/share/man/man9/scsipi.9:1.25 src/share/man/man9/scsipi.9:1.26
--- src/share/man/man9/scsipi.9:1.25	Mon Mar 22 18:58:33 2010
+++ src/share/man/man9/scsipi.9	Wed Jun  1 02:05:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: scsipi.9,v 1.25 2010/03/22 18:58:33 joerg Exp $
+.\"	$NetBSD: scsipi.9,v 1.26 2016/06/01 02:05:10 pgoyette Exp $
 .\"
 .\"
 .\" Copyright (c) 2001 Manuel Bouyer.
@@ -24,7 +24,7 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\"
-.Dd December 20, 2005
+.Dd June 1, 2016
 .Dt SCSIPI 9
 .Os
 .Sh NAME
@@ -596,5 +596,7 @@ interface appeared in
 .Sh AUTHORS
 The
 .Nm
-interface was designed and implemented by Jason R. Thorpe.
-Manuel Bouyer converted most drivers to the new interface.
+interface was designed and implemented by
+.An Jason R. Thorpe .
+.An Manuel Bouyer
+converted most drivers to the new interface.

Index: src/share/man/man9/ubc.9
diff -u src/share/man/man9/ubc.9:1.7 src/share/man/man9/ubc.9:1.8
--- src/share/man/man9/ubc.9:1.7	Tue Jun 14 00:19:20 2011
+++ src/share/man/man9/ubc.9	Wed Jun  1 02:05:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ubc.9,v 1.7 2011/06/14 00:19:20 rmind Exp $
+.\"	$NetBSD: ubc.9,v 1.8 2016/06/01 02:05:10 pgoyette Exp $
 .\"
 .\" Copyright (c) 1998 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd June 14, 2011
+.Dd June 1, 2016
 .Dt UBC 9
 .Os
 .Sh NAME
@@ -145,7 +145,7 @@ subsystem is implemented within the file
 UBC first appeared in
 .Nx 1.6 .
 .Sh AUTHORS
-Chuck Silvers
+.An Chuck Silvers
 .Aq c...@chuq.com
 designed and implemented the UBC part of UVM, which uses UVM pages
 to cache vnode data rather than the traditional buffer cache buffers.



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:02:11 UTC 2016

Modified Files:
src/share/man/man9: pmc.9

Log Message:
Use .An for authors.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man9/pmc.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pmc.9
diff -u src/share/man/man9/pmc.9:1.12 src/share/man/man9/pmc.9:1.13
--- src/share/man/man9/pmc.9:1.12	Wed Feb 22 19:04:38 2012
+++ src/share/man/man9/pmc.9	Wed Jun  1 02:02:11 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pmc.9,v 1.12 2012/02/22 19:04:38 njoly Exp $
+.\" $NetBSD: pmc.9,v 1.13 2016/06/01 02:02:11 pgoyette Exp $
 .\"
 .\" Copyright (c) 2002, 2005 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 14, 2010
+.Dd June 1, 2016
 .Dt PMC 9
 .Os
 .Sh NAME
@@ -253,7 +253,10 @@ interface appeared in
 .Sh AUTHORS
 The
 .Nm
-interface was designed and implemented by Allen Briggs for Wasabi Systems, Inc.
+interface was designed and implemented by
+.An Allen Briggs
+for Wasabi Systems, Inc.
 Additional input on the
 .Nm
-design was provided by Jason R. Thorpe.
+design was provided by
+.An Jason R. Thorpe .



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:00:10 UTC 2016

Modified Files:
src/share/man/man9: pfil.9

Log Message:
Use .An for authors.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man9/pfil.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pfil.9
diff -u src/share/man/man9/pfil.9:1.33 src/share/man/man9/pfil.9:1.34
--- src/share/man/man9/pfil.9:1.33	Thu Aug 22 07:17:11 2013
+++ src/share/man/man9/pfil.9	Wed Jun  1 02:00:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pfil.9,v 1.33 2013/08/22 07:17:11 wiz Exp $
+.\"	$NetBSD: pfil.9,v 1.34 2016/06/01 02:00:10 pgoyette Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd August 22, 2013
+.Dd June 1, 2016
 .Dt PFIL 9
 .Os
 .Sh NAME
@@ -174,10 +174,17 @@ as well as be less IP-centric.
 .Sh AUTHORS
 The
 .Nm
-interface was designed and implemented by Matthew R. Green, with help
-from Darren Reed, Jason R. Thorpe and Charles M. Hannum.
-Darren Reed added support for IPv6 in addition to IPv4.
-Jason R. Thorpe added support for multiple hooks and other clean up.
+interface was designed and implemented by
+.An Matthew R. Green ,
+with help from
+.An Darren Reed ,
+.An Jason R. Thorpe ,
+and
+.An Charles M. Hannum .
+.An Darren Reed
+added support for IPv6 in addition to IPv4.
+.An Jason R. Thorpe
+added support for multiple hooks and other clean up.
 .Sh BUGS
 The current
 .Nm



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:57:31 UTC 2016

Modified Files:
src/share/man/man9: bus_space.9

Log Message:
Use .An for authors.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/share/man/man9/bus_space.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/bus_space.9
diff -u src/share/man/man9/bus_space.9:1.46 src/share/man/man9/bus_space.9:1.47
--- src/share/man/man9/bus_space.9:1.46	Thu Jul 19 17:48:55 2012
+++ src/share/man/man9/bus_space.9	Wed Jun  1 01:57:31 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_space.9,v 1.46 2012/07/19 17:48:55 jdf Exp $
+.\" $NetBSD: bus_space.9,v 1.47 2016/06/01 01:57:31 pgoyette Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 6, 2011
+.Dd June 1, 2016
 .Dt BUS_SPACE 9
 .Os
 .Sh NAME
@@ -1994,9 +1994,14 @@ interfaces were designed and implemented
 .Nx
 developer
 community.
-Primary contributors and implementors were Chris Demetriou,
-Jason Thorpe, and Charles Hannum, but the rest of the
+Primary contributors and implementors were
+.An Chris Demetriou ,
+.An Jason Thorpe,
+and
+.An Charles Hannum ,
+but the rest of the
 .Nx
 developers and the user community played a significant role in development.
 .Pp
-Chris Demetriou wrote this manual page.
+,An Chris Demetriou
+wrote this manual page.



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:55:18 UTC 2016

Modified Files:
src/share/man/man9: bus_dma.9

Log Message:
Use .An for author names.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/share/man/man9/bus_dma.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/bus_dma.9
diff -u src/share/man/man9/bus_dma.9:1.59 src/share/man/man9/bus_dma.9:1.60
--- src/share/man/man9/bus_dma.9:1.59	Wed Oct 30 04:16:44 2013
+++ src/share/man/man9/bus_dma.9	Wed Jun  1 01:55:18 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_dma.9,v 1.59 2013/10/30 04:16:44 msaitoh Exp $
+.\" $NetBSD: bus_dma.9,v 1.60 2016/06/01 01:55:18 pgoyette Exp $
 .\"
 .\" Copyright (c) 1996, 1997, 1998, 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 8, 2011
+.Dd June 1, 2016
 .Dt BUS_DMA 9
 .Os
 .Sh NAME
@@ -841,9 +841,17 @@ interface appeared in
 .Sh AUTHORS
 The
 .Nm
-interface was designed and implemented by Jason R. Thorpe of the
+interface was designed and implemented by
+.An Jason R. Thorpe
+of the
 Numerical Aerospace Simulation Facility, NASA Ames Research Center.
 Additional input on the
 .Nm
-design was provided by Chris Demetriou, Charles Hannum, Ross Harvey,
-Matthew Jacob, Jonathan Stone, and Matt Thomas.
+design was provided by
+.An Chris Demetriou ,
+.An Charles Hannum ,
+.An Ross Harvey ,
+.An Matthew Jacob ,
+.An Jonathan Stone ,
+and
+.An Matt Thomas.



CVS commit: src/share/man/man9

2016-05-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun May  8 10:13:01 UTC 2016

Modified Files:
src/share/man/man9: wapbl.9

Log Message:
Remove unnecessary Ns macro.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man9/wapbl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/wapbl.9
diff -u src/share/man/man9/wapbl.9:1.13 src/share/man/man9/wapbl.9:1.14
--- src/share/man/man9/wapbl.9:1.13	Sat May  7 16:01:00 2016
+++ src/share/man/man9/wapbl.9	Sun May  8 10:13:01 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wapbl.9,v 1.13 2016/05/07 16:01:00 riastradh Exp $
+.\"	$NetBSD: wapbl.9,v 1.14 2016/05/08 10:13:01 wiz Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -279,7 +279,7 @@ must be
 is a callback that
 .Nm
 will invoke as
-.Fa flushfn Ns ( Fa mp , Fa deallocblks , Fa dealloclens , Fa dealloccnt )
+.Fa flushfn ( Fa mp , Fa deallocblks , Fa dealloclens , Fa dealloccnt )
 just before it flushes a transaction to disk, with the an exclusive
 lock held on the transaction, where
 .Fa mp



CVS commit: src/share/man/man9

2016-05-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  7 16:01:00 UTC 2016

Modified Files:
src/share/man/man9: wapbl.9

Log Message:
Clarify wording about shared and exclusive locks.

Maybe this isn't important for users of wapbl, but it likely is
helpful for working in wapbl internals.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man9/wapbl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/wapbl.9
diff -u src/share/man/man9/wapbl.9:1.12 src/share/man/man9/wapbl.9:1.13
--- src/share/man/man9/wapbl.9:1.12	Sat May  7 06:47:44 2016
+++ src/share/man/man9/wapbl.9	Sat May  7 16:01:00 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wapbl.9,v 1.12 2016/05/07 06:47:44 riastradh Exp $
+.\"	$NetBSD: wapbl.9,v 1.13 2016/05/07 16:01:00 riastradh Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -156,22 +156,31 @@ method should call
 .Pp
 Before issuing any
 .Xr buffercache 9
-writes, the file system must lock the current
+writes, the file system must acquire a shared lock on the current
 .Nm
 transaction with
 .Fn wapbl_begin ,
 which may sleep until there is room in the transaction for new writes.
-After issuing the writes, the file system must unlock the transaction
-with
+After issuing the writes, the file system must release its shared lock
+on the transaction with
 .Fn wapbl_end .
 Either all writes issued between
 .Fn wapbl_begin
 and
 .Fn wapbl_end
 will complete, or none of them will.
+.Pp
+File systems may also witness an
+.Em exclusive
+lock on the current transaction when
+.Nm
+is flushing the transaction to disk, or aborting a flush, and invokes a
+file system's callback.
 File systems can assert that the transaction is locked with
 .Fn wapbl_jlock_assert ,
-or not exclusively locked, with
+or not
+.Em exclusively
+locked, with
 .Fn wapbl_junlock_assert .
 .Pp
 If a file system requires multiple transactions to initialize an
@@ -271,8 +280,8 @@ is a callback that
 .Nm
 will invoke as
 .Fa flushfn Ns ( Fa mp , Fa deallocblks , Fa dealloclens , Fa dealloccnt )
-just before it flushes a transaction to disk, with the transaction
-locked exclusively, where
+just before it flushes a transaction to disk, with the an exclusive
+lock held on the transaction, where
 .Fa mp
 is the mount point passed to
 .Fn wapbl_start ,
@@ -312,9 +321,10 @@ free memory associated with
 and return zero.
 .It Fn wapbl_begin wl file line
 Wait for space in the current transaction for new writes, flushing it
-if necessary, and lock it.
+if necessary, and acquire a shared lock on it.
 .Pp
-The lock is not exclusive: other threads may lock the transaction too.
+The lock is not exclusive: other threads may acquire shared locks on
+the transaction too.
 The lock is not recursive: a thread may not acquire it again without
 calling
 .Fa wapbl_end
@@ -328,15 +338,20 @@ and
 are the file name and line number of the caller for debugging
 purposes.
 .It Fn wapbl_end wl
-Unlock the transaction.
+Release a shared lock on the transaction acquired with
+.Fn wapbl_begin .
 .It Fn wapbl_flush wl wait
 Flush the current transaction to disk.
 If
 .Fa wait
 is nonzero, wait for all writes in the current transaction to
 complete.
+.Pp
+The current transaction must not be locked.
 .It Fn wapbl_discard wl
 Discard the current transaction, permanently losing any writes in it.
+.Pp
+The current transaction must not be locked.
 .It Fn wapbl_add_buf wl bp
 Add the buffer
 .Fa bp
@@ -421,7 +436,8 @@ and
 .Fn wapbl_end .
 .Pp
 There is no way to assert that the current transaction is not locked at
-all -- i.e., that the caller may lock the transaction with
+all -- i.e., that the caller may acquire a shared lock on the
+transaction with
 .Fn wapbl_begin
 without danger of deadlock.
 .El



CVS commit: src/share/man/man9

2016-05-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat May  7 08:52:10 UTC 2016

Modified Files:
src/share/man/man9: namei.9

Log Message:
Use Er for errors and Dq for double quoted strings. Whitespace nits.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/share/man/man9/namei.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/namei.9
diff -u src/share/man/man9/namei.9:1.36 src/share/man/man9/namei.9:1.37
--- src/share/man/man9/namei.9:1.36	Fri May  6 04:55:10 2016
+++ src/share/man/man9/namei.9	Sat May  7 08:52:10 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: namei.9,v 1.36 2016/05/06 04:55:10 dholland Exp $
+.\" $NetBSD: namei.9,v 1.37 2016/05/07 08:52:10 wiz Exp $
 .\"
 .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -206,7 +206,7 @@ The
 mode is the baseline behavior, for all ordinary lookups that simply
 return a vnode.
 In this mode, if the requested object does not exist,
-.Dv ENOENT
+.Er ENOENT
 is returned.
 .Pp
 The
@@ -215,7 +215,7 @@ mode is used when doing the lookup for o
 the file system namespace, such as
 .Xr mkdir 2 .
 In this mode, if the requested name already exists,
-.Dv EEXIST
+.Er EEXIST
 is returned.
 Otherwise if the requested name does not exist, the lookup succeeds
 and the returned vnode
@@ -448,7 +448,7 @@ In the rare case that another set of cre
 namei operation,
 .Em ndp-\*[Gt]ni_cnd.cn_cred
 must be set manually after
-.Fn NDINIT.
+.Fn NDINIT .
 .It Fn NDAT "ndp" "dvp"
 This macro is used after
 .Fn NDINIT
@@ -684,7 +684,7 @@ The number of symbolic links encountered
 If this exceeds a limit,
 .Nm
 fails with
-.Dv ELOOP .
+.Er ELOOP .
 This is not initialized by
 .Fn NDINIT
 and is used only internally.
@@ -742,7 +742,7 @@ does a complete path lookup by calling
 .Fn namei_init ,
 .Fn namei_tryemulroot ,
 and
-.Fn namei_cleanup.
+.Fn namei_cleanup .
 .It Fn namei_init
 sets up the basic internal state and makes some (precondition-type)
 assertions.
@@ -775,8 +775,9 @@ initializes the root directory state (bo
 and
 .Fa ni_erootdir )
 and picks the starting directory, consuming the leading slashes of an
-absolute path and handling the magic ``/../'' string for bypassing the
-emulation root.
+absolute path and handling the magic
+.Dq /../
+string for bypassing the emulation root.
 A different version
 .Fn namei_getstartdir_for_nfsd
 is used for lookups coming from
@@ -806,7 +807,7 @@ than it is for
 The latter
 .Dq fails
 with
-.Dv EJUSTRETURN .
+.Er EJUSTRETURN .
 .Nm
 translates this into succeeding and returning a null vnode.
 .Sh CODE REFERENCES



CVS commit: src/share/man/man9

2016-05-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  7 06:47:44 UTC 2016

Modified Files:
src/share/man/man9: wapbl.9

Log Message:
Omit confusing sentence.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man9/wapbl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/wapbl.9
diff -u src/share/man/man9/wapbl.9:1.11 src/share/man/man9/wapbl.9:1.12
--- src/share/man/man9/wapbl.9:1.11	Sat May  7 05:46:35 2016
+++ src/share/man/man9/wapbl.9	Sat May  7 06:47:44 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wapbl.9,v 1.11 2016/05/07 05:46:35 riastradh Exp $
+.\"	$NetBSD: wapbl.9,v 1.12 2016/05/07 06:47:44 riastradh Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -315,9 +315,6 @@ Wait for space in the current transactio
 if necessary, and lock it.
 .Pp
 The lock is not exclusive: other threads may lock the transaction too.
-However, if there is not enough space, another thread will obtain an
-exclusive lock in order to flush the transaction.
-.Pp
 The lock is not recursive: a thread may not acquire it again without
 calling
 .Fa wapbl_end



CVS commit: src/share/man/man9

2016-05-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  7 05:46:35 UTC 2016

Modified Files:
src/share/man/man9: wapbl.9

Log Message:
Fix statement of what write-ahead means.  Contrast with roll-back.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/wapbl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/wapbl.9
diff -u src/share/man/man9/wapbl.9:1.10 src/share/man/man9/wapbl.9:1.11
--- src/share/man/man9/wapbl.9:1.10	Wed Apr  1 22:51:33 2015
+++ src/share/man/man9/wapbl.9	Sat May  7 05:46:35 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wapbl.9,v 1.10 2015/04/01 22:51:33 riastradh Exp $
+.\"	$NetBSD: wapbl.9,v 1.11 2016/05/07 05:46:35 riastradh Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -97,7 +97,8 @@ batches of writes are issued atomically 
 only physical blocks, not logical file system operations, are stored in
 the log
 .It write-ahead
-blocks are written to the log before being written to the disk
+before writing a block to disk, its new content, rather than its old
+content for roll-back, is recorded in the log
 .El
 .Pp
 When a file system using



CVS commit: src/share/man/man9

2016-05-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri May  6 04:55:10 UTC 2016

Modified Files:
src/share/man/man9: namei.9

Log Message:
Revise/update. List the functions in a sensible order. Document all
the modes and flags. Document the structure fields properly.
Distinguish internals from public interfaces. Mention historic dead
flags like SAVESTART because they still exist in other projects.
Explain the current layout of vfs_lookup.c, or at least the primary
points of it.

Etc.

This ended up being a much larger rewrite than I intended.

Bump date again.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/share/man/man9/namei.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/namei.9
diff -u src/share/man/man9/namei.9:1.35 src/share/man/man9/namei.9:1.36
--- src/share/man/man9/namei.9:1.35	Thu May  5 17:06:41 2016
+++ src/share/man/man9/namei.9	Fri May  6 04:55:10 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: namei.9,v 1.35 2016/05/05 17:06:41 salazar Exp $
+.\" $NetBSD: namei.9,v 1.36 2016/05/06 04:55:10 dholland Exp $
 .\"
 .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,43 +27,42 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 05, 2016
+.Dd May 6, 2016
 .Dt NAMEI 9
 .Os
 .Sh NAME
 .Nm namei ,
-.Nm lookup_for_nfsd ,
-.Nm lookup_for_nfsd_index ,
-.Nm relookup ,
 .Nm NDINIT ,
 .Nm NDAT ,
 .Nm namei_simple_kernel ,
 .Nm namei_simple_user
+.Nm relookup ,
+.Nm lookup_for_nfsd ,
+.Nm lookup_for_nfsd_index ,
 .Nd pathname lookup
 .Sh SYNOPSIS
 .In sys/namei.h
 .In sys/uio.h
 .In sys/vnode.h
-.Ft int
-.Fn namei "struct nameidata *ndp"
-.Ft int
-.Fn lookup_for_nfsd "struct nameidata *ndp" "struct vnode *startdir" \
-"int neverfollow"
-.Ft int
-.Fn lookup_for_nfsd_index "struct nameidata *ndp"
-.Ft int
-.Fn relookup "struct vnode *dvp" "struct vnode **vpp" \
-"struct componentname *cnp"
-.Ft void
 .Fn NDINIT "struct nameidata *ndp" "u_long op" "u_long flags" \
 "struct pathbuf *pathbuf"
 .Fn NDAT "struct nameidata *ndp" "struct vnode *dvp"
 .Ft int
+.Fn namei "struct nameidata *ndp"
+.Ft int
 .Fn namei_simple_kernel "const char *path" "namei_simple_flags_t sflags" \
 "struct vnode **ret"
 .Ft int
 .Fn namei_simple_user "const char *path" "namei_simple_flags_t sflags" \
 "struct vnode **ret"
+.Ft int
+.Fn relookup "struct vnode *dvp" "struct vnode **vpp" \
+"struct componentname *cnp"
+.Ft int
+.Fn lookup_for_nfsd "struct nameidata *ndp" "struct vnode *startdir" \
+"int neverfollow"
+.Ft int
+.Fn lookup_for_nfsd_index "struct nameidata *ndp"
 .Sh DESCRIPTION
 The
 .Nm
@@ -81,39 +80,61 @@ Except for the simple forms, the argumen
 encapsulated in the
 .Em nameidata
 structure.
-It has the following layout:
-.Bd -literal
-struct nameidata {
-	/*
-	 * Arguments to namei/lookup.
-	 */
-	struct vnode *ni_atdir;		/* startup dir, cwd if null */
-	struct pathbuf *ni_pathbuf;	/* pathname container */
-	char *ni_pnbuf;			/* extra pathname buffer ref (XXX) */
-	/*
-	 * Arguments to lookup.
-	 */
-	struct	vnode *ni_rootdir;	/* logical root directory */
-	struct	vnode *ni_erootdir;	/* emulation root directory */
-	/*
-	 * Results: returned from/manipulated by lookup
-	 */
-	struct	vnode *ni_vp;		/* vnode of result */
-	struct	vnode *ni_dvp;		/* vnode of intermediate directory */
-	/*
-	 * Shared between namei and lookup/commit routines.
-	 */
-	size_t		ni_pathlen;	/* remaining chars in path */
-	const char	*ni_next;	/* next location in pathname */
-	unsigned int	ni_loopcnt;	/* count of symlinks encountered */
-	/*
-	 * Lookup parameters: this structure describes the subset of
-	 * information from the nameidata structure that is passed
-	 * through the VOP interface.
-	 */
-	struct componentname ni_cnd;
-};
-.Ed
+The public interface to this structure is as follows.
+.Bl -offset indent
+.It
+It contains a member
+.Em ni_erootdir
+that may be set to the emulation root directory before the call if
+the
+.Dv EMULROOTSET
+flag is also set and
+.Dv TRYEMULROOT
+is in effect.
+This is only necessary (or allowed) if the emulation root is not yet
+set in the current process.
+.It
+It contains a member
+.Em ni_vp
+that upon successful return contains the result vnode.
+.It
+It contains a member
+.Em ni_dvp
+that upon successful return contains the vnode of the directory
+containing the result vnode or
+.Dv NULL .
+If the
+.Dv LOCKPARENT
+flag is set, the containing vnode is returned; otherwise this field is
+left set to
+.Dv NULL .
+.It
+It contains a member
+.Em ni_cnd
+that is a
+.Em componentname
+structure (described in just a moment).
+This may be used by callers to pass to certain vnode operations that
+operate on pathnames.
+.El
+.Pp
+The other fields in the structure should not be examined or altered
+directly.
+Note that the
+.Xr nfs 4
+code misuses the
+.Em 

CVS commit: src/share/man/man9

2016-05-05 Thread Guilherme Salazar
Module Name:src
Committed By:   salazar
Date:   Thu May  5 17:06:41 UTC 2016

Modified Files:
src/share/man/man9: namei.9

Log Message:
update struct nameidata documentation


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/namei.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/namei.9
diff -u src/share/man/man9/namei.9:1.34 src/share/man/man9/namei.9:1.35
--- src/share/man/man9/namei.9:1.34	Tue Apr 21 10:00:30 2015
+++ src/share/man/man9/namei.9	Thu May  5 17:06:41 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: namei.9,v 1.34 2015/04/21 10:00:30 wiz Exp $
+.\" $NetBSD: namei.9,v 1.35 2016/05/05 17:06:41 salazar Exp $
 .\"
 .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 21, 2015
+.Dd May 05, 2016
 .Dt NAMEI 9
 .Os
 .Sh NAME
@@ -84,45 +84,54 @@ structure.
 It has the following layout:
 .Bd -literal
 struct nameidata {
-/*
- * Arguments to namei/lookup.
- */
-struct vnode *ni_startdir;  /* starting dir, cwd if null */
-struct pathbuf *ni_pathbuf; /* pathname container */
-char *ni_pnbuf; /* extra pathname buffer ref (XXX) */
-/*
- * Arguments to lookup.
- */
-struct  vnode *ni_startdir; /* starting directory */
-struct  vnode *ni_rootdir;  /* logical root directory */
-/*
- * Results: returned from/manipulated by lookup
- */
-struct  vnode *ni_vp;   /* vnode of result */
-struct  vnode *ni_dvp;  /* vnode of intermediate dir */
-/*
- * Shared between namei and lookup/commit routines.
- */
-size_t ni_pathlen;  /* remaining chars in path */
-const char *ni_next;/* next location in pathname */
-unsigned int ni_loopcnt;/* count of symlinks encountered */
-/*
- * Lookup parameters
- */
-struct componentname {
-/*
- * Arguments to lookup.
- */
-uint32_t cn_nameiop;/* namei operation */
-uint32_t cn_flags;  /* flags to namei */
-kauth_cred_t cn_cred;   /* credentials */
-/*
- * Shared between lookup and commit routines.
- */
-const char *cn_nameptr; /* pointer to looked up name */
-size_t cn_namelen;  /* length of looked up component */
-size_t cn_consume;  /* chars to be consumed this time */
-} ni_cnd;
+	/*
+	 * Arguments to namei/lookup.
+	 */
+	struct vnode *ni_atdir;		/* startup dir, cwd if null */
+	struct pathbuf *ni_pathbuf;	/* pathname container */
+	char *ni_pnbuf;			/* extra pathname buffer ref (XXX) */
+	/*
+	 * Arguments to lookup.
+	 */
+	struct	vnode *ni_rootdir;	/* logical root directory */
+	struct	vnode *ni_erootdir;	/* emulation root directory */
+	/*
+	 * Results: returned from/manipulated by lookup
+	 */
+	struct	vnode *ni_vp;		/* vnode of result */
+	struct	vnode *ni_dvp;		/* vnode of intermediate directory */
+	/*
+	 * Shared between namei and lookup/commit routines.
+	 */
+	size_t		ni_pathlen;	/* remaining chars in path */
+	const char	*ni_next;	/* next location in pathname */
+	unsigned int	ni_loopcnt;	/* count of symlinks encountered */
+	/*
+	 * Lookup parameters: this structure describes the subset of
+	 * information from the nameidata structure that is passed
+	 * through the VOP interface.
+	 */
+	struct componentname ni_cnd;
+};
+.Ed
+.Pp
+The
+.Em componentname
+structure has the following layout:
+.Bd -literal
+struct componentname {
+	/*
+	 * Arguments to lookup.
+	 */
+	uint32_t	cn_nameiop;	/* namei operation */
+	uint32_t	cn_flags;	/* flags to namei */
+	kauth_cred_t 	cn_cred;	/* credentials */
+	/*
+	 * Shared between lookup and commit routines.
+	 */
+	const char 	*cn_nameptr;	/* pointer to looked up name */
+	size_t		cn_namelen;	/* length of looked up comp */
+	size_t		cn_consume;	/* chars to consume in lookup */
 };
 .Ed
 .Pp



CVS commit: src/share/man/man9

2016-04-27 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Apr 27 08:18:40 UTC 2016

Modified Files:
src/share/man/man9: psref.9

Log Message:
Fix usages of PSLIST_ENTRY_* in the example code


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/psref.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/psref.9
diff -u src/share/man/man9/psref.9:1.4 src/share/man/man9/psref.9:1.5
--- src/share/man/man9/psref.9:1.4	Wed Apr 27 08:05:31 2016
+++ src/share/man/man9/psref.9	Wed Apr 27 08:18:40 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: psref.9,v 1.4 2016/04/27 08:05:31 ozaki-r Exp $
+.\"	$NetBSD: psref.9,v 1.5 2016/04/27 08:18:40 ozaki-r Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -302,7 +302,7 @@ publish_as_frotz(uint64_t key, ...)
 	f = kmem_alloc(sizeof(*f), KM_SLEEP);
 	f->f_key = key;
 	f->f_... = ...;
-	PSLIST_ENTRY_INIT(>f_entry);
+	PSLIST_ENTRY_INIT(f, f_entry);
 	psref_target_init(>f_target, frobbotzim_prc);
 
 	mutex_enter();
@@ -379,7 +379,7 @@ destroy_frotz(int key)
 	if (f != NULL) {
 		/* Wait for all readers to drain before freeing.  */
 		psref_target_destroy(>f_target, frobbotzim_prc);
-		PSLIST_ENTRY_DESTROY(>f_entry);
+		PSLIST_ENTRY_DESTROY(f, f_entry);
 		kmem_free(f, sizeof(*f));
 	}
 }



CVS commit: src/share/man/man9

2016-04-27 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Apr 27 08:05:31 UTC 2016

Modified Files:
src/share/man/man9: psref.9

Log Message:
Fix usage of frobbotzim_prc in the example code


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/psref.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/psref.9
diff -u src/share/man/man9/psref.9:1.3 src/share/man/man9/psref.9:1.4
--- src/share/man/man9/psref.9:1.3	Fri Apr 15 17:55:58 2016
+++ src/share/man/man9/psref.9	Wed Apr 27 08:05:31 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: psref.9,v 1.3 2016/04/15 17:55:58 riastradh Exp $
+.\"	$NetBSD: psref.9,v 1.4 2016/04/27 08:05:31 ozaki-r Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 8, 2016
+.Dd April 27, 2016
 .Dt PSREF 9
 .Os
 .\"
@@ -324,7 +324,7 @@ use_frotz(int key, int op)
 	do_stuff_with_frotz(f, op);
 
 	/* Release passive reference, possibly waking destroy_frotz.  */
-	psref_release(, >f_psref, _prc);
+	psref_release(, >f_psref, frobbotzim_prc);
 
 	return 0;
 }
@@ -341,7 +341,7 @@ lookup_frotz(int key, struct psref *ref)
 		/* f is stable until pserialize_read_exit.  */
 		if (f->f_key == key) {
 			/* Acquire a passive reference.  */
-			psref_acquire(ref, >f_target, _prc);
+			psref_acquire(ref, >f_target, frobbotzim_prc);
 			/* f is now stable until psref_release.  */
 			break;
 		}
@@ -378,7 +378,7 @@ destroy_frotz(int key)
 
 	if (f != NULL) {
 		/* Wait for all readers to drain before freeing.  */
-		psref_target_destroy(>f_target, _prc);
+		psref_target_destroy(>f_target, frobbotzim_prc);
 		PSLIST_ENTRY_DESTROY(>f_entry);
 		kmem_free(f, sizeof(*f));
 	}



CVS commit: src/share/man/man9

2016-04-27 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Apr 27 06:57:24 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Fix declaration of PSLIST_READER_FIRST


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.15 src/share/man/man9/pslist.9:1.16
--- src/share/man/man9/pslist.9:1.15	Mon Apr 11 13:45:20 2016
+++ src/share/man/man9/pslist.9	Wed Apr 27 06:57:24 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.15 2016/04/11 13:45:20 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.16 2016/04/27 06:57:24 ozaki-r Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 8, 2016
+.Dd April 27, 2016
 .Dt PSLIST 9
 .Os
 .\"
@@ -64,7 +64,7 @@
 .Fn PSLIST_WRITER_FOREACH "TYPE *element" "struct pslist_head *head" "TYPE" "PSLIST_ENTRY NAME"
 .\" Reader operations
 .Ft TYPE *
-.Fn PSLIST_READER_FIRST "TYPE *element" "TYPE" "PSLIST_ENTRY NAME"
+.Fn PSLIST_READER_FIRST "struct pslist *head" "TYPE" "PSLIST_ENTRY NAME"
 .Ft TYPE *
 .Fn PSLIST_READER_NEXT "TYPE *element" "TYPE" "PSLIST_ENTRY NAME"
 .Fn PSLIST_READER_FOREACH "TYPE *element" "struct pslist_head *head" "TYPE" "PSLIST_ENTRY NAME"



CVS commit: src/share/man/man9

2016-04-24 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Apr 24 15:11:26 UTC 2016

Modified Files:
src/share/man/man9: usbdi.9

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man9/usbdi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/usbdi.9
diff -u src/share/man/man9/usbdi.9:1.31 src/share/man/man9/usbdi.9:1.32
--- src/share/man/man9/usbdi.9:1.31	Sun Apr 24 15:03:18 2016
+++ src/share/man/man9/usbdi.9	Sun Apr 24 15:11:26 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: usbdi.9,v 1.31 2016/04/24 15:03:18 skrll Exp $
+.\"	$NetBSD: usbdi.9,v 1.32 2016/04/24 15:11:26 wiz Exp $
 .\"
 .\" Copyright (c) 2012 Matthew R. Green
 .\" All rights reserved.
@@ -272,10 +272,10 @@ through
 .Fn usbd_set_config_index "struct usbd_device *dev" "int index" "int msg"
 .Ft usbd_status
 .Fn usbd_bulk_transfer "struct usbd_xfer *xfer" "struct usbd_pipe *pipe" \
- "uint16_t flags" "uint32_t timeout" "void *buf" "uint32_t *size" 
+ "uint16_t flags" "uint32_t timeout" "void *buf" "uint32_t *size"
 .Ft usbd_status
 .Fn usbd_intr_transfer "struct usbd_xfer *xfer" "struct usbd_pipe *pipe" \
- "uint16_t flags" "uint32_t timeout" "void *buf" "uint32_t *size" 
+ "uint16_t flags" "uint32_t timeout" "void *buf" "uint32_t *size"
 .Ft void
 .Fn usb_detach_waitold "device_t dv"
 .Ft void



CVS commit: src/share/man/man9

2016-04-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Apr 24 15:03:18 UTC 2016

Modified Files:
src/share/man/man9: usbdi.9

Log Message:
Update after nick-nhusb merge


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man9/usbdi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/usbdi.9
diff -u src/share/man/man9/usbdi.9:1.30 src/share/man/man9/usbdi.9:1.31
--- src/share/man/man9/usbdi.9:1.30	Mon Jun 29 16:20:14 2015
+++ src/share/man/man9/usbdi.9	Sun Apr 24 15:03:18 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: usbdi.9,v 1.30 2015/06/29 16:20:14 skrll Exp $
+.\"	$NetBSD: usbdi.9,v 1.31 2016/04/24 15:03:18 skrll Exp $
 .\"
 .\" Copyright (c) 2012 Matthew R. Green
 .\" All rights reserved.
@@ -27,11 +27,11 @@
 .\" SUCH DAMAGE.
 .\"
 .\"
-.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" Copyright (c) 1999, 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Lennart Augustsson.
+.\" by Lennart Augustsson and Nick Hudson.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
@@ -54,7 +54,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 29, 2015
+.Dd April 24, 2016
 .Dt USBDI 9
 .Os
 .Sh NAME
@@ -66,144 +66,148 @@
 .In dev/usb/usbdi_util.h
 .Ss Functions offered by usbdi.h
 .Ft usbd_status
-.Fn usbd_open_pipe "usbd_interface_handle iface" "uint8_t address" \
- "uint8_t flags" "usbd_pipe_handle *pipe"
+.Fn usbd_open_pipe "struct usbd_interface *iface" "uint8_t address" \
+ "uint8_t flags" "struct usbd_pipe **pipe"
 .Ft usbd_status
-.Fn usbd_close_pipe "usbd_pipe_handle pipe"
+.Fn usbd_close_pipe "struct usbd_pipe *pipe"
 .Ft usbd_status
-.Fn usbd_transfer "usbd_xfer_handle xfer"
-.Ft usbd_xfer_handle
-.Fn usbd_alloc_xfer "usbd_device_handle dev"
-.Ft usbd_status
-.Fn usbd_free_xfer "usbd_xfer_handle xfer"
-.Ft void
-.Fn usbd_setup_xfer "usbd_xfer_handle xfer" "usbd_pipe_handle pipe" \
- "usbd_private_handle priv" "void *buffer" "uint32_t length" \
+.Fn usbd_transfer "struct usbd_xfer *xfer"
+.Ft struct usbd_xfer *
+.Fn usbd_setup_xfer "struct usbd_xfer *xfer" \
+ "void *priv" "void *buffer" "uint32_t length" \
  "uint16_t flags" "uint32_t timeout" "usbd_callback"
 .Ft void
-.Fn usbd_setup_default_xfer "usbd_xfer_handle xfer" \
- "usbd_device_handle dev" "usbd_private_handle priv" \
+.Fn usbd_setup_default_xfer "struct usbd_xfer *xfer" \
+ "struct usbd_device *dev" "void *priv" \
  "uint32_t timeout" "usb_device_request_t *req" " void *buffer" \
  "uint32_t length" "uint16_t flags" "usbd_callback"
 .Ft void
-.Fn usbd_setup_isoc_xfer "usbd_xfer_handle xfer" "usbd_pipe_handle pipe" \
- "usbd_private_handle priv" "uint16_t *frlengths" \
+.Fn usbd_setup_isoc_xfer "struct usbd_xfer *xfer" \
+ "void *priv" "uint16_t *frlengths" \
  "uint32_t nframes" "uint16_t flags" "usbd_callback"
 .Ft void
-.Fn usbd_get_xfer_status "usbd_xfer_handle xfer" "usbd_private_handle *priv" \
+.Fn usbd_get_xfer_status "struct usbd_xfer *xfer" "void **priv" \
  "void **buffer" "uint32_t *count" "usbd_status *status"
 .Ft usb_endpoint_descriptor_t *
-.Fn usbd_interface2endpoint_descriptor "usbd_interface_handle iface" \
+.Fn usbd_interface2endpoint_descriptor "struct usbd_interface *iface" \
  "uint8_t address"
 .Ft usbd_status
-.Fn usbd_abort_pipe "usbd_pipe_handle pipe"
+.Fn usbd_abort_pipe "struct usbd_pipe *pipe"
 .Ft usbd_status
-.Fn usbd_abort_default_pipe "usbd_device_handle dev"
+.Fn usbd_abort_default_pipe "struct usbd_device *dev"
 .Ft usbd_status
-.Fn usbd_clear_endpoint_stall "usbd_pipe_handle pipe"
+.Fn usbd_clear_endpoint_stall "struct usbd_pipe *pipe"
 .Ft usbd_status
-.Fn usbd_clear_endpoint_stall_async "usbd_pipe_handle pipe"
+.Fn usbd_clear_endpoint_stall_async "struct usbd_pipe *pipe"
 .Ft void
-.Fn usbd_clear_endpoint_toggle "usbd_pipe_handle pipe"
+.Fn usbd_clear_endpoint_toggle "struct usbd_pipe *pipe"
 .Ft usbd_status
-.Fn usbd_endpoint_count "usbd_interface_handle dev" "uint8_t *count"
+.Fn usbd_endpoint_count "struct usbd_interface *dev" "uint8_t *count"
 .Ft usbd_status
-.Fn usbd_interface_count "usbd_device_handle dev" "uint8_t *count"
+.Fn usbd_interface_count "struct usbd_device *dev" "uint8_t *count"
 .Ft usbd_status
-.Fn usbd_interface2device_handle "usbd_interface_handle iface" "usbd_device_handle *dev"
+.Fn usbd_interface2device_handle "struct usbd_interface *iface" "struct usbd_device **dev"
 .Ft usbd_status
-.Fn usbd_device2interface_handle "usbd_device_handle dev" "uint8_t ifaceno" "usbd_interface_handle *iface"
+.Fn usbd_device2interface_handle "struct usbd_device *dev" "uint8_t ifaceno" "struct usbd_interface **iface"
 .Pp
-.Ft usbd_device_handle
-.Fn usbd_pipe2device_handle 

CVS commit: src/share/man/man9

2016-04-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Apr 15 17:55:58 UTC 2016

Modified Files:
src/share/man/man9: psref.9

Log Message:
Tweak wording.  Use \(em for emdash.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/psref.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/psref.9
diff -u src/share/man/man9/psref.9:1.2 src/share/man/man9/psref.9:1.3
--- src/share/man/man9/psref.9:1.2	Sun Apr 10 18:27:56 2016
+++ src/share/man/man9/psref.9	Fri Apr 15 17:55:58 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: psref.9,v 1.2 2016/04/10 18:27:56 wiz Exp $
+.\"	$NetBSD: psref.9,v 1.3 2016/04/15 17:55:58 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -64,12 +64,12 @@
 .Sh DESCRIPTION
 The
 .Nm
-abstraction allows CPUs to cheaply acquire references to a resource,
-called
-.Em passive references ,
-guaranteeing it will not be destroyed until all CPUs release their
-references to it, without using interprocessor synchronization on the
-reader side.
+abstraction allows CPUs to cheaply acquire and release
+.Em passive references
+to a resource, which guarantee the resource will not be destroyed
+until the reference is released.
+Acquiring and releasing passive references requires no interprocessor
+synchronization, except when the resource is pending destruction.
 .\"
 .Pp
 Passive references are an intermediate between
@@ -96,8 +96,8 @@ and may be held by a caller that sleeps.
 .\"
 .Pp
 Passive references share some properties of both: passive references
-require no interprocessor synchronization to acquire or release, and do
-not block soft interrupts, but can be held by a caller that sleeps.
+avoid interprocessor synchronization, and do not block soft interrupts,
+but can be held by a caller that sleeps.
 However, a caller holding a passive reference may not transfer it from
 one LWP to another, and the caller's LWP must be bound to a single CPU
 while it holds any passive references.
@@ -261,7 +261,7 @@ in the passive reference class
 .Fa class ,
 or false if not.
 .Pp
-This does not answer about other CPUs -- it does not tell you whether
+This does not answer about other CPUs \(em it does not tell you whether
 .Em any
 CPU holds a passive reference to
 .Fa target .



CVS commit: src/share/man/man9

2016-04-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Apr 11 13:45:20 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Clarify wording about when to use PSLIST_ENTRY_DESTROY.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.14 src/share/man/man9/pslist.9:1.15
--- src/share/man/man9/pslist.9:1.14	Mon Apr 11 03:27:14 2016
+++ src/share/man/man9/pslist.9	Mon Apr 11 13:45:20 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.14 2016/04/11 03:27:14 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.15 2016/04/11 13:45:20 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -121,11 +121,10 @@ finding it in the list, but allows extan
 reading the next entry.
 The caller must then wait, e.g. with
 .Xr pserialize_perform 9 ,
-for all extant parallel readers to finish, before freeing or reusing
-the list entry.
-A list entry should be destroyed with
+for all extant parallel readers to finish, before destroying the list
+entry with
 .Fn PSLIST_ENTRY_DESTROY
-before it may be reused.
+and then freeing or reusing its memory.
 .\"
 .Sh EXCLUSIVE OPERATIONS
 The following operations may be performed on list heads and entries



CVS commit: src/share/man/man9

2016-04-10 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Apr 11 03:27:14 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Remove incorrect comment about non-effect of PSLIST_ENTRY_DESTROY.

This does have an effect -- it nullifies the next pointer.  (The text
was copied from PSLIST_DESTROY, which really has no effect without
options DIAGNOSTIC.)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.13 src/share/man/man9/pslist.9:1.14
--- src/share/man/man9/pslist.9:1.13	Sat Apr  9 18:25:26 2016
+++ src/share/man/man9/pslist.9	Mon Apr 11 03:27:14 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.13 2016/04/09 18:25:26 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.14 2016/04/11 03:27:14 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -175,12 +175,6 @@ Either
 must never have been inserted into a list, or it must have been
 inserted and removed, and the caller must have waited for all parallel
 readers to finish reading it first.
-.Pp
-This has an effect only with the
-.Dv DIAGNOSTIC
-option, so it is not strictly necessary, but it can help to detect bugs
-early; see
-.Xr KASSERT 9 .
 .El
 .\"
 .Sh WRITER OPERATIONS



CVS commit: src/share/man/man9

2016-04-10 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Apr 10 18:27:56 UTC 2016

Modified Files:
src/share/man/man9: psref.9

Log Message:
Fix xref section.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/psref.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/psref.9
diff -u src/share/man/man9/psref.9:1.1 src/share/man/man9/psref.9:1.2
--- src/share/man/man9/psref.9:1.1	Sat Apr  9 06:21:16 2016
+++ src/share/man/man9/psref.9	Sun Apr 10 18:27:56 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: psref.9,v 1.1 2016/04/09 06:21:16 riastradh Exp $
+.\"	$NetBSD: psref.9,v 1.2 2016/04/10 18:27:56 wiz Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -86,7 +86,7 @@ read section blocks soft interrupts on t
 complete.
 .It
 Reference counting requires interprocessor synchronization via
-.Xr atomic_ops 9
+.Xr atomic_ops 3
 or
 .Xr mutex 9 .
 However, with reference counting, a reference may be held for arbitrary



CVS commit: src/share/man/man9

2016-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 18:25:26 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Parrot markup for PTHREAD_MUTEX_INITIALIZER synopsis.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.12 src/share/man/man9/pslist.9:1.13
--- src/share/man/man9/pslist.9:1.12	Sat Apr  9 18:10:41 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 18:25:26 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.12 2016/04/09 18:10:41 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.13 2016/04/09 18:25:26 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -38,8 +38,8 @@
 .Sh SYNOPSIS
 .In sys/pslist.h
 .\" Exclusive operations
-.Vt struct pslist_head PSLIST_INITIALIZER ;
-.Vt struct pslist_entry PSLIST_ENTRY_INITIALIZER ;
+.Vt struct pslist_head head No = Dv PSLIST_INITIALIZER ;
+.Vt struct pslist_entry entry No = Dv PSLIST_ENTRY_INITIALIZER ;
 .Ft void
 .Fn PSLIST_INIT "struct pslist_head *head"
 .Ft void



CVS commit: src/share/man/man9

2016-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 18:10:41 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Use the proper pluralization of `frotz'.

Per the jargon file, `frotz' is a contraction of `frobnitz', which
pluralizes to `frobnitzem'; `frobbotzim' is the plural of the related
but not identical term `frobozz'.

Fixing other uses of this plural elsewhere among the man pages is
left to the reader inclined to humorous linguistic studies.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.11 src/share/man/man9/pslist.9:1.12
--- src/share/man/man9/pslist.9:1.11	Sat Apr  9 17:50:54 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 18:10:41 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.11 2016/04/09 17:50:54 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.12 2016/04/09 18:10:41 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -352,15 +352,15 @@ Example frotz structure and global state
 		pserialize_t		psz;
 		struct pslist_head	list;
 		struct pool		pool;
-	} frobbotzim __cacheline_aligned;
+	} frobnitzem __cacheline_aligned;
 .Ed
 .Pp
 Initialize the global state:
 .Bd -literal
-	mutex_init(\*[Am]frobbotzim.lock, MUTEX_DEFAULT, IPL_NONE);
-	frobbotzim.psz = pserialize_create();
-	PSLIST_INIT(\*[Am]frobbotzim.list);
-	pool_init(\*[Am]frobbotzim.pool, sizeof(struct frotz), ...);
+	mutex_init(\*[Am]frobnitzem.lock, MUTEX_DEFAULT, IPL_NONE);
+	frobnitzem.psz = pserialize_create();
+	PSLIST_INIT(\*[Am]frobnitzem.list);
+	pool_init(\*[Am]frobnitzem.pool, sizeof(struct frotz), ...);
 .Ed
 .Pp
 Create and publish a frotz:
@@ -368,7 +368,7 @@ Create and publish a frotz:
 	uint64_t key = ...;
 	uint64_t datum = ...;
 
-	struct frotz *f = pool_get(\*[Am]frobbotzim.pool, PR_WAITOK);
+	struct frotz *f = pool_get(\*[Am]frobnitzem.pool, PR_WAITOK);
 
 	/* Initialize f.  */
 	f->f_key = key;
@@ -376,9 +376,9 @@ Create and publish a frotz:
 	PSLIST_ENTRY_INIT(f, f_entry);
 
 	/* Publish it.  */
-	mutex_enter(\*[Am]frobbotzim.lock);
-	PSLIST_WRITER_INSERT_HEAD(\*[Am]frobbotzim.list, f, f_entry);
-	mutex_exit(\*[Am]frobbotzim.lock);
+	mutex_enter(\*[Am]frobnitzem.lock);
+	PSLIST_WRITER_INSERT_HEAD(\*[Am]frobnitzem.list, f, f_entry);
+	mutex_exit(\*[Am]frobnitzem.lock);
 .Ed
 .Pp
 Look up a frotz and return its associated datum:
@@ -389,7 +389,7 @@ Look up a frotz and return its associate
 	int s;
 
 	s = pserialize_read_enter();
-	PSLIST_READER_FOREACH(f, \*[Am]frobbotzim.list, struct frotz, f_entry) {
+	PSLIST_READER_FOREACH(f, \*[Am]frobnitzem.list, struct frotz, f_entry) {
 		if (f->f_key == key) {
 			*datump = f->f_datum;
 			error = 0;
@@ -405,13 +405,13 @@ the memory allocated for it:
 .Bd -literal
 	struct frotz *f = ...;
 
-	mutex_enter(\*[Am]frobbotzim.lock);
+	mutex_enter(\*[Am]frobnitzem.lock);
 	PSLIST_WRITER_REMOVE(f, f_entry);
-	pserialize_perform(\*[Am]frobbotzim.psz);
-	mutex_exit(\*[Am]frobbotzim.lock);
+	pserialize_perform(\*[Am]frobnitzem.psz);
+	mutex_exit(\*[Am]frobnitzem.lock);
 
 	PSLIST_ENTRY_DESTROY(f, f_entry);
-	pool_put(\*[Am]frobbotzim.pool, f);
+	pool_put(\*[Am]frobnitzem.pool, f);
 .Ed
 .\"
 .Sh CODE REFERENCES



CVS commit: src/share/man/man9

2016-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 17:50:54 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Say `loop header', not `loop head'.

`Head' means something else in this context -- a list head.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.10 src/share/man/man9/pslist.9:1.11
--- src/share/man/man9/pslist.9:1.10	Sat Apr  9 17:48:32 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 17:50:54 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.10 2016/04/09 17:48:32 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.11 2016/04/09 17:50:54 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -277,7 +277,7 @@ if there are no elements after
 .Fa element .
 .\
 .It Fn PSLIST_WRITER_FOREACH element head type NAME
-Loop head for iterating over each element
+Loop header for iterating over each element
 .Fa element
 of type
 .Fa type
@@ -327,7 +327,7 @@ if there are no elements after
 .Fa element .
 .\
 .It Fn PSLIST_READER_FOREACH element head type NAME
-Loop head for iterating over each element
+Loop header for iterating over each element
 .Fa element
 of type
 .Fa type



CVS commit: src/share/man/man9

2016-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 17:48:32 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Fix a vestige of an earlier word choice: s/connected/associated/1


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.9 src/share/man/man9/pslist.9:1.10
--- src/share/man/man9/pslist.9:1.9	Sat Apr  9 17:37:55 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 17:48:32 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.9 2016/04/09 17:37:55 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.10 2016/04/09 17:48:32 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -155,7 +155,7 @@ early; see
 .Xr KASSERT 9 .
 .\
 .It Dv PSLIST_ENTRY_INITIALIZER
-Constant initializer for an unconnected
+Constant initializer for an unassociated
 .Vt struct pslist_entry
 object.
 .\



CVS commit: src/share/man/man9

2016-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 17:37:55 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Fix wording around `list heads'.

A list head is not a list, conceptually.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.8 src/share/man/man9/pslist.9:1.9
--- src/share/man/man9/pslist.9:1.8	Sat Apr  9 17:34:57 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 17:37:55 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.8 2016/04/09 17:34:57 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.9 2016/04/09 17:37:55 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -91,10 +91,12 @@ A linked list head must be initialized w
 or
 .Fn PSLIST_INIT
 before it may be used.
-When initialized, a list head is empty.
-A list head should be empty and destroyed with
+When initialized, a list head represents an empty list.
+A list should be empty and destroyed with
 .Fn PSLIST_DESTROY
-before its memory is reused.
+before the
+.Vt struct pslist_head
+object's memory is reused.
 .\"
 .Pp
 Each entry in a linked list is represented by a
@@ -137,12 +139,12 @@ Constant initializer for a
 object.
 .\
 .It Fn PSLIST_INIT head
-Initialize the list head
+Initialize the list headed by
 .Fa head
 to be empty.
 .\
 .It Fn PSLIST_DESTROY head
-Destroy the list head
+Destroy the list headed by
 .Fa head ,
 which must be empty.
 .Pp



CVS commit: src/share/man/man9

2016-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 17:34:57 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Tighten opening paragraph.  Split into two smaller sentences.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.7 src/share/man/man9/pslist.9:1.8
--- src/share/man/man9/pslist.9:1.7	Sat Apr  9 15:09:42 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 17:34:57 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.7 2016/04/09 15:09:42 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.8 2016/04/09 17:34:57 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -72,12 +72,12 @@
 .Sh DESCRIPTION
 The
 .Nm
-data structure is a linked list like the
-.Fn LIST_*
-operations in
-.Xr queue 3 ,
-augmented with memory barriers so that any number of readers can safely
-run in parallel with at most one writer, without needing any
+data structure is a linked list like
+.Nm list
+in
+.Xr queue 3 .
+It is augmented with memory barriers so that any number of readers can
+safely run in parallel with at most one writer, without needing any
 interprocessor synchronization such as locks or atomics on the reader
 side.
 .\"



CVS commit: src/share/man/man9

2016-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 15:09:42 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Use imperative mood consistently.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.6 src/share/man/man9/pslist.9:1.7
--- src/share/man/man9/pslist.9:1.6	Sat Apr  9 15:08:39 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 15:09:42 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.6 2016/04/09 15:08:39 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.7 2016/04/09 15:09:42 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -190,7 +190,7 @@ but no parallel writers.
 .\
 .Bl -tag -width abcd
 .It Fn PSLIST_WRITER_INSERT_HEAD head element NAME
-Inserts the element
+Insert the element
 .Fa element
 at the beginning of the list headed by
 .Fa head ,
@@ -203,7 +203,7 @@ must be a
 object which has been initialized but not inserted.
 .\
 .It Fn PSLIST_WRITER_INSERT_BEFORE element new NAME
-Inserts the element
+Insert the element
 .Fa new
 into a list before the element
 .Fa element .
@@ -219,7 +219,7 @@ must be a
 .Vt struct pslist_entry
 .\
 .It Fn PSLIST_WRITER_INSERT_AFTER element new NAME
-Inserts the element
+Insert the element
 .Fa new
 into a list after the element
 .Fa element .
@@ -235,7 +235,7 @@ must be a
 .Vt struct pslist_entry
 .\
 .It Fn PSLIST_WRITER_REMOVE element NAME
-Removes the element
+Remove the element
 .Fa element
 from the list into which it has been inserted.
 .Pp
@@ -246,7 +246,7 @@ must be a
 object which has been inserted into a list.
 .\
 .It Fn PSLIST_WRITER_FIRST head type NAME
-Returns a pointer to the first element
+Return a pointer to the first element
 .Fa o
 of type
 .Fa type
@@ -259,7 +259,7 @@ or
 if the list is empty.
 .\
 .It Fn PSLIST_WRITER_NEXT element type NAME
-Returns a pointer to the next element
+Return a pointer to the next element
 .Fa o
 of type
 .Fa type
@@ -296,7 +296,7 @@ when the caller is in a passively serial
 .Bl -tag -width abcd
 .\
 .It Fn PSLIST_READER_FIRST head type NAME
-Returns a pointer to the first element
+Return a pointer to the first element
 .Fa o
 of type
 .Fa type
@@ -309,7 +309,7 @@ or
 if the list is empty.
 .\
 .It Fn PSLIST_READER_NEXT element type NAME
-Returns a pointer to the next element
+Return a pointer to the next element
 .Fa o
 of type
 .Fa type



CVS commit: src/share/man/man9

2016-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 15:08:39 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Fix missing NAME operand to PSLIST_ENTRY_DESTROY.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.5 src/share/man/man9/pslist.9:1.6
--- src/share/man/man9/pslist.9:1.5	Sat Apr  9 13:38:20 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 15:08:39 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.5 2016/04/09 13:38:20 uwe Exp $
+.\"	$NetBSD: pslist.9,v 1.6 2016/04/09 15:08:39 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -163,7 +163,7 @@ Initialize the
 object
 .Fa element Ns Li -> Ns Fa NAME .
 .\
-.It Fn PSLIST_ENTRY_DESTROY element
+.It Fn PSLIST_ENTRY_DESTROY element NAME
 Destroy the
 .Vt struct pslist_entry
 object



CVS commit: src/share/man/man9

2016-04-09 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Apr  9 13:38:20 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Use \(em for em-dash.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.4 src/share/man/man9/pslist.9:1.5
--- src/share/man/man9/pslist.9:1.4	Sat Apr  9 13:34:33 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 13:38:20 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.4 2016/04/09 13:34:33 uwe Exp $
+.\"	$NetBSD: pslist.9,v 1.5 2016/04/09 13:38:20 uwe Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -127,7 +127,7 @@ before it may be reused.
 .\"
 .Sh EXCLUSIVE OPERATIONS
 The following operations may be performed on list heads and entries
-when the caller has exclusive access to them -- no parallel writers or
+when the caller has exclusive access to them \(em no parallel writers or
 readers may have access to the same objects.
 .\
 .Bl -tag -width abcd
@@ -185,7 +185,7 @@ early; see
 The following operations may be performed on list heads and entries
 when the caller has exclusive
 .Em write
-access to them -- parallel readers for the same objects are allowed,
+access to them \(em parallel readers for the same objects are allowed,
 but no parallel writers.
 .\
 .Bl -tag -width abcd
@@ -291,7 +291,7 @@ The caller must not modify the list whil
 .\"
 .Sh READER OPERATIONS
 The following operations may be performed on list heads and entries
-when the caller is in a passively serialized read section -- see
+when the caller is in a passively serialized read section \(em see
 .Xr pserialize 9 .
 .Bl -tag -width abcd
 .\



CVS commit: src/share/man/man9

2016-04-09 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Apr  9 13:34:33 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Add couple of missing .Ns


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.3 src/share/man/man9/pslist.9:1.4
--- src/share/man/man9/pslist.9:1.3	Sat Apr  9 06:21:16 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 13:34:33 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.3 2016/04/09 06:21:16 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.4 2016/04/09 13:34:33 uwe Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -161,13 +161,13 @@ object.
 Initialize the
 .Vt struct pslist_entry
 object
-.Fa element Ns Li -> Fa NAME .
+.Fa element Ns Li -> Ns Fa NAME .
 .\
 .It Fn PSLIST_ENTRY_DESTROY element
 Destroy the
 .Vt struct pslist_entry
 object
-.Fa element Ns Li -> Fa NAME .
+.Fa element Ns Li -> Ns Fa NAME .
 Either
 .Fa element
 must never have been inserted into a list, or it must have been



CVS commit: src/share/man/man9

2016-04-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 05:16:23 UTC 2016

Modified Files:
src/share/man/man9: pslist.9

Log Message:
Fix name of example list head.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/pslist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pslist.9
diff -u src/share/man/man9/pslist.9:1.1 src/share/man/man9/pslist.9:1.2
--- src/share/man/man9/pslist.9:1.1	Sat Apr  9 04:39:46 2016
+++ src/share/man/man9/pslist.9	Sat Apr  9 05:16:23 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pslist.9,v 1.1 2016/04/09 04:39:46 riastradh Exp $
+.\"	$NetBSD: pslist.9,v 1.2 2016/04/09 05:16:23 riastradh Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -375,7 +375,7 @@ Create and publish a frotz:
 
 	/* Publish it.  */
 	mutex_enter(\*[Am]frobbotzim.lock);
-	PSLIST_WRITER_INSERT_HEAD(\*[Am]frobbotzim.head, f, f_entry);
+	PSLIST_WRITER_INSERT_HEAD(\*[Am]frobbotzim.list, f, f_entry);
 	mutex_exit(\*[Am]frobbotzim.lock);
 .Ed
 .Pp
@@ -387,7 +387,7 @@ Look up a frotz and return its associate
 	int s;
 
 	s = pserialize_read_enter();
-	PSLIST_READER_FOREACH(f, \*[Am]frobbotzim.head, struct frotz, f_entry) {
+	PSLIST_READER_FOREACH(f, \*[Am]frobbotzim.list, struct frotz, f_entry) {
 		if (f->f_key == key) {
 			*datump = f->f_datum;
 			error = 0;



CVS commit: src/share/man/man9

2016-02-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 15 22:37:54 UTC 2016

Modified Files:
src/share/man/man9: cardbus.9

Log Message:
cardbus autoconf uses cardbus_attach_args, not isapnp_attach_args.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/share/man/man9/cardbus.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/cardbus.9
diff -u src/share/man/man9/cardbus.9:1.19 src/share/man/man9/cardbus.9:1.20
--- src/share/man/man9/cardbus.9:1.19	Sun Jul 13 11:03:26 2014
+++ src/share/man/man9/cardbus.9	Mon Feb 15 22:37:54 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: cardbus.9,v 1.19 2014/07/13 11:03:26 mbalmer Exp $
+.\" $NetBSD: cardbus.9,v 1.20 2016/02/15 22:37:54 riastradh Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -267,7 +267,7 @@ above.
 During autoconfiguration, a
 .Nm
 driver will receive a pointer to
-.Fa struct isapnp_attach_args
+.Fa struct cardbus_attach_args
 describing the device attaches to the CardBus.
 Drivers match the device using the
 .Fa ca_id



CVS commit: src/share/man/man9

2016-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 25 18:20:16 UTC 2016

Modified Files:
src/share/man/man9: vnodeops.9

Log Message:
we don't have va_mask


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/share/man/man9/vnodeops.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/vnodeops.9
diff -u src/share/man/man9/vnodeops.9:1.96 src/share/man/man9/vnodeops.9:1.97
--- src/share/man/man9/vnodeops.9:1.96	Fri Jul 25 04:38:29 2014
+++ src/share/man/man9/vnodeops.9	Mon Jan 25 13:20:16 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: vnodeops.9,v 1.96 2014/07/25 08:38:29 wiz Exp $
+.\" $NetBSD: vnodeops.9,v 1.97 2016/01/25 18:20:16 christos Exp $
 .\"
 .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 21, 2014
+.Dd January 25, 2016
 .Dt VNODEOPS 9
 .Os
 .Sh NAME
@@ -554,9 +554,9 @@ specifies the calling credentials.
 uses the file system type specific data object
 .Em vp-\*[Gt]v_data
 to reference the underlying file attributes.
-Attributes associated with the file are collected by setting the
-required attribute bits in
-.Em vap-\*[Gt]va_mask .
+.\" Attributes associated with the file are collected by setting the
+.\" required attribute bits in
+.\" .Em vap-\*[Gt]va_mask .
 The attributes are returned in
 .Fa vap .
 Attributes which are not available are set to the value VNOVAL.
@@ -585,9 +585,9 @@ uses the file system type specific data 
 to reference the underlying file attributes.
 The new attributes are defined in
 .Fa vap .
-Attributes associated with the file are set by setting the required
-attribute bits in
-.Em vap-\*[Gt]va_mask .
+.\" Attributes associated with the file are set by setting the required
+.\" attribute bits in
+.\" .Em vap-\*[Gt]va_mask .
 Attributes which are not being modified by
 .Fn VOP_SETATTR
 should be set to the value VNOVAL.



CVS commit: src/share/man/man9

2016-01-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jan 26 01:05:17 UTC 2016

Modified Files:
src/share/man/man9: pserialize.9

Log Message:
Suggest the cacheline-aligned global struct idiom.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/pserialize.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pserialize.9
diff -u src/share/man/man9/pserialize.9:1.10 src/share/man/man9/pserialize.9:1.11
--- src/share/man/man9/pserialize.9:1.10	Mon Mar  9 01:55:09 2015
+++ src/share/man/man9/pserialize.9	Tue Jan 26 01:05:17 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pserialize.9,v 1.10 2015/03/09 01:55:09 riastradh Exp $
+.\"	$NetBSD: pserialize.9,v 1.11 2016/01/26 01:05:17 riastradh Exp $
 .\"
 .\" Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 21, 2014
+.Dd January 26, 2016
 .Dt PSERIALIZE 9
 .Os
 .Sh NAME
@@ -81,9 +81,11 @@ Given a global database of frotz records
 		struct frotz	*f_next;
 	};
 
-	kmutex_t frobbotzim_lock;
-	struct frotz *frobbotzim;
-	pserialize_t frobbotzim_psz;
+	static struct {
+		kmutex_t	lock;
+		pserialize_t	psz;
+		struct frotz	*first;
+	} frobbotzim __cacheline_aligned;
 .Ed
 .Pp
 Create a frotz and publish it, as a writer:
@@ -93,15 +95,15 @@ Create a frotz and publish it, as a writ
 	/* Initialize f.  */
 	...
 
-	mutex_enter(\*[Am]frobbotzim_lock);
-	f->f_next = frobbotzim;
+	mutex_enter(\*[Am]frobbotzim.lock);
+	f->f_next = frobbotzim.first;
 	/*
 	 * Publish the contents of f->f_next before we publish the
-	 * pointer to f in frobbotzim.
+	 * pointer to f in frobbotzim.first.
 	 */
 	membar_producer();
-	frobbotzim = f;
-	mutex_exit(\*[Am]frobbotzim_lock);
+	frobbotzim.first = f;
+	mutex_exit(\*[Am]frobbotzim.lock);
 .Ed
 .Pp
 Find a frotz, as a reader:
@@ -111,7 +113,7 @@ Find a frotz, as a reader:
 	int s;
 
 	s = pserialize_read_enter();
-	for (f = frobbotzim; f != NULL; f = f->f_next) {
+	for (f = frobbotzim.first; f != NULL; f = f->f_next) {
 		/* Fetch f before we fetch anything f points to.  */
 		membar_datadep_consumer();
 		if (f->f_... == key) {
@@ -130,8 +132,8 @@ readers:
 .Bd -literal
 	struct frotz **fp, *f;
 
-	mutex_enter(\*[Am]frobbotzim_lock);
-	for (fp = \*[Am]frobbotzim; (f = *fp) != NULL; fp = >f_next) {
+	mutex_enter(\*[Am]frobbotzim.lock);
+	for (fp = \*[Am]frobbotzim.first; (f = *fp) != NULL; fp = >f_next) {
 		if (f->f_... == key) {
 			/*
 			 * Unhook it from the list.  Readers may still
@@ -147,9 +149,9 @@ readers:
 	 * Wait for all existing readers to complete.  New readers will
 	 * not see f because the list no longer points to it.
 	 */
-	pserialize_perform(frobbotzim_psz);
+	pserialize_perform(frobbotzim.psz);
 	/* Now nobody else can be touching f, so it is safe to free.  */
-	mutex_exit(\*[Am]frobbotzim_lock);
+	mutex_exit(\*[Am]frobbotzim.lock);
 
 	if (f != NULL)
 		pool_put(\*[Am]frotz_pool, f);



CVS commit: src/share/man/man9

2016-01-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jan 26 01:09:56 UTC 2016

Modified Files:
src/share/man/man9: pserialize.9

Log Message:
Note limited extent for reference to the pserialized object.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man9/pserialize.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pserialize.9
diff -u src/share/man/man9/pserialize.9:1.11 src/share/man/man9/pserialize.9:1.12
--- src/share/man/man9/pserialize.9:1.11	Tue Jan 26 01:05:17 2016
+++ src/share/man/man9/pserialize.9	Tue Jan 26 01:09:56 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pserialize.9,v 1.11 2016/01/26 01:05:17 riastradh Exp $
+.\"	$NetBSD: pserialize.9,v 1.12 2016/01/26 01:09:56 riastradh Exp $
 .\"
 .\" Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -117,6 +117,13 @@ Find a frotz, as a reader:
 		/* Fetch f before we fetch anything f points to.  */
 		membar_datadep_consumer();
 		if (f->f_... == key) {
+			/*
+			 * Grab whatever part of the frotz we need.
+			 * Note that we can't use the frotz after
+			 * pserialize_read_exit, without a stronger
+			 * kind of reference, say a reference count
+			 * managed by atomic_ops(3).
+			 */
 			*resultp = f->f_...;
 			error = 0;
 			break;



CVS commit: src/share/man/man9

2015-12-13 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Dec 13 21:53:03 UTC 2015

Modified Files:
src/share/man/man9: SET.9

Log Message:
Clarify the meaning of this.  These macros do not operate on bit numbers
as is implied.. the macros are defined as

#define SET(t, f)   ((t) |= (f))
#define ISSET(t, f) ((t) & (f))
#define CLR(t, f)   ((t) &= ~(f))

When the rationale is to provide clarity in the source code, then it
is good to have manual pages that are correct.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/SET.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/SET.9
diff -u src/share/man/man9/SET.9:1.3 src/share/man/man9/SET.9:1.4
--- src/share/man/man9/SET.9:1.3	Wed Mar 12 16:37:01 2014
+++ src/share/man/man9/SET.9	Sun Dec 13 21:53:02 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: SET.9,v 1.3 2014/03/12 16:37:01 jruoho Exp $
+.\" $NetBSD: SET.9,v 1.4 2015/12/13 21:53:02 plunky Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 12, 2014
+.Dd December 13, 2015
 .Dt SET 9
 .Os
 .Sh NAME
@@ -42,26 +42,26 @@
 .Ft void
 .Fn CLR "val" "x"
 .Sh DESCRIPTION
-These macros define three standard bit-operations:
+These macros define three standard bit operations:
 .Bl -enum -offset indent
 .It
 .Fn SET
-sets the bit
+the set bits from
 .Fa x
 in
 .Fa val ;
 .It
 .Fn CLR
-clears the bit
+clears the set bits from
 .Fa x
 in
 .Fa val ;
 and
 .It
 .Fn ISSET
-returns 1 if the bit
+returns true if any of the set bits from
 .Fa x
-is set in
+are set in
 .Fa val .
 .El
 .Sh SEE ALSO



CVS commit: src/share/man/man9

2015-12-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec 13 23:32:52 UTC 2015

Modified Files:
src/share/man/man9: SET.9

Log Message:
Add missing verb.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/SET.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/SET.9
diff -u src/share/man/man9/SET.9:1.4 src/share/man/man9/SET.9:1.5
--- src/share/man/man9/SET.9:1.4	Sun Dec 13 21:53:02 2015
+++ src/share/man/man9/SET.9	Sun Dec 13 23:32:52 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: SET.9,v 1.4 2015/12/13 21:53:02 plunky Exp $
+.\" $NetBSD: SET.9,v 1.5 2015/12/13 23:32:52 wiz Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -46,7 +46,7 @@ These macros define three standard bit o
 .Bl -enum -offset indent
 .It
 .Fn SET
-the set bits from
+sets the set bits from
 .Fa x
 in
 .Fa val ;



CVS commit: src/share/man/man9

2015-12-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Dec 11 10:05:17 UTC 2015

Modified Files:
src/share/man/man9: kmem.9

Log Message:
Whitespace nit.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/kmem.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/kmem.9
diff -u src/share/man/man9/kmem.9:1.18 src/share/man/man9/kmem.9:1.19
--- src/share/man/man9/kmem.9:1.18	Fri Dec 11 04:11:23 2015
+++ src/share/man/man9/kmem.9	Fri Dec 11 10:05:17 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kmem.9,v 1.18 2015/12/11 04:11:23 christos Exp $
+.\"	$NetBSD: kmem.9,v 1.19 2015/12/11 10:05:17 wiz Exp $
 .\"
 .\" Copyright (c)2006 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -78,7 +78,7 @@ Either of the following:
 If the allocation cannot be satisfied immediately, sleep until enough
 memory is available.
 Note that this does not mean that if
-.Dv KM_SLEEP 
+.Dv KM_SLEEP
 is specified, then the allocation cannot fail.
 Under resource stress conditions, the allocation can fail and the
 function will return



CVS commit: src/share/man/man9

2015-12-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 11 04:11:23 UTC 2015

Modified Files:
src/share/man/man9: kmem.9

Log Message:
Spell out that KM_SLEEP allocations can fail.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/share/man/man9/kmem.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/kmem.9
diff -u src/share/man/man9/kmem.9:1.17 src/share/man/man9/kmem.9:1.18
--- src/share/man/man9/kmem.9:1.17	Tue Jul 28 05:52:43 2015
+++ src/share/man/man9/kmem.9	Thu Dec 10 23:11:23 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kmem.9,v 1.17 2015/07/28 09:52:43 wiz Exp $
+.\"	$NetBSD: kmem.9,v 1.18 2015/12/11 04:11:23 christos Exp $
 .\"
 .\" Copyright (c)2006 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" 
-.Dd July 28, 2015
+.Dd December 10, 2015
 .Dt KMEM 9
 .Os
 .\" 
@@ -77,6 +77,15 @@ Either of the following:
 .It Dv KM_SLEEP
 If the allocation cannot be satisfied immediately, sleep until enough
 memory is available.
+Note that this does not mean that if
+.Dv KM_SLEEP 
+is specified, then the allocation cannot fail.
+Under resource stress conditions, the allocation can fail and the
+function will return
+.Dv NULL .
+One such scenario is when the allocation size is larger than it can ever
+be allocated; another is when the system memory resources are exhausted
+to even allocate pools of pages.
 .It Dv KM_NOSLEEP
 Don't sleep.
 Immediately return
@@ -134,6 +143,9 @@ It must be the one returned by
 .Fn kmem_alloc
 or
 .Fn kmem_zalloc .
+One such scenario is when the allocation size is larger than it can ever
+be allocated; another is when the system memory resources are exhausted
+to even allocate pools of pages.
 .It Fa size
 The size of the memory being freed, in bytes.
 It must be the same as the
@@ -173,6 +185,10 @@ It should be noted that
 .Fn kmem_free
 may also block.
 .Pp
+Always check the return value of the allocators, even when
+.Dv KM_SLEEP
+is specified to avoid kernel crashes during resource stress conditions.
+.Pp
 For some locks this is permissible or even unavoidable.
 For others, particularly locks that may be taken from soft interrupt context,
 it is a serious problem.



CVS commit: src/share/man/man9

2015-12-01 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Dec  1 12:07:41 UTC 2015

Modified Files:
src/share/man/man9: cpufreq.9

Log Message:
There is no user space control for this with cpuctl(8) as far as I can tell. 
Remove all references to it.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/cpufreq.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/cpufreq.9
diff -u src/share/man/man9/cpufreq.9:1.6 src/share/man/man9/cpufreq.9:1.7
--- src/share/man/man9/cpufreq.9:1.6	Thu Oct 27 05:25:08 2011
+++ src/share/man/man9/cpufreq.9	Tue Dec  1 12:07:41 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: cpufreq.9,v 1.6 2011/10/27 05:25:08 jruoho Exp $ */
+.\" $NetBSD: cpufreq.9,v 1.7 2015/12/01 12:07:41 jmcneill Exp $ */
 .\"
 .\" Copyright (c) 2011 Jukka Ruohonen 
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 27, 2011
+.Dd December 1, 2015
 .Dt CPUFREQ 9
 .Os
 .Sh NAME
@@ -73,8 +73,6 @@ The machine-independent
 interface provides a framework for
 .Tn CPU
 frequency scaling done by a machine-dependent backend implementation.
-User space control is available via
-.Xr cpuctl 8 .
 .Pp
 The
 .Nm
@@ -288,7 +286,6 @@ The
 interface is implemented within
 .Pa sys/kern/subr_cpufreq.c .
 .Sh SEE ALSO
-.Xr cpuctl 8 ,
 .Xr pmf 9 ,
 .Xr xcall 9
 .Rs



CVS commit: src/share/man/man9

2015-10-26 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 26 09:06:52 UTC 2015

Modified Files:
src/share/man/man9: kernhist.9

Log Message:
Various fixes and improvements.

Guess what the end of a sentence could be.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/kernhist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/kernhist.9
diff -u src/share/man/man9/kernhist.9:1.1 src/share/man/man9/kernhist.9:1.2
--- src/share/man/man9/kernhist.9:1.1	Mon Oct 26 07:07:36 2015
+++ src/share/man/man9/kernhist.9	Mon Oct 26 09:06:52 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kernhist.9,v 1.1 2015/10/26 07:07:36 mrg Exp $
+.\"	$NetBSD: kernhist.9,v 1.2 2015/10/26 09:06:52 wiz Exp $
 .\"
 .\" Copyright (c) 2015 Matthew R. Green
 .\" All rights reserved.
@@ -59,7 +59,7 @@ Below are the functions and macros provi
 .Sh DESCRIPTION
 The
 .Nm
-facility provides a very low-level tracing facility, that can be called
+facility provides a very low-level tracing facility that can be called
 extremely early in the kernel initialisation.
 It provides a simple restricted
 .Xr printf 3
@@ -76,10 +76,10 @@ Arguments that require additional derefe
 will not work in
 .Xr vmstat 1 ,
 but will when called from
-.Xr ddb 9 .
+.Xr ddb 4 .
 .Pp
 A kernel history is a fixed-size buffer of an either statically or dynamically
-allocated buffer, that is used and read in a cycled basis.
+allocated buffer that is used and read in a cycled basis.
 It includes the time an entry was made, the CPU that the entry was recorded
 from, the
 .Xr printf 3
@@ -89,13 +89,15 @@ for this function, and the 4 argumnts.
 These macros provide access to most kernel history functionality:
 .Bl -tag -width 4n
 .It Fn KERNHIST_DECL name
-Declares an extern struct kern_history
+Declare an extern struct kern_history
 .Fa name .
 .It Fn KERNHIST_DEFINE name
-Defines a struct kern_history
+Define a struct kern_history
 .Fa name .
 .It Fn KERNHIST_INIT name num_entries
-Dynamically initialise a kernel history called name with 
+Dynamically initialise a kernel history called name with
+.Ar num_entries
+entries.
 .It Fn KERNHIST_INITIALIZER name buffer
 Initialise a statically defined kernel history called
 .Fa name
@@ -109,7 +111,7 @@ using the statically allocated
 .Fa buffer
 for history entries.
 .It Fn KERNHIST_FUNC fname
-Declares necessary variables for
+Declare necessary variables for
 .Nm
 to be used this function.
 Callable only once per function.
@@ -118,7 +120,8 @@ For the given kernel history
 .Fa name ,
 log the format and arguments in the history as a unique event.
 .It Fn KERNHIST_CALLED name
-Declares a function as being called.  Either this or
+Declare a function as being called.
+Either this or
 .Fn KERNHIST_CALLARGS
 must be used near the function entry point.
 .It Fn KERNHIST_CALLARGS name fmt arg0 arg1 arg2 arg3
@@ -128,7 +131,7 @@ that avoids that
 .Dq called!
 log message in addition to normal arguments.
 .It Fn KERNHIST_DUMP name
-Calls
+Call
 .Fn kernhist_dump
 on the named kernel history.
 .It Fn kernhist_dump history
@@ -152,12 +155,12 @@ argument is currently ignored.
 .El
 .Sh SEE ALSO
 .Xr vmstat 1 ,
-.Xr usb 9 ,
+.Xr usb 4 ,
 .Xr uvm 9
 .\" .Sh EXAMPLES
 .\"
 .\" add example here of code usage
-.\" 
+.\"
 .Sh HISTORY
 .Nm
 was originally written by



CVS commit: src/share/man/man9

2015-10-26 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Oct 26 17:23:00 UTC 2015

Modified Files:
src/share/man/man9: kernhist.9

Log Message:
oops, i really did mean a section 9 reference for usb -- but as usbdi(9).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/kernhist.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/kernhist.9
diff -u src/share/man/man9/kernhist.9:1.2 src/share/man/man9/kernhist.9:1.3
--- src/share/man/man9/kernhist.9:1.2	Mon Oct 26 09:06:52 2015
+++ src/share/man/man9/kernhist.9	Mon Oct 26 17:23:00 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kernhist.9,v 1.2 2015/10/26 09:06:52 wiz Exp $
+.\"	$NetBSD: kernhist.9,v 1.3 2015/10/26 17:23:00 mrg Exp $
 .\"
 .\" Copyright (c) 2015 Matthew R. Green
 .\" All rights reserved.
@@ -155,7 +155,7 @@ argument is currently ignored.
 .El
 .Sh SEE ALSO
 .Xr vmstat 1 ,
-.Xr usb 4 ,
+.Xr usbdi 9 ,
 .Xr uvm 9
 .\" .Sh EXAMPLES
 .\"



CVS commit: src/share/man/man9

2015-10-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Oct 13 08:44:54 UTC 2015

Modified Files:
src/share/man/man9: pci_intr.9

Log Message:
Add return type for pci_intr_setattr to SYNOPSIS. Add missing comma.

XXX: return values for pci_intr_setattr are not documented.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/share/man/man9/pci_intr.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_intr.9
diff -u src/share/man/man9/pci_intr.9:1.21 src/share/man/man9/pci_intr.9:1.22
--- src/share/man/man9/pci_intr.9:1.21	Tue Oct 13 04:34:38 2015
+++ src/share/man/man9/pci_intr.9	Tue Oct 13 08:44:54 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci_intr.9,v 1.21 2015/10/13 04:34:38 msaitoh Exp $
+.\" $NetBSD: pci_intr.9,v 1.22 2015/10/13 08:44:54 wiz Exp $
 .\"
 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -36,7 +36,7 @@
 .Nm pci_intr_string ,
 .Nm pci_intr_evcnt ,
 .Nm pci_intr_establish ,
-.Nm pci_intr_disestablish
+.Nm pci_intr_disestablish ,
 .Nm pci_intr_setattr
 .Nd PCI bus interrupt manipulation functions
 .Sh SYNOPSIS
@@ -52,6 +52,7 @@
 "int ipl" "int (*intrhand)(void *)" "void *intrarg"
 .Ft void
 .Fn pci_intr_disestablish "pci_chipset_tag_t pc" "void *ih"
+.Ft int
 .Fn pci_intr_setattr "pci_chipset_tag_t pc" "pci_intr_handle_t *ih" "int attr" "uint64_t data"
 .Sh DESCRIPTION
 The



CVS commit: src/share/man/man9

2015-10-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Oct 13 09:21:56 UTC 2015

Modified Files:
src/share/man/man9: pci_intr.9

Log Message:
 Add note about the return values of pci_intr_setattr(). Found by wizd(8).


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/share/man/man9/pci_intr.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_intr.9
diff -u src/share/man/man9/pci_intr.9:1.22 src/share/man/man9/pci_intr.9:1.23
--- src/share/man/man9/pci_intr.9:1.22	Tue Oct 13 08:44:54 2015
+++ src/share/man/man9/pci_intr.9	Tue Oct 13 09:21:56 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci_intr.9,v 1.22 2015/10/13 08:44:54 wiz Exp $
+.\" $NetBSD: pci_intr.9,v 1.23 2015/10/13 09:21:56 msaitoh Exp $
 .\"
 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -132,6 +132,10 @@ The default is
 .El
 .Pp
 The
+.Fn pci_intr_setattr
+function returns zero on success, and nonzero on failure.
+.Pp
+The
 .Fn pci_intr_evcnt
 function should return an evcnt structure pointer or
 .Dv NULL



CVS commit: src/share/man/man9

2015-10-12 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Oct 13 04:22:24 UTC 2015

Modified Files:
src/share/man/man9: workqueue.9

Log Message:
Semicolon, not comma; use future tense more Englishly.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/workqueue.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/workqueue.9
diff -u src/share/man/man9/workqueue.9:1.10 src/share/man/man9/workqueue.9:1.11
--- src/share/man/man9/workqueue.9:1.10	Mon Oct 24 07:27:09 2011
+++ src/share/man/man9/workqueue.9	Tue Oct 13 04:22:24 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: workqueue.9,v 1.10 2011/10/24 07:27:09 yamt Exp $
+.\"	$NetBSD: workqueue.9,v 1.11 2015/10/13 04:22:24 riastradh Exp $
 .\"
 .\" Copyright (c)2005 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -80,8 +80,8 @@ The value of 0 indicates a standard crea
 flags may be bitwise ORed together:
 .Bl -tag -width WQ_MPSAFE
 .It Dv WQ_MPSAFE
-Specifies that the workqueue is multiprocessor safe and does its own locking,
-otherwise the kernel lock will be held while work will be processed.
+Specifies that the workqueue is multiprocessor safe and does its own locking;
+otherwise the kernel lock will be held while processing work.
 .It Dv WQ_PERCPU
 Specifies that the workqueue should have a separate queue for each CPU,
 thus the work could be enqueued on concrete CPUs.



CVS commit: src/share/man/man9

2015-10-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Oct 13 04:34:38 UTC 2015

Modified Files:
src/share/man/man9: pci_intr.9

Log Message:
 Add missing pci_intr_setattr(). The function first appeared in NetBSD 5.0.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/pci_intr.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_intr.9
diff -u src/share/man/man9/pci_intr.9:1.20 src/share/man/man9/pci_intr.9:1.21
--- src/share/man/man9/pci_intr.9:1.20	Thu Aug  6 06:56:00 2015
+++ src/share/man/man9/pci_intr.9	Tue Oct 13 04:34:38 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci_intr.9,v 1.20 2015/08/06 06:56:00 wiz Exp $
+.\" $NetBSD: pci_intr.9,v 1.21 2015/10/13 04:34:38 msaitoh Exp $
 .\"
 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 4, 2015
+.Dd October 13, 2015
 .Dt PCI_INTR 9
 .Os
 .Sh NAME
@@ -37,6 +37,7 @@
 .Nm pci_intr_evcnt ,
 .Nm pci_intr_establish ,
 .Nm pci_intr_disestablish
+.Nm pci_intr_setattr
 .Nd PCI bus interrupt manipulation functions
 .Sh SYNOPSIS
 .In dev/pci/pcivar.h
@@ -51,6 +52,7 @@
 "int ipl" "int (*intrhand)(void *)" "void *intrarg"
 .Ft void
 .Fn pci_intr_disestablish "pci_chipset_tag_t pc" "void *ih"
+.Fn pci_intr_setattr "pci_chipset_tag_t pc" "pci_intr_handle_t *ih" "int attr" "uint64_t data"
 .Sh DESCRIPTION
 The
 .Nm
@@ -111,6 +113,24 @@ to disable the interrupt handler
 when the driver is no longer interested in interrupts from the device.
 .Pp
 The
+.Fn pci_intr_setattr
+function sets an attribute
+.Fa attr
+of the interrupt handler to
+.Fa data .
+Currenty, only the following attribute is supported:
+.Bl -tag -width PCI_INTR_MPSAFE
+.It Dv PCI_INTR_MPSAFE
+If this attribute is set to
+.Dv true ,
+it specifies that the interrupt handler is multiprocessor safe and works its
+own locking; otherwise the kernel lock will be held for the call to the
+interrupt handler.
+The default is
+.Dv false .
+.El
+.Pp
+The
 .Fn pci_intr_evcnt
 function should return an evcnt structure pointer or
 .Dv NULL



CVS commit: src/share/man/man9

2015-10-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Oct  4 12:10:51 UTC 2015

Modified Files:
src/share/man/man9: pci.9

Log Message:
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/share/man/man9/pci.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci.9
diff -u src/share/man/man9/pci.9:1.42 src/share/man/man9/pci.9:1.43
--- src/share/man/man9/pci.9:1.42	Fri Oct  2 05:22:49 2015
+++ src/share/man/man9/pci.9	Sun Oct  4 12:10:51 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci.9,v 1.42 2015/10/02 05:22:49 msaitoh Exp $
+.\" $NetBSD: pci.9,v 1.43 2015/10/04 12:10:51 wiz Exp $
 .\"
 .\" Copyright (c) 2001, 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 14, 2015
+.Dd October 2, 2015
 .Dt PCI 9
 .Os
 .Sh NAME



CVS commit: src/share/man/man9

2015-10-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Oct  4 22:51:19 UTC 2015

Modified Files:
src/share/man/man9: module.9

Log Message:
Minor tweaks, from Michael McConville


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/share/man/man9/module.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.37 src/share/man/man9/module.9:1.38
--- src/share/man/man9/module.9:1.37	Thu Jun  4 01:58:30 2015
+++ src/share/man/man9/module.9	Sun Oct  4 22:51:19 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: module.9,v 1.37 2015/06/04 01:58:30 pgoyette Exp $
+.\"	$NetBSD: module.9,v 1.38 2015/10/04 22:51:19 pgoyette Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 18, 2011
+.Dd October 5, 2015
 .Dt MODULE 9
 .Os
 .Sh NAME
@@ -74,8 +74,9 @@ the kernel and reboot.
 Modules can be loaded from within the kernel image, provided by the boot
 loader, or loaded from the file system.
 .Pp
-Two data types are relevant for
-.Nm :
+The
+.Nm
+subsystem includes two data types:
 .Bl -enum -offset indent
 .It
 The
@@ -84,10 +85,13 @@ type provides storage to describe a modu
 .It
 The
 .Vt modinfo_t
-type resides within the module itself, and contains module header info.
+type resides within
+.Vt module_t
+and contains module header info.
 .El
 .Pp
-The module subsystem is protected by the global kernconfig_mutex.
+The module subsystem is protected by the global
+.Va kernconfig_mutex .
 .Sh FUNCTIONS
 .Bl -tag -width abcd
 .It Fn MODULE "class" "name" "required"



CVS commit: src/share/man/man9

2015-08-15 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 15 10:18:07 UTC 2015

Modified Files:
src/share/man/man9: pool.9

Log Message:
Remove POOL_INIT() (does not exist).


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/share/man/man9/pool.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pool.9
diff -u src/share/man/man9/pool.9:1.44 src/share/man/man9/pool.9:1.45
--- src/share/man/man9/pool.9:1.44	Mon Nov 14 02:38:05 2011
+++ src/share/man/man9/pool.9	Sat Aug 15 10:18:07 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: pool.9,v 1.44 2011/11/14 02:38:05 jym Exp $
+.\	$NetBSD: pool.9,v 1.45 2015/08/15 10:18:07 maxv Exp $
 .\
 .\ Copyright (c) 1997, 1998, 2007 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 14, 2011
+.Dd August 15, 2015
 .Dt POOL 9
 .Os
 .Sh NAME
@@ -125,17 +125,6 @@ when the pool will never be accessed fro
 .It Fa ipl
 Specifies an interrupt priority level that will block all interrupt
 handlers that could potentially access the pool.
-.El
-.Pp
-The
-.Fn POOL_INIT
-macro can be used to both declare and initialize a resource pool.
-The
-.Fn POOL_INIT
-macro has the same arguments as the
-.Fn pool_init
-function and the resource pool will be initialized automatically
-during system startup.
 .Ss DESTROYING A POOL
 The function
 .Fn pool_destroy



CVS commit: src/share/man/man9

2015-08-15 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 15 10:31:41 UTC 2015

Modified Files:
src/share/man/man9: uvm_km.9

Log Message:
Mention UVM_KMF_EXEC.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/uvm_km.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/uvm_km.9
diff -u src/share/man/man9/uvm_km.9:1.4 src/share/man/man9/uvm_km.9:1.5
--- src/share/man/man9/uvm_km.9:1.4	Thu Jan  8 23:43:11 2015
+++ src/share/man/man9/uvm_km.9	Sat Aug 15 10:31:41 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: uvm_km.9,v 1.4 2015/01/08 23:43:11 riastradh Exp $
+.\	$NetBSD: uvm_km.9,v 1.5 2015/08/15 10:31:41 maxv Exp $
 .\
 .\ Copyright (c) 1998 Matthew R. Green
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd June 3, 2011
+.Dd August 15, 2015
 .Dt UVM_KM 9
 .Os
 .Sh NAME
@@ -91,6 +91,8 @@ Request zero-filled memory.
 Only supported for
 .Dv UVM_KMF_WIRED .
 Should not be used with other types.
+.It UVM_KMF_EXEC
+Request memory with executable rights.
 .It UVM_KMF_TRYLOCK
 Fail if cannot lock the map without sleeping.
 .It UVM_KMF_NOWAIT



CVS commit: src/share/man/man9

2015-08-15 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Aug 15 16:39:58 UTC 2015

Modified Files:
src/share/man/man9: pci.9

Log Message:
Mark up NULL with Dv.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/share/man/man9/pci.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci.9
diff -u src/share/man/man9/pci.9:1.40 src/share/man/man9/pci.9:1.41
--- src/share/man/man9/pci.9:1.40	Fri Aug 14 06:48:11 2015
+++ src/share/man/man9/pci.9	Sat Aug 15 16:39:58 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci.9,v 1.40 2015/08/14 06:48:11 knakahara Exp $
+.\ $NetBSD: pci.9,v 1.41 2015/08/15 16:39:58 wiz Exp $
 .\
 .\ Copyright (c) 2001, 2003 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -450,11 +450,15 @@ capability
 .Fa capid .
 If
 .Fa offsetp
-is not NULL, the register offset in configuration space is returned in
+is not
+.Dv NULL ,
+the register offset in configuration space is returned in
 .Fa offsetp .
 If
 .Fa valuep
-is not NULL, the value of the capability is returned in
+is not
+.Dv NULL ,
+the value of the capability is returned in
 .Fa valuep .
 The argument
 .Fa tag
@@ -472,11 +476,15 @@ space looking for capability
 .Fa capid .
 If
 .Fa offsetp
-is not NULL, the register offset in configuration space is returned in
+is not
+.Dv NULL ,
+the register offset in configuration space is returned in
 .Fa offsetp .
 If
 .Fa valuep
-is not NULL, the value of the capability is returned in
+is not
+.Dv NULL ,
+the value of the capability is returned in
 .Fa valuep .
 The argument
 .Fa tag
@@ -563,7 +571,9 @@ If any of
 .Fa basep ,
 or
 .Fa sizep
-are NULL then
+are
+.Dv NULL
+then
 .Fn pci_mapreg_map
 does not define their return value.
 This function returns zero on success and non-zero on error.



CVS commit: src/share/man/man9

2015-08-14 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Aug 14 06:48:11 UTC 2015

Modified Files:
src/share/man/man9: pci.9

Log Message:
fix pci_get_ht_capability(9).


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/share/man/man9/pci.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci.9
diff -u src/share/man/man9/pci.9:1.39 src/share/man/man9/pci.9:1.40
--- src/share/man/man9/pci.9:1.39	Fri Aug 14 02:04:16 2015
+++ src/share/man/man9/pci.9	Fri Aug 14 06:48:11 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci.9,v 1.39 2015/08/14 02:04:16 knakahara Exp $
+.\ $NetBSD: pci.9,v 1.40 2015/08/14 06:48:11 knakahara Exp $
 .\
 .\ Copyright (c) 2001, 2003 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -102,7 +102,7 @@
 int capid int *offsetp pcireg_t *valuep
 .Ft int
 .Fn pci_get_ht_capability pci_chipset_tag_t pc pcitag_t tag \
-int *offsetp pcireg_t *valuep
+int capid int *offsetp pcireg_t *valuep
 .Ft pcireg_t
 .Fn pci_mapreg_type pci_chipset_tag_t pc pcitag_t tag int reg
 .Ft int
@@ -466,10 +466,28 @@ If the capability was not found, it retu
 and
 .Fa valuep
 remain unchanged.
-.It Fn pci_get_ht_capability pc tag offsetp valuep
-This function is about the same as
-.Fn pci_get_capability .
-This function specializes in HyperTransport capability.
+.It Fn pci_get_ht_capability pc tag capid offsetp valuep
+Parse the device capability list in HyperTransport configuration
+space looking for capability
+.Fa capid .
+If
+.Fa offsetp
+is not NULL, the register offset in configuration space is returned in
+.Fa offsetp .
+If
+.Fa valuep
+is not NULL, the value of the capability is returned in
+.Fa valuep .
+The argument
+.Fa tag
+is the PCI tag for the current device attached to PCI chipset
+.Fa pc .
+This function returns 1 if the capability was found.
+If the capability was not found, it returns zero, and
+.Fa offsetp
+and
+.Fa valuep
+remain unchanged.
 .It Fn pci_mapreg_type pc tag reg
 Interrogates the Base Address Register (BAR) in configuration space
 specified by



CVS commit: src/share/man/man9

2015-08-13 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Aug 14 02:04:16 UTC 2015

Modified Files:
src/share/man/man9: Makefile pci.9

Log Message:
Add pci_get_ht_capability(9) man.


To generate a diff of this commit:
cvs rdiff -u -r1.389 -r1.390 src/share/man/man9/Makefile
cvs rdiff -u -r1.38 -r1.39 src/share/man/man9/pci.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.389 src/share/man/man9/Makefile:1.390
--- src/share/man/man9/Makefile:1.389	Tue Jul 21 03:12:50 2015
+++ src/share/man/man9/Makefile	Fri Aug 14 02:04:16 2015
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.389 2015/07/21 03:12:50 knakahara Exp $
+#   $NetBSD: Makefile,v 1.390 2015/08/14 02:04:16 knakahara Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -558,6 +558,7 @@ MLINKS+=pci.9 pci_conf_read.9 \
 	pci.9 pci_conf_print.9 \
 	pci.9 pci_find_device.9 \
 	pci.9 pci_get_capability.9 \
+	pci.9 pci_get_ht_capability.9 \
 	pci.9 pci_mapreg_type.9 \
 	pci.9 pci_mapreg_map.9 \
 	pci.9 pci_mapreg_info.9 \

Index: src/share/man/man9/pci.9
diff -u src/share/man/man9/pci.9:1.38 src/share/man/man9/pci.9:1.39
--- src/share/man/man9/pci.9:1.38	Mon Oct 27 14:41:42 2014
+++ src/share/man/man9/pci.9	Fri Aug 14 02:04:16 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci.9,v 1.38 2014/10/27 14:41:42 wiz Exp $
+.\ $NetBSD: pci.9,v 1.39 2015/08/14 02:04:16 knakahara Exp $
 .\
 .\ Copyright (c) 2001, 2003 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd October 27, 2014
+.Dd August 14, 2015
 .Dt PCI 9
 .Os
 .Sh NAME
@@ -43,6 +43,7 @@
 .Nm pci_conf_restore ,
 .Nm pci_find_device ,
 .Nm pci_get_capability ,
+.Nm pci_get_ht_capability ,
 .Nm pci_mapreg_type ,
 .Nm pci_mapreg_map ,
 .Nm pci_mapreg_info ,
@@ -99,6 +100,9 @@
 .Ft int
 .Fn pci_get_capability pci_chipset_tag_t pc pcitag_t tag \
 int capid int *offsetp pcireg_t *valuep
+.Ft int
+.Fn pci_get_ht_capability pci_chipset_tag_t pc pcitag_t tag \
+int *offsetp pcireg_t *valuep
 .Ft pcireg_t
 .Fn pci_mapreg_type pci_chipset_tag_t pc pcitag_t tag int reg
 .Ft int
@@ -462,6 +466,10 @@ If the capability was not found, it retu
 and
 .Fa valuep
 remain unchanged.
+.It Fn pci_get_ht_capability pc tag offsetp valuep
+This function is about the same as
+.Fn pci_get_capability .
+This function specializes in HyperTransport capability.
 .It Fn pci_mapreg_type pc tag reg
 Interrogates the Base Address Register (BAR) in configuration space
 specified by



CVS commit: src/share/man/man9

2015-08-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 13 05:01:04 UTC 2015

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
 Change pci_msi[x]_count()'s argument.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/pci_msi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.6 src/share/man/man9/pci_msi.9:1.7
--- src/share/man/man9/pci_msi.9:1.6	Fri Jul 24 07:40:58 2015
+++ src/share/man/man9/pci_msi.9	Thu Aug 13 05:01:04 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci_msi.9,v 1.6 2015/07/24 07:40:58 knakahara Exp $
+.\ $NetBSD: pci_msi.9,v 1.7 2015/08/13 05:01:04 msaitoh Exp $
 .\
 .\ Copyright (c) 2015 Internet Initiative Japan Inc.
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd July 15, 2015
+.Dd August 13, 2015
 .Dt PCI_MSI 9
 .Os
 .Sh NAME
@@ -44,7 +44,8 @@
 .Nd PCI MSI{,-X} manipulation functions
 .Sh SYNOPSIS
 .Ft int
-.Fn pci_msi_count struct pci_attach_args *pa
+.Fn pci_msi_count pci_chipset_tag_t pc \
+pcitag_t tag
 .Ft int
 .Fn pci_msi_alloc  struct pci_attach_args *pa \
 pci_intr_handle_t **ihps int *count
@@ -52,7 +53,8 @@
 .Fn pci_msi_alloc_exect struct pci_attach_args *pa \
 pci_intr_handle_t **ihps int count
 .Ft int
-.Fn pci_msix_count struct pci_attach_args *pa
+.Fn pci_msix_count pci_chipset_tag_t pc \
+pcitag_t tag
 .Ft int
 .Fn pci_msix_alloc  struct pci_attach_args *pa \
 pci_intr_handle_t **ihps int *count



CVS commit: src/share/man/man9

2015-08-07 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug  7 13:56:48 UTC 2015

Modified Files:
src/share/man/man9: malloc.9

Log Message:
Remove KMEMSTATS.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/share/man/man9/malloc.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/malloc.9
diff -u src/share/man/man9/malloc.9:1.52 src/share/man/man9/malloc.9:1.53
--- src/share/man/man9/malloc.9:1.52	Sat May 23 17:05:03 2015
+++ src/share/man/man9/malloc.9	Fri Aug  7 13:56:48 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: malloc.9,v 1.52 2015/05/23 17:05:03 maxv Exp $
+.\	$NetBSD: malloc.9,v 1.53 2015/08/07 13:56:48 maxv Exp $
 .\
 .\ Copyright (c) 1996, 2003 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd May 23, 2015
+.Dd August 7, 2015
 .Dt MALLOC 9
 .Os
 .Sh NAME
@@ -249,19 +249,6 @@ Misc temporary data buffers.
 Other malloc types are defined by the corresponding subsystem; see the
 documentation for that subsystem for information its available malloc
 types.
-.Pp
-Statistics based on the
-.Fa type
-argument are maintained only if the kernel option
-.Dv KMEMSTATS
-is used when compiling the kernel
-.Po
-the default in current
-.Nx
-kernels
-.Pc
-and can be examined by using
-.Sq vmstat -m .
 .Sh RETURN VALUES
 .Fn malloc
 returns a kernel virtual address that is suitably aligned for storage of



CVS commit: src/share/man/man9

2015-08-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Aug  6 06:56:00 UTC 2015

Modified Files:
src/share/man/man9: pci_intr.9

Log Message:
Use Dv for NULL, remove dot at end of SEE ALSO


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/share/man/man9/pci_intr.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_intr.9
diff -u src/share/man/man9/pci_intr.9:1.19 src/share/man/man9/pci_intr.9:1.20
--- src/share/man/man9/pci_intr.9:1.19	Wed Aug  5 07:00:34 2015
+++ src/share/man/man9/pci_intr.9	Thu Aug  6 06:56:00 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci_intr.9,v 1.19 2015/08/05 07:00:34 mrg Exp $
+.\ $NetBSD: pci_intr.9,v 1.20 2015/08/06 06:56:00 wiz Exp $
 .\
 .\ Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -112,8 +112,9 @@ when the driver is no longer interested 
 .Pp
 The
 .Fn pci_intr_evcnt
-function should return an evcnt structure pointer or NULL if there is
-no evcnt associated with this interrupt.
+function should return an evcnt structure pointer or
+.Dv NULL
+if there is no evcnt associated with this interrupt.
 See
 .Xr evcnt 9
 for more details.
@@ -160,4 +161,4 @@ contains the PCI tag of the device itsel
 contains the PCI tag of the uppermost bridge device.
 .Sh SEE ALSO
 .Xr evcnt 9 ,
-.Xr pci 9 .
+.Xr pci 9



CVS commit: src/share/man/man9

2015-08-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Aug  5 07:00:34 UTC 2015

Modified Files:
src/share/man/man9: pci_intr.9

Log Message:
document pci_intr_evcnt()


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/pci_intr.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_intr.9
diff -u src/share/man/man9/pci_intr.9:1.18 src/share/man/man9/pci_intr.9:1.19
--- src/share/man/man9/pci_intr.9:1.18	Wed Feb 25 17:03:42 2015
+++ src/share/man/man9/pci_intr.9	Wed Aug  5 07:00:34 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci_intr.9,v 1.18 2015/02/25 17:03:42 riastradh Exp $
+.\ $NetBSD: pci_intr.9,v 1.19 2015/08/05 07:00:34 mrg Exp $
 .\
 .\ Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,13 +27,14 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd February 25, 2015
+.Dd August 4, 2015
 .Dt PCI_INTR 9
 .Os
 .Sh NAME
 .Nm pci_intr ,
 .Nm pci_intr_map ,
 .Nm pci_intr_string ,
+.Nm pci_intr_evcnt ,
 .Nm pci_intr_establish ,
 .Nm pci_intr_disestablish
 .Nd PCI bus interrupt manipulation functions
@@ -43,6 +44,8 @@
 .Fn pci_intr_map const struct pci_attach_args *pa pci_intr_handle_t *ih
 .Ft const char *
 .Fn pci_intr_string pci_chipset_tag_t pc pci_intr_handle_t ih char *buf size_t len
+.Ft const struct evcnt *
+.Fn pci_intr_evcnt pci_chipset_tag_t pc pci_intr_handle_t ih
 .Ft void *
 .Fn pci_intr_establish pci_chipset_tag_t pc pci_intr_handle_t ih \
 int ipl int (*intrhand)(void *) void *intrarg
@@ -106,6 +109,14 @@ may be saved and passed to
 .Fn pci_intr_disestablish
 to disable the interrupt handler
 when the driver is no longer interested in interrupts from the device.
+.Pp
+The
+.Fn pci_intr_evcnt
+function should return an evcnt structure pointer or NULL if there is
+no evcnt associated with this interrupt.
+See
+.Xr evcnt 9
+for more details.
 .Ss PORTING
 A port's implementation of
 .Fn pci_intr_map
@@ -147,3 +158,6 @@ contains the original interrupt pin;
 contains the PCI tag of the device itself, and
 .Ft pa_intrtag
 contains the PCI tag of the uppermost bridge device.
+.Sh SEE ALSO
+.Xr evcnt 9 ,
+.Xr pci 9 .



CVS commit: src/share/man/man9

2015-07-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul 28 08:59:48 UTC 2015

Modified Files:
src/share/man/man9: kmem.9

Log Message:
Document KMEM_SIZE, KMEM_REDZONE and KMEM_GUARD.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/kmem.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/kmem.9
diff -u src/share/man/man9/kmem.9:1.14 src/share/man/man9/kmem.9:1.15
--- src/share/man/man9/kmem.9:1.14	Tue Nov 26 20:47:26 2013
+++ src/share/man/man9/kmem.9	Tue Jul 28 08:59:47 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: kmem.9,v 1.14 2013/11/26 20:47:26 rmind Exp $
+.\	$NetBSD: kmem.9,v 1.15 2015/07/28 08:59:47 maxv Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -25,7 +25,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ 
-.Dd November 26, 2013
+.Dd July 28, 2015
 .Dt KMEM 9
 .Os
 .\ 
@@ -61,7 +61,9 @@
 const char *fmt ...
 .\ 
 .Pp
-.Cd options DEBUG
+.Cd options KMEM_SIZE
+.Cd options KMEM_REDZONE
+.Cd options KMEM_GUARD
 .Sh DESCRIPTION
 .Fn kmem_alloc
 allocates kernel wired memory.
@@ -204,15 +206,70 @@ For example:
 .Ed
 .\ 
 .Sh OPTIONS
+.Ss KMEM_SIZE
 Kernels compiled with the
-.Dv DEBUG
-option perform CPU intensive sanity checks on kmem operations,
-and include the
-.Dv kmguard
-facility which can be enabled at runtime.
+.Dv KMEM_SIZE
+option ensure the size given in
+.Fn kmem_free
+matches the actual allocated size. On
+.Fn kmem_alloc ,
+the kernel will allocate an additional contiguous kmem page of eight
+bytes in the buffer, will register the allocated size in the first kmem
+page of that buffer, and will return a pointer to the second kmem page
+in that same buffer. When freeing, the kernel reads the first page, and
+compares the size registered with the one given in
+.Fn kmem_free .
+Any mismatch triggers a panic.
+.Pp
+.Dv KMEM_SIZE
+is enabled by default on
+.Dv DIAGNOSTIC
+and
+.Dv DEBUG .
+.Ss KMEM_REDZONE
+Kernels compiled with the
+.Dv KMEM_REDZONE
+option add a dynamic pattern of two bytes at the end of each allocated
+buffer, and check this pattern when freeing to ensure the caller hasn't
+written outside the requested area. This option does not introduce a
+significant performance impact, but has two drawbacks: it only catches
+write overflows, and catches them only on
+.Fn kmem_free .
+.Pp
+.Dv KMEM_REDZONE
+is enabled by default on
+.Dv DIAGNOSTIC .
+.Ss KMEM_GUARD
+Kernels compiled with the
+.Dv KMEM_GUARD
+option perform CPU intensive sanity checks on kmem operations. It adds
+additional, very high overhead runtime verification to kmem operations.
+It must be enabled with
+.Dv KMEM_SIZE .
+.Pp
+.Dv KMEM_GUARD
+tries to catch the following types of bugs:
+.Bl -bullet
+.It
+Overflow at time of occurrence, by means of a guard page. An unmapped
+guard page sits immediately after the requested area; a read/write
+overflow therefore triggers a page fault.
+.It
+Underflow at
+.Fn kmem_free ,
+by using KMEM_SIZE's registered size. If an underflow occurs, the size
+stored by
+.Dv KMEM_SIZE
+will be overwritten, which means that when freeing, the kernel will
+spot the mismatch.
+.It
+Use-after-free at time of occurrence. When freeing, the memory is
+unmapped, and depending on the value of kmem_guard_depth, the kernel
+will more or less delay the recycling of that memory. Which means that
+any ulterior read/write access to the memory will trigger a page fault,
+given it hasn't been recycled yet.
+.El
 .Pp
-.Dv kmguard
-adds additional, very high overhead runtime verification to kmem operations.
 To enable it, boot the system with the
 .Fl d
 option, which causes the debugger to be entered early during the kernel
@@ -224,7 +281,7 @@ db\*[Gt] c
 .Ed
 .Pp
 This instructs
-.Dv kmguard
+.Dv kmem_guard
 to queue up to 6 (3*2) pages of unmapped KVA to catch
 use-after-free type errors.
 When
@@ -239,23 +296,11 @@ Limitations:
 It has a severe impact on performance.
 .It
 It is best used on a 64-bit machine with lots of RAM.
-.It
-Allocations larger than PAGE_SIZE bypass the
-.Dv kmguard
-facility.
 .El
 .Pp
-kmguard tries to catch the following types of bugs:
-.Bl -bullet
-.It
-Overflow at time of occurrence, by means of a guard page.
-.It
-Underflow at
-.Fn kmem_free ,
-by using a canary value.
-.It
-Invalid pointer or size passed, at
-.Fn kmem_free .
+.Dv KMEM_GUARD
+is enabled by default on
+.Dv DEBUG .
 .El
 .Sh RETURN VALUES
 On success,



CVS commit: src/share/man/man9

2015-07-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 28 09:52:43 UTC 2015

Modified Files:
src/share/man/man9: kmem.9

Log Message:
Use more Dv.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/kmem.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/kmem.9
diff -u src/share/man/man9/kmem.9:1.16 src/share/man/man9/kmem.9:1.17
--- src/share/man/man9/kmem.9:1.16	Tue Jul 28 09:51:42 2015
+++ src/share/man/man9/kmem.9	Tue Jul 28 09:52:43 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: kmem.9,v 1.16 2015/07/28 09:51:42 wiz Exp $
+.\	$NetBSD: kmem.9,v 1.17 2015/07/28 09:52:43 wiz Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -74,10 +74,10 @@ Specify the size of allocation in bytes.
 .It Fa kmflags
 Either of the following:
 .Bl -tag -width KM_NOSLEEP
-.It KM_SLEEP
+.It Dv KM_SLEEP
 If the allocation cannot be satisfied immediately, sleep until enough
 memory is available.
-.It KM_NOSLEEP
+.It Dv KM_NOSLEEP
 Don't sleep.
 Immediately return
 .Dv NULL
@@ -261,7 +261,9 @@ a read/write overflow therefore triggers
 .It
 Underflow at
 .Fn kmem_free ,
-by using KMEM_SIZE's registered size.
+by using
+.Dv KMEM_SIZE Ap s
+registered size.
 If an underflow occurs, the size stored by
 .Dv KMEM_SIZE
 will be overwritten, which means that when freeing, the kernel will



CVS commit: src/share/man/man9

2015-07-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 28 09:51:42 UTC 2015

Modified Files:
src/share/man/man9: kmem.9

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/kmem.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/kmem.9
diff -u src/share/man/man9/kmem.9:1.15 src/share/man/man9/kmem.9:1.16
--- src/share/man/man9/kmem.9:1.15	Tue Jul 28 08:59:47 2015
+++ src/share/man/man9/kmem.9	Tue Jul 28 09:51:42 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: kmem.9,v 1.15 2015/07/28 08:59:47 maxv Exp $
+.\	$NetBSD: kmem.9,v 1.16 2015/07/28 09:51:42 wiz Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -211,13 +211,15 @@ Kernels compiled with the
 .Dv KMEM_SIZE
 option ensure the size given in
 .Fn kmem_free
-matches the actual allocated size. On
+matches the actual allocated size.
+On
 .Fn kmem_alloc ,
 the kernel will allocate an additional contiguous kmem page of eight
 bytes in the buffer, will register the allocated size in the first kmem
 page of that buffer, and will return a pointer to the second kmem page
-in that same buffer. When freeing, the kernel reads the first page, and
-compares the size registered with the one given in
+in that same buffer.
+When freeing, the kernel reads the first page, and compares the
+size registered with the one given in
 .Fn kmem_free .
 Any mismatch triggers a panic.
 .Pp
@@ -231,9 +233,10 @@ Kernels compiled with the
 .Dv KMEM_REDZONE
 option add a dynamic pattern of two bytes at the end of each allocated
 buffer, and check this pattern when freeing to ensure the caller hasn't
-written outside the requested area. This option does not introduce a
-significant performance impact, but has two drawbacks: it only catches
-write overflows, and catches them only on
+written outside the requested area.
+This option does not introduce a significant performance impact,
+but has two drawbacks: it only catches write overflows, and catches
+them only on
 .Fn kmem_free .
 .Pp
 .Dv KMEM_REDZONE
@@ -242,8 +245,9 @@ is enabled by default on
 .Ss KMEM_GUARD
 Kernels compiled with the
 .Dv KMEM_GUARD
-option perform CPU intensive sanity checks on kmem operations. It adds
-additional, very high overhead runtime verification to kmem operations.
+option perform CPU intensive sanity checks on kmem operations.
+It adds additional, very high overhead runtime verification to kmem
+operations.
 It must be enabled with
 .Dv KMEM_SIZE .
 .Pp
@@ -251,23 +255,24 @@ It must be enabled with
 tries to catch the following types of bugs:
 .Bl -bullet
 .It
-Overflow at time of occurrence, by means of a guard page. An unmapped
-guard page sits immediately after the requested area; a read/write
-overflow therefore triggers a page fault.
+Overflow at time of occurrence, by means of a guard page.
+An unmapped guard page sits immediately after the requested area;
+a read/write overflow therefore triggers a page fault.
 .It
 Underflow at
 .Fn kmem_free ,
-by using KMEM_SIZE's registered size. If an underflow occurs, the size
-stored by
+by using KMEM_SIZE's registered size.
+If an underflow occurs, the size stored by
 .Dv KMEM_SIZE
 will be overwritten, which means that when freeing, the kernel will
 spot the mismatch.
 .It
-Use-after-free at time of occurrence. When freeing, the memory is
-unmapped, and depending on the value of kmem_guard_depth, the kernel
-will more or less delay the recycling of that memory. Which means that
-any ulterior read/write access to the memory will trigger a page fault,
-given it hasn't been recycled yet.
+Use-after-free at time of occurrence.
+When freeing, the memory is unmapped, and depending on the value
+of kmem_guard_depth, the kernel will more or less delay the recycling
+of that memory.
+Which means that any ulterior read/write access to the memory will
+trigger a page fault, given it hasn't been recycled yet.
 .El
 .Pp
 To enable it, boot the system with the



CVS commit: src/share/man/man9

2015-07-24 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Jul 24 07:40:58 UTC 2015

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
fix typo. reported by nonaka@n.o


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/pci_msi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.5 src/share/man/man9/pci_msi.9:1.6
--- src/share/man/man9/pci_msi.9:1.5	Tue Jul 21 12:05:02 2015
+++ src/share/man/man9/pci_msi.9	Fri Jul 24 07:40:58 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci_msi.9,v 1.5 2015/07/21 12:05:02 wiz Exp $
+.\ $NetBSD: pci_msi.9,v 1.6 2015/07/24 07:40:58 knakahara Exp $
 .\
 .\ Copyright (c) 2015 Internet Initiative Japan Inc.
 .\ All rights reserved.
@@ -294,7 +294,7 @@ is
 .Ed
 on return.
 .Pp
-.Ft pci_intr_type_t
+.Fn pci_intr_type
 returns the interrupt type of
 .Fa ih .
 The return value is



CVS commit: src/share/man/man9

2015-07-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 21 12:05:02 UTC 2015

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
Fix Dd argument, whitespace, improve readability.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/pci_msi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.4 src/share/man/man9/pci_msi.9:1.5
--- src/share/man/man9/pci_msi.9:1.4	Tue Jul 21 03:12:50 2015
+++ src/share/man/man9/pci_msi.9	Tue Jul 21 12:05:02 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci_msi.9,v 1.4 2015/07/21 03:12:50 knakahara Exp $
+.\ $NetBSD: pci_msi.9,v 1.5 2015/07/21 12:05:02 wiz Exp $
 .\
 .\ Copyright (c) 2015 Internet Initiative Japan Inc.
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd Jul 15, 2015
+.Dd July 15, 2015
 .Dt PCI_MSI 9
 .Os
 .Sh NAME
@@ -39,7 +39,7 @@
 .Nm pci_msix_alloc_map ,
 .Nm pci_intx_alloc ,
 .Nm pci_intr_alloc ,
-.Nm pci_intr_release,
+.Nm pci_intr_release ,
 .Nm pci_intr_type
 .Nd PCI MSI{,-X} manipulation functions
 .Sh SYNOPSIS
@@ -206,13 +206,17 @@ The index count of
 must be
 .Dv PCI_INTR_TYPE_SIZE .
 .Fa max_type
-must be PCI_INTR_TYPE_MSIX, PCI_INTR_TYPE_MSI, or PCI_INTR_TYPE_INTX.
+must be
+.Dv PCI_INTR_TYPE_MSIX ,
+.Dv PCI_INTR_TYPE_MSI ,
+or
+.Dv PCI_INTR_TYPE_INTX .
 The parameter does not mean array index counts of
 .Fa counts .
 The parameter means the interrupt type which
 .Fn pci_intr_alloc
 tries to allocate first.
-I.e., if the driver wants to allocate interrupt the following way:
+I.e., if the driver wants to allocate interrupts in the following way:
 .Bd -literal
 	5 MSI-X
 	1 MSI (if MSI-X allocation failed)
@@ -229,7 +233,7 @@ in the following way:
 	error = pci_intr_alloc(pa, ihps, counts,
 			   PCI_INTR_TYPE_MSIX);
 .Ed
-If the driver wants to allocate int the following way:
+If the driver wants to allocate interrupts in the following way:
 .Bd -literal
 	hardware max number MSI-X
 	1 MSI (if MSI-X allocation failed)
@@ -245,7 +249,7 @@ in the following way:
 	error = pci_intr_alloc(pa, ihps, counts,
 			   PCI_INTR_TYPE_MSIX);
 .Ed
-If the driver wants to allocate int the following way:
+If the driver wants to allocate interrupts in the following way:
 .Bd -literal
 	3 MSI
 	INTx (if MSI allocation failed)
@@ -261,7 +265,7 @@ in the following way:
 	error = pci_intr_alloc(pa, ihps, counts,
 			   PCI_INTR_TYPE_MSI);
 .Ed
-If the driver wants to allocate int the following way:
+If the driver wants to allocate interrupts in the following way:
 .Bd -literal
 	1 MSI
 	INTx (if MSI allocation failed)
@@ -275,11 +279,12 @@ in the following way:
 .Fa max_type
 is ignored in this case.
 .Fn pci_intr_alloc
-return zero on any allocation function success, and nonzero on
-all allocation functions failure. On success,
+returns zero on any allocation function success, and non-zero on
+all allocation function failures.
+On success,
 .Fa counts
 is overwritten by a really allocated count.
-I.e, if 5 MSI-X is allocated,
+I.e., if 5 MSI-X is allocated,
 .Fa counts
 is
 .Bd -literal
@@ -290,13 +295,13 @@ is
 on return.
 .Pp
 .Ft pci_intr_type_t
-return the interrupt type of
+returns the interrupt type of
 .Fa ih .
 The return value is
 .Dv PCI_INTR_TYPE_MSIX
 for MSI-X,
 .Dv PCI_INTR_TYPE_MSI
-for MSI
+for MSI, and
 .Dv PCI_INTR_TYPE_INTX
 for others.
 .Sh SEE ALSO



CVS commit: src/share/man/man9

2015-07-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jul 17 06:45:55 UTC 2015

Modified Files:
src/share/man/man9: vnode.9

Log Message:
Trailing whitespace, begone!


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/share/man/man9/vnode.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/vnode.9
diff -u src/share/man/man9/vnode.9:1.69 src/share/man/man9/vnode.9:1.70
--- src/share/man/man9/vnode.9:1.69	Sun Jul 12 08:11:27 2015
+++ src/share/man/man9/vnode.9	Fri Jul 17 06:45:55 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: vnode.9,v 1.69 2015/07/12 08:11:27 hannken Exp $
+.\ $NetBSD: vnode.9,v 1.70 2015/07/17 06:45:55 wiz Exp $
 .\
 .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -692,8 +692,8 @@ is the mount point for the file system t
 resides in.
 .Pp
 The arguments
-.Fa old_key 
-and 
+.Fa old_key
+and
 .Fa old_key_len
 identify the cached vnode.
 .Pp
@@ -718,8 +718,8 @@ The argument
 is the mount point for the file system this file resides in.
 .Pp
 The arguments
-.Fa key 
-and 
+.Fa key
+and
 .Fa key_len
 uniquely identify the file in the file system.
 .It Fn vrecycle vp



CVS commit: src/share/man/man9

2015-07-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Jul 11 15:42:31 UTC 2015

Modified Files:
src/share/man/man9: vnsubr.9

Log Message:
Avoid Pq.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/share/man/man9/vnsubr.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/vnsubr.9
diff -u src/share/man/man9/vnsubr.9:1.42 src/share/man/man9/vnsubr.9:1.43
--- src/share/man/man9/vnsubr.9:1.42	Thu Feb 27 16:51:37 2014
+++ src/share/man/man9/vnsubr.9	Sat Jul 11 15:42:31 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: vnsubr.9,v 1.42 2014/02/27 16:51:37 hannken Exp $
+.\ $NetBSD: vnsubr.9,v 1.43 2015/07/11 15:42:31 wiz Exp $
 .\
 .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -182,9 +182,9 @@ then perform the I/O.
 The argument
 .Fa rw
 specifies whether the I/O is a read
-.Pq Dv UIO_READ
+.Dv ( UIO_READ )
 or write
-.Pq Dv UIO_WRITE
+.Dv ( UIO_WRITE )
 operation.
 The vnode is specified by
 .Fa vp .



CVS commit: src/share/man/man9

2015-07-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jul  9 11:34:59 UTC 2015

Modified Files:
src/share/man/man9: splraiseipl.9

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/splraiseipl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/splraiseipl.9
diff -u src/share/man/man9/splraiseipl.9:1.7 src/share/man/man9/splraiseipl.9:1.8
--- src/share/man/man9/splraiseipl.9:1.7	Thu Jul  9 10:23:51 2015
+++ src/share/man/man9/splraiseipl.9	Thu Jul  9 11:34:59 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: splraiseipl.9,v 1.7 2015/07/09 10:23:51 kamil Exp $
+.\	$NetBSD: splraiseipl.9,v 1.8 2015/07/09 11:34:59 wiz Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -25,7 +25,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ 
-.Dd February 11, 2007
+.Dd July 9, 2015
 .Dt SPLRAISEIPL 9
 .Os
 .\ 



CVS commit: src/share/man/man9

2015-07-09 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jul  9 10:23:51 UTC 2015

Modified Files:
src/share/man/man9: splraiseipl.9

Log Message:
Set proper include file: sys/intr.h

The sys/param.h header has nothing to do (directly or indirectly) with
splraiseipl(9). This issue might be hidden for kernel modules, as
sys/module.h includes sys/mutex.h, which in turn pulls in sys/intr.h.

Reviewed by msaitoh


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/splraiseipl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/splraiseipl.9
diff -u src/share/man/man9/splraiseipl.9:1.6 src/share/man/man9/splraiseipl.9:1.7
--- src/share/man/man9/splraiseipl.9:1.6	Wed Dec  5 04:50:49 2007
+++ src/share/man/man9/splraiseipl.9	Thu Jul  9 10:23:51 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: splraiseipl.9,v 1.6 2007/12/05 04:50:49 ad Exp $
+.\	$NetBSD: splraiseipl.9,v 1.7 2015/07/09 10:23:51 kamil Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -34,7 +34,7 @@
 .Nd raise the system priority level
 .\ 
 .Sh SYNOPSIS
-.In sys/param.h
+.In sys/intr.h
 .\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 .Ft int
 .Fn splraiseipl \



CVS commit: src/share/man/man9

2015-06-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jun 29 16:20:14 UTC 2015

Modified Files:
src/share/man/man9: usbdi.9

Log Message:
Typos


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man9/usbdi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/usbdi.9
diff -u src/share/man/man9/usbdi.9:1.29 src/share/man/man9/usbdi.9:1.30
--- src/share/man/man9/usbdi.9:1.29	Thu Sep 26 16:18:52 2013
+++ src/share/man/man9/usbdi.9	Mon Jun 29 16:20:14 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: usbdi.9,v 1.29 2013/09/26 16:18:52 skrll Exp $
+.\	$NetBSD: usbdi.9,v 1.30 2015/06/29 16:20:14 skrll Exp $
 .\
 .\ Copyright (c) 2012 Matthew R. Green
 .\ All rights reserved.
@@ -54,7 +54,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd September 26, 2013
+.Dd June 29, 2015
 .Dt USBDI 9
 .Os
 .Sh NAME
@@ -187,7 +187,7 @@
 .Ft usbd_status
 .Fn usbd_get_string usbd_device_handle iface int si char *buf
 .Ft usbd_status
-.Fn usbd_get_string0 usbd_device_handle iface int si char *buf \
+.Fn usbd_get_string0 usbd_device_handle iface int si char *buf \
  int unicode
 .Ft void
 .Fn usb_desc_iter_init usbd_device_handle iface usbd_desc_iter_t *iter
@@ -224,7 +224,7 @@ through
 .Ft usbd_status
 .Fn usbd_set_address usbd_device_handle dev int addr
 .Ft usbd_status
-.Fn usbd_get_port_status usbd_device_handle dev intp ort usb_port_status_t *ps
+.Fn usbd_get_port_status usbd_device_handle dev int port usb_port_status_t *ps
 .Ft usbd_status
 .Fn usbd_set_hub_feature usbd_device_handle dev int sel
 .Ft usbd_status
@@ -244,7 +244,7 @@ through
 .Ft struct usb_hid_descriptor *
 .Fn usbd_get_hid_descriptor usbd_interface_handle ifc
 .Ft usbd_status
-.Fn usbd_set_report usbd_interface_handle iface nt type int id void *data int len
+.Fn usbd_set_report usbd_interface_handle iface int type int id void *data int len
 .Ft usbd_status
 .Fn usbd_set_report_async usbd_interface_handle iface int type int id void *data int len
 .Ft usbd_status



CVS commit: src/share/man/man9

2015-06-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jun  4 01:58:30 UTC 2015

Modified Files:
src/share/man/man9: module.9

Log Message:
Fix typo - from Kamil Rytarowski


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/share/man/man9/module.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.36 src/share/man/man9/module.9:1.37
--- src/share/man/man9/module.9:1.36	Thu May 14 13:59:57 2015
+++ src/share/man/man9/module.9	Thu Jun  4 01:58:30 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: module.9,v 1.36 2015/05/14 13:59:57 wiz Exp $
+.\	$NetBSD: module.9,v 1.37 2015/06/04 01:58:30 pgoyette Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -420,7 +420,7 @@ are never auto-unloaded.
 .El
 .Sh EXAMPLES
 A set of example modules is available in the
-.Pa src/sys/modules.examples
+.Pa src/sys/modules/examples
 directory hierarchy.
 .Sh CODE REFERENCES
 The core of the kernel module implementation is in



CVS commit: src/share/man/man9

2015-05-23 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat May 23 17:05:03 UTC 2015

Modified Files:
src/share/man/man9: malloc.9

Log Message:
Remove the DIAGNOSTIC section, and two references to MALLOC and FREE.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/share/man/man9/malloc.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/malloc.9
diff -u src/share/man/man9/malloc.9:1.51 src/share/man/man9/malloc.9:1.52
--- src/share/man/man9/malloc.9:1.51	Sat Dec 27 20:45:08 2014
+++ src/share/man/man9/malloc.9	Sat May 23 17:05:03 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: malloc.9,v 1.51 2014/12/27 20:45:08 wiz Exp $
+.\	$NetBSD: malloc.9,v 1.52 2015/05/23 17:05:03 maxv Exp $
 .\
 .\ Copyright (c) 1996, 2003 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,15 +27,13 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd December 27, 2014
+.Dd May 23, 2015
 .Dt MALLOC 9
 .Os
 .Sh NAME
 .Nm malloc ,
-.Nm MALLOC ,
 .Nm realloc ,
 .Nm free ,
-.Nm FREE ,
 .Nm malloc_type_attach ,
 .Nm malloc_type_detach ,
 .Nm MALLOC_DEFINE ,
@@ -268,50 +266,6 @@ and can be examined by using
 .Fn malloc
 returns a kernel virtual address that is suitably aligned for storage of
 any type of object.
-.Sh DIAGNOSTICS
-A kernel compiled with the
-.Dv DIAGNOSTIC
-configuration option attempts to detect memory corruption caused by
-such things as writing outside the allocated area and imbalanced calls to the
-.Fn malloc
-and
-.Fn free
-functions.
-Failing consistency checks will cause a panic or a system console message:
-.Pp
-.Bl -bullet -offset indent -compact
-.It
-panic:
-.Dq malloc - bogus type
-.It
-panic:
-.Dq malloc: out of space in kmem_map
-.It
-panic:
-.Dq malloc: allocation too large
-.It
-panic:
-.Dq malloc: wrong bucket
-.It
-panic:
-.Dq malloc: lost data
-.It
-panic:
-.Dq free: unaligned addr
-.It
-panic:
-.Dq free: duplicated free
-.It
-panic:
-.Dq free: multiple frees
-.It
-panic:
-.Dq init: minbucket too small/struct freelist too big
-.It
-.Dq multiply freed item Aq addr
-.It
-.Dq Data modified on freelist: Aq data object description
-.El
 .Sh SEE ALSO
 .Xr vmstat 1 ,
 .Xr memoryallocators 9



CVS commit: src/share/man/man9

2015-05-15 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri May 15 08:39:14 UTC 2015

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
update man.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/pci_msi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.2 src/share/man/man9/pci_msi.9:1.3
--- src/share/man/man9/pci_msi.9:1.2	Mon Apr 27 10:37:20 2015
+++ src/share/man/man9/pci_msi.9	Fri May 15 08:39:14 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci_msi.9,v 1.2 2015/04/27 10:37:20 wiz Exp $
+.\ $NetBSD: pci_msi.9,v 1.3 2015/05/15 08:39:14 knakahara Exp $
 .\
 .\ Copyright (c) 2015 Internet Initiative Japan Inc.
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd April 8, 2015
+.Dd May 11, 2015
 .Dt PCI_MSI 9
 .Os
 .Sh NAME
@@ -33,19 +33,12 @@
 .Nm pci_msi_count ,
 .Nm pci_msi_alloc ,
 .Nm pci_msi_alloc_exact ,
-.Nm pci_msi_release ,
-.Nm pci_msi_establish ,
-.Nm pci_msi_disestablish ,
-.Nm pci_msi_string
 .Nm pci_msix_count ,
 .Nm pci_msix_alloc ,
 .Nm pci_msix_alloc_exact ,
 .Nm pci_msix_alloc_map ,
-.Nm pci_msix_release ,
-.Nm pci_msix_establish ,
-.Nm pci_msix_disestablish ,
 .Nm pci_intx_alloc ,
-.Nm pci_intx_release
+.Nm pci_intr_release
 .Nd PCI MSI{,-X} manipulation functions
 .Sh SYNOPSIS
 .Ft int
@@ -56,16 +49,6 @@
 .Ft int
 .Fn pci_msi_alloc_exect struct pci_attach_args *pa \
 pci_intr_handle_t **ihps int count
-.Ft void
-.Fn pci_msi_release pci_intr_handle_t **pihs int count
-.Ft void *
-.Fn pci_msi_establish pci_chipset_tag_t pc pci_intr_handle_t ih \
-int level int (*func)(void *) void *arg
-.Ft void
-.Fn pci_msi_disestablish pci_chipset_tag_t pc void *cookie
-.Ft const char *
-.Ft pci_msi_string pci_chipset_tag_t pc \
-pci_intr_handle_t, char *buf size_t len
 .Ft int
 .Fn pci_msix_count struct pci_attach_args *pa
 .Ft int
@@ -77,17 +60,12 @@
 .Ft int
 .Fn pci_msix_alloc_map struct pci_attach_args *pa \
 pci_intr_handle_t **ihps u_int *table_indexes int count
-.Ft void
-.Fn pci_msix_release pci_intr_handle_t **pihs int count
-.Ft void *
-.Fn pci_msix_establish pci_chipset_tag_t pc pci_intr_handle_t ih \
-int level int (*func)(void *) void *arg
-.Fn pci_msix_disestablish pci_chipset_tag_t pc void *cookie
 .Ft int
 .Fn pci_intx_alloc  struct pci_attach_args *pa \
 pci_intr_handle_t **ihp
 .Ft void
-.Fn pci_intx_release pci_intr_handle_t *pih
+.Fn pci_intr_release pci_chipset_tag_t pc \
+pci_intr_handle_t *pih int count
 .Sh DESCRIPTION
 The
 .Nm
@@ -142,34 +120,34 @@ can not decrement
 .Pp
 If the driver wishes to refer to the MSI source in an attach or
 error message, it should use the value returned by
-.Fn pci_msi_string .
+.Fn pci_intr_string
+the same as INTx.
 The buffer passed to
-.Fn pci_msi_string
+.Fn pci_intr_string
 should be at least
 .Dv PCI_INTRSTR_LEN
 bytes long.
 .Pp
 Subsequently, when the driver is prepared to receive MSIs, it
 should call
-.Fn pci_msi_establish
-to actually establish the handler; when the device interrupts,
+.Fn pci_intr_establish
+the same as INTx to actually establish the handler;
+when the device interrupts,
 .Fa intrhand
 will be called with a single argument
 .Fa intrarg ,
 and will run at the interrupt priority level
 .Fa ipl .
-This is the same as
-.Fn pci_intr_establish .
 .Pp
 The return value of
-.Fn pci_msi_establish
+.Fn pci_intr_establish
 may be saved and passed to
-.Fn pci_msi_disestablish
-to disable the interrupt handler
+.Fn pci_intr_disestablish
+to disable the interrupt handler the same as INTx
 when the driver is no longer interested in MSIs from the device.
 After that, the driver should also call
-.Fn pci_msi_release
-to free resources about MSI.
+.Fn pci_intr_release
+to free resources about MSI as well as INTx and MSI-X.
 .Pp
 If a driver wishes to establish an MSI-X handler for the device,
 it is almost the same as MSI.
@@ -195,7 +173,7 @@ this way:
 If the driver wants to fall back to INTx, the driver should use
 .Fn pci_intx_alloc
 and
-.Fn pci_intx_release
+.Fn pci_intr_release
 instead of
 .Fn pci_intr_map
 to resolve contradiction of the interrupt handler ownership.
@@ -207,3 +185,5 @@ in contrast,
 and
 .Fn pci_msix_alloc
 have (the functions allocate memory for interrupt handlers).
+.Sh SEE ALSO
+.Xr pci_intr 9



CVS commit: src/share/man/man9

2015-05-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu May 14 13:59:57 UTC 2015

Modified Files:
src/share/man/man9: module.9

Log Message:
Sort sections.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/share/man/man9/module.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.35 src/share/man/man9/module.9:1.36
--- src/share/man/man9/module.9:1.35	Wed May 13 22:31:16 2015
+++ src/share/man/man9/module.9	Thu May 14 13:59:57 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: module.9,v 1.35 2015/05/13 22:31:16 pgoyette Exp $
+.\	$NetBSD: module.9,v 1.36 2015/05/14 13:59:57 wiz Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -418,6 +418,10 @@ Note however that modules loaded manuall
 .Xr modload 8
 are never auto-unloaded.
 .El
+.Sh EXAMPLES
+A set of example modules is available in the
+.Pa src/sys/modules.examples
+directory hierarchy.
 .Sh CODE REFERENCES
 The core of the kernel module implementation is in
 .Pa sys/kern/kern_module.c
@@ -446,10 +450,6 @@ needed when a module is loaded or unload
 deals with resolution of relocatable symbols.
 .Fn module_init_md
 is for finding modules passed in by the boot loader.
-.Sh EXAMPLES
-A set of example modules is available in the
-.Pa src/sys/modules.examples
-directory hierarchy.
 .Sh SEE ALSO
 .Xr modctl 2 ,
 .Xr module 7 ,



CVS commit: src/share/man/man9

2015-05-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu May 14 13:59:15 UTC 2015

Modified Files:
src/share/man/man9: devsw_attach.9

Log Message:
Minus needs a backslash, add it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/devsw_attach.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/devsw_attach.9
diff -u src/share/man/man9/devsw_attach.9:1.1 src/share/man/man9/devsw_attach.9:1.2
--- src/share/man/man9/devsw_attach.9:1.1	Thu May 14 00:08:44 2015
+++ src/share/man/man9/devsw_attach.9	Thu May 14 13:59:15 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: devsw_attach.9,v 1.1 2015/05/14 00:08:44 pgoyette Exp $
+.\	$NetBSD: devsw_attach.9,v 1.2 2015/05/14 13:59:15 wiz Exp $
 .\
 .\ Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -103,14 +103,14 @@ should be set to
 and
 .Em bmajor
 to
-.Dv -1 .
+.Dv \-1 .
 The
 .Em devname ,
 major number, and device type
 (character or block)
 must correspond to the device file which will be opened by user programs.
 By passing
-.Dv -1
+.Dv \-1
 to the function for the
 .Em cmajor
 or



CVS commit: src/share/man/man9

2015-05-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed May 13 09:04:38 UTC 2015

Modified Files:
src/share/man/man9: module.9

Log Message:
Add an entry for lue(9lua) to the SEE ALSO list.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man9/module.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.30 src/share/man/man9/module.9:1.31
--- src/share/man/man9/module.9:1.30	Tue Mar 18 18:20:40 2014
+++ src/share/man/man9/module.9	Wed May 13 09:04:38 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: module.9,v 1.30 2014/03/18 18:20:40 riastradh Exp $
+.\	$NetBSD: module.9,v 1.31 2015/05/13 09:04:38 pgoyette Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -448,7 +448,8 @@ deals with resolution of relocatable sym
 is for finding modules passed in by the boot loader.
 .Sh SEE ALSO
 .Xr modctl 2 ,
-.Xr module 7
+.Xr module 7 ,
+.Xr lua 9lua
 .Sh HISTORY
 The kernel module subsystem first appeared in
 .Nx 5.0 .



CVS commit: src/share/man/man9

2015-05-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed May 13 10:49:26 UTC 2015

Modified Files:
src/share/man/man9: module.9

Log Message:
Note to self:  if you're going to revert, do it right.

This should restore the original SEE ALSO section.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/share/man/man9/module.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.32 src/share/man/man9/module.9:1.33
--- src/share/man/man9/module.9:1.32	Wed May 13 10:17:27 2015
+++ src/share/man/man9/module.9	Wed May 13 10:49:26 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: module.9,v 1.32 2015/05/13 10:17:27 pgoyette Exp $
+.\	$NetBSD: module.9,v 1.33 2015/05/13 10:49:26 pgoyette Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -447,8 +447,8 @@ deals with resolution of relocatable sym
 .Fn module_init_md
 is for finding modules passed in by the boot loader.
 .Sh SEE ALSO
-.Xr modctl 2
-.Xr lua 9lua
+.Xr modctl 2 ,
+.Xr module 7
 .Sh HISTORY
 The kernel module subsystem first appeared in
 .Nx 5.0 .



CVS commit: src/share/man/man9

2015-05-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed May 13 10:17:27 UTC 2015

Modified Files:
src/share/man/man9: module.9

Log Message:
Revert revision 1.31 - the referenced page does not exist and I am not
qualified to write it!


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man9/module.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.31 src/share/man/man9/module.9:1.32
--- src/share/man/man9/module.9:1.31	Wed May 13 09:04:38 2015
+++ src/share/man/man9/module.9	Wed May 13 10:17:27 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: module.9,v 1.31 2015/05/13 09:04:38 pgoyette Exp $
+.\	$NetBSD: module.9,v 1.32 2015/05/13 10:17:27 pgoyette Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -447,8 +447,7 @@ deals with resolution of relocatable sym
 .Fn module_init_md
 is for finding modules passed in by the boot loader.
 .Sh SEE ALSO
-.Xr modctl 2 ,
-.Xr module 7 ,
+.Xr modctl 2
 .Xr lua 9lua
 .Sh HISTORY
 The kernel module subsystem first appeared in



CVS commit: src/share/man/man9

2015-05-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed May 13 12:21:04 UTC 2015

Modified Files:
src/share/man/man9: module.9

Log Message:
Add the correct cross-ref, to intro(9lua)


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man9/module.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.33 src/share/man/man9/module.9:1.34
--- src/share/man/man9/module.9:1.33	Wed May 13 10:49:26 2015
+++ src/share/man/man9/module.9	Wed May 13 12:21:04 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: module.9,v 1.33 2015/05/13 10:49:26 pgoyette Exp $
+.\	$NetBSD: module.9,v 1.34 2015/05/13 12:21:04 pgoyette Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -448,7 +448,8 @@ deals with resolution of relocatable sym
 is for finding modules passed in by the boot loader.
 .Sh SEE ALSO
 .Xr modctl 2 ,
-.Xr module 7
+.Xr module 7 ,
+.Xr intro 9lua
 .Sh HISTORY
 The kernel module subsystem first appeared in
 .Nx 5.0 .



CVS commit: src/share/man/man9

2015-05-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu May 14 00:08:44 UTC 2015

Modified Files:
src/share/man/man9: Makefile
Added Files:
src/share/man/man9: devsw_attach.9

Log Message:
Add new man page for devsw_attach() and friends.

From Kamil Ritarowski with some editting by myself.


To generate a diff of this commit:
cvs rdiff -u -r1.386 -r1.387 src/share/man/man9/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man9/devsw_attach.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.386 src/share/man/man9/Makefile:1.387
--- src/share/man/man9/Makefile:1.386	Mon Apr 27 07:03:57 2015
+++ src/share/man/man9/Makefile	Thu May 14 00:08:44 2015
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.386 2015/04/27 07:03:57 knakahara Exp $
+#   $NetBSD: Makefile,v 1.387 2015/05/14 00:08:44 pgoyette Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -16,7 +16,7 @@ MAN=	accept_filter.9 accf_data.9 accf_ht
 	cpu_startup.9 cpu_switchto.9 cpufreq.9 \
 	csf.9 ctod.9 \
 	curproc.9 \
-	delay.9 disk.9 ddc.9 disklabel.9 dofileread.9 \
+	delay.9 devsw_attach.9 disk.9 ddc.9 disklabel.9 dofileread.9 \
 	dopowerhooks.9 do_setresuid.9 doshutdownhooks.9 driver.9 \
 	edid.9 errno.9 ethersubr.9 evcnt.9 extattr.9 extent.9 \
 	fetch.9 file.9 fileassoc.9 filedesc.9 firmload.9 flash.9 \
@@ -278,6 +278,11 @@ MLINKS+=ctod.9 dtoc.9 \
 	ctod.9 btodb.9
 MLINKS+=curproc.9 curcpu.9 curproc.9 curlwp.9
 MLINKS+=delay.9 DELAY.9
+MLINKS+=devsw_attach.9 devsw_detach.9 \
+	devsw_attach.9 bdevsw_lookup.9 \
+	devsw_attach.9 cdevsw_lookup.9 \
+	devsw_attach.9 bdevsw_lookup_major.9 \
+	devsw_attach.9 cdevsw_lookup_major.9
 MLINKS+=disk.9 disk_attach.9 disk.9 disk_detach.9 \
 	disk.9 disk_busy.9 disk.9 disk_unbusy.9 disk.9 disk_find.9 \
 	disk.9 disk_init.9 disk.9 disk_destroy.9 disk.9 disk_begindetach.9

Added files:

Index: src/share/man/man9/devsw_attach.9
diff -u /dev/null src/share/man/man9/devsw_attach.9:1.1
--- /dev/null	Thu May 14 00:08:44 2015
+++ src/share/man/man9/devsw_attach.9	Thu May 14 00:08:44 2015
@@ -0,0 +1,178 @@
+.\	$NetBSD: devsw_attach.9,v 1.1 2015/05/14 00:08:44 pgoyette Exp $
+.\
+.\ Copyright (c) 2015 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Kamil Rytarowski.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\ POSSIBILITY OF SUCH DAMAGE.
+.\
+.Dd May 13, 2015
+.Dt DEVSW_ATTACH 9
+.Os
+.Sh NAME
+.Nm devsw_attach ,
+.Nm devsw_detach ,
+.Nm bdevsw_lookup ,
+.Nm cdevsw_lookup ,
+.Nm bdevsw_lookup_major ,
+.Nm cdevsw_lookup_major
+.Nd character and block device switch functions
+.Sh SYNOPSIS
+.In sys/conf.h
+.Ft int
+.Fo devsw_attach
+.Fa const char *devname
+.Fa const struct bdevsw *bev
+.Fa devmajor_t *bmajor
+.Fa const struct cdevsw *cdev
+.Fa devmajor_t *cmajor
+.Fc
+.Ft int
+.Fo devsw_detach
+.Fa const struct bdevsw *bdev
+.Fa const struct cdevsw *cdev
+.Fc
+.Ft const struct bdevsw *
+.Fo bdevsw_lookup
+.Fa dev_t dev
+.Fc
+.Ft const struct cdevsw *
+.Fo cdevsw_lookup
+.Fa dev_t dev
+.Fc
+.Ft devmajor_t
+.Fo bdevsw_lookup_major
+.Fa const struct bdevsw *bdev
+.Fc
+.Ft devmajor_t
+.Fo cdevsw_lookup_major
+.Fa const struct cdevsw *cdev
+.Fc
+.Sh DESCRIPTION
+If a device driver has character device interfaces accessed from
+userland, the driver must define a
+.Em cdevsw
+structure.
+If the driver also has block device interfaces, the driver must
+additionally define a
+.Em bdevsw
+structure.
+These structures are constant, and are defined within the
+.Xr driver 9 .
+.Pp
+For drivers which are included in 

CVS commit: src/share/man/man9/man9.x86

2015-05-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon May  4 08:15:21 UTC 2015

Modified Files:
src/share/man/man9/man9.x86: tsc.9

Log Message:
Swap function names, so that xxx_bp() refers to the boot processor and
xxx_ap() to the application processor. It doesn't make any sense to
have bp reference the application processor while ap references boot!

XXX The two function are now lexicographically mis-ordered.  If this
XXX is an issue, let me know and I will re-sequence them.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/man9.x86/tsc.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/man9.x86/tsc.9
diff -u src/share/man/man9/man9.x86/tsc.9:1.5 src/share/man/man9/man9.x86/tsc.9:1.6
--- src/share/man/man9/man9.x86/tsc.9:1.5	Wed Nov 20 18:13:16 2013
+++ src/share/man/man9/man9.x86/tsc.9	Mon May  4 08:15:21 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: tsc.9,v 1.5 2013/11/20 18:13:16 jruoho Exp $
+.\ $NetBSD: tsc.9,v 1.6 2015/05/04 08:15:21 pgoyette Exp $
 .\
 .\ Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 20, 2013
+.Dd April 4, 2015
 .Dt TSC 9 x86
 .Os
 .Sh NAME
@@ -93,9 +93,9 @@ function initializes the
 as a
 .Xr timecounter 9 .
 The function is called early in the boot process when the processors attach.
-.It Fn tsc_sync_ap ci
+.It Fn tsc_sync_bp ci
 The
-.Fn tsc_sync_ap
+.Fn tsc_sync_bp
 function synchronizes the counter for the boot processor
 .Pq Tn BP .
 The supplied
@@ -108,9 +108,9 @@ The
 interface takes internally care of such issues as out-of-order execution,
 where instructions are not necessarily performed in the order of execution,
 possibly causing a misleading cycle count.
-.It Fn tsc_sync_bp ci
+.It Fn tsc_sync_ap ci
 The
-.Fn tsc_sync_bp
+.Fn tsc_sync_ap
 function synchronize the counter for the application processor
 .Fa ci .
 Interrupts must be off at machine-level when the function is called.



CVS commit: src/share/man/man9

2015-04-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Apr 27 10:32:22 UTC 2015

Modified Files:
src/share/man/man9: pci_intr_distribute.9

Log Message:
Improve wording.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/pci_intr_distribute.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_intr_distribute.9
diff -u src/share/man/man9/pci_intr_distribute.9:1.1 src/share/man/man9/pci_intr_distribute.9:1.2
--- src/share/man/man9/pci_intr_distribute.9:1.1	Mon Apr 27 06:42:52 2015
+++ src/share/man/man9/pci_intr_distribute.9	Mon Apr 27 10:32:22 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci_intr_distribute.9,v 1.1 2015/04/27 06:42:52 knakahara Exp $
+.\ $NetBSD: pci_intr_distribute.9,v 1.2 2015/04/27 10:32:22 wiz Exp $
 .\
 .\ Copyright (c) 2015 Internet Initiative Japan Inc.
 .\ All rights reserved.
@@ -37,17 +37,17 @@
 .Sh DESCRIPTION
 The
 .Nm
-functions exist to assing an interrupt to CPU.
+function exists to assign an interrupt to a CPU.
 .Pp
 If a driver (or the other kernel component) wishes to assign an
-interrupt to CPU, it should pass the return value of
+interrupt to a CPU, it should pass the return value of
 .Fn pci_intr_establish
-to the
-.Ft ich .
-And it should set kcpuset which want to assign to
-.Ft newset .
-If it want to get the assignment before changing, it should be
-pass non-NULL value to
-.Ft oldset .
-If not, it should set NULL to
+as
+.Fa ich
+argument, and it should pass the kcpuset to which it should be
+assigned as
+.Fa newset .
+To get the previous value, pass a
+.Pf non- Dv NULL
+value to
 .Ft oldset .



CVS commit: src/share/man/man9

2015-04-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Apr 27 10:37:20 UTC 2015

Modified Files:
src/share/man/man9: pci_msi.9

Log Message:
Improve wording and macro usage.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/pci_msi.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.1 src/share/man/man9/pci_msi.9:1.2
--- src/share/man/man9/pci_msi.9:1.1	Mon Apr 27 07:03:57 2015
+++ src/share/man/man9/pci_msi.9	Mon Apr 27 10:37:20 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pci_msi.9,v 1.1 2015/04/27 07:03:57 knakahara Exp $
+.\ $NetBSD: pci_msi.9,v 1.2 2015/04/27 10:37:20 wiz Exp $
 .\
 .\ Copyright (c) 2015 Internet Initiative Japan Inc.
 .\ All rights reserved.
@@ -25,11 +25,11 @@
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
 .Dd April 8, 2015
-.Dt PCI_MSI 9 (DRAFT)
+.Dt PCI_MSI 9
 .Os
-.Sh NAME (DRAFT)
+.Sh NAME
 .Nm pci_msi ,
-.Nm pci_msix,
+.Nm pci_msix ,
 .Nm pci_msi_count ,
 .Nm pci_msi_alloc ,
 .Nm pci_msi_alloc_exact ,
@@ -48,7 +48,6 @@
 .Nm pci_intx_release
 .Nd PCI MSI{,-X} manipulation functions
 .Sh SYNOPSIS
-.In NOTYET
 .Ft int
 .Fn pci_msi_count struct pci_attach_args *pa
 .Ft int
@@ -90,12 +89,11 @@
 .Ft void
 .Fn pci_intx_release pci_intr_handle_t *pih
 .Sh DESCRIPTION
-XXX This decument describes draft APIs. These APIs may change later.
-.Pp
 The
 .Nm
 functions exist to allow device drivers to use MSI/MSI-X.
-When the system use MSI/MSI-X, it must define a __HAVE_PCI_MSI_MSIX
+When the system uses MSI/MSI-X, it must define the
+.Dv __HAVE_PCI_MSI_MSIX
 build option.
 .Pp
 Each driver has an
@@ -113,28 +111,29 @@ If a driver wishes to establish an MSI h
 it should pass the
 .Ft struct pci_attach_args *
 and
-.Ft count
+.Fa count
 .Fn pci_msi_alloc
 or
 .Fn pci_msi_alloc_exact
-functions, which returns zero on success, and nonzero on failure.
-When the functions successed, set the pointer to allocated handle
-array to
+functions, which return zero on success, and nonzero on failure.
+When the functions are successful, they return the pointer to the
+allocated handle array in
 .Ft pihs
 whose size is
 .Ft count
-or less. The difference between
+or less.
+The difference between
 .Fn pci_msi_alloc
 and
 .Fn pci_msi_alloc_exact
-is
-.Ft count
+is whether
+.Fa count
 can be decremented or not.
 .Fn pci_msi_alloc
 can decrement
-.Ft count ,
-and
-which is similar to FreeBSD's
+.Fa count ,
+and which is similar to
+.Fx Ap s
 .Fn pci_alloc_msi .
 In contrast,
 .Fn pci_msi_alloc_exact
@@ -148,7 +147,7 @@ The buffer passed to
 .Fn pci_msi_string
 should be at least
 .Dv PCI_INTRSTR_LEN
-bytes.
+bytes long.
 .Pp
 Subsequently, when the driver is prepared to receive MSIs, it
 should call
@@ -168,43 +167,43 @@ may be saved and passed to
 .Fn pci_msi_disestablish
 to disable the interrupt handler
 when the driver is no longer interested in MSIs from the device.
-After that, the driver should also
+After that, the driver should also call
 .Fn pci_msi_release
 to free resources about MSI.
 .Pp
 If a driver wishes to establish an MSI-X handler for the device,
-it is alomost the same as MSI.
+it is almost the same as MSI.
 The only differences is
 .Fn pci_msix_alloc_map .
-This function can assign each handles to MSI-X table entries.
-e.g. If the driver want assign each handler to
+This function can assign separate handlers for each MSI-X table
+entry.
+I.e., if the driver wants to assign the handlers in the following way:
 .Bd -literal
 	msix_handler0 = MSI-X table index: 4
 	msix_handler1 = MSI-X table index: 5
 	msix_handler2 = MSI-X table index: 0
 .Ed
-, the driver should set
+the driver should set
+.Fa table_indexes
+this way:
 .Bd -literal
 	table_indexes[0] = 4;
 	table_indexes[1] = 5;
 	table_indexes[2] = 0;
 .Ed
-to
-.Ft table_indexes .
 .Pp
-If the driver want to fallback to INTx, the driver should use
+If the driver wants to fall back to INTx, the driver should use
 .Fn pci_intx_alloc
 and
 .Fn pci_intx_release
 instead of
 .Fn pci_intr_map
 to resolve contradiction of the interrupt handler ownership.
-i.e.
+I.e.,
 .Fn pci_intr_map
-does not have the ownership (the function just calcurates value),
+does not have the ownership (the function just calculates value),
 in contrast,
 .Fn pci_msi_alloc
 and
 .Fn pci_msix_alloc
-has the owneship (the functions allocate memory for interrupt
-handlers).
+have (the functions allocate memory for interrupt handlers).



CVS commit: src/share/man/man9

2015-04-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Apr 21 03:21:54 UTC 2015

Modified Files:
src/share/man/man9: namei.9

Log Message:
Cull long-dead flags from namei(9) man page.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/share/man/man9/namei.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/namei.9
diff -u src/share/man/man9/namei.9:1.32 src/share/man/man9/namei.9:1.33
--- src/share/man/man9/namei.9:1.32	Sat Jun 21 04:28:23 2014
+++ src/share/man/man9/namei.9	Tue Apr 21 03:21:54 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: namei.9,v 1.32 2014/06/21 04:28:23 dholland Exp $
+.\ $NetBSD: namei.9,v 1.33 2015/04/21 03:21:54 riastradh Exp $
 .\
 .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -164,21 +164,12 @@ The additional flags are:
 do not cross mount points
 .It Dv RDONLY
 lookup with read-only semantics
-.It Dv HASBUF
-caller has allocated pathname buffer
-.Em ni_cnd.cn_pnbuf
-.It Dv SAVENAME
-save pathname buffer
-.It Dv SAVESTART
-save starting directory
 .It Dv ISDOTDOT
 current pathname component is ..
 .It Dv MAKEENTRY
 add entry to the name cache
 .It Dv ISLASTCN
 this is last component of pathname
-.It Dv ISSYMLINK
-symlink needs interpretation
 .It Dv ISWHITEOUT
 found whiteout
 .It Dv DOWHITEOUT
@@ -191,32 +182,6 @@ trailing slashes are ok
 mask of parameter descriptors
 .El
 .Pp
-If the caller of
-.Fn namei
-sets the SAVENAME flag, then it must free the buffer.
-If
-.Fn VOP_LOOKUP
-sets the flag, then the buffer must be freed by either the commit
-routine or the
-.Fn VOP_ABORT
-routine.
-The
-.Dv SAVESTART
-flag is set only by the callers of
-.Fn namei .
-It implies
-.Dv SAVENAME
-plus the addition of saving the parent directory
-that contains the name in
-.Em ni_startdir .
-It allows repeated calls to
-.Fn lookup
-for the name being sought.
-The caller is responsible for releasing the buffer and for invoking
-.Fn vrele
-on
-.Em ni_startdir .
-.Pp
 All access to the
 .Nm
 interface must be in process context.



CVS commit: src/share/man/man9

2015-04-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Apr 20 14:03:10 UTC 2015

Modified Files:
src/share/man/man9: vnode.9

Log Message:
Document current state of vget.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/share/man/man9/vnode.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/vnode.9
diff -u src/share/man/man9/vnode.9:1.61 src/share/man/man9/vnode.9:1.62
--- src/share/man/man9/vnode.9:1.61	Mon Mar 24 13:42:40 2014
+++ src/share/man/man9/vnode.9	Mon Apr 20 14:03:10 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: vnode.9,v 1.61 2014/03/24 13:42:40 hannken Exp $
+.\ $NetBSD: vnode.9,v 1.62 2015/04/20 14:03:10 riastradh Exp $
 .\
 .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd March 24, 2014
+.Dd April 20, 2015
 .Dt VNODE 9
 .Os
 .Sh NAME
@@ -67,7 +67,7 @@
 .Ft void
 .Fn vrele_async struct vnode *vp
 .Ft int
-.Fn vget struct vnode *vp int lockflag
+.Fn vget struct vnode *vp int lockflag int wait
 .Ft void
 .Fn vput struct vnode *vp
 .Ft void
@@ -527,27 +527,60 @@ are zero, the vnode is placed on the fre
 .It Fn vrele_async vp
 Will asychronously release the vnode in different context than the caller,
 sometime after the call.
-.It Fn vget vp lockflags
+.It Fn vget vp lockflags wait
 Reclaim vnode
 .Fa vp
-from the freelist, increment its reference count and lock it.
-The argument
+from the freelist and increment its reference count.
+.Pp
+The vnode
+.Fa vp
+may be changing state: another thread may be initializing it from disk,
+or revoking it with
+.Xr revoke 2 ,
+or reclaiming it with
+.Xr VOP_RECLAIM 9 .
+In that case,
+.Fn vget
+will wait until the state has changed, if
 .Fa lockflags
-specifies the
-.Xr rwlock 9
-flags used to lock the vnode.
-If the
-.Dv VI_XLOCK
-flag is set in
-.Fa vp Ns 's
-.Em v_flag ,
-vnode
-.Fa vp
-is being recycled in
-.Fn vgone
-and the calling thread sleeps until the transition is complete.
-When it is awakened, an error is returned to indicate that the vnode is
-no longer usable.
+is
+.Li 0
+and
+.Fa wait
+is
+.Li true ;
+or will return
+.Dv EBUSY
+if
+.Fa lockflags
+is
+.Dv LK_NOWAIT
+and
+.Fa wait
+is
+.Li false .
+.Pp
+(The extra argument enables the compiler to detect old code which
+additionally used
+.Fn vget
+to lock the vnode.)
+.Pp
+Returns
+.Bl -tag -offset abcd -width ENOENT -compact
+.It Li EBUSY
+if
+.Fa vp
+was changing state and
+.Fa wait
+is false,
+.It Li ENOENT
+if the system was reclaiming
+.Fa vp
+with
+.Xr VOP_RECLAIM 9 .
+.It Li 0
+on success.
+.El
 .It Fn vput vp
 Unlock vnode
 .Fa vp



CVS commit: src/share/man/man9

2015-04-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Apr 20 14:07:25 UTC 2015

Modified Files:
src/share/man/man9: vnode.9

Log Message:
Rewrite vput(9) description.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/share/man/man9/vnode.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/vnode.9
diff -u src/share/man/man9/vnode.9:1.62 src/share/man/man9/vnode.9:1.63
--- src/share/man/man9/vnode.9:1.62	Mon Apr 20 14:03:10 2015
+++ src/share/man/man9/vnode.9	Mon Apr 20 14:07:24 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: vnode.9,v 1.62 2015/04/20 14:03:10 riastradh Exp $
+.\ $NetBSD: vnode.9,v 1.63 2015/04/20 14:07:24 riastradh Exp $
 .\
 .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -582,16 +582,24 @@ with
 on success.
 .El
 .It Fn vput vp
-Unlock vnode
-.Fa vp
-and decrement its
-.Em v_usecount .
-Depending on the reference counts, move the vnode to the holdlist or
-the freelist.
-This operation is functionally equivalent to calling
+Legacy convenience routine for unlocking and releasing
+.Fa vp .
+Equivalent to:
+.Bd -literal -offset abcd
+.No VOP_UNLOCK( Ns Fa vp Ns Li );
+.No vrele( Ns Fa vp Ns Li );
+.Ed
+.Pp
+Note that this is
+.Em not
+an inverse of
+.Fn vget .
+The name appears so for hysterical raisins.
+New code should prefer using
 .Xr VOP_UNLOCK 9
-followed by
-.Fn vrele .
+and
+.Fn vrele
+directly.
 .It Fn vhold vp
 Mark the vnode
 .Fa vp



CVS commit: src/share/man/man9

2015-04-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Apr 20 14:09:14 UTC 2015

Modified Files:
src/share/man/man9: vnode.9

Log Message:
Use Dv, not Li, for EBUSY/ENOENT.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/share/man/man9/vnode.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/vnode.9
diff -u src/share/man/man9/vnode.9:1.64 src/share/man/man9/vnode.9:1.65
--- src/share/man/man9/vnode.9:1.64	Mon Apr 20 14:08:52 2015
+++ src/share/man/man9/vnode.9	Mon Apr 20 14:09:14 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: vnode.9,v 1.64 2015/04/20 14:08:52 riastradh Exp $
+.\ $NetBSD: vnode.9,v 1.65 2015/04/20 14:09:14 riastradh Exp $
 .\
 .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -567,13 +567,13 @@ to lock the vnode.)
 .Pp
 Returns
 .Bl -tag -offset abcd -width ENOENT -compact
-.It Li EBUSY
+.It Dv EBUSY
 if
 .Fa vp
 was changing state and
 .Fa wait
 is false.
-.It Li ENOENT
+.It Dv ENOENT
 if the system was reclaiming
 .Fa vp
 with



CVS commit: src/share/man/man9

2015-04-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Apr 20 14:08:52 UTC 2015

Modified Files:
src/share/man/man9: vnode.9

Log Message:
Fix punctuation.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/share/man/man9/vnode.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/vnode.9
diff -u src/share/man/man9/vnode.9:1.63 src/share/man/man9/vnode.9:1.64
--- src/share/man/man9/vnode.9:1.63	Mon Apr 20 14:07:24 2015
+++ src/share/man/man9/vnode.9	Mon Apr 20 14:08:52 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: vnode.9,v 1.63 2015/04/20 14:07:24 riastradh Exp $
+.\ $NetBSD: vnode.9,v 1.64 2015/04/20 14:08:52 riastradh Exp $
 .\
 .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -572,7 +572,7 @@ if
 .Fa vp
 was changing state and
 .Fa wait
-is false,
+is false.
 .It Li ENOENT
 if the system was reclaiming
 .Fa vp



<    1   2   3   4   5   6   7   8   9   10   >