CVS commit: src/sys/arch/usermode/usermode

2012-01-02 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Jan  2 09:49:13 UTC 2012

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

Log Message:
Do release all l2 pages on destroy


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/usermode/usermode/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/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.88 src/sys/arch/usermode/usermode/pmap.c:1.89
--- src/sys/arch/usermode/usermode/pmap.c:1.88	Sun Jan  1 21:40:22 2012
+++ src/sys/arch/usermode/usermode/pmap.c	Mon Jan  2 09:49:12 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.88 2012/01/01 21:40:22 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.89 2012/01/02 09:49:12 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.88 2012/01/01 21:40:22 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.89 2012/01/02 09:49:12 reinoud Exp $);
 
 #include opt_memsize.h
 #include opt_kmempages.h
@@ -509,6 +509,12 @@ pmap_destroy(pmap_t pmap)
 		}
 	}
 #endif
+	for (l1 = 0; l1  pm_nl1; l1++) {
+		l2tbl = pmap-pm_l1[l1];
+		if (!l2tbl)
+			continue;
+		pool_put(pmap_l2_pool, l2tbl);
+	}
 	pool_put(pmap_l1_pool, pmap-pm_l1);
 	pool_put(pmap_pool, pmap);
 }



CVS commit: src/share/man/man9

2012-01-02 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Jan  2 15:41:51 UTC 2012

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

Log Message:
Correct the include path.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/memcpy.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/memcpy.9
diff -u src/share/man/man9/memcpy.9:1.7 src/share/man/man9/memcpy.9:1.8
--- src/share/man/man9/memcpy.9:1.7	Mon Sep  8 17:54:35 2003
+++ src/share/man/man9/memcpy.9	Mon Jan  2 15:41:51 2012
@@ -30,7 +30,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)memcpy.3	8.1 (Berkeley) 6/4/93
-.\	$NetBSD: memcpy.9,v 1.7 2003/09/08 17:54:35 wiz Exp $
+.\	$NetBSD: memcpy.9,v 1.8 2012/01/02 15:41:51 rkujawa Exp $
 .\
 .Dd July 7, 2001
 .Dt MEMCPY 9
@@ -39,7 +39,7 @@
 .Nm memcpy
 .Nd copy byte string
 .Sh SYNOPSIS
-.In systm.h
+.In sys/systm.h
 .Ft void *
 .Fn memcpy void * restrict dst const void * restrict src size_t len
 .Sh DESCRIPTION



CVS commit: src/sys/arch

2012-01-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan  2 16:13:13 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: locore.S machdep.c
src/sys/arch/hppa/hppa: trap.S

Log Message:
From OpenBSD...

Fix encoding of DIAG instructions in the MFCPU_T and MTCPU_T macros. MTCPU_T
was encoded as a read instruction, while MFCPU_T was encoded as a
read-through-TH instruction, although the only uses of it concern registers
read through CH.

(You are not supposed to understand this, this is a dark corner of undocumented
rotten PA-RISC bowels).

Cache SID hashing will now correctly be disabled on PCXS, PCXT and PCXT'
processors.

