CVS commit: src/usr.sbin/apm

2010-03-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Mar 20 07:59:45 UTC 2010

Modified Files:
src/usr.sbin/apm: apm.8

Log Message:
Add a note that APM was deprecated by the PC manufacturers in about 1996.
Mention the APM emulation layer of ACPI. In addition, some small fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/apm/apm.8

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/apm/apm.8
diff -u src/usr.sbin/apm/apm.8:1.19 src/usr.sbin/apm/apm.8:1.20
--- src/usr.sbin/apm/apm.8:1.19	Thu Sep 25 22:44:51 2008
+++ src/usr.sbin/apm/apm.8	Sat Mar 20 07:59:44 2010
@@ -1,6 +1,6 @@
-.\	$NetBSD: apm.8,v 1.19 2008/09/25 22:44:51 reed Exp $
+.\	$NetBSD: apm.8,v 1.20 2010/03/20 07:59:44 jruoho Exp $
 .\
-.\ Copyright (c) 1996 The NetBSD Foundation, Inc.
+.\ Copyright (c) 1996, 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 June 18, 1996
+.Dd March 20, 2010
 .Dt APM 8
 .Os
 .Sh NAME
@@ -46,11 +46,14 @@
 .Op Fl f Ar sockname
 .Ek
 .Sh DESCRIPTION
+The
 .Nm
-communicates with the Advanced Power Management daemon,
+program communicates with the Advanced Power Management
+.Pq Tn APM
+daemon,
 .Xr apmd 8 ,
-making requests of it for current power status or to place the system
-into a suspend or stand-by state.
+making requests of the current power status or placing the system either
+into suspend or stand-by state.
 The
 .Nm
 tool is only installed on supported platforms.
@@ -60,7 +63,7 @@
 displays the current power management state in verbose form.
 .Pp
 Available command-line flags are:
-.Bl -tag -width indent -compact
+.Bl -tag -width -f sockname -compact
 .It Fl z
 Put the system into suspend (deep sleep) mode.
 .It Fl S
@@ -70,10 +73,11 @@
 .It Fl m
 Display the estimated battery lifetime in minutes.
 .It Fl b
-Display the battery status.  0 means high, 1 means low, 2 means
-critical, 3 means charging, 4 means absent, and 255 means unknown.
+Display the battery status:
+0 means high, 1 means low, 2 means critical, 3 means charging,
+4 means absent, and 255 means unknown.
 .It Fl a
-Display the external charger (A/C status).  0 means disconnected, 1
+Display the external charger (A/C status):  0 means disconnected, 1
 means connected, 2 means backup power source, and 255 means unknown.
 .It Fl s
 Display if power management is enabled.
@@ -122,13 +126,37 @@
 is the status device used when the socket is not accessible; it must be
 readable to provide current APM status.
 .Sh SEE ALSO
+.Xr acpi 4 ,
 .Xr apm 4 ,
 .Xr apmd 8
-.Sh REFERENCES
-Advanced Power Management (APM) BIOS Interface Specification (revision
-1.1), Intel Corporation and Microsoft Corporation
+.Rs
+.%A Intel Corporation
+.%A Microsoft Corporation
+.%T Advanced Power Management (APM) BIOS Interface Specification
+.%N Revision 1.2
+.%D February 1996
+.Re
 .Sh HISTORY
 The
 .Nm
 command appeared in
 .Nx 1.3 .
+.Pp
+The
+.Tn APM
+specification first appeared in 1992.
+The last update to the standard was made in 1996 -
+the same year when it was superceded by the
+.Tn ACPI 1.0
+standard.
+Thereafter power management on IBM-compatible personal computers has relied on
+.Tn ACPI ,
+implemented in
+.Nx
+by the
+.Xr acpi 4
+subsystem.
+The
+.Xr acpi 4
+provides an emulation layer for the legacy
+.Nm .



CVS commit: src/share/man/man3

2010-03-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Mar 20 11:18:43 UTC 2010

Modified Files:
src/share/man/man3: fast_divide32.3

Log Message:
Serial comma; prepare for HTML-output.


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

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/man3/fast_divide32.3
diff -u src/share/man/man3/fast_divide32.3:1.2 src/share/man/man3/fast_divide32.3:1.3
--- src/share/man/man3/fast_divide32.3:1.2	Sat Mar 20 10:26:06 2010
+++ src/share/man/man3/fast_divide32.3	Sat Mar 20 11:18:43 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: fast_divide32.3,v 1.2 2010/03/20 10:26:06 jruoho Exp $
+.\	$NetBSD: fast_divide32.3,v 1.3 2010/03/20 11:18:43 wiz Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -58,7 +58,7 @@
 using optimised CPU instructions.
 The constants
 .Fa m ,
-.Fa s1
+.Fa s1 ,
 and
 .Fa s2
 must first be preset for a given value of
@@ -80,7 +80,7 @@
 uint32_t a, b, q, r, m;
 uint8_t s1, s2;
 
-fast_divide32_prepare(b, m, s1, s2);
+fast_divide32_prepare(b, \*[Am]m, \*[Am]s1, \*[Am]s2);
 
 q = fast_divide32(a, b, m, s1, s2);
 r = fast_remainder32(a, b, m, s1, s2);



CVS commit: src/share/man/man5

2010-03-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Mar 20 11:23:38 UTC 2010

