CVS commit: src/lib/libcurses

2010-02-12 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb 12 10:06:15 UTC 2010

Modified Files:
src/lib/libcurses: cr_put.c

Log Message:
Change from scroll_forward to cursor_down.
cursor_down is more similar to our old termcap use of nl.
Fixes PR lib/42770.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libcurses/cr_put.c

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

Modified files:

Index: src/lib/libcurses/cr_put.c
diff -u src/lib/libcurses/cr_put.c:1.29 src/lib/libcurses/cr_put.c:1.30
--- src/lib/libcurses/cr_put.c:1.29	Wed Feb  3 15:34:40 2010
+++ src/lib/libcurses/cr_put.c	Fri Feb 12 10:06:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cr_put.c,v 1.29 2010/02/03 15:34:40 roy Exp $	*/
+/*	$NetBSD: cr_put.c,v 1.30 2010/02/12 10:06:15 roy Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)cr_put.c	8.3 (Berkeley) 5/4/94;
 #else
-__RCSID($NetBSD: cr_put.c,v 1.29 2010/02/03 15:34:40 roy Exp $);
+__RCSID($NetBSD: cr_put.c,v 1.30 2010/02/12 10:06:15 roy Exp $);
 #endif
 #endif/* not lint */
 
@@ -112,8 +112,8 @@
 	else
 		__cputchar('\r');
 }
-if (scroll_forward)
-	tputs(scroll_forward, 0, __cputchar);
+if (cursor_down)
+	tputs(cursor_down, 0, __cputchar);
 else
 	__cputchar('\n');
 l--;
@@ -152,8 +152,8 @@
 			 * linefeed to scroll since down arrow won't go past
 			 * memory end. I turned this off after recieving Paul
 			 * Eggert's Superbee description which wins better. */
-			if (scroll_forward /*  !__tc_xb */  __pfast)
-tputs(scroll_forward, 0, __cputchar);
+			if (cursor_down /*  !__tc_xb */  __pfast)
+tputs(cursor_down, 0, __cputchar);
 			else
 __cputchar('\n');
 			l--;
@@ -327,8 +327,8 @@
 		else
 			plodput('\r');
 		if (!carriage_return) {
-			if (scroll_forward)
-tputs(scroll_forward, 0, plodput);
+			if (cursor_down)
+tputs(cursor_down, 0, plodput);
 			else
 plodput('\n');
 			outline++;
@@ -337,8 +337,8 @@
 	}
 dontcr:while (outline  destline) {
 		outline++;
-		if (scroll_forward)
-			tputs(scroll_forward, 0, plodput);
+		if (cursor_down)
+			tputs(cursor_down, 0, plodput);
 		else
 			plodput('\n');
 		if (plodcnt  0)



CVS commit: src/lib/libterminfo

2010-02-12 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb 12 10:18:56 UTC 2010

Modified Files:
src/lib/libterminfo: hash.c termcap_hash.c termcap_map.c terminfo.5.in

Log Message:
Don't try to map obsolete termcap bc and nl to terminfo.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/hash.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libterminfo/termcap_hash.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libterminfo/termcap_map.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libterminfo/terminfo.5.in

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

Modified files:

Index: src/lib/libterminfo/hash.c
diff -u src/lib/libterminfo/hash.c:1.3 src/lib/libterminfo/hash.c:1.4
--- src/lib/libterminfo/hash.c:1.3	Thu Feb  4 12:25:08 2010
+++ src/lib/libterminfo/hash.c	Fri Feb 12 10:18:56 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.c,v 1.3 2010/02/04 12:25:08 roy Exp $ */
+/* $NetBSD: hash.c,v 1.4 2010/02/12 10:18:56 roy Exp $ */
 /* DO NOT EDIT
  * Automatically generated from term.h */
 
@@ -7,7 +7,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hash.c,v 1.3 2010/02/04 12:25:08 roy Exp $);
+__RCSID($NetBSD: hash.c,v 1.4 2010/02/12 10:18:56 roy Exp $);
 
 #include stdint.h
 #include stdlib.h
@@ -61,18 +61,18 @@
 _ti_flaghash(const void * __restrict key, size_t keylen)
 {
 	static const uint8_t g[75] = {
-	0x05, 0x09, 0x03, 0x12, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00,
-	0x00, 0x08, 0x00, 0x00, 0x11, 0x24, 0x01, 0x00, 0x19, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00,
-	0x00, 0x01, 0x21, 0x09, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00,
-	0x1b, 0x16, 0x15, 0x0e, 0x0c, 0x0f, 0x00, 0x15, 0x0a, 0x22,
-	0x00, 0x24, 0x1f, 0x00, 0x00, 0x19, 0x00, 0x14, 0x00, 0x14,
-	0x05, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x0a, 0x02, 0x00,
-	0x00, 0x00, 0x00, 0x23, 0x00,
+	0x19, 0x08, 0x16, 0x00, 0x00, 0x1e, 0x07, 0x00, 0x1d, 0x00,
+	0x17, 0x00, 0x0a, 0x17, 0x08, 0x09, 0x11, 0x00, 0x00, 0x0a,
+	0x00, 0x13, 0x1a, 0x0f, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00,
+	0x12, 0x0a, 0x00, 0x11, 0x10, 0x09, 0x00, 0x00, 0x00, 0x1b,
+	0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x00,
+	0x00, 0x0d, 0x00, 0x00, 0x04, 0x16, 0x09, 0x00, 0x1a, 0x00,
+	0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+	0x00, 0x1c, 0x05, 0x00, 0x00,
 	};
 	uint32_t h[3];
 
-	mi_vector_hash(key, keylen, 0xe0584cf3U, h);
+	mi_vector_hash(key, keylen, 0xd36b2625U, h);
 	return (g[h[0] % 75] + g[h[1] % 75]) % 37;
 }
 
@@ -139,17 +139,17 @@
 _ti_numhash(const void * __restrict key, size_t keylen)
 {
 	static const uint8_t g[67] = {
-	0x1d, 0x00, 0x07, 0x09, 0x1c, 0x00, 0x0d, 0x15, 0x0f, 0x00,
-	0x00, 0x1c, 0x00, 0x11, 0x01, 0x03, 0x03, 0x00, 0x18, 0x06,
-	0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x18, 0x00, 0x1e,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x0a, 0x00, 0x00, 0x1a,
-	0x00, 0x00, 0x00, 0x0e, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x07, 0x0c, 0x00, 0x00, 0x12, 0x1f, 0x00, 0x00,
-	0x00, 0x00, 0x0b, 0x05, 0x09, 0x14, 0x0b,
+	0x04, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00,
+	0x19, 0x00, 0x0d, 0x00, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00,
+	0x0b, 0x15, 0x1d, 0x14, 0x00, 0x01, 0x13, 0x1b, 0x14, 0x00,
+	0x19, 0x00, 0x00, 0x02, 0x14, 0x1a, 0x12, 0x00, 0x00, 0x00,
+	0x16, 0x05, 0x00, 0x12, 0x04, 0x00, 0x03, 0x00, 0x00, 0x00,
+	0x19, 0x00, 0x20, 0x00, 0x00, 0x10, 0x17, 0x00, 0x00, 0x0f,
+	0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
 	};
 	uint32_t h[3];
 
-	mi_vector_hash(key, keylen, 0x4bd7de7aU, h);
+	mi_vector_hash(key, keylen, 0x50a11f58U, h);
 	return (g[h[0] % 67] + g[h[1] % 67]) % 33;
 }
 