Proper encoding from the old PA-RISC mklinux sources; tested on 720 (PCXS)
and 715/75 (PCXT); ok kettenis@


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/hp700/hp700/locore.S
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/hp700/hp700/machdep.c
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/hppa/hppa/trap.S

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/locore.S
diff -u src/sys/arch/hp700/hp700/locore.S:1.56 src/sys/arch/hp700/hp700/locore.S:1.57
--- src/sys/arch/hp700/hp700/locore.S:1.56	Mon Dec 19 10:56:59 2011
+++ src/sys/arch/hp700/hp700/locore.S	Mon Jan  2 16:13:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.56 2011/12/19 10:56:59 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.57 2012/01/02 16:13:12 skrll Exp $	*/
 /*	$OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $	*/
 
 /*
@@ -135,8 +135,8 @@
 
 #define	DR_PAGE0	.word	0x14001200
 #define	DR_PAGE1	.word	0x14001240
-#define	MTCPU_T(x,t)	.word	0x14001400 | ((t)  21) | ((x)  16)
-#define	MFCPU_T(r,x)	.word	0x14001400 | ((r)  21) | (x)
+#define	MTCPU_T(x,t)	.word	0x14001600 | ((t)  21) | ((x)  16)
+#define	MFCPU_T(r,x)	.word	0x14001a00 | ((r)  21) | ((x)  16)
 #define	MTCPU_C(x,t)	.word	0x14000240 | ((t)  21) | ((x)  16)
 #define	MFCPU_C(r,x)	.word	0x14000600 | ((r)  21) | ((x)  16)
 #define	MFCPU_U(r,x)	.word	0x140008a0 | ((r)  21) | ((x))

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.102 src/sys/arch/hp700/hp700/machdep.c:1.103
--- src/sys/arch/hp700/hp700/machdep.c:1.102	Mon Dec 12 19:03:09 2011
+++ src/sys/arch/hp700/hp700/machdep.c	Mon Jan  2 16:13:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.102 2011/12/12 19:03:09 mrg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.103 2012/01/02 16:13:12 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.102 2011/12/12 19:03:09 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.103 2012/01/02 16:13:12 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -330,8 +330,8 @@ const struct hppa_cpu_info cpu_types[] =
 	{ PA7000, NULL, PCXS,
 	  hpcxs,  0,
 	  0, 1.1a,
-	  desidhash_s, itlb_x, dtlb_x, itlbna_x, dtlbna_x, tlbd_x,
-	  ibtlb_g, NULL, pbtlb_g }, /* XXXNH check */
+	  desidhash_s, itlb_s, dtlb_s, itlbna_s, dtlbna_s, tlbd_s,
+	  ibtlb_g, NULL, pbtlb_g },
 #endif
 #ifdef HP7100_CPU
 	{ PA7100, T-Bird, PCXT,

Index: src/sys/arch/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.60 src/sys/arch/hppa/hppa/trap.S:1.61
--- src/sys/arch/hppa/hppa/trap.S:1.60	Mon Feb 28 21:22:35 2011
+++ src/sys/arch/hppa/hppa/trap.S	Mon Jan  2 16:13:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.60 2011/02/28 21:22:35 skrll Exp $	*/
+/*	$NetBSD: trap.S,v 1.61 2012/01/02 16:13:12 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -1743,7 +1743,7 @@ EXIT(TLABEL(dtlb_u))
 	.level	1.1
 #endif /* HP8000_CPU */
 
-#if defined(HP7000_CPU) || defined(HP7100_CPU)
+#if defined(HP7000_CPU)
 /*
  * int desidhash_s(void)
  * int desidhash_x(void)
@@ -1767,7 +1767,7 @@ ALTENTRY(desidhash_x)
 	bv	0(%rp)
 	extru	%t1, 4, 5, %ret0	/* return chip revision */
 EXIT(desidhash_s)
-#endif /* defined(HP7000_CPU) || defined(HP7100_CPU) */
+#endif /* defined(HP7000_CPU) */
 
 #if defined(HP7100_CPU) || defined(HP7200_CPU)
 /*



CVS commit: src/share/man/man8/man8.sandpoint

2012-01-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan  2 18:02:00 UTC 2012

Modified Files:
src/share/man/man8/man8.sandpoint: altboot.8

Log Message:
New sentence, new line. Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man8/man8.sandpoint/altboot.8

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/man8/man8.sandpoint/altboot.8
diff -u src/share/man/man8/man8.sandpoint/altboot.8:1.4 src/share/man/man8/man8.sandpoint/altboot.8:1.5
--- src/share/man/man8/man8.sandpoint/altboot.8:1.4	Sun Jan  1 14:48:40 2012
+++ src/share/man/man8/man8.sandpoint/altboot.8	Mon Jan  2 18:02:00 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: altboot.8,v 1.4 2012/01/01 14:48:40 phx Exp $
+.\ $NetBSD: altboot.8,v 1.5 2012/01/02 18:02:00 wiz Exp $
 .\
 .\ Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 26, 2011
+.Dd January 1, 2012
 .Dt ALTBOOT 8 sandpoint
 .Os
 .Sh NAME
@@ -182,7 +182,8 @@ kernel.
 boots the
 .Tn ELF
 .Nx
-kernel from any address in memory. The
+kernel from any address in memory.
+The
 .Em address
 argument has to be specified as a hexadecimal number and denotes the
 start address of the



CVS commit: src/usr.sbin/wsmoused

2012-01-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan  2 18:04:34 UTC 2012

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

Log Message:
Use more markup. New sentence, new line. Sort sections.
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/wsmoused/wsmoused.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/wsmoused/wsmoused.8
diff -u src/usr.sbin/wsmoused/wsmoused.8:1.17 src/usr.sbin/wsmoused/wsmoused.8:1.18
--- src/usr.sbin/wsmoused/wsmoused.8:1.17	Sun Jan  1 19:12:17 2012
+++ src/usr.sbin/wsmoused/wsmoused.8	Mon Jan  2 18:04:34 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: wsmoused.8,v 1.17 2012/01/01 19:12:17 rkujawa Exp $
+.\ $NetBSD: wsmoused.8,v 1.18 2012/01/02 18:04:34 wiz Exp $
 .\
 .\ Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd April 15, 2006
+.Dd January 1, 2012
 .Dt WSMOUSED 8
 .Os
 .Sh NAME
@@ -114,6 +114,40 @@ mouse control device
 .It Pa /etc/wsmoused.conf
 default configuration file
 .El
+.Sh SEE ALSO
+.Xr su 1 ,
+.Xr wscons 4 ,
+.Xr wsdisplay 4 ,
+.Xr wsmouse 4 ,
+.Xr rc.conf 5 ,
+.Xr ttys 5 ,
+.Xr wscons.conf 5 ,
+.Xr wsmoused.conf 5 ,
+.Xr moused 8 ,
+.Xr rc.subr 8
+.Sh HISTORY
+The
+.Nm
+command first appeared in
+.Nx 2.0 .
+.Sh AUTHORS
+The
+.Nm
+command was developed by
+.An Julio M. Merino Vidal
+.Aq j...@netbsd.org .
+.Sh CAVEATS
+.Nm
+does work properly only with display drivers, which implement
+.Dv WSDISPLAYIO_GETWSCHAR
+and
+.Dv WSDISPLAYIO_PUTWSCHAR
+ioctls.
+Currently only
+.Xr vga 4
+and drivers utilizing
+.Xr vcons 9
+support it.
 .Sh SECURITY CONSIDERATIONS
 When using the
 .Sq action
@@ -163,34 +197,3 @@ To do this, edit
 and
 .Pa /etc/wscons.conf .
 .El
-.Sh SEE ALSO
-.Xr su 1 ,
-.Xr wscons 4 ,
-.Xr wsdisplay 4 ,
-.Xr wsmouse 4 ,
-.Xr rc.conf 5 ,
-.Xr ttys 5 ,
-.Xr wscons.conf 5 ,
-.Xr wsmoused.conf 5 ,
-.Xr moused 8 ,
-.Xr rc.subr 8
-.Sh HISTORY
-The
-.Nm
-command first appeared in
-.Nx 2.0 .
-.Sh AUTHORS
-The
-.Nm
-command was developed by
-.An Julio M. Merino Vidal
-.Aq j...@netbsd.org .
-.Sh CAVEATS
-The
-.Nm
-does work properly only with display drivers, which implement
-WSDISPLAYIO_GETWSCHAR and WSDISPLAYIO_PUTWSCHAR ioctls.  Currently only
-.Xr vga 4
-and drivers utilizing
-.Xr vcons 9
-supports it.



CVS commit: src/lib/libcrypt

2012-01-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan  2 18:06:37 UTC 2012

Modified Files:
src/lib/libcrypt: crypt.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libcrypt/crypt.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/libcrypt/crypt.3
diff -u src/lib/libcrypt/crypt.3:1.24 src/lib/libcrypt/crypt.3:1.25
--- src/lib/libcrypt/crypt.3:1.24	Sun Jan  1 23:42:03 2012
+++ src/lib/libcrypt/crypt.3	Mon Jan  2 18:06:37 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: crypt.3,v 1.24 2012/01/01 23:42:03 christos Exp $
+.\	$NetBSD: crypt.3,v 1.25 2012/01/02 18:06:37 wiz Exp $
 .\
 .\ Copyright (c) 1989, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -244,7 +244,7 @@ for interpretation.
 .Ss Blowfish crypt
 The
 .Tn Blowfish
-version of 
+version of
 .Fn crypt
 has 128 bits of
 .Fa salt



CVS commit: src/share/man/man9

2012-01-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan  2 18:07:21 UTC 2012

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

Log Message:
Bump date for previous. Move RCS Id to top of file.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/memcpy.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/memcpy.9
diff -u src/share/man/man9/memcpy.9:1.8 src/share/man/man9/memcpy.9:1.9
--- src/share/man/man9/memcpy.9:1.8	Mon Jan  2 15:41:51 2012
+++ src/share/man/man9/memcpy.9	Mon Jan  2 18:07:21 2012
@@ -1,3 +1,5 @@
+.\	$NetBSD: memcpy.9,v 1.9 2012/01/02 18:07:21 wiz Exp $
+.\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
 .\
@@ -30,9 +32,8 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)memcpy.3	8.1 (Berkeley) 6/4/93
-.\	$NetBSD: memcpy.9,v 1.8 2012/01/02 15:41:51 rkujawa Exp $
 .\
-.Dd July 7, 2001
+.Dd January 2, 2012
 .Dt MEMCPY 9
 .Os
 .Sh NAME



CVS commit: xsrc/external/mit/xorg-cf-files/dist

2012-01-02 Thread Matthias Scheler
Module Name:xsrc
Committed By:   tron
Date:   Mon Jan  2 19:54:42 UTC 2012

Modified Files:
xsrc/external/mit/xorg-cf-files/dist: NetBSD.cf

Log Message:
Don't include xorg.cf twice for NetBSD/sparc and NetBSD/sparc64.
This avoid a lot redefinition warnings from imake which are e.g.
triggered by pkgsrc's checks.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xorg-cf-files/dist/NetBSD.cf

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

Modified files:

Index: xsrc/external/mit/xorg-cf-files/dist/NetBSD.cf
diff -u xsrc/external/mit/xorg-cf-files/dist/NetBSD.cf:1.5 xsrc/external/mit/xorg-cf-files/dist/NetBSD.cf:1.6
--- xsrc/external/mit/xorg-cf-files/dist/NetBSD.cf:1.5	Mon Aug  1 14:14:15 2011
+++ xsrc/external/mit/xorg-cf-files/dist/NetBSD.cf	Mon Jan  2 19:54:42 2012
@@ -597,12 +597,6 @@ InstallManPageAliasesBase(file,destdir,a
 #endif
 
 /*
- * Always include xorg.cf for GccAliasingArgs,
- * regardless of server support on this plattform
- */
-#include xorg.cf
-
-/*
  * Definitions for the SUN server on NetBSD/sparc
  */
 #ifdef SparcArchitecture
@@ -631,6 +625,11 @@ InstallManPageAliasesBase(file,destdir,a
 #define BuildXF86VidModeExt	NO
 #define BuildXF86DGA		NO
 #define BuildXInputExt		NO
+
+/*
+ * Always include xorg.cf for GccAliasingArgs,
+ * regardless of server support on this plattform
+ */
 #include xorg.cf
 #endif
 



CVS commit: src/lib/libc/rpc

2012-01-02 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Jan  2 21:29:55 UTC 2012

Modified Files:
src/lib/libc/rpc: xdr_sizeof.c

Log Message:
Remove unnecessary cast to caddr_t.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/rpc/xdr_sizeof.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/rpc/xdr_sizeof.c
diff -u src/lib/libc/rpc/xdr_sizeof.c:1.2 src/lib/libc/rpc/xdr_sizeof.c:1.3
--- src/lib/libc/rpc/xdr_sizeof.c:1.2	Mon Jul  4 11:01:40 2011
+++ src/lib/libc/rpc/xdr_sizeof.c	Mon Jan  2 21:29:55 2012
@@ -39,7 +39,7 @@
 #if 0
 __FBSDID($FreeBSD: src/lib/libc/xdr/xdr_sizeof.c,v 1.5.38.1 2010/12/21 17:10:29 kensmith Exp $);
 #else
-__RCSID($NetBSD: xdr_sizeof.c,v 1.2 2011/07/04 11:01:40 mrg Exp $);
+__RCSID($NetBSD: xdr_sizeof.c,v 1.3 2012/01/02 21:29:55 dholland Exp $);
 #endif
 
 #include namespace.h
@@ -117,7 +117,7 @@ x_inline(xdrs, len)
 		/* Free the earlier space and allocate new area */
 		if (xdrs-x_private)
 			free(xdrs-x_private);
-		if ((xdrs-x_private = (caddr_t) malloc(len)) == NULL) {
+		if ((xdrs-x_private = malloc(len)) == NULL) {
 			xdrs-x_base = 0;
 			return (NULL);
 		}



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

2012-01-02 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Jan  2 21:48:14 UTC 2012

Modified Files:
src/sys/arch/usermode/conf: GENERIC.common

Log Message:
Add UDF, NILFS and NFS to the standard file systems and boost the symbol table
size to accomodate for this.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/usermode/conf/GENERIC.common

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/usermode/conf/GENERIC.common
diff -u src/sys/arch/usermode/conf/GENERIC.common:1.9 src/sys/arch/usermode/conf/GENERIC.common:1.10
--- src/sys/arch/usermode/conf/GENERIC.common:1.9	Fri Dec 30 20:08:36 2011
+++ src/sys/arch/usermode/conf/GENERIC.common	Mon Jan  2 21:48:14 2012
@@ -1,14 +1,14 @@
-# $NetBSD: GENERIC.common,v 1.9 2011/12/30 20:08:36 jmcneill Exp $
+# $NetBSD: GENERIC.common,v 1.10 2012/01/02 21:48:14 reinoud Exp $
 
 include arch/usermode/conf/std.usermode
 
 options 	INCLUDE_CONFIG_FILE
-#ident 		GENERIC-$Revision: 1.9 $
+#ident 		GENERIC-$Revision: 1.10 $
 maxusers 	32
 
 makeoptions	DEBUG=-O1 -g3
 
-options 	SYMTAB_SPACE=31
+options 	SYMTAB_SPACE=35
 
 options 	RTC_OFFSET=0
 options 	KTRACE
@@ -38,6 +38,9 @@ file-system	KERNFS
 file-system	PROCFS
 file-system	PTYFS
 file-system	TMPFS
+file-system	NFS
+file-system	UDF
+file-system	NILFS
 options		WAPBL
 
 options 	INET



CVS commit: src/sys/arch/usermode/usermode

2012-01-02 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Jan  2 22:02:51 UTC 2012

Modified Files:
src/sys/arch/usermode/usermode: trap.c

Log Message:
Remove tests that are dubious and should be (re)moved anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/usermode/usermode/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/usermode/usermode/trap.c
diff -u src/sys/arch/usermode/usermode/trap.c:1.48 src/sys/arch/usermode/usermode/trap.c:1.49
--- src/sys/arch/usermode/usermode/trap.c:1.48	Mon Dec 26 22:04:35 2011
+++ src/sys/arch/usermode/usermode/trap.c	Mon Jan  2 22:02:51 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.48 2011/12/26 22:04:35 jmcneill Exp $ */
+/* $NetBSD: trap.c,v 1.49 2012/01/02 22:02:51 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.48 2011/12/26 22:04:35 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.49 2012/01/02 22:02:51 reinoud Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -150,6 +150,7 @@ mem_access_handler(int sig, siginfo_t *i
 	va = (vaddr_t) info-si_addr;
 	va = trunc_page(va);
 
+#if 0	/* disabled for now, these checks need to move */
 #ifdef DIAGNOSTIC
 	/* sanity */
 	if ((va  VM_MIN_ADDRESS) || (va = VM_MAX_KERNEL_ADDRESS))
@@ -159,6 +160,7 @@ mem_access_handler(int sig, siginfo_t *i
 	if (va == 0)
 		panic(NULL deref\n);
 #endif
+#endif
 
 //printf(memaccess error : va = %p\n, (void *) va);
 	/* copy this state to return to */



CVS commit: src/sys/ufs

2012-01-02 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Mon Jan  2 22:10:45 UTC 2012

Modified Files:
src/sys/ufs/lfs: lfs.h lfs_bio.c lfs_extern.h lfs_segment.c lfs_subr.c
lfs_syscalls.c lfs_vfsops.c lfs_vnops.c
src/sys/ufs/ufs: inode.h ufs_readwrite.c

Log Message:
* Remove PGO_RECLAIM during lfs_putpages()' call to genfs_putpages(),
  to avoid a live lock in the latter when reclaiming a vnode with
  dirty pages.

* Add a new segment flag, SEGM_RECLAIM, to note when a segment is
  being written for vnode reclamation, and record which inode is being
  reclaimed, to aid in forensic debugging.

* Add a new segment flag, SEGM_SINGLE, so that opportunistic writes
  can write a single segment's worth of blocks and then stop, rather
  than writing all the way up to the cleaner's reserved number of
  segments.

* Add assert statements to check mutex ownership is the way it ought
  to be, mostly in lfs_putpages; fix problems uncovered by this.

* Don't clear VU_DIROP until the inode actually makes its way to disk,
  avoiding a problem where dirop inodes could become separated
  (uncovered by a modified version of the ckckp forensic regression
  test).

* Move the vfs_getopsbyname() call into lfs_writerd.  Prepare code to
  make lfs_writerd notice when there are no more LFSs, and exit losing
  the reference, so that, in theory, the module can be unloaded.  This
  code is not enabled, since it causes a crash on exit.

* Set IN_MODIFIED on inodes flushed by lfs_flush_dirops.  Really we
  only need to set IN_MODIFIED if we are going to write them again
  (e.g., to write pages); need to think about this more.

Finally, several changes to help avoid no clean segments panics:

* In lfs_bmapv, note when a vnode is loaded only to discover whether
  its blocks are live, so it can immediately be recycled.  Since the
  cleaner will try to choose ~empty segments over full ones, this
  prevents the cleaner from (1) filling the vnode cache with junk, and
  (2) squeezing any unwritten writes to disk and running the fs out of
  segments.

* Overestimate by half the amount of metadata that will be required
  to fill the clean segments.  This will make the disk appear smaller,
  but should help avoid a no clean segments panic.

* Rearrange lfs_writerd.  In particular, lfs_writerd now pays
  attention to the number of clean segments available, and holds off
  writing until there is room.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/ufs/lfs/lfs.h
cvs rdiff -u -r1.120 -r1.121 src/sys/ufs/lfs/lfs_bio.c
cvs rdiff -u -r1.96 -r1.97 src/sys/ufs/lfs/lfs_extern.h
cvs rdiff -u -r1.222 -r1.223 src/sys/ufs/lfs/lfs_segment.c
cvs rdiff -u -r1.76 -r1.77 src/sys/ufs/lfs/lfs_subr.c
cvs rdiff -u -r1.139 -r1.140 src/sys/ufs/lfs/lfs_syscalls.c
cvs rdiff -u -r1.291 -r1.292 src/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -u -r1.238 -r1.239 src/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -u -r1.58 -r1.59 src/sys/ufs/ufs/inode.h
cvs rdiff -u -r1.100 -r1.101 src/sys/ufs/ufs/ufs_readwrite.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/ufs/lfs/lfs.h
diff -u src/sys/ufs/lfs/lfs.h:1.134 src/sys/ufs/lfs/lfs.h:1.135
--- src/sys/ufs/lfs/lfs.h:1.134	Mon Jul 11 08:27:40 2011
+++ src/sys/ufs/lfs/lfs.h	Mon Jan  2 22:10:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs.h,v 1.134 2011/07/11 08:27:40 hannken Exp $	*/
+/*	$NetBSD: lfs.h,v 1.135 2012/01/02 22:10:44 perseant Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -592,6 +592,7 @@ struct segsum_v1 {
 #define	SS_CONT		0x02		/* more partials to finish this write*/
 #define	SS_CLEAN	0x04		/* written by the cleaner */
 #define	SS_RFW		0x08		/* written by the roll-forward agent */
+#define	SS_RECLAIM	0x10		/* written by the roll-forward agent */
 	u_int16_t ss_flags;		/* 24: used for directory operations */
 	u_int16_t ss_pad;		/* 26: extra space */
 	/* FINFO's and inode daddr's... */
@@ -608,7 +609,8 @@ struct segsum {
 	u_int16_t ss_nfinfo;		/* 20: number of file info structures */
 	u_int16_t ss_ninos;		/* 22: number of inodes in summary */
 	u_int16_t ss_flags;		/* 24: used for directory operations */
-	u_int8_t  ss_pad[6];		/* 26: extra space */
+	u_int8_t  ss_pad[2];		/* 26: extra space */
+	u_int32_t ss_reclino;   /* 28: inode being reclaimed */
 	u_int64_t ss_serial;		/* 32: serial number */
 	u_int64_t ss_create;		/* 40: time stamp */
 	/* FINFO's and inode daddr's... */
@@ -840,6 +842,8 @@ struct lfs {
 	int lfs_nowrap;			/* Suspend log wrap */
 	int lfs_wrappass;		/* Allow first log wrap requester to pass */
 	int lfs_wrapstatus;		/* Wrap status */
+	int lfs_reclino;		/* Inode being reclaimed */
+	int lfs_startseg;   /* Segment we started writing at */
 	LIST_HEAD(, segdelta) lfs_segdhd;	/* List of pending trunc accounting events */
 };
 
@@ -945,13 +949,15 @@ struct segment {
 	u_int32_t seg_number;		/* number 

CVS commit: src/sys/netinet

2012-01-02 Thread Liam J. Foy
Module Name:src
Committed By:   liamjfoy
Date:   Mon Jan  2 22:17:11 UTC 2012

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
Remove dead variable


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/netinet/if_arp.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/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.153 src/sys/netinet/if_arp.c:1.154
--- src/sys/netinet/if_arp.c:1.153	Sat Dec 31 20:41:58 2011
+++ src/sys/netinet/if_arp.c	Mon Jan  2 22:17:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.153 2011/12/31 20:41:58 christos Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.154 2012/01/02 22:17:11 liamjfoy Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.153 2011/12/31 20:41:58 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.154 2012/01/02 22:17:11 liamjfoy Exp $);
 
 #include opt_ddb.h
 #include opt_inet.h
@@ -161,7 +161,7 @@ struct	ifqueue arpintrq = {
 	.ifq_maxlen = 50,
 	.ifq_drops = 0,
 };
-int	arp_inuse, arp_allocated, arp_intimer;
+int	arp_inuse, arp_allocated;
 int	arp_maxtries = 5;
 int	useloopback = 1;	/* use loopback interface for local traffic */
 int	arpinit_done = 0;



CVS commit: [netbsd-5] xsrc/xfree/xc/programs/Xserver

2012-01-02 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Mon Jan  2 23:47:56 UTC 2012

Modified Files:
xsrc/xfree/xc/programs/Xserver/fb [netbsd-5]: fbpict.c
xsrc/xfree/xc/programs/Xserver/mi [netbsd-5]: miarc.c misprite.c

Log Message:
Pull up following revision(s) (requested by is in ticket #1707):
xfree/xc/programs/Xserver/mi/misprite.c: revision 1.2
xfree/xc/programs/Xserver/mi/miarc.c: revision 1.2
xfree/xc/programs/Xserver/fb/fbpict.c: revision 1.5
This fix is taken from xorg-server 1.9.2.
mod(a,b) used to be defined with a - in front of naked a, such that uses
of mod with certain arithmetic expressions as a led to surprising results,
namely the one in Xrender praised in CVE-2010-1166.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 xsrc/xfree/xc/programs/Xserver/fb/fbpict.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.20.1 \
xsrc/xfree/xc/programs/Xserver/mi/miarc.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.22.1 \
xsrc/xfree/xc/programs/Xserver/mi/misprite.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/fb/fbpict.c
diff -u xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4 xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4.2.1
--- xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4	Sat Apr 19 19:00:39 2008
+++ xsrc/xfree/xc/programs/Xserver/fb/fbpict.c	Mon Jan  2 23:47:56 2012
@@ -908,7 +908,7 @@ fbCompositeSolidMask_nx1xn (CARD8  o
 	  0x0);
 }
 
-# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 void
 fbComposite (CARD8  op,

Index: xsrc/xfree/xc/programs/Xserver/mi/miarc.c
diff -u xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5 xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5.20.1
--- xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5	Fri Mar  5 14:29:39 2004
+++ xsrc/xfree/xc/programs/Xserver/mi/miarc.c	Mon Jan  2 23:47:56 2012
@@ -1554,7 +1554,7 @@ miRoundCap(
 
 # define Dsin(d)	((d) == 0.0 ? 0.0 : ((d) == 90.0 ? 1.0 : sin(d*M_PI/180.0)))
 # define Dcos(d)	((d) == 0.0 ? 1.0 : ((d) == 90.0 ? 0.0 : cos(d*M_PI/180.0)))
-# define mod(a,b)	((a) = 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((a) = 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 static double
 miDcos (double a)

Index: xsrc/xfree/xc/programs/Xserver/mi/misprite.c
diff -u xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5 xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5.22.1
--- xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5	Fri Feb 28 13:20:27 2003
+++ xsrc/xfree/xc/programs/Xserver/mi/misprite.c	Mon Jan  2 23:47:56 2012
@@ -1978,7 +1978,7 @@ miSpriteLineHelper()
 
 #ifdef RENDER
 
-# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 static void
 miSpritePictureOverlap (PicturePtr  pPict,



CVS commit: [netbsd-5] src/doc

2012-01-02 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Jan  2 23:49:28 UTC 2012

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

Log Message:
1707


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.121 -r1.1.2.122 src/doc/CHANGES-5.2

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.2
diff -u src/doc/CHANGES-5.2:1.1.2.121 src/doc/CHANGES-5.2:1.1.2.122
--- src/doc/CHANGES-5.2:1.1.2.121	Sat Dec 31 22:13:35 2011
+++ src/doc/CHANGES-5.2	Mon Jan  2 23:49:27 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.121 2011/12/31 22:13:35 snj Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.122 2012/01/02 23:49:27 snj Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5841,3 +5841,13 @@ sys/dev/vndvar.h1.31 via patch
 	Make vnd(4) work on sparse files.
 	[riz, ticket #1705]
 
+xfree/xc/programs/Xserver/fb/fbpict.c		1.5
+xfree/xc/programs/Xserver/mi/miarc.c		1.2
+xfree/xc/programs/Xserver/mi/misprite.c		1.2
+
+	mod(a,b) used to be defined with a - in front of naked a, such that
+	uses of mod with certain arithmetic expressions as a led to
+	surprising results, namely the one in Xrender praised in
+	CVE-2010-1166.
+	[is, ticket #1707]
+



CVS commit: [netbsd-5-1] xsrc/xfree/xc/programs/Xserver

2012-01-02 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Mon Jan  2 23:51:37 UTC 2012

Modified Files:
xsrc/xfree/xc/programs/Xserver/fb [netbsd-5-1]: fbpict.c
xsrc/xfree/xc/programs/Xserver/mi [netbsd-5-1]: miarc.c misprite.c

Log Message:
Pull up following revision(s) (requested by is in ticket #1707):
xfree/xc/programs/Xserver/mi/misprite.c: revision 1.2
xfree/xc/programs/Xserver/mi/miarc.c: revision 1.2
xfree/xc/programs/Xserver/fb/fbpict.c: revision 1.5
This fix is taken from xorg-server 1.9.2.
mod(a,b) used to be defined with a - in front of naked a, such that uses
of mod with certain arithmetic expressions as a led to surprising results,
namely the one in Xrender praised in CVE-2010-1166.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.6.1 xsrc/xfree/xc/programs/Xserver/fb/fbpict.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.24.1 \
xsrc/xfree/xc/programs/Xserver/mi/miarc.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.26.1 \
xsrc/xfree/xc/programs/Xserver/mi/misprite.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/fb/fbpict.c
diff -u xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4 xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4.6.1
--- xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4	Sat Apr 19 19:00:39 2008
+++ xsrc/xfree/xc/programs/Xserver/fb/fbpict.c	Mon Jan  2 23:51:37 2012
@@ -908,7 +908,7 @@ fbCompositeSolidMask_nx1xn (CARD8  o
 	  0x0);
 }
 
-# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 void
 fbComposite (CARD8  op,

Index: xsrc/xfree/xc/programs/Xserver/mi/miarc.c
diff -u xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5 xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5.24.1
--- xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5	Fri Mar  5 14:29:39 2004
+++ xsrc/xfree/xc/programs/Xserver/mi/miarc.c	Mon Jan  2 23:51:37 2012
@@ -1554,7 +1554,7 @@ miRoundCap(
 
 # define Dsin(d)	((d) == 0.0 ? 0.0 : ((d) == 90.0 ? 1.0 : sin(d*M_PI/180.0)))
 # define Dcos(d)	((d) == 0.0 ? 1.0 : ((d) == 90.0 ? 0.0 : cos(d*M_PI/180.0)))
-# define mod(a,b)	((a) = 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((a) = 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 static double
 miDcos (double a)

Index: xsrc/xfree/xc/programs/Xserver/mi/misprite.c
diff -u xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5 xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5.26.1
--- xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5	Fri Feb 28 13:20:27 2003
+++ xsrc/xfree/xc/programs/Xserver/mi/misprite.c	Mon Jan  2 23:51:37 2012
@@ -1978,7 +1978,7 @@ miSpriteLineHelper()
 
 #ifdef RENDER
 
-# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 static void
 miSpritePictureOverlap (PicturePtr  pPict,



CVS commit: [netbsd-5-1] src/doc

2012-01-02 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Jan  2 23:52:31 UTC 2012

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

Log Message:
1707


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.43 -r1.1.2.44 src/doc/CHANGES-5.1.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.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.43 src/doc/CHANGES-5.1.1:1.1.2.44
--- src/doc/CHANGES-5.1.1:1.1.2.43	Sat Dec 31 20:05:00 2011
+++ src/doc/CHANGES-5.1.1	Mon Jan  2 23:52:30 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.43 2011/12/31 20:05:00 snj Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.44 2012/01/02 23:52:30 snj Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2582,3 +2582,13 @@ lib/libtelnet/encrypt.c1.15
 	Avoid buffer overflow, reported by Colin Percival at FreeBSD
 	[christos, ticket #1704]
 
+xsrc/xfree/xc/programs/Xserver/fb/fbpict.c	1.5
+xsrc/xfree/xc/programs/Xserver/mi/miarc.c	1.2
+xsrc/xfree/xc/programs/Xserver/mi/misprite.c	1.2
+
+	mod(a,b) used to be defined with a - in front of naked a, such that
+	uses of mod with certain arithmetic expressions as a led to
+	surprising results, namely the one in Xrender praised in
+	CVE-2010-1166.
+	[is, ticket #1707]
+



CVS commit: [netbsd-5] src/doc

2012-01-02 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Jan  2 23:53:07 UTC 2012

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

Log Message:
Note that the files in ticket 1707 are xsrc.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.122 -r1.1.2.123 src/doc/CHANGES-5.2

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.2
diff -u src/doc/CHANGES-5.2:1.1.2.122 src/doc/CHANGES-5.2:1.1.2.123
--- src/doc/CHANGES-5.2:1.1.2.122	Mon Jan  2 23:49:27 2012
+++ src/doc/CHANGES-5.2	Mon Jan  2 23:53:07 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.122 2012/01/02 23:49:27 snj Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.123 2012/01/02 23:53:07 snj Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5841,9 +5841,9 @@ sys/dev/vndvar.h1.31 via patch
 	Make vnd(4) work on sparse files.
 	[riz, ticket #1705]
 
-xfree/xc/programs/Xserver/fb/fbpict.c		1.5
-xfree/xc/programs/Xserver/mi/miarc.c		1.2
-xfree/xc/programs/Xserver/mi/misprite.c		1.2
+xsrc/xfree/xc/programs/Xserver/fb/fbpict.c	1.5
+xsrc/xfree/xc/programs/Xserver/mi/miarc.c	1.2
+xsrc/xfree/xc/programs/Xserver/mi/misprite.c	1.2
 
 	mod(a,b) used to be defined with a - in front of naked a, such that
 	uses of mod with certain arithmetic expressions as a led to



CVS commit: [netbsd-5-0] xsrc/xfree/xc/programs/Xserver

2012-01-02 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Mon Jan  2 23:54:25 UTC 2012

Modified Files:
xsrc/xfree/xc/programs/Xserver/fb [netbsd-5-0]: fbpict.c
xsrc/xfree/xc/programs/Xserver/mi [netbsd-5-0]: miarc.c misprite.c

Log Message:
Pull up following revision(s) (requested by is in ticket #1707):
xfree/xc/programs/Xserver/mi/misprite.c: revision 1.2
xfree/xc/programs/Xserver/mi/miarc.c: revision 1.2
xfree/xc/programs/Xserver/fb/fbpict.c: revision 1.5
This fix is taken from xorg-server 1.9.2.
mod(a,b) used to be defined with a - in front of naked a, such that uses
of mod with certain arithmetic expressions as a led to surprising results,
namely the one in Xrender praised in CVE-2010-1166.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 xsrc/xfree/xc/programs/Xserver/fb/fbpict.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.22.1 \
xsrc/xfree/xc/programs/Xserver/mi/miarc.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.24.1 \
xsrc/xfree/xc/programs/Xserver/mi/misprite.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/fb/fbpict.c
diff -u xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4 xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4.4.1
--- xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4	Sat Apr 19 19:00:39 2008
+++ xsrc/xfree/xc/programs/Xserver/fb/fbpict.c	Mon Jan  2 23:54:25 2012
@@ -908,7 +908,7 @@ fbCompositeSolidMask_nx1xn (CARD8  o
 	  0x0);
 }
 
-# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 void
 fbComposite (CARD8  op,

Index: xsrc/xfree/xc/programs/Xserver/mi/miarc.c
diff -u xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5 xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5.22.1
--- xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5	Fri Mar  5 14:29:39 2004
+++ xsrc/xfree/xc/programs/Xserver/mi/miarc.c	Mon Jan  2 23:54:25 2012
@@ -1554,7 +1554,7 @@ miRoundCap(
 
 # define Dsin(d)	((d) == 0.0 ? 0.0 : ((d) == 90.0 ? 1.0 : sin(d*M_PI/180.0)))
 # define Dcos(d)	((d) == 0.0 ? 1.0 : ((d) == 90.0 ? 0.0 : cos(d*M_PI/180.0)))
-# define mod(a,b)	((a) = 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((a) = 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 static double
 miDcos (double a)

Index: xsrc/xfree/xc/programs/Xserver/mi/misprite.c
diff -u xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5 xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5.24.1
--- xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5	Fri Feb 28 13:20:27 2003
+++ xsrc/xfree/xc/programs/Xserver/mi/misprite.c	Mon Jan  2 23:54:25 2012
@@ -1978,7 +1978,7 @@ miSpriteLineHelper()
 
 #ifdef RENDER
 
-# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 static void
 miSpritePictureOverlap (PicturePtr  pPict,



CVS commit: [netbsd-5-0] src/doc

2012-01-02 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Jan  2 23:55:31 UTC 2012

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

Log Message:
1707


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.57 -r1.1.2.58 src/doc/CHANGES-5.0.3

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.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.57 src/doc/CHANGES-5.0.3:1.1.2.58
--- src/doc/CHANGES-5.0.3:1.1.2.57	Sat Dec 31 20:03:50 2011
+++ src/doc/CHANGES-5.0.3	Mon Jan  2 23:55:31 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.57 2011/12/31 20:03:50 snj Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.58 2012/01/02 23:55:31 snj Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2886,3 +2886,13 @@ lib/libtelnet/encrypt.c1.15
 	Avoid buffer overflow, reported by Colin Percival at FreeBSD
 	[christos, ticket #1704]
 
+xsrc/xfree/xc/programs/Xserver/fb/fbpict.c	1.5
+xsrc/xfree/xc/programs/Xserver/mi/miarc.c	1.2
+xsrc/xfree/xc/programs/Xserver/mi/misprite.c	1.2
+
+	mod(a,b) used to be defined with a - in front of naked a, such that
+	uses of mod with certain arithmetic expressions as a led to
+	surprising results, namely the one in Xrender praised in
+	CVE-2010-1166.
+	[is, ticket #1707]
+



CVS commit: src/sys/dev/pci

2012-01-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jan  3 00:25:49 UTC 2012

Modified Files:
src/sys/dev/pci: files.pci radeonfb.c

Log Message:
support anti-aliased fonts in 32bit colour
enable with options RADEONFB_DEPTH_32


To generate a diff of this commit:
cvs rdiff -u -r1.350 -r1.351 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/radeonfb.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/pci/files.pci
diff -u src/sys/dev/pci/files.pci:1.350 src/sys/dev/pci/files.pci:1.351
--- src/sys/dev/pci/files.pci:1.350	Sun Oct 30 12:12:21 2011
+++ src/sys/dev/pci/files.pci	Tue Jan  3 00:25:49 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.350 2011/10/30 12:12:21 hannken Exp $
+#	$NetBSD: files.pci,v 1.351 2012/01/03 00:25:49 macallan Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -846,6 +846,7 @@ defflag opt_radeonfb.h	RADEONFB_DEBUG
 defflag opt_radeonfb.h	RADEONFB_BIOS_INIT
 defflag opt_radeonfb.h	RADEONFB_BIOS_DEBUG
 defflag opt_radeonfb.h	RADEONFB_MMAP_BARS
+defflag opt_radeonfb.h	RADEONFB_DEPTH_32
 
 # Chelsio Terminator 3 (T3) 10 gigabit ethernet
 device	cxgbc { }
@@ -979,7 +980,7 @@ attach	ichsmb at pci
 file	dev/pci/ichsmb.c		ichsmb
 
 # ATI Rage 128 framebuffer console driver
-device	r128fb: wsemuldisplaydev, rasops8, vcons, videomode, iic, i2c_bitbang
+device	r128fb: wsemuldisplaydev, rasops8, rasops32, vcons, videomode, iic, i2c_bitbang
 attach	r128fb at pci
 file	dev/pci/r128fb.c		r128fb
 defflag	opt_r128fb.h	R128FB_DEBUG

Index: src/sys/dev/pci/radeonfb.c
diff -u src/sys/dev/pci/radeonfb.c:1.48 src/sys/dev/pci/radeonfb.c:1.49
--- src/sys/dev/pci/radeonfb.c:1.48	Thu Dec 29 20:14:39 2011
+++ src/sys/dev/pci/radeonfb.c	Tue Jan  3 00:25:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeonfb.c,v 1.48 2011/12/29 20:14:39 macallan Exp $ */
+/*	$NetBSD: radeonfb.c,v 1.49 2012/01/03 00:25:49 macallan Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,9 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.48 2011/12/29 20:14:39 macallan Exp $);
-
-#define RADEONFB_DEFAULT_DEPTH 8
+__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.49 2012/01/03 00:25:49 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -101,6 +99,12 @@ __KERNEL_RCSID(0, $NetBSD: radeonfb.c,v
 #include opt_radeonfb.h
 #include opt_vcons.h
 
+#ifdef RADEONFB_DEPTH_32
+#define RADEONFB_DEFAULT_DEPTH 32
+#else
+#define RADEONFB_DEFAULT_DEPTH 8
+#endif
+
 static int radeonfb_match(device_t, cfdata_t, void *);
 static void radeonfb_attach(device_t, device_t, void *);
 static int radeonfb_ioctl(void *, void *, unsigned long, void *, int,
@@ -162,8 +166,8 @@ static void radeonfb_copyrows(void *, in
 static void radeonfb_copycols(void *, int, int, int, int);
 static void radeonfb_cursor(void *, int, int, int);
 static void radeonfb_putchar(void *, int, int, unsigned, long);
+static void radeonfb_putchar_aa32(void *, int, int, unsigned, long);
 static void radeonfb_putchar_wrapper(void *, int, int, unsigned, long);
-static int radeonfb_allocattr(void *, int, int, int, long *);
 
 static int radeonfb_get_backlight(struct radeonfb_display *);
 static int radeonfb_set_backlight(struct radeonfb_display *, int);
@@ -222,7 +226,7 @@ static struct wsscreen_descr radeonfb_st
 	0, 0,		/* ncols, nrows */
 	NULL,		/* textops */
 	8, 16,		/* fontwidth, fontheight */
-	WSSCREEN_WSCOLORS | WSSCREEN_REVERSE, /* capabilities */
+	WSSCREEN_WSCOLORS, /* capabilities */
 	0,		/* modecookie */
 };
 
@@ -755,11 +759,8 @@ radeonfb_attach(device_t parent, device_
 		dp-rd_softc = sc;
 		dp-rd_wsmode = WSDISPLAYIO_MODE_EMUL;
 		dp-rd_bg = WS_DEFAULT_BG;
-#if 0
-		dp-rd_bpp = sc-sc_maxbpp;	/* XXX: for now */
-#else
 		dp-rd_bpp = RADEONFB_DEFAULT_DEPTH;	/* XXX */
-#endif
+
 		/* for text mode, we pick a resolution that won't
 		 * require panning */
 		radeonfb_pickres(dp, dp-rd_virtx, dp-rd_virty, 0);
@@ -1146,7 +1147,7 @@ radeonfb_mmap(void *v, void *vs, off_t o
 		0, prot, 0);	
 		return pa;
 	}	
-#endif /* macppc */
+#endif /* PCI_MAGIC_IO_RANGE */
 
 #endif /* RADEONFB_MMAP_BARS */
 
@@ -1947,7 +1948,6 @@ radeonfb_setcrtc(struct radeonfb_display
 	pitch = (((sc-sc_maxx * sc-sc_maxbpp) + ((sc-sc_maxbpp * 8) - 1)) /
 	(sc-sc_maxbpp * 8));
 #endif
-	//pitch = pitch | (pitch  16);
 
 	switch (crtc) {
 	case 0:
@@ -2162,13 +2162,15 @@ radeonfb_init_screen(void *cookie, struc
 	ri-ri_height = dp-rd_virty;
 	ri-ri_stride = dp-rd_stride;
 	ri-ri_flg = RI_CENTER;
+	if (ri-ri_depth == 32) {
+		ri-ri_flg |= RI_ENABLE_ALPHA;
+	}
 	ri-ri_bits = (void *)dp-rd_fbptr;
 
 #ifdef VCONS_DRAW_INTR
 	scr-scr_flags |= VCONS_DONT_READ;
 #endif
 
-	/* XXX: 32 bpp only */
 	/* this is rgb in big-endian order... */
 	ri-ri_rnum = 8;
 	ri-ri_gnum = 8;
@@ -2188,10 +2190,10 @@ radeonfb_init_screen(void *cookie, 

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2012-01-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  3 03:32:23 UTC 2012

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mipsX_subr.S

Log Message:
If MIPS64R2_XLP, just let MIPSX(exception) do the work on cache exceptions.
(this might be generalized to all mipsNN with more testing).


To generate a diff of this commit:
cvs rdiff -u -r1.26.36.1.2.52 -r1.26.36.1.2.53 \
src/sys/arch/mips/mips/mipsX_subr.S

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/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.52 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.53
--- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.52	Fri Dec 23 23:40:00 2011
+++ src/sys/arch/mips/mips/mipsX_subr.S	Tue Jan  3 03:32:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.52 2011/12/23 23:40:00 matt Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.53 2012/01/03 03:32:23 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -1535,6 +1535,11 @@ NESTED_NOPROFILE(MIPSX(cache_exception),
 	eret
 	nop
 #endif
+#if (MIPS64R2_RMIXL)  0
+	PTR_LA	k0, MIPSX(exception)		# switches to KSEG0
+	jr	k0# let common exception handle it
+	 nop
+#else
 	PTR_LA	k0, panic			# return to panic
 	PTR_LA	a0, 9f# panicstr
 	_MFC0	a1, MIPS_COP_0_ERROR_PC
@@ -1548,16 +1553,6 @@ NESTED_NOPROFILE(MIPSX(cache_exception),
 #endif
 	mfc0	a4, MIPS_COP_0_STATUS
 	mfc0	a5, MIPS_COP_0_CAUSE
-#elif (MIPS64R2_RMIXL)  0
-	li	k1, 0x308	/* LSU_CERR_LOG0 */
-	mfcr	a3, k1
-	li	k1, 0x309	/* LSU_CERR_LOG1 */
-	mfcr	a2, k1
-#if defined(__mips_o32)
-#error O32 not supported.
-#endif
-	mfc0	a4, MIPS_COP_0_STATUS
-	mfc0	a5, MIPS_COP_0_CAUSE
 #else
 	mfc0	a2, MIPS_COP_0_ECC
 	mfc0	a3, MIPS_COP_0_CACHE_ERR
@@ -1574,11 +1569,12 @@ NESTED_NOPROFILE(MIPSX(cache_exception),
 
 	eret
 
-#if (MIPS64_RMIXL + MIPS64R2_RMIXL)  0
+#if (MIPS64_RMIXL)  0
 	MSG(cache error @ EPC %#llx\nL1D_CACHE_ERROR_LOG %#llx\nL1D_CACHE_INTERRUPT %#lx\nstatus %#x, cause %#x);
 #else
 	MSG(cache error @ EPC 0x%x ErrCtl 0x%x CacheErr 0x%x);
 #endif
+#endif
 	.set	at
 END(MIPSX(cache_exception))
 



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

2012-01-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  3 06:11:21 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: locore.S

Log Message:
Tidy up the M[FT]CPU_* hv-specific instructions some more.

Same code before and after change.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/hp700/hp700/locore.S

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/locore.S
diff -u src/sys/arch/hp700/hp700/locore.S:1.57 src/sys/arch/hp700/hp700/locore.S:1.58
--- src/sys/arch/hp700/hp700/locore.S:1.57	Mon Jan  2 16:13:12 2012
+++ src/sys/arch/hp700/hp700/locore.S	Tue Jan  3 06:11:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.57 2012/01/02 16:13:12 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.58 2012/01/03 06:11:21 skrll Exp $	*/
 /*	$OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $	*/
 
 /*
@@ -118,30 +118,18 @@
 	_DEBUG_DUMPN(reg1, reg2, reg3, 27)	! \
 	_DEBUG_DUMPN(reg1, reg2, reg3, 31)
 
-#ifdef XXXNH
 /*
  * hv-specific instructions
  */
-#define	DR_PAGE0	diag (0x70  5)/* XXXNH Different */
-#define	DR_PAGE1	diag (0x72  5)/* XXXNH Different */
-#define	MTCPU_T(x,t)	diag ((t)  21) | ((x)  16) | (0xc0  5)	/* XXXNH Different */
-#define	MFCPU_T(r,x)	diag ((r)  21) | (0xa0  5) | (x)
+#define	DR_PAGE0	diag (0x70  5)
+#define	DR_PAGE1	diag (0x72  5)
+
+#define	MTCPU_T(x,t)	diag ((t)  21) | ((x)  16) | (0xb0  5)
+#define	MFCPU_T(r,x)	diag ((r)  21) | ((x)  16) | (0xd0  5)
 #define	MTCPU_C(x,t)	diag ((t)  21) | ((x)  16) | (0x12  5)
 #define	MFCPU_C(r,x)	diag ((r)  21) | ((x)  16) | (0x30  5)
-#define	MFCPU_U(r,x)	.word	0x140008a0 | ((r)  21) | ((x))
-#define	MTCPU_U(x,r)	.word	0x14001840 | ((r)  21) | ((x)  16)
-
-#else
-
-#define	DR_PAGE0	.word	0x14001200
-#define	DR_PAGE1	.word	0x14001240
-#define	MTCPU_T(x,t)	.word	0x14001600 | ((t)  21) | ((x)  16)
-#define	MFCPU_T(r,x)	.word	0x14001a00 | ((r)  21) | ((x)  16)
-#define	MTCPU_C(x,t)	.word	0x14000240 | ((t)  21) | ((x)  16)
-#define	MFCPU_C(r,x)	.word	0x14000600 | ((r)  21) | ((x)  16)
-#define	MFCPU_U(r,x)	.word	0x140008a0 | ((r)  21) | ((x))
-#define	MTCPU_U(x,r)	.word	0x14001840 | ((r)  21) | ((x)  16)
-#endif
+#define	MFCPU_U(r,x)	diag ((r)  21) | ((x))   | (0x45  5)
+#define	MTCPU_U(x,r)	diag ((r)  21) | ((x)  16) | (0xc2  5)
 
 	.import	$global$, data
 	.import pdc, data



CVS commit: src/sys/arch/hppa/hppa

2012-01-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  3 06:18:25 UTC 2012

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
Fix the CPU #ifdefs


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/hppa/hppa/trap.S

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/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.61 src/sys/arch/hppa/hppa/trap.S:1.62
--- src/sys/arch/hppa/hppa/trap.S:1.61	Mon Jan  2 16:13:12 2012
+++ src/sys/arch/hppa/hppa/trap.S	Tue Jan  3 06:18:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.61 2012/01/02 16:13:12 skrll Exp $	*/
+/*	$NetBSD: trap.S,v 1.62 2012/01/03 06:18:24 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -640,7 +640,8 @@ LDILDO(tlbd_l)
 #endif
 
 #if defined(HP8000_CPU) || defined(HP8200_CPU) || \
-defined(HP8500_CPU) || defined(HP8600_CPU)
+defined(HP8500_CPU) || defined(HP8600_CPU) || \
+defined(HP8700_CPU)
 LDILDO(itlb_u)
 LDILDO(itlbna_u)
 LDILDO(dtlb_u)
@@ -1227,7 +1228,6 @@ EXIT(hppa_fpu_swapout)
 #define	TLB_STATS_AFT(t)	/**/
 #endif
 
-#if defined(HP7000_CPU) || defined(HP7100_CPU) || defined(HP7200_CPU)
 #define	TLB_PULL(bits,lbl)		! \
 	/* space:pgaddr -- %r8:%r9 */	! \
 	mfctl	CR_VTOP, %r16		! \
@@ -1250,6 +1250,36 @@ EXIT(hppa_fpu_swapout)
 	addi	2, %r25, %r25		! \
 	extru	%r17, 24, 25, %r17
 
+/*
+ * possible optimizations:
+ *	change pte to reduce number of shifts
+ *	reorder to reduce stalls
+ */
+#define	TLB_PULL_L(bits,lbl)		! \
+	/* space:pgaddr -- %r8:%r9 */	! \
+	mfctl	CR_VTOP, %r16		! \
+	ldwx,s	%r8(%r16), %r17		/* space - page directory */	! \
+	extru	%r9, 9, 10, %r25	! \
+	combt,=,n %r0, %r17, lbl	! \
+	ldwx,s	%r25(%r17), %r24	/* page - page table */	! \
+	extru	%r9, 19, 10, %r16	! \
+	combt,=,n %r0, %r24, lbl	! \
+	ldwx,s	%r16(%r24), %r17	/* va - pa:prot */		! \
+	sh2addl	%r16, %r24, %r25	! \
+	combt,=,n %r0, %r17, lbl	! \
+	copy	%r17, %r16		! \
+	depi	(bits), 21+bits, 1+bits, %r17! \
+	sub,=	%r16, %r17, %r0		/* do not store if unchanged */	! \
+	stws	%r17, 0(%r25)		/* store back w/ the bits */	! \
+	shd	%r17, %r0, 13, %r25	! \
+	dep	%r8, 30, 15, %r25	/* mix0r the pid from the sid */! \
+	dep	%r0, 31, 12, %r17	/* needed ? */			! \
+	addi	2, %r25, %r25		! \
+	extru	%r17, 24, 25, %r17	/* tlbbtop(%r17) */		! \
+	sync
+
+#if defined(HP7000_CPU) || defined(HP7100_CPU) || defined(HP7200_CPU)
+
 	.align	32
 
 /*
@@ -1404,34 +1434,6 @@ EXIT(TLABEL(dtlbna_s))
 #define	IDTLBAF(r)	.word	0x04001440 | ((r)  16)
 #define	IDTLBPF(r)	.word	0x04001400 | ((r)  16)
 
-/*
- * possible optimizations:
- *	change pte to reduce number of shifts
- *	reorder to reduce stalls
- */
-#define	TLB_PULL_L(bits,lbl)		! \
-	/* space:pgaddr -- %r8:%r9 */	! \
-	mfctl	CR_VTOP, %r16		! \
-	ldwx,s	%r8(%r16), %r17		/* space - page directory */	! \
-	extru	%r9, 9, 10, %r25	! \
-	combt,=,n %r0, %r17, lbl	! \
-	ldwx,s	%r25(%r17), %r24	/* page - page table */	! \
-	extru	%r9, 19, 10, %r16	! \
-	combt,=,n %r0, %r24, lbl	! \
-	ldwx,s	%r16(%r24), %r17	/* va - pa:prot */		! \
-	sh2addl	%r16, %r24, %r25	! \
-	combt,=,n %r0, %r17, lbl	! \
-	copy	%r17, %r16		! \
-	depi	(bits), 21+bits, 1+bits, %r17! \
-	sub,=	%r16, %r17, %r0		/* do not store if unchanged */	! \
-	stws	%r17, 0(%r25)		/* store back w/ the bits */	! \
-	shd	%r17, %r0, 13, %r25	! \
-	dep	%r8, 30, 15, %r25	/* mix0r the pid from the sid */! \
-	dep	%r0, 31, 12, %r17	/* needed ? */			! \
-	addi	2, %r25, %r25		! \
-	extru	%r17, 24, 25, %r17	/* tlbbtop(%r17) */		! \
-	sync
-
 	.align	32
 
 /*
@@ -1605,7 +1607,10 @@ L$dtlb_done_l:
 EXIT(TLABEL(dtlb_l))
 #endif /* defined(HP7100LC_CPU) || defined(HP7300LC_CPU) */
 
-#if defined(HP8000_CPU) || defined(HP8200_CPU) || defined(HP8500_CPU)
+#if defined(HP8000_CPU) || defined(HP8200_CPU) || \
+defined(HP8500_CPU) || defined(HP8600_CPU) || \
+defined(HP8700_CPU)
+
 	.level	2.0w
 
 	/* xlate 32bit-64bit pte */
@@ -1876,7 +1881,10 @@ EXIT(desidhash_l)
 
 #endif /* defined(HP7100LC_CPU) || defined(HP7300LC_CPU) */
 
-#if defined(HP8000_CPU) || defined(HP8200_CPU) || defined(HP8500_CPU)
+#if defined(HP8000_CPU) || defined(HP8200_CPU) || \
+defined(HP8500_CPU) || defined(HP8600_CPU) || \
+defined(HP8700_CPU)
+
 	.level	2.0w
 LEAF_ENTRY_NOPROFILE(desidhash_u)
 	MFCPU_U(2,28)
@@ -1898,7 +1906,7 @@ LEAF_ENTRY_NOPROFILE(pbtlb_u)
 	nop
 EXIT(pbtlb_u)
 	.level	1.1
-#endif /* HP8000_CPU */
+#endif /* HP8000_CPU || HP8200_CPU || HP8500_CPU || HP8600_CPU || HP8700_CPU */
 
 	.align	64
 	.export	TLABEL(all), entry



CVS commit: src/sys/arch/mips/alchemy/dev

2012-01-02 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jan  3 07:36:02 UTC 2012

Modified Files:
src/sys/arch/mips/alchemy/dev: augpio.c aupci.c aupcmcia.c aupsc.c
aupscvar.h aurtc.c ausmbus_psc.c auspi.c if_aumac.c

Log Message:
Use device_t instead of 'struct device *'.
Call aprint_* in auto-config time.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/alchemy/dev/augpio.c \
src/sys/arch/mips/alchemy/dev/aupsc.c \
src/sys/arch/mips/alchemy/dev/auspi.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/alchemy/dev/aupci.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/alchemy/dev/aupcmcia.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/alchemy/dev/aupscvar.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/alchemy/dev/aurtc.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/alchemy/dev/ausmbus_psc.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mips/alchemy/dev/if_aumac.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/mips/alchemy/dev/augpio.c
diff -u src/sys/arch/mips/alchemy/dev/augpio.c:1.6 src/sys/arch/mips/alchemy/dev/augpio.c:1.7
--- src/sys/arch/mips/alchemy/dev/augpio.c:1.6	Fri Jul  1 18:39:29 2011
+++ src/sys/arch/mips/alchemy/dev/augpio.c	Tue Jan  3 07:36:02 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: augpio.c,v 1.6 2011/07/01 18:39:29 dyoung Exp $ */
+/* $NetBSD: augpio.c,v 1.7 2012/01/03 07:36:02 kiyohara Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */ 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: augpio.c,v 1.6 2011/07/01 18:39:29 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: augpio.c,v 1.7 2012/01/03 07:36:02 kiyohara Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -53,7 +53,7 @@ __KERNEL_RCSID(0, $NetBSD: augpio.c,v 1
 #include mips/alchemy/dev/augpiovar.h
 
 struct augpio_softc {
-	struct device			sc_dev;
+	device_t			sc_dev;
 	struct gpio_chipset_tag		sc_gc;
 	gpio_pin_t			sc_pins[AUGPIO_NPINS];
 	intsc_npins;
@@ -63,10 +63,10 @@ struct augpio_softc {
 	int(*sc_getctl)(void *, int);
 };
 
-static int augpio_match(struct device *, struct cfdata *, void *);
-static void augpio_attach(struct device *, struct device *, void *);
+static int augpio_match(device_t, struct cfdata *, void *);
+static void augpio_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(augpio, sizeof(struct augpio_softc),
+CFATTACH_DECL_NEW(augpio, sizeof(struct augpio_softc),
 augpio_match, augpio_attach, NULL, NULL);
 
 #define	GETREG(x)	\
@@ -80,7 +80,7 @@ CFATTACH_DECL(augpio, sizeof(struct augp
 #define	PUTGPIO2(x,v)	PUTREG(GPIO2_BASE + (x), (v))
 
 int
-augpio_match(struct device *parent, struct cfdata *match, void *aux)
+augpio_match(device_t parent, struct cfdata *match, void *aux)
 {
 	struct aubus_attach_args *aa = (struct aubus_attach_args *)aux;
 
@@ -91,14 +91,15 @@ augpio_match(struct device *parent, stru
 }
 
 void
-augpio_attach(struct device *parent, struct device *self, void *aux)
+augpio_attach(device_t parent, device_t self, void *aux)
 {
 	int	pin;
 
-	struct augpio_softc *sc = (struct augpio_softc *)self;
+	struct augpio_softc *sc = device_private(self);
 	struct aubus_attach_args *aa = aux;
 	struct gpiobus_attach_args gba;
 
+	sc-sc_dev = self;
 	sc-sc_bst = aa-aa_st;
 	sc-sc_npins = aa-aa_addrs[1];
 	sc-sc_gc.gp_cookie = sc;
@@ -128,7 +129,7 @@ augpio_attach(struct device *parent, str
 		sc-sc_name = secondary block;
 
 	} else {
-		printf(: unidentified block\n);
+		aprint_error(: unidentified block\n);
 		return;
 	}
 
@@ -145,8 +146,9 @@ augpio_attach(struct device *parent, str
 	gba.gba_pins = sc-sc_pins;
 	gba.gba_npins = sc-sc_npins;
 
-	printf(: Alchemy GPIO, %s\n, sc-sc_name);
-	config_found_ia(sc-sc_dev, gpiobus, gba, gpiobus_print);
+	aprint_normal(: Alchemy GPIO, %s\n, sc-sc_name);
+	aprint_naive(\n);
+	config_found_ia(self, gpiobus, gba, gpiobus_print);
 }
 
 int
Index: src/sys/arch/mips/alchemy/dev/aupsc.c
diff -u src/sys/arch/mips/alchemy/dev/aupsc.c:1.6 src/sys/arch/mips/alchemy/dev/aupsc.c:1.7
--- src/sys/arch/mips/alchemy/dev/aupsc.c:1.6	Fri Jul  1 18:39:29 2011
+++ src/sys/arch/mips/alchemy/dev/aupsc.c	Tue Jan  3 07:36:02 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: aupsc.c,v 1.6 2011/07/01 18:39:29 dyoung Exp $ */
+/* $NetBSD: aupsc.c,v 1.7 2012/01/03 07:36:02 kiyohara Exp $ */
 
 /*-
  * Copyright (c) 2006 Shigeyuki Fukushima.
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: aupsc.c,v 1.6 2011/07/01 18:39:29 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: aupsc.c,v 1.7 2012/01/03 07:36:02 kiyohara Exp $);
 
 #include locators.h
 
@@ -52,7 +52,7 @@ __KERNEL_RCSID(0, $NetBSD: aupsc.c,v 1.
 #include mips/alchemy/dev/ausmbus_pscreg.h
 
 struct aupsc_softc {
-	struct device		sc_dev;
+	device_t		sc_dev;
 	bus_space_tag_t		sc_bust;
 	bus_space_handle_t	sc_bush;
 	int			sc_pscsel;
@@ -71,10 +71,9 @@ const struct aupsc_proto {
 	{ NULL, AUPSC_SEL_DISABLE }
 };
 
-static int