Modified Files:
src/share/man/man5: rc.conf.5

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/share/man/man5/rc.conf.5

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/man5/rc.conf.5
diff -u src/share/man/man5/rc.conf.5:1.140 src/share/man/man5/rc.conf.5:1.141
--- src/share/man/man5/rc.conf.5:1.140	Fri Mar 19 20:07:00 2010
+++ src/share/man/man5/rc.conf.5	Sat Mar 20 11:23:37 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: rc.conf.5,v 1.140 2010/03/19 20:07:00 jruoho Exp $
+.\	$NetBSD: rc.conf.5,v 1.141 2010/03/20 11:23:37 wiz Exp $
 .\
 .\ Copyright (c) 1996 Matthew R. Green
 .\ All rights reserved.
@@ -416,7 +416,8 @@
 Boolean value.
 Configures
 .Xr raid 4 ,
-RAIDframe disk devices. See
+RAIDframe disk devices.
+See
 .Xr raidctl 8
 for additional details.
 .It Sy rndctl



CVS commit: src/sys/sys

2010-03-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Mar 20 12:54:42 UTC 2010

Modified Files:
src/sys/sys: bitops.h

Log Message:
Shut up the broken piece of junk called lint. Use __inline.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/sys/bitops.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/sys/bitops.h
diff -u src/sys/sys/bitops.h:1.3 src/sys/sys/bitops.h:1.4
--- src/sys/sys/bitops.h:1.3	Fri Mar 19 16:48:55 2010
+++ src/sys/sys/bitops.h	Sat Mar 20 12:54:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bitops.h,v 1.3 2010/03/19 16:48:55 joerg Exp $	*/
+/*	$NetBSD: bitops.h,v 1.4 2010/03/20 12:54:42 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -258,7 +258,7 @@
 	-1) : ((sizeof(_n) = 4 ? fls64(_n) : fls32(_n)) - 1) \
 )
 
-static inline void
+static __inline void
 fast_divide32_prepare(uint32_t _div, uint32_t * __restrict _m,
 uint8_t *__restrict _s1, uint8_t *__restrict _s2)
 {
@@ -267,22 +267,25 @@
 
 	_l = fls32(_div - 1);
 	_mt = 0x1ULL * ((1ULL  _l) - _div);
+	/* LINTED */
 	*_m = _mt / _div + 1;
 	*_s1 = (_l  1) ? 1 : _l;
 	*_s2 = (_l == 0) ? 0 : _l - 1;
 }
 
-static inline uint32_t
+/* ARGSUSED */
+static __inline uint32_t
 fast_divide32(uint32_t _v, uint32_t _div, uint32_t _m, uint8_t _s1,
 uint8_t _s2)
 {
 	uint32_t _t;
 
+	/* LINTED */
 	_t = ((uint64_t)_v * _m)  32;
 	return (_t + ((_v - _t)  _s1))  _s2;
 }
 
-static inline uint32_t
+static __inline uint32_t
 fast_remainder32(uint32_t _v, uint32_t _div, uint32_t _m, uint8_t _s1,
 uint8_t _s2)
 {



CVS commit: src/sys/sys

2010-03-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 20 14:43:50 UTC 2010

Modified Files:
src/sys/sys: bitops.h

Log Message:
/*LINTED*/ is too wide a brush.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/bitops.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/sys/bitops.h
diff -u src/sys/sys/bitops.h:1.4 src/sys/sys/bitops.h:1.5
--- src/sys/sys/bitops.h:1.4	Sat Mar 20 08:54:42 2010
+++ src/sys/sys/bitops.h	Sat Mar 20 10:43:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bitops.h,v 1.4 2010/03/20 12:54:42 joerg Exp $	*/
+/*	$NetBSD: bitops.h,v 1.5 2010/03/20 14:43:50 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -267,8 +267,7 @@
 
 	_l = fls32(_div - 1);
 	_mt = 0x1ULL * ((1ULL  _l) - _div);
-	/* LINTED */
-	*_m = _mt / _div + 1;
+	*_m = (uint32_t)(_mt / _div + 1);
 	*_s1 = (_l  1) ? 1 : _l;
 	*_s2 = (_l == 0) ? 0 : _l - 1;
 }
@@ -280,8 +279,7 @@
 {
 	uint32_t _t;
 
-	/* LINTED */
-	_t = ((uint64_t)_v * _m)  32;
+	_t = (uint32_t)(((uint64_t)_v * _m)  32);
 	return (_t + ((_v - _t)  _s1))  _s2;
 }
 



CVS commit: src/share/man/man3

2010-03-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Mar 20 14:45:18 UTC 2010

Modified Files:
src/share/man/man3: fast_divide32.3

Log Message:
Do not use .pp with %P, as noted by jo...@.


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

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/man3/fast_divide32.3
diff -u src/share/man/man3/fast_divide32.3:1.3 src/share/man/man3/fast_divide32.3:1.4
--- src/share/man/man3/fast_divide32.3:1.3	Sat Mar 20 11:18:43 2010
+++ src/share/man/man3/fast_divide32.3	Sat Mar 20 14:45:18 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: fast_divide32.3,v 1.3 2010/03/20 11:18:43 wiz Exp $
+.\	$NetBSD: fast_divide32.3,v 1.4 2010/03/20 14:45:18 jruoho Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -91,10 +91,10 @@
 .%A Peter L. Montgomery
 .%T Division by Invariant Integers Using Multiplication
 .%J ACM SIGPLAN Notices
-.%D 1994
+.%D June 1994
 .%N Issue 6
 .%V Volume 29