@@ -577,109 +577,109 @@
 _ti_strhash(const void * __restrict key, size_t keylen)
 {
 	static const uint16_t g[789] = {
-	0x, 0x, 0x, 0x007f, 0x000c, 0x0026, 0x00d7, 0x,
-	0x000e, 0x, 0x00dc, 0x, 0x, 0x0153, 0x, 0x,
-	0x0003, 0x, 0x0180, 0x00bd, 0x0066, 0x0067, 0x000a, 0x00a4,
-	0x0036, 0x00b8, 0x, 0x00a6, 0x, 0x0186, 0x000d, 0x,
-	0x, 0x, 0x, 0x00e2, 0x, 0x0088, 0x00bc, 0x0075,
-	0x, 0x007e, 0x00ef, 0x, 0x, 0x, 0x00fe, 0x0159,
-	0x0093, 0x, 0x0074, 0x, 0x003d, 0x, 0x, 0x,
-	0x00f6, 0x, 0x0117, 0x, 0x0022, 0x, 0x00a1, 0x,
-	0x, 0x, 0x000a, 0x, 0x00ed, 0x012c, 0x014d, 0x005a,
-	0x016a, 0x0102, 0x, 0x, 0x012d, 0x0066, 0x005a, 0x,
-	0x, 0x, 0x00e5, 0x010f, 0x010b, 0x006d, 0x, 0x00f3,
-	0x, 0x0131, 0x012e, 0x0176, 0x, 0x, 0x0096, 0x,
-	0x00de, 0x, 0x00bb, 0x001e, 0x, 0x010e, 0x, 0x,
-	0x010c, 0x004c, 0x002e, 0x, 0x00cb, 0x0165, 0x0180, 0x00e1,
-	0x0013, 0x001d, 0x, 0x, 0x, 0x, 0x001a, 0x00d2,
-	0x007b, 0x0043, 0x0091, 0x00f2, 0x, 0x, 0x016f, 0x00a0,
-	0x000f, 0x, 0x017e, 

CVS commit: src/lib/libterminfo

2010-02-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb 12 10:36:07 UTC 2010

Modified Files:
src/lib/libterminfo: tputs.c

Log Message:
Fix an array bounds check - fixes PR lib/42793.
Restore a comment (from libterm/tputs.c), requested by jdc.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libterminfo/tputs.c

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

Modified files:

Index: src/lib/libterminfo/tputs.c
diff -u src/lib/libterminfo/tputs.c:1.1 src/lib/libterminfo/tputs.c:1.2
--- src/lib/libterminfo/tputs.c:1.1	Wed Feb  3 15:16:32 2010
+++ src/lib/libterminfo/tputs.c	Fri Feb 12 10:36:07 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tputs.c,v 1.1 2010/02/03 15:16:32 roy Exp $ */
+/* $NetBSD: tputs.c,v 1.2 2010/02/12 10:36:07 martin Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tputs.c,v 1.1 2010/02/03 15:16:32 roy Exp $);
+__RCSID($NetBSD: tputs.c,v 1.2 2010/02/12 10:36:07 martin Exp $);
 
 #include assert.h
 #include ctype.h
@@ -37,6 +37,11 @@
 #include term_private.h
 #include term.h
 
+/*
+ * The following array gives the number of tens of milliseconds per
+ * character for each speed as returned by gtty.  Thus since 300
+ * baud returns a 7, there are 33.3 milliseconds per char at 300 baud.
+ */
 static const short tmspc10[] = {
 	0, 2000, 1333, 909, 743, 666, 500, 333, 166, 83, 55, 41, 20, 10, 5
 };
@@ -78,7 +83,7 @@
 {
 	int mspc10;
 
-	if (delay  1 || os  1 || (size_t)os = sizeof(tmspc10))
+	if (delay  1 || os  1 || (size_t)os = __arraycount(tmspc10))
 		return;
 	
 	mspc10 = tmspc10[os];



CVS commit: src/share/man/man4

2010-02-12 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Feb 12 10:54:54 UTC 2010

Modified Files:
src/share/man/man4: lm.4

Log Message:
Start a new paragraph to describe flags values.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/lm.4

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/man4/lm.4
diff -u src/share/man/man4/lm.4:1.30 src/share/man/man4/lm.4:1.31
--- src/share/man/man4/lm.4:1.30	Tue Feb  9 14:10:08 2010
+++ src/share/man/man4/lm.4	Fri Feb 12 10:54:53 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: lm.4,v 1.30 2010/02/09 14:10:08 pgoyette Exp $
+.\	$NetBSD: lm.4,v 1.31 2010/02/12 10:54:53 njoly Exp $
 .\
 .\ Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -102,6 +102,7 @@
 .Tn ASUS
 .Em AS99127F .
 .El
+.Pp
 For most of the Winbond chips (identified with a * above), the
 .Em flags
 configuration option can be specified to select the type of temperature



CVS commit: src/sys/dev/scsipi

2010-02-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 12 11:39:33 UTC 2010

Modified Files:
src/sys/dev/scsipi: scsipi_base.c

Log Message:
delay() is used here, so need to include machine/param.h.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/dev/scsipi/scsipi_base.c

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

Modified files:

Index: src/sys/dev/scsipi/scsipi_base.c
diff -u src/sys/dev/scsipi/scsipi_base.c:1.150 src/sys/dev/scsipi/scsipi_base.c:1.151
--- src/sys/dev/scsipi/scsipi_base.c:1.150	Wed Oct 21 21:12:05 2009
+++ src/sys/dev/scsipi/scsipi_base.c	Fri Feb 12 11:39:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsipi_base.c,v 1.150 2009/10/21 21:12:05 rmind Exp $	*/
+/*	$NetBSD: scsipi_base.c,v 1.151 2010/02/12 11:39:33 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scsipi_base.c,v 1.150 2009/10/21 21:12:05 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: scsipi_base.c,v 1.151 2010/02/12 11:39:33 pooka Exp $);
 
 #include opt_scsi.h
 
@@ -59,6 +59,8 @@
 #include dev/scsipi/scsi_all.h
 #include dev/scsipi/scsi_message.h
 
+#include machine/param.h
+
 static int	scsipi_complete(struct scsipi_xfer *);
 static void	scsipi_request_sense(struct scsipi_xfer *);
 static int	scsipi_enqueue(struct scsipi_xfer *);



CVS commit: src/sys/rump/dev/lib

2010-02-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 12 12:07:12 UTC 2010

Modified Files:
src/sys/rump/dev/lib/libumass: Makefile
src/sys/rump/dev/lib/libusb: Makefile
Added Files:
src/sys/rump/dev/lib/libumass: dummy.c
src/sys/rump/dev/lib/libusb: dummy.c

Log Message:
I forgot I didn't fix kern/40505 yet, and hence using delay()/DELAY()
in rumps is hard due to some archs having a colorful idea of what
they should be like.  So temporarily disable build of components
using those for non-i386 (use the no-need-to-mess-with-setlists
approach).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libumass/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libumass/dummy.c
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libusb/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libusb/dummy.c

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

Modified files:

Index: src/sys/rump/dev/lib/libumass/Makefile
diff -u src/sys/rump/dev/lib/libumass/Makefile:1.1 src/sys/rump/dev/lib/libumass/Makefile:1.2
--- src/sys/rump/dev/lib/libumass/Makefile:1.1	Thu Feb 11 02:22:09 2010
+++ src/sys/rump/dev/lib/libumass/Makefile	Fri Feb 12 12:07:12 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2010/02/11 02:22:09 pooka Exp $
+#	$NetBSD: Makefile,v 1.2 2010/02/12 12:07:12 pooka Exp $
 #
 #
 # umass.  includes scsibus+sd for simplicity due to the umass code
@@ -8,7 +8,9 @@
 .PATH:	${.CURDIR}/../../../../dev/usb ${.CURDIR}/../../../../dev/scsipi
 
 LIB=	rumpdev_umass
+IOCONFIG= UMASS.ioconf
 
+.if ${MACHINE} == i386
 SRCS=	umass.c umass_isdata.c umass_quirks.c umass_scsipi.c
 SRCS+=	scsipiconf.c scsipi_base.c scsipi_ioctl.c scsi_base.c scsiconf.c
 SRCS+=	atapi_base.c atapiconf.c
@@ -16,8 +18,9 @@
 SRCS+=	cd.c sd.c
 
 SRCS+=	sd_at_scsibus_at_umass.c
-
-IOCONFIG= UMASS.ioconf
+.else
+SRCS=	dummy.c
+.endif
 
 CFLAGS+=	-Wno-pointer-sign
 CPPFLAGS+=	-I${.CURDIR}/opt -I${RUMPTOP}/librump/rumpvfs

Index: src/sys/rump/dev/lib/libusb/Makefile
diff -u src/sys/rump/dev/lib/libusb/Makefile:1.1 src/sys/rump/dev/lib/libusb/Makefile:1.2
--- src/sys/rump/dev/lib/libusb/Makefile:1.1	Thu Feb 11 02:22:10 2010
+++ src/sys/rump/dev/lib/libusb/Makefile	Fri Feb 12 12:07:12 2010
@@ -1,12 +1,16 @@
-#	$NetBSD: Makefile,v 1.1 2010/02/11 02:22:10 pooka Exp $
+#	$NetBSD: Makefile,v 1.2 2010/02/12 12:07:12 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../dev/usb
 
 LIB=	rumpdev_usb
 
+.if ${MACHINE} == i386
 SRCS=	usb.c usbdi.c usbdi_util.c usb_mem.c usb_subr.c usb_quirks.c	\
 	uhub.c usbroothub_subr.c
+.else
+SRCS=	dummy.c
+.endif
 
 #CPPFLAGS+= -DUHUB_DEBUG
 

Added files:

Index: src/sys/rump/dev/lib/libumass/dummy.c
diff -u /dev/null src/sys/rump/dev/lib/libumass/dummy.c:1.1
--- /dev/null	Fri Feb 12 12:07:12 2010
+++ src/sys/rump/dev/lib/libumass/dummy.c	Fri Feb 12 12:07:12 2010
@@ -0,0 +1 @@
+int nada;

Index: src/sys/rump/dev/lib/libusb/dummy.c
diff -u /dev/null src/sys/rump/dev/lib/libusb/dummy.c:1.1
--- /dev/null	Fri Feb 12 12:07:13 2010
+++ src/sys/rump/dev/lib/libusb/dummy.c	Fri Feb 12 12:07:12 2010
@@ -0,0 +1 @@
+int njet;



CVS commit: src/lib/libterminfo

2010-02-12 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb 12 12:18:33 UTC 2010

Modified Files:
src/lib/libterminfo: Makefile term.c
Added Files:
src/lib/libterminfo: compiled_terms.c genterms

Log Message:
Store the generated compiled terminfo descriptions so that we can build
a consistent library just from source.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libterminfo/Makefile \
src/lib/libterminfo/term.c
cvs rdiff -u -r0 -r1.1 src/lib/libterminfo/compiled_terms.c \
src/lib/libterminfo/genterms

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

Modified files:

Index: src/lib/libterminfo/Makefile
diff -u src/lib/libterminfo/Makefile:1.8 src/lib/libterminfo/Makefile:1.9
--- src/lib/libterminfo/Makefile:1.8	Thu Feb 11 14:49:56 2010
+++ src/lib/libterminfo/Makefile	Fri Feb 12 12:18:33 2010
@@ -1,25 +1,17 @@
-#	$NetBSD: Makefile,v 1.8 2010/02/11 14:49:56 roy Exp $
+#	$NetBSD: Makefile,v 1.9 2010/02/12 12:18:33 roy Exp $
 
 USE_SHLIBDIR=	yes
 
 LIB=		terminfo
 WARNS=		4
 
-CPPFLAGS+=	-I${.CURDIR} -I${.OBJDIR}
+CPPFLAGS+=	-I${.CURDIR}
 
 SRCS=		term.c ti.c setupterm.c curterm.c tparm.c tputs.c
 SRCS+=		hash.c
 INCS=		term.h
 INCSDIR=	/usr/include
 
-.PHONY:	rescue.c
-
-rescue.c:
-		${TOOL_TIC} -Sx ${NETBSDSRCDIR}/share/terminfo/terminfo \
-		ansi dumb vt100 vt220 wsvt25 xterm $@
-
-term.c: rescue.c
-
 MAN=		terminfo.3 terminfo.5
 MLINKS=		terminfo.3 setupterm.3 \
 		terminfo.3 set_curterm.3 terminfo.3 del_curterm.3 \
@@ -50,9 +42,14 @@
 		@echo Generating terminfo man pages
 		cd ${.CURDIR}  ${HOST_SH} ./genman ${.OBJDIR}/$@
 
+# Allow terminfo descriptions to be compiled into libterminfo
+compiled_terms:
+		@echo Generating compiled terminfo descriptions
+		cd ${.CURDIR}  ${HOST_SH} ./genterms compiled_terms.c
+
 man: terminfo.5
 
-gen: hash man
+gen: hash compiled_terms man
 
 .include bsd.own.mk
 .include bsd.shlib.mk
Index: src/lib/libterminfo/term.c
diff -u src/lib/libterminfo/term.c:1.8 src/lib/libterminfo/term.c:1.9
--- src/lib/libterminfo/term.c:1.8	Thu Feb 11 14:36:09 2010
+++ src/lib/libterminfo/term.c	Fri Feb 12 12:18:33 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: term.c,v 1.8 2010/02/11 14:36:09 roy Exp $ */
+/* $NetBSD: term.c,v 1.9 2010/02/12 12:18:33 roy Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: term.c,v 1.8 2010/02/11 14:36:09 roy Exp $);
+__RCSID($NetBSD: term.c,v 1.9 2010/02/12 12:18:33 roy Exp $);
 
 #include sys/stat.h
 
@@ -50,17 +50,8 @@
 static char pathbuf[PATH_MAX];
 const char *_ti_database;
 
-/* rescue.c is generated from /usr/src/share/terminfo/terminfo
- * at build time as an array of strings.
- * static const char *rescue_terms[] = {
- *	ansi,
- *	\002\005\000\141\156\163\151\000\000\000\043\000\141\156\163\151\057,
- *	NULL,
- *	NULL
- * };
- */
- 
-#include rescue.c
+/* Include a generated list of pre-compiled terminfo descriptions. */
+#include compiled_terms.c
 
 static int
 _ti_readterm(TERMINAL *term, const char *cap, size_t caplen, int flags)

Added files:

Index: src/lib/libterminfo/compiled_terms.c
diff -u /dev/null src/lib/libterminfo/compiled_terms.c:1.1
--- /dev/null	Fri Feb 12 12:18:33 2010
+++ src/lib/libterminfo/compiled_terms.c	Fri Feb 12 12:18:33 2010
@@ -0,0 +1,520 @@
+/* $NetBSD: compiled_terms.c,v 1.1 2010/02/12 12:18:33 roy Exp $ */
+/* DO NOT EDIT
+ * Regenerate by doing `make compiled_terms`
+ */
+
+struct compiled_term {
+	const char *name;
+	const char *cap;
+	size_t caplen;
+};
+
+const struct compiled_term compiled_terms[] = {
+	{
+		ansi,
+		\002\005\000\141\156\163\151\000\000\000\000\000\016\000\004
+		\000\036\000\001\001\000\001\026\000\001\027\000\001\032\000
+		\006\000\016\000\010\000\025\000\003\000\021\000\100\000\004
+		\000\120\000\007\000\010\000\012\000\030\000\142\003\107\000
+		\200\001\013\000\033\133\045\151\045\144\073\045\144\122\000
+		\201\001\005\000\033\133\066\156\000\202\001\023\000\033\133
+		\077\045\133\073\060\061\062\063\064\065\066\067\070\071\135
+		\143\000\203\001\004\000\033\133\143\000\052\001\011\000\033
+		\133\063\071\073\064\071\155\000\132\001\012\000\033\133\064
+		\045\160\061\045\144\155\000\133\001\012\000\033\133\063\045
+		\160\061\045\144\155\000\110\000\005\000\033\133\070\155\000
+		\134\001\126\000\033\133\060\073\061\060\045\077\045\160\061
+		\045\164\073\067\045\073\045\077\045\160\062\045\164\073\064
+		\045\073\045\077\045\160\063\045\164\073\067\045\073\045\077
+		\045\160\064\045\164\073\065\045\073\045\077\045\160\066\045
+		\164\073\061\045\073\045\077\045\160\067\045\164\073\070\045
+		\073\045\077\045\160\071\045\164\073\061\061\045\073\155\000
+		\063\000\005\000\033\133\065\155\000\064\000\005\000\033\133
+		\061\155\000\105\000\005\000\033\133\067\155\000\135\000\006
+		\000\033\133\061\060\155\000\140\000\004\000\033\133\155\000
+		

CVS commit: src/lib/libc/sys

2010-02-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb 12 12:29:10 UTC 2010

Modified Files:
src/lib/libc/sys: stat.2

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libc/sys/stat.2

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

Modified files:

Index: src/lib/libc/sys/stat.2
diff -u src/lib/libc/sys/stat.2:1.38 src/lib/libc/sys/stat.2:1.39
--- src/lib/libc/sys/stat.2:1.38	Wed May 13 12:51:13 2009
+++ src/lib/libc/sys/stat.2	Fri Feb 12 12:29:10 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: stat.2,v 1.38 2009/05/13 12:51:13 wiz Exp $
+.\	$NetBSD: stat.2,v 1.39 2010/02/12 12:29:10 wiz Exp $
 .\
 .\ Copyright (c) 1980, 1991, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -180,7 +180,7 @@
 A directory will be a multiple of the size of the
 .Xr dirent 5
 structure.
-Some filesystems (notably ZFS) return the number of enties in the directory
+Some filesystems (notably ZFS) return the number of entries in the directory
 instead of the size in bytes.
 .It st_blksize
 The optimal I/O block size for the file.



CVS commit: [uebayasi-xip] src/sys/uvm

2010-02-12 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Feb 12 13:38:41 UTC 2010

Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_bio.c

Log Message:
Teach device page handling.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.68.2.1 src/sys/uvm/uvm_bio.c

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

Modified files:

Index: src/sys/uvm/uvm_bio.c
diff -u src/sys/uvm/uvm_bio.c:1.68 src/sys/uvm/uvm_bio.c:1.68.2.1
--- src/sys/uvm/uvm_bio.c:1.68	Sat Nov  7 07:27:49 2009
+++ src/sys/uvm/uvm_bio.c	Fri Feb 12 13:38:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_bio.c,v 1.68 2009/11/07 07:27:49 cegger Exp $	*/
+/*	$NetBSD: uvm_bio.c,v 1.68.2.1 2010/02/12 13:38:41 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers.
@@ -34,10 +34,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_bio.c,v 1.68 2009/11/07 07:27:49 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_bio.c,v 1.68.2.1 2010/02/12 13:38:41 uebayasi Exp $);
 
 #include opt_uvmhist.h
 #include opt_ubc.h
+#include opt_xip.h
 
 #include sys/param.h
 #include sys/systm.h
@@ -335,7 +336,13 @@
 			continue;
 		}
 
-		uobj = pg-uobject;
+		if (uvm_pageisdevice_p(pg)) {
+			UVMHIST_LOG(ubchist, pg is device, i, 0,0,0);
+			goto ubc_fault_enter;
+		}
+
+		KASSERT(uobj == pg-uobject);
+			
 		mutex_enter(uobj-vmobjlock);
 		if (pg-flags  PG_WANTED) {
 			wakeup(pg);
@@ -371,26 +378,37 @@
 			}
 		}
 
+ubc_fault_enter:
 		/*
 		 * note that a page whose backing store is partially allocated
 		 * is marked as PG_RDONLY.
 		 */
 
-		rdonly = ((access_type  VM_PROT_WRITE) == 0 
-		(pg-flags  PG_RDONLY) != 0) ||
+		/* XXXUEBS device pages are always read-only for now */
+		rdonly = uvm_pageisdevice_p(pg) ||
+		((access_type  VM_PROT_WRITE) == 0 
+		 (pg-flags  PG_RDONLY) != 0) ||
 		UVM_OBJ_NEEDS_WRITEFAULT(uobj);
-		KASSERT((pg-flags  PG_RDONLY) == 0 ||
+		KASSERT(uvm_pageisdevice_p(pg) ||
+		(pg-flags  PG_RDONLY) == 0 ||
 		(access_type  VM_PROT_WRITE) == 0 ||
 		pg-offset  umap-writeoff ||
 		pg-offset + PAGE_SIZE  umap-writeoff + umap-writelen);
 		mask = rdonly ? ~VM_PROT_WRITE : VM_PROT_ALL;
+
 		error = pmap_enter(ufi-orig_map-pmap, va, VM_PAGE_TO_PHYS(pg),
 		prot  mask, PMAP_CANFAIL | (access_type  mask));
+
+		if (uvm_pageisdevice_p(pg))
+			goto ubc_fault_done;
+
 		mutex_enter(uvm_pageqlock);
 		uvm_pageactivate(pg);
 		mutex_exit(uvm_pageqlock);
 		pg-flags = ~(PG_BUSY|PG_WANTED);
 		UVM_PAGE_OWN(pg, NULL);
+
+ubc_fault_done:
 		mutex_exit(uobj-vmobjlock);
 		if (error) {
 			UVMHIST_LOG(ubchist, pmap_enter fail %d,
@@ -532,6 +550,9 @@
 		for (i = 0; i  npages; i++) {
 			struct vm_page *pg = pgs[i];
 
+			if (uvm_pageisdevice_p(pg))
+goto uvm_alloc_enter;
+
 			KASSERT(pg-uobject == uobj);
 			if (pg-loan_count != 0) {
 mutex_enter(uobj-vmobjlock);
@@ -550,6 +571,8 @@
 }
 pgs[i] = pg;
 			}
+
+uvm_alloc_enter:
 			pmap_kenter_pa(va + slot_offset + (i  PAGE_SHIFT),
 			VM_PAGE_TO_PHYS(pg),
 			VM_PROT_READ | VM_PROT_WRITE, 0);



CVS commit: [uebayasi-xip] src/sys/uvm

2010-02-12 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Feb 12 13:39:10 UTC 2010

Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_loan.c

Log Message:
Teach device page handling.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.77.2.1 src/sys/uvm/uvm_loan.c

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

Modified files:

Index: src/sys/uvm/uvm_loan.c
diff -u src/sys/uvm/uvm_loan.c:1.77 src/sys/uvm/uvm_loan.c:1.77.2.1
--- src/sys/uvm/uvm_loan.c:1.77	Wed Feb  3 14:02:49 2010
+++ src/sys/uvm/uvm_loan.c	Fri Feb 12 13:39:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_loan.c,v 1.77 2010/02/03 14:02:49 uebayasi Exp $	*/
+/*	$NetBSD: uvm_loan.c,v 1.77.2.1 2010/02/12 13:39:10 uebayasi Exp $	*/
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_loan.c,v 1.77 2010/02/03 14:02:49 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_loan.c,v 1.77.2.1 2010/02/12 13:39:10 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -540,6 +540,10 @@
 		}
 		if (error)
 			goto fail;
+		if (uvm_pageisdevice_p(pgpp[0])) {
+			error = EBUSY;
+			goto fail2;
+		}
 
 		KASSERT(npages  0);
 
@@ -606,6 +610,7 @@
 fail:
 	uvm_unloan(origpgpp, ndone, UVM_LOAN_TOPAGE);
 
+fail2:
 	return error;
 }
 
@@ -657,7 +662,7 @@
 	 * then we fail the loan.
 	 */
 
-	if (error  error != EBUSY) {
+	if ((error  error != EBUSY) || uvm_pageisdevice_p(pg)) {
 		uvmfault_unlockall(ufi, amap, uobj, NULL);
 		return (-1);
 	}



CVS commit: [uebayasi-xip] src/sys/uvm

2010-02-12 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Feb 12 13:39:26 UTC 2010

Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_object.c

Log Message:
Teach device page handling.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/uvm/uvm_object.c

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

Modified files:

Index: src/sys/uvm/uvm_object.c
diff -u src/sys/uvm/uvm_object.c:1.7 src/sys/uvm/uvm_object.c:1.7.2.1
--- src/sys/uvm/uvm_object.c:1.7	Tue Aug 18 19:16:09 2009
+++ src/sys/uvm/uvm_object.c	Fri Feb 12 13:39:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_object.c,v 1.7 2009/08/18 19:16:09 thorpej Exp $	*/
+/*	$NetBSD: uvm_object.c,v 1.7.2.1 2010/02/12 13:39:26 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_object.c,v 1.7 2009/08/18 19:16:09 thorpej Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_object.c,v 1.7.2.1 2010/02/12 13:39:26 uebayasi Exp $);
 
 #include opt_ddb.h
 #include opt_uvmhist.h
@@ -85,6 +85,9 @@
 		mutex_enter(uobj-vmobjlock);
 		for (i = 0; i  npages; i++) {
 
+			if (uvm_pageisdevice_p(pgs[i]))
+continue;
+
 			KASSERT(pgs[i] != NULL);
 			KASSERT(!(pgs[i]-flags  PG_RELEASED));
 



CVS commit: [uebayasi-xip] src/sys/uvm

2010-02-12 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Feb 12 13:40:00 UTC 2010

Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_page.h

Log Message:
Typo.


To generate a diff of this commit:
cvs rdiff -u -r1.59.2.11 -r1.59.2.12 src/sys/uvm/uvm_page.h

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

Modified files:

Index: src/sys/uvm/uvm_page.h
diff -u src/sys/uvm/uvm_page.h:1.59.2.11 src/sys/uvm/uvm_page.h:1.59.2.12
--- src/sys/uvm/uvm_page.h:1.59.2.11	Fri Feb 12 04:33:05 2010
+++ src/sys/uvm/uvm_page.h	Fri Feb 12 13:40:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.h,v 1.59.2.11 2010/02/12 04:33:05 uebayasi Exp $	*/
+/*	$NetBSD: uvm_page.h,v 1.59.2.12 2010/02/12 13:40:00 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -294,7 +294,7 @@
 #ifdef DEVICE_PAGE
 bool uvm_pageisdevice_p(const struct vm_page *);
 #else
-#define	uvm_pageisdevice_p	false
+#define	uvm_pageisdevice_p(x)	false
 #endif
 
 int uvm_page_lookup_freelist(struct vm_page *);



CVS commit: src/usr.sbin/envstat

2010-02-12 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Feb 12 14:26:27 UTC 2010

Modified Files:
src/usr.sbin/envstat: envstat.c

Log Message:
Fix double free, when requesting an invalid sensor.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/usr.sbin/envstat/envstat.c

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

Modified files:

Index: src/usr.sbin/envstat/envstat.c
diff -u src/usr.sbin/envstat/envstat.c:1.75 src/usr.sbin/envstat/envstat.c:1.76
--- src/usr.sbin/envstat/envstat.c:1.75	Fri Feb 12 05:02:40 2010
+++ src/usr.sbin/envstat/envstat.c	Fri Feb 12 14:26:27 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: envstat.c,v 1.75 2010/02/12 05:02:40 cnst Exp $ */
+/* $NetBSD: envstat.c,v 1.76 2010/02/12 14:26:27 njoly Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: envstat.c,v 1.75 2010/02/12 05:02:40 cnst Exp $);
+__RCSID($NetBSD: envstat.c,v 1.76 2010/02/12 14:26:27 njoly Exp $);
 #endif /* not lint */
 
 #include stdio.h
@@ -436,8 +436,6 @@
 		}
 		rval = check_sensors(str);
 		free(str);
-		if (rval)
-			free(str);
 	}
 	if ((flags  ENVSYS_LFLAG) == 0  (flags  ENVSYS_DFLAG) == 0)
 		print_sensors();



CVS commit: [uebayasi-xip] src/sys/uvm

2010-02-12 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Feb 12 16:06:50 UTC 2010

Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_fault.c

Log Message:
uvmfault_promote: For promotion from a lower page, pass the belonging struct
uvm_object * from callers, because device page struct vm_page * doesn't have
a back-pointer to the uvm_object.


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.166.2.1 src/sys/uvm/uvm_fault.c

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

Modified files:

Index: src/sys/uvm/uvm_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.166 src/sys/uvm/uvm_fault.c:1.166.2.1
--- src/sys/uvm/uvm_fault.c:1.166	Mon Feb  8 00:02:50 2010
+++ src/sys/uvm/uvm_fault.c	Fri Feb 12 16:06:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_fault.c,v 1.166 2010/02/08 00:02:50 mlelstv Exp $	*/
+/*	$NetBSD: uvm_fault.c,v 1.166.2.1 2010/02/12 16:06:50 uebayasi Exp $	*/
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.166 2010/02/08 00:02:50 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.166.2.1 2010/02/12 16:06:50 uebayasi Exp $);
 
 #include opt_uvmhist.h
 
@@ -546,12 +546,12 @@
 static int
 uvmfault_promote(struct uvm_faultinfo *ufi,
 struct vm_anon *oanon,
+struct uvm_object *uobj,
 struct vm_page *uobjpage,
 struct vm_anon **nanon, /* OUT: allocated anon */
 struct vm_anon **spare)
 {
 	struct vm_amap *amap = ufi-entry-aref.ar_amap;
-	struct uvm_object *uobj;
 	struct vm_anon *anon;
 	struct vm_page *pg;
 	struct vm_page *opg;
@@ -570,11 +570,6 @@
 		/* ZFOD */
 		opg = NULL;
 	}
-	if (opg != NULL) {
-		uobj = opg-uobject;
-	} else {
-		uobj = NULL;
-	}
 
 	KASSERT(amap != NULL);
 	KASSERT(uobjpage != NULL);
@@ -1534,7 +1529,7 @@
 	UVMHIST_LOG(maphist,   case 1B: COW fault,0,0,0,0);
 	uvmexp.flt_acow++;
 
-	error = uvmfault_promote(ufi, oanon, PGO_DONTCARE,
+	error = uvmfault_promote(ufi, oanon, NULL, PGO_DONTCARE,
 	anon, flt-anon_spare);
 	switch (error) {
 	case 0:
@@ -1986,7 +1981,7 @@
 	if (amap == NULL)
 		panic(uvm_fault: want to promote data, but no anon);
 #endif
-	error = uvmfault_promote(ufi, NULL, uobjpage,
+	error = uvmfault_promote(ufi, NULL, uobj, uobjpage,
 	anon, flt-anon_spare);
 	switch (error) {
 	case 0:



CVS commit: [uebayasi-xip] src/sys/uvm

2010-02-12 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Feb 12 16:09:56 UTC 2010

Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_fault.c

Log Message:
Teach device page handling to the lower fault handler.  Skip all the paging
activities, no loaning, no wired count.  Only compile tested so far.


To generate a diff of this commit:
cvs rdiff -u -r1.166.2.1 -r1.166.2.2 src/sys/uvm/uvm_fault.c

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

Modified files:

Index: src/sys/uvm/uvm_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.166.2.1 src/sys/uvm/uvm_fault.c:1.166.2.2
--- src/sys/uvm/uvm_fault.c:1.166.2.1	Fri Feb 12 16:06:50 2010
+++ src/sys/uvm/uvm_fault.c	Fri Feb 12 16:09:56 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_fault.c,v 1.166.2.1 2010/02/12 16:06:50 uebayasi Exp $	*/
+/*	$NetBSD: uvm_fault.c,v 1.166.2.2 2010/02/12 16:09:56 uebayasi Exp $	*/
 
 /*
  *
@@ -39,9 +39,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.166.2.1 2010/02/12 16:06:50 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.166.2.2 2010/02/12 16:09:56 uebayasi Exp $);
 
 #include opt_uvmhist.h
+#include opt_xip.h
 
 #include sys/param.h
 #include sys/systm.h
@@ -573,7 +574,8 @@
 
 	KASSERT(amap != NULL);
 	KASSERT(uobjpage != NULL);
-	KASSERT(uobjpage == PGO_DONTCARE || (uobjpage-flags  PG_BUSY) != 0);
+	KASSERT(uobjpage == PGO_DONTCARE || uvm_pageisdevice_p(uobjpage) ||
+	(uobjpage-flags  PG_BUSY) != 0);
 	KASSERT(mutex_owned(amap-am_l));
 	KASSERT(oanon == NULL || mutex_owned(oanon-an_lock));
 	KASSERT(uobj == NULL || mutex_owned(uobj-vmobjlock));
@@ -1235,7 +1237,8 @@
 	/* locked: maps(read), amap(if there), uobj(if !null), uobjpage(if !null) */
 	KASSERT(amap == NULL || mutex_owned(amap-am_l));
 	KASSERT(uobj == NULL || mutex_owned(uobj-vmobjlock));
-	KASSERT(uobjpage == NULL || (uobjpage-flags  PG_BUSY) != 0);
+	KASSERT(uobjpage == NULL || uvm_pageisdevice_p(uobjpage) ||
+	(uobjpage-flags  PG_BUSY) != 0);
 
 	/*
 	 * note that at this point we are done with any front or back pages.
@@ -1299,7 +1302,7 @@
 		if (curpg == NULL || curpg == PGO_DONTCARE) {
 			continue;
 		}
-		KASSERT(curpg-uobject == uobj);
+		KASSERT(uvm_pageisdevice_p(curpg) || curpg-uobject == uobj);
 
 		/*
 		 * if center page is resident and not PG_BUSY|PG_RELEASED
@@ -1312,7 +1315,8 @@
 			(0x%x) with locked get,
 			curpg, 0,0,0);
 		} else {
-			bool readonly = (curpg-flags  PG_RDONLY)
+			bool readonly = uvm_pageisdevice_p(curpg)
+			|| (curpg-flags  PG_RDONLY)
 			|| (curpg-loan_count  0)
 			|| UVM_OBJ_NEEDS_WRITEFAULT(curpg-uobject);
 
@@ -1331,6 +1335,9 @@
 {
 	UVMHIST_FUNC(uvm_fault_lower_neighor); UVMHIST_CALLED(maphist);
 
+	if (uvm_pageisdevice_p(pg))
+		goto uvm_fault_lower_neighbor_enter;
+
 	/*
 	 * calling pgo_get with PGO_LOCKED returns us pages which
 	 * are neither busy nor released, so we don't need to check
@@ -1355,12 +1362,16 @@
 	KASSERT(!UVM_OBJ_IS_CLEAN(pg-uobject) ||
 	(pg-flags  PG_CLEAN) != 0);
 
+uvm_fault_lower_neighbor_enter:
 	(void) pmap_enter(ufi-orig_map-pmap, currva,
 	VM_PAGE_TO_PHYS(pg),
 	readonly ? (flt-enter_prot  ~VM_PROT_WRITE) :
 	flt-enter_prot  MASK(ufi-entry),
 	PMAP_CANFAIL | (flt-wire_mapping ? PMAP_WIRED : 0));
 
+	if (uvm_pageisdevice_p(pg))
+		goto uvm_fault_lower_neighbor_done;
+
 	/*
 	 * NOTE: page can't be PG_WANTED or PG_RELEASED because we've
 	 * held the lock the whole time we've had the handle.
@@ -1370,6 +1381,9 @@
 
 	pg-flags = ~(PG_BUSY);
 	UVM_PAGE_OWN(pg, NULL);
+
+uvm_fault_lower_neighbor_done:
+	;
 }
 
 static int
@@ -1687,7 +1701,8 @@
 	 */
 	KASSERT(amap == NULL || mutex_owned(amap-am_l));
 	KASSERT(uobj == NULL || mutex_owned(uobj-vmobjlock));
-	KASSERT(uobjpage == NULL || (uobjpage-flags  PG_BUSY) != 0);
+	KASSERT(uobjpage == NULL || uvm_pageisdevice_p(uobjpage) ||
+	(uobjpage-flags  PG_BUSY) != 0);
 
 	/*
 	 * note that uobjpage can not be PGO_DONTCARE at this point.  we now
@@ -1730,7 +1745,8 @@
 	 */
 	KASSERT(amap == NULL || mutex_owned(amap-am_l));
 	KASSERT(uobj == NULL || mutex_owned(uobj-vmobjlock));
-	KASSERT(uobj == NULL || (uobjpage-flags  PG_BUSY) != 0);
+	KASSERT(uobj == NULL || uvm_pageisdevice_p(uobjpage) ||
+	(uobjpage-flags  PG_BUSY) != 0);
 
 	/*
 	 * notes:
@@ -1740,8 +1756,10 @@
 	 *  - at this point uobjpage could be PG_WANTED (handle later)
 	 */
 
-	KASSERT(uobj == NULL || uobj == uobjpage-uobject);
-	KASSERT(uobj == NULL || !UVM_OBJ_IS_CLEAN(uobjpage-uobject) ||
+	KASSERT(uvm_pageisdevice_p(uobjpage) || uobj == NULL ||
+	uobj == uobjpage-uobject);
+	KASSERT(uvm_pageisdevice_p(uobjpage) || uobj == NULL ||
+	!UVM_OBJ_IS_CLEAN(uobjpage-uobject) ||
 	(uobjpage-flags  PG_CLEAN) != 0);
 
 	if (promote == false) {
@@ -1897,12 +1915,15 @@
 	 *
 	 * set pg to the page we want to map in (uobjpage, usually)
 	 */
+	pg = uobjpage;		/* map in the actual object */
+
+	if 

CVS commit: src/sys/arch/hp700/hp700

2010-02-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 12 16:57:21 UTC 2010

Modified Files:
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.31 src/sys/arch/hp700/hp700/autoconf.c:1.32
--- src/sys/arch/hp700/hp700/autoconf.c:1.31	Fri Dec 18 15:49:48 2009
+++ src/sys/arch/hp700/hp700/autoconf.c	Fri Feb 12 16:57:21 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.31 2009/12/18 15:49:48 skrll Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.32 2010/02/12 16:57:21 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.31 2009/12/18 15:49:48 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.32 2010/02/12 16:57:21 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -348,7 +348,7 @@
 		boot_device = dev;
 	/*
 	 * If the boot device is a PCI device the HPA is the address where the
-	 * firmware has maped the PCI memory of the PCI device. This is quite
+	 * firmware has mapped the PCI memory of the PCI device. This is quite
 	 * device dependent, so we compare the DP. It encodes the bus routing
 	 * information to the PCI bus bridge in the DP head and the PCI device
 	 * and PCI function in the last two DP components. So we compare the



CVS commit: src/sys/arch/hp700/hp700

2010-02-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 12 16:57:52 UTC 2010

Modified Files:
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Allow elroy to provide boot device.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.32 src/sys/arch/hp700/hp700/autoconf.c:1.33
--- src/sys/arch/hp700/hp700/autoconf.c:1.32	Fri Feb 12 16:57:21 2010
+++ src/sys/arch/hp700/hp700/autoconf.c	Fri Feb 12 16:57:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.32 2010/02/12 16:57:21 skrll Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.33 2010/02/12 16:57:52 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.32 2010/02/12 16:57:21 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.33 2010/02/12 16:57:52 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -360,7 +360,7 @@
 	 * on a match. In case of a SCSI boot device we have to do the same
 	 * check when SCSI devices are attached like on GSC SCSI controllers.
 	 */
-	if (device_is_a(dev, dino)) {
+	if (device_is_a(dev, dino) || device_is_a(dev, elroy)) {
 		struct confargs *ca = (struct confargs *)aux;
 		int i, n;
 



CVS commit: src/dist/libpcap

2010-02-12 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 12 21:16:56 UTC 2010

Modified Files:
src/dist/libpcap: pf.h

Log Message:
sync with rev. 1.5 of sys/dist/pf/net/if_pflog.h (which was before
the 5.x branch), to make filter expressions in pflog dumps work again,
from Lucio Albornoz per PR bin/42780
(pullup candidate)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/dist/libpcap/pf.h

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

Modified files:

Index: src/dist/libpcap/pf.h
diff -u src/dist/libpcap/pf.h:1.1.1.1 src/dist/libpcap/pf.h:1.2
--- src/dist/libpcap/pf.h:1.1.1.1	Mon Feb 27 15:45:49 2006
+++ src/dist/libpcap/pf.h	Fri Feb 12 21:16:56 2010
@@ -26,7 +26,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * @(#) $Header: /cvsroot/src/dist/libpcap/pf.h,v 1.1.1.1 2006/02/27 15:45:49 drochner Exp $ (LBL)
+ * @(#) $Header: /cvsroot/src/dist/libpcap/pf.h,v 1.2 2010/02/12 21:16:56 drochner Exp $ (LBL)
  */
 
 /*	from $OpenBSD: pfvar.h,v 1.170 2003/08/22 21:50:34 david Exp $ */
@@ -71,6 +71,10 @@
 	char		ruleset[PF_RULESET_NAME_SIZE];
 	u_int32_t	rulenr;
 	u_int32_t	subrulenr;
+	u_int32_t	uid;
+	int32_t		pid;
+	u_int32_t	rule_uid;
+	int32_t		rule_pid;
 	u_int8_t	dir;
 	u_int8_t	pad[3];
 };



CVS commit: src/sys/arch/hp700/conf

2010-02-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 12 22:19:23 UTC 2010

Modified Files:
src/sys/arch/hp700/conf: GENERIC

Log Message:
Spelling.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/hp700/conf/GENERIC

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

Modified files:

Index: src/sys/arch/hp700/conf/GENERIC
diff -u src/sys/arch/hp700/conf/GENERIC:1.92 src/sys/arch/hp700/conf/GENERIC:1.93
--- src/sys/arch/hp700/conf/GENERIC:1.92	Mon Feb  8 08:49:57 2010
+++ src/sys/arch/hp700/conf/GENERIC	Fri Feb 12 22:19:23 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.92 2010/02/08 08:49:57 skrll Exp $
+# $NetBSD: GENERIC,v 1.93 2010/02/12 22:19:23 skrll Exp $
 #
 # GENERIC machine description file
 #
@@ -23,7 +23,7 @@
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
-#ident 		GENERIC-$Revision: 1.92 $
+#ident 		GENERIC-$Revision: 1.93 $
 
 maxusers	32		# estimated number of users
 
@@ -281,7 +281,7 @@
 #eisa*	at weisa?
 
 # ISA bus support
-# Beware: Most ISA MI drivers are not endianes clean!
+# Beware: Most ISA MI drivers are not endianness clean!
 #isa*	at mongoose?
 #isa*	at weisa?
 



CVS commit: src/lib/libc/atomic

2010-02-12 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Feb 12 22:23:17 UTC 2010

Modified Files:
src/lib/libc/atomic: atomic_cas.3

Log Message:
With help from rmind@, describe the non-interlocked (*_ni) variants of
the standard atomic compare-and-swap operations.  Tell some caveats.

Manual page links, *_ni.3 - atomic_cas.3 are coming up after a
successful 'build.sh distribution'.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/atomic/atomic_cas.3

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

Modified files:

Index: src/lib/libc/atomic/atomic_cas.3
diff -u src/lib/libc/atomic/atomic_cas.3:1.1 src/lib/libc/atomic/atomic_cas.3:1.2
--- src/lib/libc/atomic/atomic_cas.3:1.1	Mon Jun 23 10:22:40 2008
+++ src/lib/libc/atomic/atomic_cas.3	Fri Feb 12 22:23:17 2010
@@ -1,6 +1,6 @@
-.\	$NetBSD: atomic_cas.3,v 1.1 2008/06/23 10:22:40 ad Exp $
+.\	$NetBSD: atomic_cas.3,v 1.2 2010/02/12 22:23:17 dyoung Exp $
 .\
-.\ Copyright (c) 2007 The NetBSD Foundation, Inc.
+.\ Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
 .\ This code is derived from software contributed to The NetBSD Foundation
@@ -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 11, 2007
+.Dd February 11, 2010
 .Dt ATOMIC_CAS 3
 .Os
 .Sh NAME
@@ -36,7 +36,12 @@
 .Nm atomic_cas_uint ,
 .Nm atomic_cas_ulong ,
 .Nm atomic_cas_ptr ,
-.Nm atomic_cas_64
+.Nm atomic_cas_64 ,
+.Nm atomic_cas_32_ni ,
+.Nm atomic_cas_uint_ni ,
+.Nm atomic_cas_ulong_ni ,
+.Nm atomic_cas_ptr_ni ,
+.Nm atomic_cas_64_ni
 .Nd atomic compare-and-swap operations
 .\ .Sh LIBRARY
 .\ .Lb libc
@@ -54,6 +59,18 @@
 .Fn atomic_cas_ptr volatile void *ptr void *old void *new
 .Ft uint64_t
 .Fn atomic_cas_64 volatile uint64_t *ptr uint64_t old uint64_t new
+.Ft uint32_t
+.Fn atomic_cas_32_ni volatile uint32_t *ptr uint32_t old uint32_t new
+.Ft unsigned int
+.Fn atomic_cas_uint_ni volatile unsigned int *ptr unsigned int old \
+unsigned int new
+.Ft unsigned long
+.Fn atomic_cas_ulong_ni volatile unsigned long *ptr unsigned long old \
+unsigned long new
+.Ft void *
+.Fn atomic_cas_ptr_ni volatile void *ptr void *old void *new
+.Ft uint64_t
+.Fn atomic_cas_64_ni volatile uint64_t *ptr uint64_t old uint64_t new
 .Sh DESCRIPTION
 The
 .Nm atomic_cas
@@ -75,6 +92,20 @@
 .Fa old ;
 if they are equal then the new value was stored.
 .Pp
+The non-interlocked variants,
+.Fn *_ni ,
+guarantee atomicity within the same CPU with respect to
+interrupts and preemption.
+For example, they are suitable for synchronizing compare-and-swap
+operations on a variable shared by a thread and an interrupt
+that are bound to the same CPU.
+The
+.Fn *_ni
+variants are not atomic with respect to different CPUs.
+.Fn *_ni
+variants should avoid the interprocessor synchronization overhead
+of the standard compare-and-swap operations.
+.Pp
 The 64-bit variants of these functions are available only on platforms
 that can support atomic 64-bit memory access.
 Applications can check for the availability of 64-bit atomic memory
@@ -88,3 +119,11 @@
 .Nm atomic_cas
 functions first appeared in
 .Nx 5.0 .
+.Sh NOTES
+On some architectures, a
+.Fn *_ni
+variant is merely an alias for the corresponding standard
+compare-and-swap operation.
+While the non-interlocked variant behaves correctly on those
+architectures, it does not avoid the interprocessor synchronization
+overhead.



CVS commit: src/sys/arch/hp700/hp700

2010-02-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 12 22:23:40 UTC 2010

Modified Files:
src/sys/arch/hp700/hp700: mainbus.c

Log Message:
Just return if length of zero is passed to bus_dmamap_sync.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/hp700/hp700/mainbus.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.58 src/sys/arch/hp700/hp700/mainbus.c:1.59
--- src/sys/arch/hp700/hp700/mainbus.c:1.58	Wed Dec  2 13:49:32 2009
+++ src/sys/arch/hp700/hp700/mainbus.c	Fri Feb 12 22:23:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.58 2009/12/02 13:49:32 skrll Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.59 2010/02/12 22:23:40 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.58 2009/12/02 13:49:32 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.59 2010/02/12 22:23:40 skrll Exp $);
 
 #include locators.h
 #include power.h
@@ -1101,6 +1101,7 @@
 int ops)
 {
 	int i;
+
 	/*
 	 * Mixing of PRE and POST operations is not allowed.
 	 */
@@ -1112,7 +1113,7 @@
 	if (offset = map-dm_mapsize)
 		panic(mbus_dmamap_sync: bad offset %lu (map size is %lu),
 		offset, map-dm_mapsize);
-	if (len == 0 || (offset + len)  map-dm_mapsize)
+	if ((offset + len)  map-dm_mapsize)
 		panic(mbus_dmamap_sync: bad length);
 #endif
 
@@ -1133,7 +1134,7 @@
 	 */
 
 	ops = (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
-	if (ops == 0)
+	if (len == 0 || ops == 0)
 		return;
 
 	for (i = 0; len != 0  i  map-dm_nsegs; i++) {



CVS commit: src/sys/arch/hp700/hp700

2010-02-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 12 22:31:05 UTC 2010

Modified Files:
src/sys/arch/hp700/hp700: mainbus.c

Log Message:
Comment reformating and correction.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/hp700/hp700/mainbus.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.59 src/sys/arch/hp700/hp700/mainbus.c:1.60
--- src/sys/arch/hp700/hp700/mainbus.c:1.59	Fri Feb 12 22:23:40 2010
+++ src/sys/arch/hp700/hp700/mainbus.c	Fri Feb 12 22:31:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.59 2010/02/12 22:23:40 skrll Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.60 2010/02/12 22:31:05 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.59 2010/02/12 22:23:40 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.60 2010/02/12 22:31:05 skrll Exp $);
 
 #include locators.h
 #include power.h
@@ -843,8 +843,8 @@
 };
 
 /*
- * Common function for DMA map creation.  May be called by bus-specific
- * DMA map creation functions.
+ * Common function for DMA map creation.  May be called by bus-specific DMA map
+ * creation functions.
  */
 int
 mbus_dmamap_create(void *v, bus_size_t size, int nsegments, bus_size_t maxsegsz,
@@ -854,16 +854,16 @@
 	size_t mapsize;
 
 	/*
-	 * Allocate and initialize the DMA map.  The end of the map
-	 * is a variable-sized array of segments, so we allocate enough
-	 * room for them in one shot.
+	 * Allocate and initialize the DMA map.  The end of the map is a
+	 * variable-sized array of segments, so we allocate enough room for
+	 * them in one shot.
 	 *
-	 * Note we don't preserve the WAITOK or NOWAIT flags.  Preservation
-	 * of ALLOCNOW notifies others that we've reserved these resources,
-	 * and they are not to be freed.
+	 * Note we don't preserve the WAITOK or NOWAIT flags.  Preservation of
+	 * ALLOCNOW notifies others that we've reserved these resources, and
+	 * they are not to be freed.
 	 *
-	 * The bus_dmamap_t includes one bus_dma_segment_t, hence
-	 * the (nsegments - 1).
+	 * The bus_dmamap_t includes one bus_dma_segment_t, hence the
+	 * (nsegments - 1).
 	 */
 	mapsize = sizeof(struct hppa_bus_dmamap) +
 	(sizeof(bus_dma_segment_t) * (nsegments - 1));
@@ -886,8 +886,8 @@
 }
 
 /*
- * Common function for DMA map destruction.  May be called by bus-specific
- * DMA map destruction functions.
+ * Common function for DMA map destruction.  May be called by bus-specific DMA
+ * map destruction functions.
  */
 void
 mbus_dmamap_destroy(void *v, bus_dmamap_t map)
@@ -1085,10 +1085,9 @@
 mbus_dmamap_unload(void *v, bus_dmamap_t map)
 {
 	/*
-	 * If this map was loaded with mbus_dmamap_load,
-	 * we don't need to do anything.  If this map was
-	 * loaded with mbus_dmamap_load_raw, we also don't
-	 * need to do anything.
+	 * If this map was loaded with mbus_dmamap_load, we don't need to do
+	 * anything.  If this map was loaded with mbus_dmamap_load_raw, we also
+	 * don't need to do anything.
 	 */
 
 	/* Mark the mappings as invalid. */
@@ -1116,17 +1115,21 @@
 	if ((offset + len)  map-dm_mapsize)
 		panic(mbus_dmamap_sync: bad length);
 #endif
+	
+	/* If the whole DMA map is marked as BUS_DMA_COHERENT, do nothing. */
+	if ((map-_dm_flags  BUS_DMA_COHERENT) != 0)
+		return;
 
 	/*
-	 * For a virtually-indexed write-back cache, we need
-	 * to do the following things:
+	 * For a virtually-indexed write-back cache, we need to do the
+	 * following things:
 	 *
-	 *	PREREAD -- Invalidate the D-cache.  We do this
-	 *	here in case a write-back is required by the back-end.
+	 *	PREREAD -- Invalidate the D-cache.  We do this here in case a
+	 *	write-back is required by the back-end.
 	 *
-	 *	PREWRITE -- Write-back the D-cache.  Note that if
-	 *	we are doing a PREREAD|PREWRITE, we can collapse
-	 *	the whole thing into a single Wb-Inv.
+	 *	PREWRITE -- Write-back the D-cache.  Note that if we are doing
+	 *	a PREREAD|PREWRITE, we can collapse the whole thing into a
+	 *	single Wb-Inv.
 	 *
 	 *	POSTREAD -- Nothing.
 	 *
@@ -1159,8 +1162,8 @@
 }
 
 /*
- * Common function for DMA-safe memory allocation.  May be called
- * by bus-specific DMA memory allocation functions.
+ * Common function for DMA-safe memory allocation.  May be called by bus-
+ * specific DMA memory allocation functions.
  */
 int
 mbus_dmamem_alloc(void *v, bus_size_t size, bus_size_t alignment,
@@ -1251,16 +1254,14 @@
 	 * Simply keep a pointer around to the linked list, so
 	 * bus_dmamap_free() can return it.
 	 *
-	 * NOBODY SHOULD TOUCH THE pageq.queue FIELDS WHILE THESE PAGES
-	 * ARE IN OUR CUSTODY.
+	 * Nobody should touch the pageq.queue fields while these pages are in
+	 * our custody.
 	 */
 	segs[0]._ds_mlist = mlist;
 
 	/*
-	 * We now have physical 

CVS commit: src

2010-02-12 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Feb 12 22:34:38 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libc/atomic: Makefile.inc

Log Message:
Link atomic_cas.3 to atomic_cas_{32,64,ptr,uint,ulong}_ni.3.


To generate a diff of this commit:
cvs rdiff -u -r1.1390 -r1.1391 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/atomic/Makefile.inc

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1390 src/distrib/sets/lists/comp/mi:1.1391
--- src/distrib/sets/lists/comp/mi:1.1390	Fri Feb 12 00:45:37 2010
+++ src/distrib/sets/lists/comp/mi	Fri Feb 12 22:34:38 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1390 2010/02/12 00:45:37 dyoung Exp $
+#	$NetBSD: mi,v 1.1391 2010/02/12 22:34:38 dyoung Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -4939,6 +4939,11 @@
 ./usr/share/man/cat3/atomic_cas_ptr.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_cas_uint.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_cas_ulong.0		comp-c-catman		.cat
+./usr/share/man/cat3/atomic_cas_32_ni.0		comp-c-catman		.cat
+./usr/share/man/cat3/atomic_cas_64_ni.0		comp-c-catman		.cat
+./usr/share/man/cat3/atomic_cas_ptr_ni.0	comp-c-catman		.cat
+./usr/share/man/cat3/atomic_cas_uint_ni.0	comp-c-catman		.cat
+./usr/share/man/cat3/atomic_cas_ulong_ni.0	comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_dec.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_dec_32.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_dec_32_nv.0		comp-c-catman		.cat
@@ -10701,6 +10706,11 @@
 ./usr/share/man/html3/atomic_cas_ptr.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_cas_uint.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_cas_ulong.html	comp-c-htmlman		html
+./usr/share/man/html3/atomic_cas_32_ni.html	comp-c-htmlman		html
+./usr/share/man/html3/atomic_cas_64_ni.html	comp-c-htmlman		html
+./usr/share/man/html3/atomic_cas_ptr_ni.html	comp-c-htmlman		html
+./usr/share/man/html3/atomic_cas_uint_ni.html	comp-c-htmlman		html
+./usr/share/man/html3/atomic_cas_ulong_ni.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_dec.html		comp-c-htmlman		html
 ./usr/share/man/html3/atomic_dec_32.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_dec_32_nv.html	comp-c-htmlman		html
@@ -16263,6 +16273,11 @@
 ./usr/share/man/man3/atomic_cas_ptr.3		comp-c-man		.man
 ./usr/share/man/man3/atomic_cas_uint.3		comp-c-man		.man
 ./usr/share/man/man3/atomic_cas_ulong.3		comp-c-man		.man
+./usr/share/man/man3/atomic_cas_32_ni.3		comp-c-man		.man
+./usr/share/man/man3/atomic_cas_64_ni.3		comp-c-man		.man
+./usr/share/man/man3/atomic_cas_ptr_ni.3	comp-c-man		.man
+./usr/share/man/man3/atomic_cas_uint_ni.3	comp-c-man		.man
+./usr/share/man/man3/atomic_cas_ulong_ni.3	comp-c-man		.man
 ./usr/share/man/man3/atomic_dec.3		comp-c-man		.man
 ./usr/share/man/man3/atomic_dec_32.3		comp-c-man		.man
 ./usr/share/man/man3/atomic_dec_32_nv.3		comp-c-man		.man

Index: src/lib/libc/atomic/Makefile.inc
diff -u src/lib/libc/atomic/Makefile.inc:1.1 src/lib/libc/atomic/Makefile.inc:1.2
--- src/lib/libc/atomic/Makefile.inc:1.1	Mon Jun 23 10:22:40 2008
+++ src/lib/libc/atomic/Makefile.inc	Fri Feb 12 22:34:38 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.1 2008/06/23 10:22:40 ad Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2010/02/12 22:34:38 dyoung Exp $
 #	from: @(#)Makefile.inc	8.6 (Berkeley) 5/4/95
 
 # gen sources
@@ -31,6 +31,11 @@
 	atomic_cas.3 atomic_cas_ulong.3 \
 	atomic_cas.3 atomic_cas_ptr.3 \
 	atomic_cas.3 atomic_cas_64.3 \
+	atomic_cas.3 atomic_cas_32_ni.3 \
+	atomic_cas.3 atomic_cas_uint_ni.3 \
+	atomic_cas.3 atomic_cas_ulong_ni.3 \
+	atomic_cas.3 atomic_cas_ptr_ni.3 \
+	atomic_cas.3 atomic_cas_64_ni.3 \
 	atomic_dec.3 atomic_dec_32.3 \
 	atomic_dec.3 atomic_dec_uint.3 \
 	atomic_dec.3 atomic_dec_ulong.3 \



CVS commit: src/sys/arch/hp700/hp700

2010-02-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 12 22:34:39 UTC 2010

Modified Files:
src/sys/arch/hp700/hp700: mainbus.c

Log Message:
More comment fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/hp700/hp700/mainbus.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.60 src/sys/arch/hp700/hp700/mainbus.c:1.61
--- src/sys/arch/hp700/hp700/mainbus.c:1.60	Fri Feb 12 22:31:05 2010
+++ src/sys/arch/hp700/hp700/mainbus.c	Fri Feb 12 22:34:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.60 2010/02/12 22:31:05 skrll Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.61 2010/02/12 22:34:39 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.60 2010/02/12 22:31:05 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.61 2010/02/12 22:34:39 skrll Exp $);
 
 #include locators.h
 #include power.h
@@ -939,7 +939,7 @@
 }
 
 /*
- * Like _bus_dmamap_load(), but for mbufs.
+ * Like bus_dmamap_load(), but for mbufs.
  */
 int
 mbus_dmamap_load_mbuf(void *v, bus_dmamap_t map, struct mbuf *m0,
@@ -981,7 +981,7 @@
 }
 
 /*
- * Like _bus_dmamap_load(), but for uios.
+ * Like bus_dmamap_load(), but for uios.
  */
 int
 mbus_dmamap_load_uio(void *v, bus_dmamap_t map, struct uio *uio,



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-02-12 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sat Feb 13 00:14:00 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: signature.h

Log Message:
let's get modern int types defined so that netpgp will build on mac os x


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/external/bsd/netpgp/dist/src/lib/signature.h

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/signature.h
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/signature.h:1.15 src/crypto/external/bsd/netpgp/dist/src/lib/signature.h:1.16
--- src/crypto/external/bsd/netpgp/dist/src/lib/signature.h:1.15	Sat Feb  6 02:24:33 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/signature.h	Sat Feb 13 00:14:00 2010
@@ -53,6 +53,10 @@
 #ifndef SIGNATURE_H_
 #define SIGNATURE_H_
 
+#include sys/types.h
+
+#include inttypes.h
+
 #include packet.h
 #include create.h
 #include memory.h



CVS commit: src/sys/dev/usb

2010-02-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 13 02:09:41 UTC 2010

Modified Files:
src/sys/dev/usb: umass.c umass_quirks.c umassvar.h

Log Message:
Remove UMASS_QUIRK_IGNORE_RESIDUE, instead max out the expected response
size at the actual transfer length. Fixes PR kern/42225 differently.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/dev/usb/umass.c
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/usb/umass_quirks.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/umassvar.h

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

Modified files:

Index: src/sys/dev/usb/umass.c
diff -u src/sys/dev/usb/umass.c:1.136 src/sys/dev/usb/umass.c:1.137
--- src/sys/dev/usb/umass.c:1.136	Thu Nov 12 19:58:27 2009
+++ src/sys/dev/usb/umass.c	Sat Feb 13 02:09:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass.c,v 1.136 2009/11/12 19:58:27 dyoung Exp $	*/
+/*	$NetBSD: umass.c,v 1.137 2010/02/13 02:09:41 martin Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.136 2009/11/12 19:58:27 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.137 2010/02/13 02:09:41 martin Exp $);
 
 #include atapibus.h
 #include scsibus.h
@@ -1178,10 +1178,9 @@
 
 		DIF(UDMASS_BBB, umass_bbb_dump_csw(sc, sc-csw));
 
-		if (sc-sc_quirks  UMASS_QUIRK_IGNORE_RESIDUE)
-residue = sc-transfer_datalen - sc-transfer_actlen;
-else
-residue = UGETDW(sc-csw.dCSWDataResidue);
+		residue = UGETDW(sc-csw.dCSWDataResidue);
+		if (residue  sc-transfer_datalen - sc-transfer_actlen)
+		residue = sc-transfer_datalen - sc-transfer_actlen;
 
 		/* Translate weird command-status signatures. */
 		if ((sc-sc_quirks  UMASS_QUIRK_WRONG_CSWSIG) 

Index: src/sys/dev/usb/umass_quirks.c
diff -u src/sys/dev/usb/umass_quirks.c:1.78 src/sys/dev/usb/umass_quirks.c:1.79
--- src/sys/dev/usb/umass_quirks.c:1.78	Fri Oct 30 16:22:32 2009
+++ src/sys/dev/usb/umass_quirks.c	Sat Feb 13 02:09:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass_quirks.c,v 1.78 2009/10/30 16:22:32 is Exp $	*/
+/*	$NetBSD: umass_quirks.c,v 1.79 2010/02/13 02:09:41 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umass_quirks.c,v 1.78 2009/10/30 16:22:32 is Exp $);
+__KERNEL_RCSID(0, $NetBSD: umass_quirks.c,v 1.79 2010/02/13 02:09:41 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -229,17 +229,6 @@
 	  UMATCH_VENDOR_PRODUCT,
 	  NULL, NULL
 	},
-
-/*
- * Devices with bad residue.
- */
-{ { USB_VENDOR_SUPERTOP, USB_PRODUCT_SUPERTOP_IDEBRIDGE },
-  UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
-  UMASS_QUIRK_IGNORE_RESIDUE,
-  0,
-  UMATCH_VENDOR_PRODUCT,
-  NULL, NULL
-},
 };
 
 const struct umass_quirk *

Index: src/sys/dev/usb/umassvar.h
diff -u src/sys/dev/usb/umassvar.h:1.28 src/sys/dev/usb/umassvar.h:1.29
--- src/sys/dev/usb/umassvar.h:1.28	Fri Oct 30 16:22:32 2009
+++ src/sys/dev/usb/umassvar.h	Sat Feb 13 02:09:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: umassvar.h,v 1.28 2009/10/30 16:22:32 is Exp $	*/
+/*	$NetBSD: umassvar.h,v 1.29 2010/02/13 02:09:41 martin Exp $	*/
 /*-
  * Copyright (c) 1999 MAEKAWA Masahide bis...@rr.iij4u.or.jp,
  *		  Nick Hibma n_hi...@freebsd.org
@@ -180,7 +180,6 @@
 #define	UMASS_QUIRK_WRONG_CSWTAG	0x0002
 #define	UMASS_QUIRK_RBC_PAD_TO_12	0x0004
 #define	UMASS_QUIRK_NOGETMAXLUN		0x0008
-#define UMASS_QUIRK_IGNORE_RESIDUE  0x0010
 
 #define UMASS_QUIRK_USE_DEFAULTMATCH	-1
 



CVS commit: src/sys/dev/usb

2010-02-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 13 02:16:51 UTC 2010

Modified Files:
src/sys/dev/usb: umass.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/dev/usb/umass.c

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

Modified files:

Index: src/sys/dev/usb/umass.c
diff -u src/sys/dev/usb/umass.c:1.137 src/sys/dev/usb/umass.c:1.138
--- src/sys/dev/usb/umass.c:1.137	Sat Feb 13 02:09:41 2010
+++ src/sys/dev/usb/umass.c	Sat Feb 13 02:16:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass.c,v 1.137 2010/02/13 02:09:41 martin Exp $	*/
+/*	$NetBSD: umass.c,v 1.138 2010/02/13 02:16:51 martin Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.137 2010/02/13 02:09:41 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.138 2010/02/13 02:16:51 martin Exp $);
 
 #include atapibus.h
 #include scsibus.h
@@ -1180,7 +1180,7 @@
 
 		residue = UGETDW(sc-csw.dCSWDataResidue);
 		if (residue  sc-transfer_datalen - sc-transfer_actlen)
-		residue = sc-transfer_datalen - sc-transfer_actlen;
+			residue = sc-transfer_datalen - sc-transfer_actlen;
 
 		/* Translate weird command-status signatures. */
 		if ((sc-sc_quirks  UMASS_QUIRK_WRONG_CSWSIG) 



CVS commit: src/sys/rump/include/machine

2010-02-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Feb 13 03:19:47 UTC 2010

Modified Files:
src/sys/rump/include/machine: bus.h

Log Message:
Add missing public members of bus_dmamap_t per interface specification
(nothing uses them here for now, so untested).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/include/machine/bus.h

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

Modified files:

Index: src/sys/rump/include/machine/bus.h
diff -u src/sys/rump/include/machine/bus.h:1.1 src/sys/rump/include/machine/bus.h:1.2
--- src/sys/rump/include/machine/bus.h:1.1	Tue Feb  9 17:33:31 2010
+++ src/sys/rump/include/machine/bus.h	Sat Feb 13 03:19:46 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.h,v 1.1 2010/02/09 17:33:31 pooka Exp $	*/
+/*	$NetBSD: bus.h,v 1.2 2010/02/13 03:19:46 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -50,6 +50,9 @@
 } bus_dma_segment_t;
 
 typedef struct {
+	bus_size_t dm_maxsegsz;
+	bus_size_t dm_mapsize;
+	int dm_nsegs;
 	bus_dma_segment_t dm_segs[1];
 } *bus_dmamap_t;
 



CVS commit: src/sys/dev/ic

2010-02-12 Thread Jonathan A. Kollasch
This is a multi-part message in MIME format.
Module Name:src
Committed By:   jakllsch
Date:   Sat Feb 13 04:09:36 UTC 2010

Modified Files:
src/sys/dev/ic: nslm7x.c

Log Message:
Explicitly mark voltage readings as valid in Winbond voltage refresh functions.
This fixes forever-N/A VCore and -12V readings on my W83627THF chips.


CVS commit: src/share/man/man9

2010-02-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Feb 13 07:44:11 UTC 2010

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

Log Message:
Bump date for new kmem_asprintf.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.6 src/share/man/man9/kmem.9:1.7
--- src/share/man/man9/kmem.9:1.6	Fri Feb 12 01:04:05 2010
+++ src/share/man/man9/kmem.9	Sat Feb 13 07:44:11 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: kmem.9,v 1.6 2010/02/12 01:04:05 dyoung Exp $
+.\	$NetBSD: kmem.9,v 1.7 2010/02/13 07:44:11 wiz Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -25,7 +25,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ 
-.Dd August 3, 2009
+.Dd February 11, 2010
 .Dt KMEM 9
 .Os
 .\ 



CVS commit: src/share/man/man9

2010-02-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Feb 13 07:48:01 UTC 2010

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

Log Message:
Bump date for vrele_async.
Reword slightly and put it outside the vget description.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 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.45 src/share/man/man9/vnode.9:1.46
--- src/share/man/man9/vnode.9:1.45	Thu Feb 11 23:16:35 2010
+++ src/share/man/man9/vnode.9	Sat Feb 13 07:48:01 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: vnode.9,v 1.45 2010/02/11 23:16:35 haad Exp $
+.\ $NetBSD: vnode.9,v 1.46 2010/02/13 07:48:01 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 January 8, 2010
+.Dd February 11, 2010
 .Dt VNODE 9
 .Os
 .Sh NAME
@@ -534,9 +534,10 @@
 and
 .Em v_holdcnt
 are zero, the vnode is placed on the freelist.
-.It Fn vget vp lockflags
 .It Fn vrele_async vp
-Will asychronously release vnode in different context than caller, sometime in future. 
+Will asychronously release the vnode in different context than the caller,
+sometime after the call.
+.It Fn vget vp lockflags
 Reclaim vnode
 .Fa vp
 from the freelist, increment its reference count and lock it.