-.%P pp. 61-72
+.%P 61-72
 .%U http://gmplib.org/~tege/divcnst-pldi94.pdf
 .Re
 .Sh HISTORY



CVS commit: src/sys/arch/powerpc/ibm4xx/dev

2010-03-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Mar 20 15:22:27 UTC 2010

Added Files:
src/sys/arch/powerpc/ibm4xx/dev: zmiireg.h

Log Message:
Fix build failed.
  Add forgot zmiireg.h since support 405EX.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/ibm4xx/dev/zmiireg.h

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

Added files:

Index: src/sys/arch/powerpc/ibm4xx/dev/zmiireg.h
diff -u /dev/null src/sys/arch/powerpc/ibm4xx/dev/zmiireg.h:1.1
--- /dev/null	Sat Mar 20 15:22:27 2010
+++ src/sys/arch/powerpc/ibm4xx/dev/zmiireg.h	Sat Mar 20 15:22:27 2010
@@ -0,0 +1,66 @@
+/*	$NetBSD: zmiireg.h,v 1.1 2010/03/20 15:22:27 kiyohara Exp $	*/
+/*
+ * Copyright (c) 2010 KIYOHARA Takashi
+ * All rights reserved.
+ *
+ * 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 AUTHOR ``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 AUTHOR 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.
+ */
+
+#ifndef _IBM4XX_ZMIIREG_H_
+#define	_IBM4XX_ZMIIREG_H_
+
+/* ZMII Bridge (440EP/440GP/440GX) */
+
+#define ZMII0_SIZE		0x10
+
+#define ZMII0_FER		0x0	/* Function Enable Register */
+#define   FER_MDI_MASK		  0x	/* MDI enable */
+#define   FER_MDI(emac)		  (1  (31 - ((emac)  2)))
+#define   FER__MII_MASK		  0x7
+#define   FER__MII_MII		  0x1		/* MII Enable */
+#define   FER__MII_RMII		  0x2		/* ZMII (or RMII) Enable */
+#define   FER__MII_SMII		  0x4		/* SMII Enable */
+#define   FER__MII(emac, mii)	  ((mii)  (28 - ((emac)  2)))
+#define ZMII0_SSR		0x4	/* Speed Selection Register */
+#define   SSR_SCI(emac)		  (0x4  (28 - ((emac)  2))) /* Suppress Collision Indication */
+#define   SSR_FSS(emac)		  (0x2  (28 - ((emac)  2))) /* Force Speed Selection */
+#define   SSR_SP_10MBPS		  0x0
+#define   SSR_SP_100MBPS	  0x2
+#define   SSR_ZSP(emac, sp)	  ((sp)  (27 - ((emac)  2))) /* Speed Selection */
+#define ZMII0_SMIISR		0x8	/* SMII Status Register */
+#define   SMIISR_SHIFT(emac)	  (24 - ((emac)  3))
+#define   SMIISR_MASK		  0xff
+#define   SMIISR_E1		  0x01		/* RxD Set to 1 */
+#define   SMIISR_EC		  0x02		/* RxD False Carrier Detected */
+#define   SMIISR_EN_INVALID	  0x00		/* RxD Nibble  Invalid */
+#define   SMIISR_EN_VALID	  0x04		/* RxD Nibble  Valid */
+#define   SMIISR_EJ_OK		  0x00		/* RxD Jabber  OK */
+#define   SMIISR_EJ_ERROR	  0x08		/* RxD Jabber  Error */
+#define   SMIISR_EL_DOWN	  0x00		/* RxD Link  Down */
+#define   SMIISR_EL_UP		  0x10		/* RxD Link  Up */
+#define   SMIISR_ED_HALF	  0x00		/* RxD Duplex  Half */
+#define   SMIISR_ED_FULL	  0x20		/* RxD Duplex  Full */
+#define   SMIISR_ES_10		  0x00		/* RxD Speed  10MBit */
+#define   SMIISR_ES_100		  0x40		/* RxD Speed  100MBit */
+#define   SMIISR_EF		  0x80		/* RxD from Previous Frame */
+
+#endif	/* _IBM4XX_ZMIIREG_H_ */



CVS commit: src/share/man/man3

2010-03-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Mar 20 16:33:51 UTC 2010

Modified Files:
src/share/man/man3: Makefile
Added Files:
src/share/man/man3: stdint.3

Log Message:
Add a manual page for stdint.h. From FreeBSD, by Mike Barcroft.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/share/man/man3/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man3/stdint.3

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/man3/Makefile
diff -u src/share/man/man3/Makefile:1.40 src/share/man/man3/Makefile:1.41
--- src/share/man/man3/Makefile:1.40	Fri Mar 19 20:11:22 2010
+++ src/share/man/man3/Makefile	Sat Mar 20 16:33:51 2010
@@ -1,9 +1,10 @@
-#	$NetBSD: Makefile,v 1.40 2010/03/19 20:11:22 joerg Exp $
+#	$NetBSD: Makefile,v 1.41 2010/03/20 16:33:51 jruoho Exp $
 #	@(#)Makefile	8.2 (Berkeley) 12/13/93
 
 MAN=	_DIAGASSERT.3 __UNCONST.3 CMSG_DATA.3 \
 	__arraycount.3 assert.3 bits.3 bitstring.3 dlfcn.3 end.3 \
-	fast_divide32.3 gcq.3 intro.3 offsetof.3 queue.3 stdarg.3 sysexits.3 \
+	fast_divide32.3 gcq.3 intro.3 offsetof.3 queue.3 \
+	stdarg.3 stdint.3 sysexits.3 \
 	tgmath.3 timeradd.3 tree.3 varargs.3
 
 USETBL=	# used by queue.3

Added files:

Index: src/share/man/man3/stdint.3
diff -u /dev/null src/share/man/man3/stdint.3:1.1
--- /dev/null	Sat Mar 20 16:33:51 2010
+++ src/share/man/man3/stdint.3	Sat Mar 20 16:33:51 2010
@@ -0,0 +1,136 @@
+.\ $NetBSD: stdint.3,v 1.1 2010/03/20 16:33:51 jruoho Exp $
+.\
+.\ Copyright (c) 2002 Mike Barcroft m...@freebsd.org
+.\ All rights reserved.
+.\
+.\ 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 AUTHOR 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 AUTHOR 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.
+.\
+.\ $FreeBSD: src/share/man/man7/stdint.7,v 1.5 2003/09/08 19:57:21 ru Exp $
+.\
+.Dd March 20, 2010
+.Dt STDINT 3
+.Os
+.Sh NAME
+.Nm stdint
+.Nd standard integer types
+.Sh SYNOPSIS
+.In stdint.h
+.Sh DESCRIPTION
+The
+.In stdint.h
+header provides source-portable integer types of a specific
+size, smallest memory footprint with a minimum size, fastest
+access speed with a minimum size, largest integer size, and
+those capable of storing pointers.
+.Pp
+The types
+.Vt int8_t ,
+.Vt int16_t ,
+.Vt int32_t ,
+and
+.Vt int64_t
+provide a signed integer type of width 8, 16, 32, or 64 bits, respectively.
+The types
+.Vt uint8_t ,
+.Vt uint16_t ,
+.Vt uint32_t ,
+and
+.Vt uint64_t
+provide an unsigned integer type of width 8, 16, 32, or 64 bits, respectively.
+These integer types should be used when a specific size is required.
+.Pp
+The types
+.Vt int_fast8_t ,
+.Vt int_fast16_t ,
+.Vt int_fast32_t ,
+and
+.Vt int_fast64_t
+provide the fastest signed integer type with a width
+of at least 8, 16, 32, or 64 bits, respectively.
+The types
+.Vt uint_fast8_t ,
+.Vt uint_fast16_t ,
+.Vt uint_fast32_t ,
+and
+.Vt uint_fast64_t
+provide the fastest unsigned integer type with a width
+of at least 8, 16, 32, or 64 bits, respectively.
+These types should be used when access speed is
+paramount, and when a specific size is not required.
+.Pp
+The types
+.Vt int_least8_t ,
+.Vt int_least16_t ,
+.Vt int_least32_t ,
+and
+.Vt int_least64_t
+provide the smallest memory footprint signed integer type with
+a width of at least 8, 16, 32, or 64 bits, respectively.
+The types
+.Vt uint_least8_t ,
+.Vt uint_least16_t ,
+.Vt uint_least32_t ,
+and
+.Vt uint_least64_t
+provide the smallest memory footprint unsigned integer type with
+a width of at least 8, 16, 32, or 64 bits, respectively.
+These types should be used when memory storage is of
+concern, and when a specific size is not required.
+.Pp
+The type
+.Vt intmax_t
+provides a signed integer type large
+enough to hold any other signed integer.
+The type
+.Vt uintmax_t
+provides 

CVS commit: src/libexec/ld.elf_so

2010-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar 20 16:36:35 UTC 2010

Modified Files:
src/libexec/ld.elf_so: Makefile

Log Message:
Only apply -Wno-stack-protector where alloca is used.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/libexec/ld.elf_so/Makefile

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

Modified files:

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.95 src/libexec/ld.elf_so/Makefile:1.96
--- src/libexec/ld.elf_so/Makefile:1.95	Fri Mar 19 20:53:50 2010
+++ src/libexec/ld.elf_so/Makefile	Sat Mar 20 16:36:35 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.95 2010/03/19 20:53:50 roy Exp $
+#	$NetBSD: Makefile,v 1.96 2010/03/20 16:36:35 skrll Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
@@ -85,6 +85,10 @@
 CPPFLAGS+=	-DRTLD_DEFAULT_LIBRARY_PATH=\${SHLIBDIR}:${LIBDIR}\
 .endif
 
+# rtld.c and symbol.c use alloca, so disable SSP warnings.
+COPTS.rtld.c+=	-Wno-stack-protector
+COPTS.symbol.c+=-Wno-stack-protector
+
 LDADD+=		-L${CLIBOBJ} -L${DESTDIR}${LIBDIR}
 .if ${MKPICLIB} != no
 LDADD+=		-lc_pic
@@ -116,7 +120,3 @@
 
 .include bsd.man.mk
 .endif
-
-# We use alloca, so disable SSP warnings.
-# This has to come last in the CFLAGS ordering
-CFLAGS+=	-Wno-stack-protector



CVS commit: src/lib/libc/citrus/modules

2010-03-20 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Sat Mar 20 18:15:32 UTC 2010

Modified Files:
src/lib/libc/citrus/modules: citrus_utf1632.c

Log Message:
fix byte order mark related bug introduced by previous commit,
reported by Sverre Froyen via current-user, thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/citrus/modules/citrus_utf1632.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/libc/citrus/modules/citrus_utf1632.c
diff -u src/lib/libc/citrus/modules/citrus_utf1632.c:1.10 src/lib/libc/citrus/modules/citrus_utf1632.c:1.11
--- src/lib/libc/citrus/modules/citrus_utf1632.c:1.10	Mon Mar 15 15:00:58 2010
+++ src/lib/libc/citrus/modules/citrus_utf1632.c	Sat Mar 20 18:15:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: citrus_utf1632.c,v 1.10 2010/03/15 15:00:58 tnozaki Exp $	*/
+/*	$NetBSD: citrus_utf1632.c,v 1.11 2010/03/20 18:15:32 tnozaki Exp $	*/
 
 /*-
  * Copyright (c)2003 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: citrus_utf1632.c,v 1.10 2010/03/15 15:00:58 tnozaki Exp $);
+__RCSID($NetBSD: citrus_utf1632.c,v 1.11 2010/03/20 18:15:32 tnozaki Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include assert.h
@@ -155,9 +155,8 @@
 	goto refetch;
 }
 			}
-		} else {
-			psenc-current_endian = ei-preffered_endian;
 		}
+		psenc-current_endian = ei-preffered_endian;
 	}
 	endian = psenc-current_endian;
 



CVS commit: src/external/bsd/openldap/man

2010-03-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Mar 20 20:27:57 UTC 2010

Modified Files:
src/external/bsd/openldap/man: ldapurl.1

Log Message:
Drop redundant TPs


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/openldap/man/ldapurl.1

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

Modified files:

Index: src/external/bsd/openldap/man/ldapurl.1
diff -u src/external/bsd/openldap/man/ldapurl.1:1.1 src/external/bsd/openldap/man/ldapurl.1:1.2
--- src/external/bsd/openldap/man/ldapurl.1:1.1	Mon Mar  8 05:11:20 2010
+++ src/external/bsd/openldap/man/ldapurl.1	Sat Mar 20 20:27:57 2010
@@ -51,8 +51,6 @@
 and
 .BR \-s .
 .SH OPTIONS
-.TP
-.TP
 .BI \-a \ attrs
 Set a comma-separated list of attribute selectors.
 .TP
@@ -89,7 +87,6 @@
   rp[/cookie][/slimit] (LDAP Sync refreshAndPersist)
 .fi
 .TP
-.TP
 .BI \-f \ filter
 Set the URL filter.  No particular check on conformity with RFC 4515
 LDAP filters is performed, but the value is hex-escaped as required.



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

2010-03-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Mar 20 20:34:56 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgp: netpgp.1

Log Message:
Quote lines that start with . and should appear literally.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1

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/netpgp/netpgp.1
diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.10 src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.11
--- src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.10	Fri Mar  5 16:01:10 2010
+++ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1	Sat Mar 20 20:34:56 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: netpgp.1,v 1.10 2010/03/05 16:01:10 agc Exp $
+.\ $NetBSD: netpgp.1,v 1.11 2010/03/20 20:34:56 joerg Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -467,7 +467,7 @@
 uid  Alistair Crooks \*[lt]...@netbsd.org\*[gt]
 uid  Alistair Crooks \*[lt]...@alistaircrooks.com\*[gt]
 uid  Alistair Crooks (Yahoo!) \*[lt]agcro...@yahoo-inc.com\*[gt]
-...contents of original file...
+\...contents of original file...
 %
 .Ed
 .Pp
@@ -504,7 +504,7 @@
 uid  Alistair Crooks \*[lt]...@netbsd.org\*[gt]
 uid  Alistair Crooks \*[lt]...@alistaircrooks.com\*[gt]
 uid  Alistair Crooks (Yahoo!) \*[lt]agcro...@yahoo-inc.com\*[gt]
-...contents of original file...
+\...contents of original file...
 %
 .Ed
 .Sh RETURN VALUES



CVS commit: src/sys/arch/sparc64/sparc64

2010-03-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Mar 20 20:36:23 UTC 2010

Modified Files:
src/sys/arch/sparc64/sparc64: pmap.c

Log Message:
convert pmap_lock into an IPL_VM lock, and avoid calling
KASSERT(!mutex_owned(pmap_lock)) since that's no longer valid.

this fixes hangs on 4-core machines like the U80.

tested on U80, SB2500 and SB2000.

XXX: my initial attempts to replace pseg_lock with this new equivalent
XXX: lock hang in pmap_bootstrap it seems..  but this should be able
XXX: to go away now.


To generate a diff of this commit:
cvs rdiff -u -r1.259 -r1.260 src/sys/arch/sparc64/sparc64/pmap.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/sparc64/sparc64/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.259 src/sys/arch/sparc64/sparc64/pmap.c:1.260
--- src/sys/arch/sparc64/sparc64/pmap.c:1.259	Wed Mar 10 06:57:22 2010
+++ src/sys/arch/sparc64/sparc64/pmap.c	Sat Mar 20 20:36:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.259 2010/03/10 06:57:22 mrg Exp $	*/
+/*	$NetBSD: pmap.c,v 1.260 2010/03/20 20:36:23 mrg Exp $	*/
 /*
  *
  * Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.259 2010/03/10 06:57:22 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.260 2010/03/20 20:36:23 mrg Exp $);
 
 #undef	NO_VCACHE /* Don't forget the locked TLB in dostart */
 #define	HWREF
@@ -1293,7 +1293,7 @@
 	vm_first_phys = avail_start;
 	vm_num_phys = avail_end - avail_start;
 
-	mutex_init(pmap_lock, MUTEX_DEFAULT, IPL_NONE);
+	mutex_init(pmap_lock, MUTEX_SPIN, IPL_VM);
 #if defined(USE_LOCKSAFE_PSEG_GETSET)
 	mutex_init(pseg_lock, MUTEX_SPIN, IPL_VM);
 #endif
@@ -2621,8 +2621,6 @@
 	pv_entry_t pv, npv;
 	bool res = false;
 
-	KASSERT(!mutex_owned(pmap_lock));
-
 	/* Check if any mapping has been modified */
 	pv = pg-mdpage.mdpg_pvh;
 	if (pv-pv_va  PV_MOD)
@@ -2725,8 +2723,6 @@
 	pv_entry_t pv;
 	bool res = false;
 
-	KASSERT(!mutex_owned(pmap_lock));
-
 	/* Check if any mapping has been referenced */
 	pv = pg-mdpage.mdpg_pvh;
 	if (pv-pv_va  PV_REF)



CVS commit: src/external/bsd/openldap/man

2010-03-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Mar 20 20:58:07 UTC 2010

Modified Files:
src/external/bsd/openldap/man: ldap.conf.5

Log Message:
Drop redundant .TP


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/openldap/man/ldap.conf.5

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

Modified files:

Index: src/external/bsd/openldap/man/ldap.conf.5
diff -u src/external/bsd/openldap/man/ldap.conf.5:1.4 src/external/bsd/openldap/man/ldap.conf.5:1.5
--- src/external/bsd/openldap/man/ldap.conf.5:1.4	Mon Mar  8 05:08:40 2010
+++ src/external/bsd/openldap/man/ldap.conf.5	Sat Mar 20 20:58:06 2010
@@ -159,7 +159,6 @@
 of the search.
 .RE
 .TP
-.TP
 .B HOST name[:port] ...
 Specifies the name(s) of an LDAP server(s) to which the
 .I LDAP 



CVS commit: src/usr.bin/xlint/lint1

2010-03-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 21 00:02:13 UTC 2010

Modified Files:
src/usr.bin/xlint/lint1: tree.c

Log Message:
make lint recognize constant shift values and not warn if the number of bits
shifted results in a narrower type.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.bin/xlint/lint1/tree.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.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.62 src/usr.bin/xlint/lint1/tree.c:1.63
--- src/usr.bin/xlint/lint1/tree.c:1.62	Fri Oct  2 17:04:03 2009
+++ src/usr.bin/xlint/lint1/tree.c	Sat Mar 20 20:02:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.62 2009/10/02 21:04:03 christos Exp $	*/
+/*	$NetBSD: tree.c,v 1.63 2010/03/21 00:02:13 christos Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(lint)
-__RCSID($NetBSD: tree.c,v 1.62 2009/10/02 21:04:03 christos Exp $);
+__RCSID($NetBSD: tree.c,v 1.63 2010/03/21 00:02:13 christos Exp $);
 #endif
 
 #include stdlib.h
@@ -1513,6 +1513,8 @@
 {
 	tnode_t	*ntn;
 	tspec_t	t;
+	size_t l;
+	uint64_t rnum;
 
 	ntn = getnode();
 
@@ -1521,7 +1523,40 @@
 	ntn-tn_left = ln;
 	ntn-tn_right = rn;
 
-	if (op == STAR || op == FSEL) {
+	switch (op) {
+	case SHR:
+		if (rn-tn_op != CON)
+			break;
+		rnum = rn-tn_val-v_quad;
+		l = tsize(ln-tn_type) / CHAR_BIT;
+		t = ln-tn_type-t_tspec;
+		switch (l) {
+		case 8:
+			if (rnum = 56)
+t = UCHAR;
+			else if (rnum = 48)
+t = USHORT;
+			else if (rnum = 32)
+t = UINT;
+			break;
+		case 4:
+			if (rnum = 24)
+t = UCHAR;
+			else if (rnum = 16)
+t = USHORT;
+			break;
+		case 2:
+			if (rnum = 8)
+t = UCHAR;
+			break;
+		default:
+			break;
+		}
+		if (t != ln-tn_type-t_tspec)
+			ntn-tn_type-t_tspec = t;
+		break;
+	case STAR:
+	case FSEL:
 		if (ln-tn_type-t_tspec == PTR) {
 			t = ln-tn_type-t_subt-t_tspec;
 			if (t != FUNC  t != VOID)
@@ -1529,9 +1564,12 @@
 		} else {
 			LERROR(mktnode());
 		}
+		break;
+	default:
+		break;
 	}
 
-	return (ntn);
+	return ntn;
 }
 
 /*



CVS commit: src/regress/usr.bin/xlint/lint1

2010-03-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 21 00:03:46 UTC 2010

Added Files:
src/regress/usr.bin/xlint/lint1: test27.c

Log Message:
right shift of unsigned quantities with constant.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/regress/usr.bin/xlint/lint1/test27.c

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

Added files:

Index: src/regress/usr.bin/xlint/lint1/test27.c
diff -u /dev/null src/regress/usr.bin/xlint/lint1/test27.c:1.1
--- /dev/null	Sat Mar 20 20:03:46 2010
+++ src/regress/usr.bin/xlint/lint1/test27.c	Sat Mar 20 20:03:46 2010
@@ -0,0 +1,23 @@
+// Test that type shifts that result to narrower types don't produce warnings. 
+void
+foo(void) {
+	unsigned long l = 100;
+	unsigned long long ll = 100;
+	unsigned int i = 100;
+	unsigned short s = 100;
+	unsigned char c = 1;
+
+	l = ll  32;
+//	i = ll  31;
+	i = ll  32;
+	s = ll  48;
+	c = ll  56;
+	s = i  16;
+	c = i  24;
+	c = s  8;
+	(void)ll;
+	(void)l;
+	(void)i;
+	(void)s;
+	(void)c;
+}



CVS commit: src/sys/sys

2010-03-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 21 00:04:34 UTC 2010

Modified Files:
src/sys/sys: bitops.h

Log Message:
remove unnecessary cast now that lint is more intelligent.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/bitops.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/sys/bitops.h
diff -u src/sys/sys/bitops.h:1.5 src/sys/sys/bitops.h:1.6
--- src/sys/sys/bitops.h:1.5	Sat Mar 20 10:43:50 2010
+++ src/sys/sys/bitops.h	Sat Mar 20 20:04:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bitops.h,v 1.5 2010/03/20 14:43:50 christos Exp $	*/
+/*	$NetBSD: bitops.h,v 1.6 2010/03/21 00:04:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -279,7 +279,7 @@
 {
 	uint32_t _t;
 
-	_t = (uint32_t)(((uint64_t)_v * _m)  32);
+	_t = ((uint64_t)_v * _m)  32;
 	return (_t + ((_v - _t)  _s1))  _s2;
 }
 



CVS commit: src/sys/arch

2010-03-20 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Mar 21 00:10:15 UTC 2010

Modified Files:
src/sys/arch/arm/arm32: fault.c
src/sys/arch/powerpc/powerpc: trap.c

Log Message:
assert that pcb_onfault is NULL in places where it should be.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/arm/arm32/fault.c
cvs rdiff -u -r1.133 -r1.134 src/sys/arch/powerpc/powerpc/trap.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/arm/arm32/fault.c
diff -u src/sys/arch/arm/arm32/fault.c:1.75 src/sys/arch/arm/arm32/fault.c:1.76
--- src/sys/arch/arm/arm32/fault.c:1.75	Wed Feb  3 13:51:00 2010
+++ src/sys/arch/arm/arm32/fault.c	Sun Mar 21 00:10:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fault.c,v 1.75 2010/02/03 13:51:00 wiz Exp $	*/
+/*	$NetBSD: fault.c,v 1.76 2010/03/21 00:10:14 chs Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
 #include opt_sa.h
 
 #include sys/types.h
-__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.75 2010/02/03 13:51:00 wiz Exp $);
+__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.76 2010/03/21 00:10:14 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -868,6 +868,7 @@
 	}
 #endif
 
+	KASSERT(pcb-pcb_onfault == NULL);
 	error = uvm_fault(map, va, VM_PROT_READ);
 
 #ifdef KERN_SA

Index: src/sys/arch/powerpc/powerpc/trap.c
diff -u src/sys/arch/powerpc/powerpc/trap.c:1.133 src/sys/arch/powerpc/powerpc/trap.c:1.134
--- src/sys/arch/powerpc/powerpc/trap.c:1.133	Thu Feb 25 23:31:48 2010
+++ src/sys/arch/powerpc/powerpc/trap.c	Sun Mar 21 00:10:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.133 2010/02/25 23:31:48 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.134 2010/03/21 00:10:14 chs Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.133 2010/02/25 23:31:48 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.134 2010/03/21 00:10:14 chs Exp $);
 
 #include opt_altivec.h
 #include opt_ddb.h
@@ -84,7 +84,6 @@
 	struct proc *p = l ? l-l_proc : NULL;
 	struct pcb *pcb = curpcb;
 	struct vm_map *map;
-	struct faultbuf *onfault;
 	ksiginfo_t ksi;
 	int type = frame-exc;
 	int ftype, rv;
@@ -121,7 +120,9 @@
 	case EXC_DSI: {
 		struct faultbuf *fb;
 		vaddr_t va = frame-dar;
+
 		ci-ci_ev_kdsi.ev_count++;
+		fb = pcb-pcb_onfault;
 
 		/*
 		 * Only query UVM if no interrupts are active.
@@ -169,10 +170,9 @@
 			else
 ftype = VM_PROT_READ;
 
-			onfault = pcb-pcb_onfault;
 			pcb-pcb_onfault = NULL;
 			rv = uvm_fault(map, trunc_page(va), ftype);
-			pcb-pcb_onfault = onfault;
+			pcb-pcb_onfault = fb;
 
 			if (map != kernel_map) {
 /*
@@ -193,7 +193,7 @@
 			 */
 			rv = EFAULT;
 		}
-		if ((fb = pcb-pcb_onfault) != NULL) {
+		if (fb != NULL) {
 			frame-srr0 = fb-fb_pc;
 			frame-fixreg[1] = fb-fb_sp;
 			frame-fixreg[2] = fb-fb_r2;
@@ -241,6 +241,7 @@
 			l-l_savp-savp_faultaddr = (vaddr_t)frame-dar;
 			l-l_pflag |= LP_SA_PAGEFAULT;
 		}
+		KASSERT(pcb-pcb_onfault == NULL);
 		rv = uvm_fault(map, trunc_page(frame-dar), ftype);
 		if (rv == 0) {
 			/*
@@ -311,6 +312,7 @@
 			l-l_pflag |= LP_SA_PAGEFAULT;
 		}
 		ftype = VM_PROT_EXECUTE;
+		KASSERT(pcb-pcb_onfault == NULL);
 		rv = uvm_fault(map, trunc_page(frame-srr0), ftype);
 		if (rv == 0) {
 			l-l_pflag = ~LP_SA_PAGEFAULT;



CVS commit: src/sys/nfs

2010-03-20 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Mar 21 00:10:40 UTC 2010

Modified Files:
src/sys/nfs: nfs_bootparam.c

Log Message:
in nfs_bootparam(), set the corresponding flag for each field that we fill in.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/nfs/nfs_bootparam.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/nfs/nfs_bootparam.c
diff -u src/sys/nfs/nfs_bootparam.c:1.36 src/sys/nfs/nfs_bootparam.c:1.37
--- src/sys/nfs/nfs_bootparam.c:1.36	Tue Mar  2 23:19:09 2010
+++ src/sys/nfs/nfs_bootparam.c	Sun Mar 21 00:10:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_bootparam.c,v 1.36 2010/03/02 23:19:09 pooka Exp $	*/
+/*	$NetBSD: nfs_bootparam.c,v 1.37 2010/03/21 00:10:40 chs Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_bootparam.c,v 1.36 2010/03/02 23:19:09 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_bootparam.c,v 1.37 2010/03/21 00:10:40 chs Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs_boot.h
@@ -178,6 +178,7 @@
 		printf(nfs_boot: bootparam whoami, error=%d\n, error);
 		goto delout;
 	}
+	*flags |= NFS_BOOT_HAS_SERVADDR | NFS_BOOT_HAS_SERVER;
 	printf(nfs_boot: server_addr=%s\n, inet_ntoa(sin-sin_addr));
 	printf(nfs_boot: hostname=%s\n, hostname);
 
@@ -190,6 +191,7 @@
 		printf(nfs_boot: bootparam get root: %d\n, error);
 		goto delout;
 	}
+	*flags |= NFS_BOOT_HAS_ROOTPATH;
 
 #ifndef NFS_BOOTPARAM_NOGATEWAY
 	gw_ndm = kmem_alloc(sizeof(*gw_ndm), KM_SLEEP);
@@ -208,6 +210,7 @@
 	printf(nfs_boot: gateway=%s\n, inet_ntoa(sin-sin_addr));
 	/* Just save it.  Caller adds the route. */
 	nd-nd_gwip = sin-sin_addr;
+	*flags |= NFS_BOOT_HAS_GWIP;
 
 	/* Look for a mask string after the colon. */
 	p = strchr(gw_ndm-ndm_host, ':');
@@ -221,6 +224,7 @@
 
 	/* Have a netmask too!  Save it; update the I/F. */
 	nd-nd_mask.s_addr = mask;
+	*flags |= NFS_BOOT_HAS_MASK;
 	printf(nfs_boot: my_mask=%s\n, inet_ntoa(nd-nd_mask));
 	(void)  nfs_boot_deladdress(ifp, lwp, my_ip.s_addr);
 	error = nfs_boot_setaddress(ifp, lwp, my_ip.s_addr,
@@ -248,6 +252,7 @@
 	if (gw_ip.s_addr) {
 		/* Our caller will add the route. */
 		nd-nd_gwip = gw_ip;
+		*flags |= NFS_BOOT_HAS_GWIP;
 	}
 #endif
 



CVS commit: [netbsd-5] src/sys/sys

2010-03-20 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Mar 21 03:45:33 UTC 2010

Modified Files:
src/sys/sys [netbsd-5]: null.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1344):
sys/sys/null.h: revision 1.8
Enclose (void *)0 in an extra set of parenthese to make the result usable
in arbitrary expressions.
Fixes PR/41890, I can't think of any downsides!


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.86.1 src/sys/sys/null.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/sys/null.h
diff -u src/sys/sys/null.h:1.7 src/sys/sys/null.h:1.7.86.1
--- src/sys/sys/null.h:1.7	Sat Dec  3 17:10:46 2005
+++ src/sys/sys/null.h	Sun Mar 21 03:45:33 2010
@@ -1,11 +1,11 @@
-/*	$NetBSD: null.h,v 1.7 2005/12/03 17:10:46 christos Exp $	*/
+/*	$NetBSD: null.h,v 1.7.86.1 2010/03/21 03:45:33 snj Exp $	*/
 
 #ifndef _SYS_NULL_H_
 #define _SYS_NULL_H_
 #ifndef	NULL
 #if !defined(__GNUG__) || __GNUG__  2 || (__GNUG__ == 2  __GNUC_MINOR__  90)
 #if !defined(__cplusplus)
-#define	NULL	(void *)0
+#define	NULL	((void *)0)
 #else
 #define	NULL	0
 #endif /* !__cplusplus */



CVS commit: [netbsd-5] src/doc

2010-03-20 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Mar 21 03:46:43 UTC 2010

Modified Files:
src/doc [netbsd-5]: CHANGES-5.1

Log Message:
Ticket 1344.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.218 -r1.1.2.219 src/doc/CHANGES-5.1

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

Modified files:

Index: src/doc/CHANGES-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.218 src/doc/CHANGES-5.1:1.1.2.219
--- src/doc/CHANGES-5.1:1.1.2.218	Wed Mar 17 03:25:49 2010
+++ src/doc/CHANGES-5.1	Sun Mar 21 03:46:42 2010
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.218 2010/03/17 03:25:49 snj Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.219 2010/03/21 03:46:42 snj Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -17018,3 +17018,9 @@
 	does something.
 	[jdc, ticket #1340]
 
+sys/sys/null.h	1.8
+
+	Enclose (void *)0 in an extra set of parenthese to make the result
+	usable in arbitrary expressions.  Fixes PR/41890.
+	[joerg, ticket #1344]
+