CVS commit: src

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar 30 00:44:37 UTC 2015

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile

Log Message:
Hook up the new wapbl(9) man page.


To generate a diff of this commit:
cvs rdiff -u -r1.1948 -r1.1949 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.380 -r1.381 src/share/man/man9/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1948 src/distrib/sets/lists/comp/mi:1.1949
--- src/distrib/sets/lists/comp/mi:1.1948	Sat Mar 28 14:09:58 2015
+++ src/distrib/sets/lists/comp/mi	Mon Mar 30 00:44:37 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1948 2015/03/28 14:09:58 jmcneill Exp $
+#	$NetBSD: mi,v 1.1949 2015/03/30 00:44:37 riastradh Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -11174,6 +11174,21 @@
 ./usr/share/man/cat9/vwakeup.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/wakeup.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/wdc.0			comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl.0			comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_start.0		comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_stop.0		comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_begin.0		comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_end.0		comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_flush.0		comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_discard.0		comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_add_buf.0		comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_remove_buf.0		comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_resize_buf.0		comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_register_inode.0	comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_unregister_inode.0	comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_register_deallocation.0	comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_jlock_assert.0	comp-sys-catman		.cat
+./usr/share/man/cat9/wapbl_junlock_assert.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/workqueue.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/workqueue_create.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/workqueue_destroy.0	comp-sys-catman		.cat
@@ -17883,6 +17898,21 @@
 ./usr/share/man/html9/vwakeup.html		comp-sys-htmlman	html
 ./usr/share/man/html9/wakeup.html		comp-sys-htmlman	html
 ./usr/share/man/html9/wdc.html			comp-sys-htmlman	html
+./usr/share/man/html9/wapbl.html		comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_start.html		comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_stop.html		comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_begin.html		comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_end.html		comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_flush.html		comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_discard.html	comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_add_buf.html	comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_remove_buf.html	comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_resize_buf.html	comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_register_inode.html	comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_unregister_inode.html	comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_register_deallocation.html	comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_jlock_assert.html	comp-sys-htmlman	html
+./usr/share/man/html9/wapbl_junlock_assert.html	comp-sys-htmlman	html
 ./usr/share/man/html9/workqueue.html		comp-sys-htmlman	html
 ./usr/share/man/html9/workqueue_create.html	comp-sys-htmlman	html
 ./usr/share/man/html9/workqueue_destroy.html	comp-sys-htmlman	html
@@ -24849,6 +24879,21 @@
 ./usr/share/man/man9/vwakeup.9			comp-sys-man		.man
 ./usr/share/man/man9/wakeup.9			comp-sys-man		.man
 ./usr/share/man/man9/wdc.9			comp-sys-man		.man
+./usr/share/man/man9/wapbl.9			comp-sys-man		.man
+./usr/share/man/man9/wapbl_start.9		comp-sys-man		.man
+./usr/share/man/man9/wapbl_stop.9		comp-sys-man		.man
+./usr/share/man/man9/wapbl_begin.9		comp-sys-man		.man
+./usr/share/man/man9/wapbl_end.9		comp-sys-man		.man
+./usr/share/man/man9/wapbl_flush.9		comp-sys-man		.man
+./usr/share/man/man9/wapbl_discard.9		comp-sys-man		.man
+./usr/share/man/man9/wapbl_add_buf.9		comp-sys-man		.man
+./usr/share/man/man9/wapbl_remove_buf.9		comp-sys-man		.man
+./usr/share/man/man9/wapbl_resize_buf.9		comp-sys-man		.man
+./usr/share/man/man9/wapbl_register_inode.9	comp-sys-man		.man
+./usr/share/man/man9/wapbl_unregister_inode.9	comp-sys-man		.man
+./usr/share/man/man9/wapbl_register_deallocation.9	comp-sys-man	.man
+./usr/share/man/man9/wapbl_jlock_assert.9	comp-sys-man		.man
+./usr/share/man/man9/wapbl_junlock_assert.9	comp-sys-man		.man
 ./usr/share/man/man9/workqueue.9		comp-sys-man		.man
 ./usr/share/man/man9/workqueue_create.9		comp-sys-man		.man
 ./usr/share/man/man9/workqueue_destroy.9	comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u 

CVS commit: src

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar 30 01:25:36 UTC 2015

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile

Log Message:
Remove obsolete cprng_strong_getflags/setflags(9) man page links.

XXX pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.1950 -r1.1951 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.382 -r1.383 src/share/man/man9/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1950 src/distrib/sets/lists/comp/mi:1.1951
--- src/distrib/sets/lists/comp/mi:1.1950	Mon Mar 30 01:15:15 2015
+++ src/distrib/sets/lists/comp/mi	Mon Mar 30 01:25:36 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1950 2015/03/30 01:15:15 riastradh Exp $
+#	$NetBSD: mi,v 1.1951 2015/03/30 01:25:36 riastradh Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -10074,8 +10074,8 @@
 ./usr/share/man/cat9/cprng_strong64.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/cprng_strong_create.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/cprng_strong_destroy.0	comp-sys-catman		.cat
-./usr/share/man/cat9/cprng_strong_getflags.0	comp-sys-catman		.cat
-./usr/share/man/cat9/cprng_strong_setflags.0	comp-sys-catman		.cat
+./usr/share/man/cat9/cprng_strong_getflags.0	comp-obsolete		obsolete
+./usr/share/man/cat9/cprng_strong_setflags.0	comp-obsolete		obsolete
 ./usr/share/man/cat9/cpu_configure.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/cpu_coredump.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/cpu_dump.0			comp-sys-catman		.cat
@@ -16871,8 +16871,8 @@
 ./usr/share/man/html9/cprng_strong64.html	comp-sys-htmlman	html
 ./usr/share/man/html9/cprng_strong_create.html	comp-sys-htmlman	html
 ./usr/share/man/html9/cprng_strong_destroy.html	comp-sys-htmlman	html
-./usr/share/man/html9/cprng_strong_getflags.html comp-sys-htmlman	html
-./usr/share/man/html9/cprng_strong_setflags.html comp-sys-htmlman	html
+./usr/share/man/html9/cprng_strong_getflags.html comp-obsolete		obsolete
+./usr/share/man/html9/cprng_strong_setflags.html comp-obsolete		obsolete
 ./usr/share/man/html9/cpu_configure.html	comp-sys-htmlman	html
 ./usr/share/man/html9/cpu_coredump.html		comp-sys-htmlman	html
 ./usr/share/man/html9/cpu_dump.html		comp-sys-htmlman	html
@@ -23786,8 +23786,8 @@
 ./usr/share/man/man9/cprng_strong64.9		comp-sys-man		.man
 ./usr/share/man/man9/cprng_strong_create.9	comp-sys-man		.man
 ./usr/share/man/man9/cprng_strong_destroy.9	comp-sys-man		.man
-./usr/share/man/man9/cprng_strong_getflags.9	comp-sys-man		.man
-./usr/share/man/man9/cprng_strong_setflags.9	comp-sys-man		.man
+./usr/share/man/man9/cprng_strong_getflags.9	comp-obsolete		obsolete
+./usr/share/man/man9/cprng_strong_setflags.9	comp-obsolete		obsolete
 ./usr/share/man/man9/cpu_configure.9		comp-sys-man		.man
 ./usr/share/man/man9/cpu_coredump.9		comp-sys-man		.man
 ./usr/share/man/man9/cpu_dump.9			comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.382 src/share/man/man9/Makefile:1.383
--- src/share/man/man9/Makefile:1.382	Mon Mar 30 01:15:15 2015
+++ src/share/man/man9/Makefile	Mon Mar 30 01:25:36 2015
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.382 2015/03/30 01:15:15 riastradh Exp $
+#   $NetBSD: Makefile,v 1.383 2015/03/30 01:25:36 riastradh Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -70,8 +70,6 @@ MAN+=	cprng.9
 MLINKS+=cprng.9	cprng_strong.9 \
 	cprng.9 cprng_strong_create.9 \
 	cprng.9	cprng_strong_destroy.9 \
-	cprng.9 cprng_strong_getflags.9 \
-	cprng.9 cprng_strong_setflags.9 \
 	cprng.9 cprng_strong32.9 \
 	cprng.9 cprng_strong64.9 \
 	cprng.9 cprng_fast.9 \



CVS commit: src/sys/netipsec

2015-03-29 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Mar 30 03:51:50 UTC 2015

Modified Files:
src/sys/netipsec: ipsec_input.c ipsec_output.c key.h key_debug.c
keydb.h keysock.c xform_ah.c xform_esp.c

Log Message:
Tidy up opt_ipsec.h inclusions

Some inclusions of opt_ipsec.h were for IPSEC_NAT_T and are now unnecessary.
Add inclusions to some C files for IPSEC_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/netipsec/ipsec_input.c
cvs rdiff -u -r1.40 -r1.41 src/sys/netipsec/ipsec_output.c
cvs rdiff -u -r1.13 -r1.14 src/sys/netipsec/key.h src/sys/netipsec/keydb.h
cvs rdiff -u -r1.11 -r1.12 src/sys/netipsec/key_debug.c
cvs rdiff -u -r1.43 -r1.44 src/sys/netipsec/keysock.c \
src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.45 -r1.46 src/sys/netipsec/xform_esp.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/netipsec/ipsec_input.c
diff -u src/sys/netipsec/ipsec_input.c:1.32 src/sys/netipsec/ipsec_input.c:1.33
--- src/sys/netipsec/ipsec_input.c:1.32	Sat Mar  8 12:18:04 2014
+++ src/sys/netipsec/ipsec_input.c	Mon Mar 30 03:51:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec_input.c,v 1.33 2015/03/30 03:51:50 ozaki-r Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $	*/
 /*	$OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $	*/
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.33 2015/03/30 03:51:50 ozaki-r Exp $);
 
 /*
  * IPsec input processing.
@@ -49,7 +49,6 @@ __KERNEL_RCSID(0, $NetBSD: ipsec_input.
 #ifdef __FreeBSD__
 #include opt_inet6.h
 #endif
-#include opt_ipsec.h
 
 #include sys/param.h
 #include sys/systm.h

Index: src/sys/netipsec/ipsec_output.c
diff -u src/sys/netipsec/ipsec_output.c:1.40 src/sys/netipsec/ipsec_output.c:1.41
--- src/sys/netipsec/ipsec_output.c:1.40	Sun Nov  3 18:37:10 2013
+++ src/sys/netipsec/ipsec_output.c	Mon Mar 30 03:51:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_output.c,v 1.40 2013/11/03 18:37:10 mrg Exp $	*/
+/*	$NetBSD: ipsec_output.c,v 1.41 2015/03/30 03:51:50 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipsec_output.c,v 1.40 2013/11/03 18:37:10 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipsec_output.c,v 1.41 2015/03/30 03:51:50 ozaki-r Exp $);
 
 /*
  * IPsec output processing.
@@ -38,7 +38,6 @@ __KERNEL_RCSID(0, $NetBSD: ipsec_output
 #ifdef __FreeBSD__
 #include opt_inet6.h
 #endif
-#include opt_ipsec.h
 
 #include sys/param.h
 #include sys/systm.h

Index: src/sys/netipsec/key.h
diff -u src/sys/netipsec/key.h:1.13 src/sys/netipsec/key.h:1.14
--- src/sys/netipsec/key.h:1.13	Fri May 30 01:39:03 2014
+++ src/sys/netipsec/key.h	Mon Mar 30 03:51:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: key.h,v 1.13 2014/05/30 01:39:03 christos Exp $	*/
+/*	$NetBSD: key.h,v 1.14 2015/03/30 03:51:50 ozaki-r Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/key.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$KAME: key.h,v 1.21 2001/07/27 03:51:30 itojun Exp $	*/
 
@@ -36,8 +36,6 @@
 
 #ifdef _KERNEL
 
-#include opt_ipsec.h
-
 struct secpolicy;
 struct secpolicyindex;
 struct ipsecrequest;
Index: src/sys/netipsec/keydb.h
diff -u src/sys/netipsec/keydb.h:1.13 src/sys/netipsec/keydb.h:1.14
--- src/sys/netipsec/keydb.h:1.13	Tue Jun  4 22:47:37 2013
+++ src/sys/netipsec/keydb.h	Mon Mar 30 03:51:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: keydb.h,v 1.13 2013/06/04 22:47:37 christos Exp $	*/
+/*	$NetBSD: keydb.h,v 1.14 2015/03/30 03:51:50 ozaki-r Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/keydb.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$KAME: keydb.h,v 1.14 2000/08/02 17:58:26 sakane Exp $	*/
 
@@ -36,8 +36,6 @@
 
 #ifdef _KERNEL
 
-#include opt_ipsec.h
-
 #include netipsec/key_var.h
 #include net/route.h
 #include netinet/in.h

Index: src/sys/netipsec/key_debug.c
diff -u src/sys/netipsec/key_debug.c:1.11 src/sys/netipsec/key_debug.c:1.12
--- src/sys/netipsec/key_debug.c:1.11	Mon May 23 15:17:25 2011
+++ src/sys/netipsec/key_debug.c	Mon Mar 30 03:51:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: key_debug.c,v 1.11 2011/05/23 15:17:25 drochner Exp $	*/
+/*	$NetBSD: key_debug.c,v 1.12 2015/03/30 03:51:50 ozaki-r Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/key_debug.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$KAME: key_debug.c,v 1.26 2001/06/27 10:46:50 sakane Exp $	*/
 
@@ -33,14 +33,13 @@
 
 #ifdef _KERNEL
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: key_debug.c,v 1.11 2011/05/23 15:17:25 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: key_debug.c,v 1.12 2015/03/30 03:51:50 ozaki-r Exp $);
 #endif
 
 #include opt_inet.h
 #ifdef __FreeBSD__
 #include opt_inet6.h
 #endif
-#include 

CVS commit: src/sys/arch/arm/include

2015-03-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 30 05:43:55 UTC 2015

Modified Files:
src/sys/arch/arm/include: locore.h

Log Message:
#include sys/pcu.h


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/include/locore.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/arch/arm/include/locore.h
diff -u src/sys/arch/arm/include/locore.h:1.20 src/sys/arch/arm/include/locore.h:1.21
--- src/sys/arch/arm/include/locore.h:1.20	Sun Mar 29 09:49:54 2015
+++ src/sys/arch/arm/include/locore.h	Mon Mar 30 05:43:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.h,v 1.20 2015/03/29 09:49:54 matt Exp $	*/
+/*	$NetBSD: locore.h,v 1.21 2015/03/30 05:43:55 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -54,6 +54,8 @@
 #include opt_arm_debug.h
 #endif
 
+#include sys/pcu.h
+
 #include arm/cpuconf.h
 #include arm/armreg.h
 



CVS commit: src/sys/netinet6

2015-03-29 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Mar 30 02:23:21 UTC 2015

Modified Files:
src/sys/netinet6: in6_pcb.h

Log Message:
Include ip6.h for ip6_hdr


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/netinet6/in6_pcb.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/netinet6/in6_pcb.h
diff -u src/sys/netinet6/in6_pcb.h:1.40 src/sys/netinet6/in6_pcb.h:1.41
--- src/sys/netinet6/in6_pcb.h:1.40	Sat Oct 11 20:53:16 2014
+++ src/sys/netinet6/in6_pcb.h	Mon Mar 30 02:23:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_pcb.h,v 1.40 2014/10/11 20:53:16 christos Exp $	*/
+/*	$NetBSD: in6_pcb.h,v 1.41 2015/03/30 02:23:21 ozaki-r Exp $	*/
 /*	$KAME: in6_pcb.h,v 1.45 2001/02/09 05:59:46 itojun Exp $	*/
 
 /*
@@ -66,6 +66,7 @@
 
 #include sys/queue.h
 #include netinet/in_pcb_hdr.h
+#include netinet/ip6.h
 
 /*
  * Common structure pcb for internet protocol implementation.



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2015-03-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 30 05:26:47 UTC 2015

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: aes-armv4.S

Log Message:
Add workaround/hack for clang integrated arm assembler bug.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S

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/openssl/lib/libcrypto/arch/arm/aes-armv4.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S:1.1	Tue Mar 10 13:28:47 2015
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S	Mon Mar 30 05:26:47 2015
@@ -170,7 +170,13 @@ AES_encrypt:
 	stmdb   sp!,{r1,r4-r12,lr}
 	mov	r12,r0		@ inp
 	mov	r11,r2
+#ifdef __clang__
+	@ workaround for clang integrated assembler bug
+	ldr	r0,=(AES_encrypt-AES_Te)
+	sub	r10,r3,r0
+#else
 	sub	r10,r3,#AES_encrypt-AES_Te	@ Te
+#endif
 #if __ARM_ARCH__7
 	ldrb	r0,[r12,#3]	@ load input data in endian-neutral
 	ldrb	r4,[r12,#2]	@ manner...



CVS commit: src/sys/netinet6

2015-03-29 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Mar 30 04:25:26 UTC 2015

Modified Files:
src/sys/netinet6: nd6.c nd6_nbr.c udp6_usrreq.c

Log Message:
Tidy up opt_ipsec.h inclusions


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.106 -r1.107 src/sys/netinet6/nd6_nbr.c
cvs rdiff -u -r1.115 -r1.116 src/sys/netinet6/udp6_usrreq.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/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.160 src/sys/netinet6/nd6.c:1.161
--- src/sys/netinet6/nd6.c:1.160	Wed Feb 25 12:45:34 2015
+++ src/sys/netinet6/nd6.c	Mon Mar 30 04:25:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.160 2015/02/25 12:45:34 roy Exp $	*/
+/*	$NetBSD: nd6.c,v 1.161 2015/03/30 04:25:26 ozaki-r Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,11 +31,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.160 2015/02/25 12:45:34 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.161 2015/03/30 04:25:26 ozaki-r Exp $);
 
 #include bridge.h
 #include carp.h
-#include opt_ipsec.h
 
 #include sys/param.h
 #include sys/systm.h

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.106 src/sys/netinet6/nd6_nbr.c:1.107
--- src/sys/netinet6/nd6_nbr.c:1.106	Wed Feb 25 12:45:34 2015
+++ src/sys/netinet6/nd6_nbr.c	Mon Mar 30 04:25:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.106 2015/02/25 12:45:34 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.107 2015/03/30 04:25:26 ozaki-r Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,10 +31,9 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nd6_nbr.c,v 1.106 2015/02/25 12:45:34 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: nd6_nbr.c,v 1.107 2015/03/30 04:25:26 ozaki-r Exp $);
 
 #include opt_inet.h
-#include opt_ipsec.h
 
 #include sys/param.h
 #include sys/systm.h

Index: src/sys/netinet6/udp6_usrreq.c
diff -u src/sys/netinet6/udp6_usrreq.c:1.115 src/sys/netinet6/udp6_usrreq.c:1.116
--- src/sys/netinet6/udp6_usrreq.c:1.115	Sat Aug  9 05:33:01 2014
+++ src/sys/netinet6/udp6_usrreq.c	Mon Mar 30 04:25:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: udp6_usrreq.c,v 1.115 2014/08/09 05:33:01 rtr Exp $	*/
+/*	$NetBSD: udp6_usrreq.c,v 1.116 2015/03/30 04:25:26 ozaki-r Exp $	*/
 /*	$KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $	*/
 
 /*
@@ -62,10 +62,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: udp6_usrreq.c,v 1.115 2014/08/09 05:33:01 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: udp6_usrreq.c,v 1.116 2015/03/30 04:25:26 ozaki-r Exp $);
 
 #include opt_inet.h
 #include opt_inet_csum.h
+#include opt_ipsec.h
 
 #include sys/param.h
 #include sys/mbuf.h
@@ -103,6 +104,15 @@ __KERNEL_RCSID(0, $NetBSD: udp6_usrreq.
 #include netinet6/ip6protosw.h
 #include netinet6/scope6_var.h
 
+#ifdef IPSEC
+#include netipsec/ipsec.h
+#include netipsec/ipsec_var.h
+#include netipsec/ipsec_private.h
+#ifdef INET6
+#include netipsec/ipsec6.h
+#endif
+#endif	/* IPSEC */
+
 #include faith.h
 #if defined(NFAITH)  NFAITH  0
 #include net/if_faith.h



CVS commit: src/doc

2015-03-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 30 05:30:08 UTC 2015

Modified Files:
src/doc: HACKS

Log Message:
note change to workaround bug in clang's arm integrated assembler.


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/doc/HACKS

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

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.155 src/doc/HACKS:1.156
--- src/doc/HACKS:1.155	Thu Mar  5 10:21:02 2015
+++ src/doc/HACKS	Mon Mar 30 05:30:08 2015
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.155 2015/03/05 10:21:02 skrll Exp $
+# $NetBSD: HACKS,v 1.156 2015/03/30 05:30:08 matt Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -993,3 +993,9 @@ file	src/sys/arch/vax/boot/boot/Makefile
 descr	/boot does not work when compiled with -O2 and gcc 4.8
 kcah
 
+port	arm
+hack	avoid using labels in a 12-bit constant.
+who	matt
+file	crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S: 1.2
+descr	workaround for clang misassembling an instruction
+kcah



CVS commit: src

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Mar 30 01:15:15 UTC 2015

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile
Removed Files:
src/share/man/man9: getiobuf.9

Log Message:
Hook bufferio(9) man page into the build.

Remove separate getiobuf(9) man page, subsumed by bufferio(9).


To generate a diff of this commit:
cvs rdiff -u -r1.1949 -r1.1950 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.381 -r1.382 src/share/man/man9/Makefile
cvs rdiff -u -r1.5 -r0 src/share/man/man9/getiobuf.9

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1949 src/distrib/sets/lists/comp/mi:1.1950
--- src/distrib/sets/lists/comp/mi:1.1949	Mon Mar 30 00:44:37 2015
+++ src/distrib/sets/lists/comp/mi	Mon Mar 30 01:15:15 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1949 2015/03/30 00:44:37 riastradh Exp $
+#	$NetBSD: mi,v 1.1950 2015/03/30 01:15:15 riastradh Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -9906,6 +9906,7 @@
 ./usr/share/man/cat9/btoc.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/btodb.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/buffercache.0		comp-sys-catman		.cat
+./usr/share/man/cat9/bufferio.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bufq.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bus_dma.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bus_dmamap_create.0	comp-sys-catman		.cat
@@ -10558,6 +10559,8 @@
 ./usr/share/man/cat9/nanotime.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/nanouptime.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/need_resched.0		comp-obsolete		obsolete
+./usr/share/man/cat9/nestiobuf_done.0		comp-sys-catman		.cat
+./usr/share/man/cat9/nestiobuf_setup.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/nextrunqueue.0		comp-obsolete		obsolete
 ./usr/share/man/cat9/npf_ncode.0		comp-obsolete		obsolete
 ./usr/share/man/cat9/nullop.0			comp-sys-catman		.cat
@@ -16705,6 +16708,7 @@
 ./usr/share/man/html9/btoc.html			comp-sys-htmlman	html
 ./usr/share/man/html9/btodb.html		comp-sys-htmlman	html
 ./usr/share/man/html9/buffercache.html		comp-sys-htmlman	html
+./usr/share/man/html9/bufferio.html		comp-sys-htmlman	html
 ./usr/share/man/html9/bufq.html			comp-sys-htmlman	html
 ./usr/share/man/html9/bus_dma.html		comp-sys-htmlman	html
 ./usr/share/man/html9/bus_dmamap_create.html	comp-sys-htmlman	html
@@ -17330,6 +17334,8 @@
 ./usr/share/man/html9/namei.html		comp-sys-htmlman	html
 ./usr/share/man/html9/nanotime.html		comp-sys-htmlman	html
 ./usr/share/man/html9/nanouptime.html		comp-sys-htmlman	html
+./usr/share/man/html9/nestiobuf_done.html	comp-sys-htmlman	html
+./usr/share/man/html9/nestiobuf_setup.html	comp-sys-htmlman	html
 ./usr/share/man/html9/npf_ncode.html		comp-obsolete		obsolete
 ./usr/share/man/html9/nullop.html		comp-sys-htmlman	html
 ./usr/share/man/html9/old_sysctl.html		comp-sys-htmlman	html
@@ -23612,6 +23618,7 @@
 ./usr/share/man/man9/btoc.9			comp-sys-man		.man
 ./usr/share/man/man9/btodb.9			comp-sys-man		.man
 ./usr/share/man/man9/buffercache.9		comp-sys-man		.man
+./usr/share/man/man9/bufferio.9			comp-sys-man		.man
 ./usr/share/man/man9/bufq.9			comp-sys-man		.man
 ./usr/share/man/man9/bus_dma.9			comp-sys-man		.man
 ./usr/share/man/man9/bus_dmamap_create.9	comp-sys-man		.man
@@ -24264,6 +24271,8 @@
 ./usr/share/man/man9/nanotime.9			comp-sys-man		.man
 ./usr/share/man/man9/nanouptime.9		comp-sys-man		.man
 ./usr/share/man/man9/need_resched.9		comp-obsolete		obsolete
+./usr/share/man/man9/nestiobuf_done.9		comp-sys-man		.man
+./usr/share/man/man9/nestiobuf_setup.9		comp-sys-man		.man
 ./usr/share/man/man9/nextrunqueue.9		comp-obsolete		obsolete
 ./usr/share/man/man9/npf_ncode.9		comp-obsolete		obsolete
 ./usr/share/man/man9/nullop.9			comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.381 src/share/man/man9/Makefile:1.382
--- src/share/man/man9/Makefile:1.381	Mon Mar 30 00:44:37 2015
+++ src/share/man/man9/Makefile	Mon Mar 30 01:15:15 2015
@@ -1,11 +1,12 @@
-#   $NetBSD: Makefile,v 1.381 2015/03/30 00:44:37 riastradh Exp $
+#   $NetBSD: Makefile,v 1.382 2015/03/30 01:15:15 riastradh Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
 MAN=	accept_filter.9 accf_data.9 accf_http.9 \
 	altq.9 arp.9 audio.9 autoconf.9 \
 	bcdtobin.9 bcmp.9 bcopy.9 bintime_add.9 bluetooth.9 boothowto.9 bpf.9 \
-	buffercache.9 bufq.9 bus_dma.9 bus_space.9 byteorder.9 bzero.9 \
+	buffercache.9 bufferio.9 bufq.9 bus_dma.9 bus_space.9 byteorder.9 \
+	bzero.9 \
 	callback.9 callout.9 cardbus.9 clock.9 cnmagic.9 condvar.9 config.9 \
 	cons.9 copy.9 coredump_write.9 \
 	cpu_configure.9 cpu_coredump.9 cpu_dumpconf.9 \
@@ -19,7 +20,8 @@ MAN=	accept_filter.9 accf_data.9 accf_ht
 	dopowerhooks.9 do_setresuid.9 doshutdownhooks.9 driver.9 \
 	edid.9 errno.9 

CVS commit: [netbsd-7] src/distrib/atari/floppies/common

2015-03-29 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Mar 29 07:44:46 UTC 2015

Modified Files:
src/distrib/atari/floppies/common [netbsd-7]: Makefile.images

Log Message:
Pull up following revision(s) (requested by martin in ticket #652):
distrib/atari/floppies/common/Makefile.images: revision 1.9
Use -Os -m68020-60 for DBG. It seems to generate smaller objects than -Os.
gcc48 with -Os:
-rwxr-xr-x  1 tsutsui  wheel  1319596 Nov 16 20:50 obj.atari/instbin
gcc48 with -Os -m68020-60
-rwxr-xr-x  1 tsutsui  wheel  1314516 Nov 16 20:49 obj.atari/instbin
This allows ever growing sysinst.fs still fit into 1440KB even with gcc48.
Acually we need a real solution (ustarfs based floppies etc.) soon
but we can work around at least for NetBSD 7.0.
Should be pulled up to netbsd-7 (if NetBSD/m68k 7.0 will switch to gcc48).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.26.1 \
src/distrib/atari/floppies/common/Makefile.images

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

Modified files:

Index: src/distrib/atari/floppies/common/Makefile.images
diff -u src/distrib/atari/floppies/common/Makefile.images:1.8 src/distrib/atari/floppies/common/Makefile.images:1.8.26.1
--- src/distrib/atari/floppies/common/Makefile.images:1.8	Sun Feb 21 20:06:19 2010
+++ src/distrib/atari/floppies/common/Makefile.images	Sun Mar 29 07:44:46 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.images,v 1.8 2010/02/21 20:06:19 tsutsui Exp $
+#	$NetBSD: Makefile.images,v 1.8.26.1 2015/03/29 07:44:46 snj Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -6,7 +6,7 @@
 .include bsd.kernobj.mk
 
 WARNS=		1
-DBG=		-Os
+DBG=		-Os -m68020-60	# -m68020-60 seems to generate smaller binaries
 
 CRUNCHBIN=	instbin
 LISTS=		${.CURDIR}/list ${.CURDIR}/../common/list.images



CVS commit: [netbsd-7] src/doc

2015-03-29 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Mar 29 07:46:22 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
651 and 652


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.245 -r1.1.2.246 src/doc/CHANGES-7.0

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-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.245 src/doc/CHANGES-7.0:1.1.2.246
--- src/doc/CHANGES-7.0:1.1.2.245	Fri Mar 27 11:29:09 2015
+++ src/doc/CHANGES-7.0	Sun Mar 29 07:46:21 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.245 2015/03/27 11:29:09 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.246 2015/03/29 07:46:21 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -19390,4 +19390,17 @@ sys/arch/arm/arm32/genassym.cf			1.70
 	not LW_SYSTEM.
 	[skrll, ticket #646]
 
+distrib/atari/floppies/common/list.images	1.10
+sys/arch/atari/stand/installboot/Makefile	1.8
+sys/arch/atari/stand/installboot/installboot.c	1.34
+
+	Disable OS bootversion check on crunched binaries for
+	installation media.
+	[martin, ticket #651]
+
+distrib/atari/floppies/common/Makefile.images	1.9
+
+	Use -Os -m68020-60 for DBG, which generates smaller objects
+	than -Os.
+	[martin, ticket #652]
 



CVS commit: [netbsd-7] src/sys

2015-03-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar 29 09:07:55 UTC 2015

Modified Files:
src/sys/compat/linux/common [netbsd-7]: linux_exec_elf32.c
src/sys/compat/linux32/common [netbsd-7]: linux32_exec_elf32.c
src/sys/compat/netbsd32 [netbsd-7]: netbsd32_exec_elf32.c
src/sys/compat/svr4_32 [netbsd-7]: svr4_32_exec_elf32.c
src/sys/kern [netbsd-7]: exec_elf.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #650):
sys/compat/netbsd32/netbsd32_exec_elf32.c: revision 1.39
sys/kern/exec_elf.c: revision 1.71
sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.18
sys/compat/linux/common/linux_exec_elf32.c: revision 1.92
sys/compat/svr4_32/svr4_32_exec_elf32.c: revision 1.24
Zero-fill the ELF auxiliary vectors. Otherwise, on 64bit systems, the
padding between a_v and a_type contains kernel garbage, therefore
exposed to userland.
Original report by uebayasi@


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.91.2.1 src/sys/compat/linux/common/linux_exec_elf32.c
cvs rdiff -u -r1.17 -r1.17.4.1 \
src/sys/compat/linux32/common/linux32_exec_elf32.c
cvs rdiff -u -r1.37 -r1.37.2.1 src/sys/compat/netbsd32/netbsd32_exec_elf32.c
cvs rdiff -u -r1.23 -r1.23.2.1 src/sys/compat/svr4_32/svr4_32_exec_elf32.c
cvs rdiff -u -r1.69.2.1 -r1.69.2.2 src/sys/kern/exec_elf.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/compat/linux/common/linux_exec_elf32.c
diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.91 src/sys/compat/linux/common/linux_exec_elf32.c:1.91.2.1
--- src/sys/compat/linux/common/linux_exec_elf32.c:1.91	Tue Apr 15 17:29:00 2014
+++ src/sys/compat/linux/common/linux_exec_elf32.c	Sun Mar 29 09:07:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_exec_elf32.c,v 1.91 2014/04/15 17:29:00 maxv Exp $	*/
+/*	$NetBSD: linux_exec_elf32.c,v 1.91.2.1 2015/03/29 09:07:55 martin Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_exec_elf32.c,v 1.91 2014/04/15 17:29:00 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_exec_elf32.c,v 1.91.2.1 2015/03/29 09:07:55 martin Exp $);
 
 #ifndef ELFSIZE
 /* XXX should die */
@@ -391,6 +391,8 @@ ELFNAME2(linux,copyargs)(struct lwp *l, 
 
 	a = ai;
 
+	memset(ai, 0, sizeof(ai));
+
 	/*
 	 * Push extra arguments used by glibc on the stack.
 	 */

Index: src/sys/compat/linux32/common/linux32_exec_elf32.c
diff -u src/sys/compat/linux32/common/linux32_exec_elf32.c:1.17 src/sys/compat/linux32/common/linux32_exec_elf32.c:1.17.4.1
--- src/sys/compat/linux32/common/linux32_exec_elf32.c:1.17	Sun Feb 23 16:07:40 2014
+++ src/sys/compat/linux32/common/linux32_exec_elf32.c	Sun Mar 29 09:07:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_exec_elf32.c,v 1.17 2014/02/23 16:07:40 njoly Exp $ */
+/*	$NetBSD: linux32_exec_elf32.c,v 1.17.4.1 2015/03/29 09:07:55 martin Exp $ */
 
 /*- 
  * Copyright (c) 1995, 1998, 2000, 2001,2006 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux32_exec_elf32.c,v 1.17 2014/02/23 16:07:40 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_exec_elf32.c,v 1.17.4.1 2015/03/29 09:07:55 martin Exp $);
 
 #define	ELFSIZE		32
 
@@ -119,6 +119,8 @@ linux32_elf32_copyargs(struct lwp *l, st
 
 	a = ai;
 
+	memset(ai, 0, sizeof(ai));
+
 	/*
 	 * Push extra arguments on the stack needed by dynamically
 	 * linked binaries and static binaries as well.

Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c
diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.37 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.37.2.1
--- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.37	Fri Jul 25 16:23:13 2014
+++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c	Sun Mar 29 09:07:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_exec_elf32.c,v 1.37 2014/07/25 16:23:13 maxv Exp $	*/
+/*	$NetBSD: netbsd32_exec_elf32.c,v 1.37.2.1 2015/03/29 09:07:55 martin Exp $	*/
 /*	from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
 
 /*
@@ -57,7 +57,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_exec_elf32.c,v 1.37 2014/07/25 16:23:13 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_exec_elf32.c,v 1.37.2.1 2015/03/29 09:07:55 martin Exp $);
 
 #define	ELFSIZE		32
 
@@ -143,6 +143,8 @@ netbsd32_elf32_copyargs(struct lwp *l, s
 
 	a = ai;
 
+	memset(ai, 0, sizeof(ai));
+
 	/*
 	 * Push extra arguments on the stack needed by dynamically
 	 * linked binaries

Index: src/sys/compat/svr4_32/svr4_32_exec_elf32.c
diff -u src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.23 src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.23.2.1
--- src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.23	Wed Apr  9 11:40:03 2014
+++ src/sys/compat/svr4_32/svr4_32_exec_elf32.c	Sun Mar 29 09:07:55 2015
@@ -1,4 +1,4 @@

CVS commit: src/sys/arch/arm/arm32

2015-03-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Mar 29 09:47:48 UTC 2015

Modified Files:
src/sys/arch/arm/arm32: vm_machdep.c

Log Message:
cache pmap in vmapbuf.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/arm/arm32/vm_machdep.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/vm_machdep.c
diff -u src/sys/arch/arm/arm32/vm_machdep.c:1.69 src/sys/arch/arm/arm32/vm_machdep.c:1.70
--- src/sys/arch/arm/arm32/vm_machdep.c:1.69	Mon Mar 10 05:18:34 2014
+++ src/sys/arch/arm/arm32/vm_machdep.c	Sun Mar 29 09:47:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.69 2014/03/10 05:18:34 matt Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.70 2015/03/29 09:47:48 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -44,7 +44,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.69 2014/03/10 05:18:34 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.70 2015/03/29 09:47:48 matt Exp $);
 
 #include opt_armfpe.h
 #include opt_pmap_debug.h
@@ -216,9 +216,11 @@ cpu_lwp_free2(struct lwp *l)
 int
 vmapbuf(struct buf *bp, vsize_t len)
 {
+	struct pmap * const pm = vm_map_pmap(bp-b_proc-p_vmspace-vm_map);
 	vaddr_t faddr, taddr, off;
 	paddr_t fpa;
 
+	KASSERT(pm != pmap_kernel());
 
 #ifdef PMAP_DEBUG
 	if (pmap_debug_level  0)
@@ -242,8 +244,7 @@ vmapbuf(struct buf *bp, vsize_t len)
 	 * non-NULL.
 	 */
 	while (len) {
-		(void) pmap_extract(vm_map_pmap(bp-b_proc-p_vmspace-vm_map),
-		faddr, fpa);
+		(void) pmap_extract(pm, faddr, fpa);
 		pmap_kenter_pa(taddr, fpa, VM_PROT_READ|VM_PROT_WRITE,
 		PMAP_WIRED);
 		faddr += PAGE_SIZE;



CVS commit: src/sys/arch

2015-03-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Mar 29 10:41:59 UTC 2015

Added Files:
src/sys/arch/arm/nvidia: files.tegra soc_tegra124.c tegra_ahcisata.c
tegra_apbreg.h tegra_com.c tegra_ehci.c tegra_hdaudio.c
tegra_intr.h tegra_io.c tegra_mc.c tegra_mcreg.h tegra_pmc.c
tegra_pmcreg.h tegra_reg.h tegra_sdhc.c tegra_soc.c tegra_space.c
tegra_var.h
src/sys/arch/evbarm/conf: JETSONTK1 files.tegra mk.tegra std.tegra
src/sys/arch/evbarm/tegra: genassym.cf platform.h tegra_machdep.c
tegra_start.S

Log Message:
NVIDIA Tegra K1 support, work in progress.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/files.tegra \
src/sys/arch/arm/nvidia/soc_tegra124.c \
src/sys/arch/arm/nvidia/tegra_ahcisata.c \
src/sys/arch/arm/nvidia/tegra_apbreg.h \
src/sys/arch/arm/nvidia/tegra_com.c src/sys/arch/arm/nvidia/tegra_ehci.c \
src/sys/arch/arm/nvidia/tegra_hdaudio.c \
src/sys/arch/arm/nvidia/tegra_intr.h src/sys/arch/arm/nvidia/tegra_io.c \
src/sys/arch/arm/nvidia/tegra_mc.c src/sys/arch/arm/nvidia/tegra_mcreg.h \
src/sys/arch/arm/nvidia/tegra_pmc.c \
src/sys/arch/arm/nvidia/tegra_pmcreg.h \
src/sys/arch/arm/nvidia/tegra_reg.h src/sys/arch/arm/nvidia/tegra_sdhc.c \
src/sys/arch/arm/nvidia/tegra_soc.c src/sys/arch/arm/nvidia/tegra_space.c \
src/sys/arch/arm/nvidia/tegra_var.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/JETSONTK1 \
src/sys/arch/evbarm/conf/files.tegra src/sys/arch/evbarm/conf/mk.tegra \
src/sys/arch/evbarm/conf/std.tegra
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/tegra/genassym.cf \
src/sys/arch/evbarm/tegra/platform.h \
src/sys/arch/evbarm/tegra/tegra_machdep.c \
src/sys/arch/evbarm/tegra/tegra_start.S

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/arm/nvidia/files.tegra
diff -u /dev/null src/sys/arch/arm/nvidia/files.tegra:1.1
--- /dev/null	Sun Mar 29 10:41:59 2015
+++ src/sys/arch/arm/nvidia/files.tegra	Sun Mar 29 10:41:59 2015
@@ -0,0 +1,64 @@
+#	$NetBSD: files.tegra,v 1.1 2015/03/29 10:41:59 jmcneill Exp $
+#
+# Configuration info for NVIDIA Tegra ARM Peripherals
+#
+
+include arch/arm/pic/files.pic
+include arch/arm/cortex/files.cortex
+
+file	arch/arm/arm32/arm32_boot.c
+file	arch/arm/arm32/arm32_kvminit.c
+file	arch/arm/arm32/arm32_reboot.c
+file	arch/arm/arm32/irq_dispatch.S
+
+file	arch/arm/nvidia/tegra_soc.c
+file	arch/arm/nvidia/tegra_space.c
+file	arch/arm/arm/bus_space_a4x.S
+file	arch/arm/nvidia/soc_tegra124.c		soc_tegra124
+
+# On-board I/O
+device	tegraio { [port=-1] } : bus_space_generic
+attach	tegraio at mainbus with tegra_io 
+file	arch/arm/nvidia/tegra_io.c		tegra_io
+
+# Memory controller
+device	tegramc
+attach	tegramc at tegraio with tegra_mc
+file	arch/arm/nvidia/tegra_mc.c		tegra_mc
+
+# Power management controller
+device	tegrapmc
+attach	tegrapmc at tegraio with tegra_pmc
+file	arch/arm/nvidia/tegra_pmc.c		tegra_pmc
+
+# UART
+attach	com at tegraio with tegra_com
+file	arch/arm/nvidia/tegra_com.c		tegra_com needs-flag
+
+# USB 2.0
+attach	ehci at tegraio with tegra_ehci
+file	arch/arm/nvidia/tegra_ehci.c		tegra_ehci
+
+# SDMMC
+attach	sdhc at tegraio with tegra_sdhc
+file	arch/arm/nvidia/tegra_sdhc.c		tegra_sdhc
+
+# SATA
+attach	ahcisata at tegraio with tegra_ahcisata
+file	arch/arm/nvidia/tegra_ahcisata.c	tegra_ahcisata
+
+# HDA
+attach	hdaudio at tegraio with tegra_hdaudio
+file	arch/arm/nvidia/tegra_hdaudio.c		tegra_hdaudio
+
+# Console parameters
+defparam opt_tegra.h			CONADDR
+defparam opt_tegra.h			CONSPEED
+defparam opt_tegra.h			CONMODE
+
+# Memory parameters
+defparam opt_tegra.h			MEMSIZE
+
+# SOC parameters
+defflag	opt_tegra.h			SOC_TEGRAK1
+defflag	opt_tegra.h			SOC_TEGRA124: SOC_TEGRAK1
Index: src/sys/arch/arm/nvidia/soc_tegra124.c
diff -u /dev/null src/sys/arch/arm/nvidia/soc_tegra124.c:1.1
--- /dev/null	Sun Mar 29 10:41:59 2015
+++ src/sys/arch/arm/nvidia/soc_tegra124.c	Sun Mar 29 10:41:59 2015
@@ -0,0 +1,57 @@
+/* $NetBSD: soc_tegra124.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
+ * 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 

CVS commit: [nick-nhusb] src/sys/dev/usb

2015-03-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Mar 29 11:13:34 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: usbdi.c

Log Message:
Fix transfer buffer handling post the URQ_AUTO_BUFFER removal


To generate a diff of this commit:
cvs rdiff -u -r1.162.2.23 -r1.162.2.24 src/sys/dev/usb/usbdi.c

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

Modified files:

Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.162.2.23 src/sys/dev/usb/usbdi.c:1.162.2.24
--- src/sys/dev/usb/usbdi.c:1.162.2.23	Sat Mar 28 15:56:45 2015
+++ src/sys/dev/usb/usbdi.c	Sun Mar 29 11:13:34 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.162.2.23 2015/03/28 15:56:45 skrll Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.162.2.24 2015/03/29 11:13:34 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: usbdi.c,v 1.162.2.23 2015/03/28 15:56:45 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: usbdi.c,v 1.162.2.24 2015/03/29 11:13:34 skrll Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_usb.h
@@ -300,20 +300,26 @@ usbd_transfer(struct usbd_xfer *xfer)
 	size = xfer-ux_length;
 	flags = xfer-ux_flags;
 
-	struct usbd_bus *bus = pipe-up_dev-ud_bus;
-
-	if (bus-ub_usedma) {
+	if (size != 0) {
 		/*
-		 * Copy data if not using the xfer buffer.  isoc transfers
-		 * always use DMA buffer, i.e. buffer == NULL
+		 * Use the xfer buffer if none specified in transfer setup.
+		 * isoc transfers always use the xfer buffer, i.e.
+		 * ux_buffer is always NULL for isoc.
 		 */
 		if (xfer-ux_buffer == NULL) {
 			xfer-ux_buffer = xfer-ux_buf;
-		} else if (xfer-ux_buffer != xfer-ux_buf) {
-			memcpy(xfer-ux_buf, xfer-ux_buffer, size);
 		}
-	} else {
-		xfer-ux_buffer = xfer-ux_buf;
+
+		/*
+		 * If not using the xfer buffer copy data to the
+		 * xfer buffer for OUT transfers of 0 length
+		 */
+		if (xfer-ux_buffer != xfer-ux_buf) {
+			KASSERT(xfer-ux_buf);
+			if (!usbd_xfer_isread(xfer)) {
+memcpy(xfer-ux_buf, xfer-ux_buffer, size);
+			}
+		}
 	}
 
 	/* xfer is not valid after the transfer method unless synchronous */
@@ -867,16 +873,16 @@ usb_transfer_complete(struct usbd_xfer *
 	if (polling)
 		pipe-up_running = 0;
 
-	if (xfer-ux_buffer != xfer-ux_buf) {
-		/* can only be different for DMA busses */
-		KASSERT(bus-ub_usedma);
+	if (xfer-ux_length != 0  xfer-ux_buffer != xfer-ux_buf) {
 		KDASSERTMSG(xfer-ux_actlen = xfer-ux_length,
 		actlen %d length %d,xfer-ux_actlen, xfer-ux_length);
 
-		memcpy(xfer-ux_buffer, xfer-ux_buf, xfer-ux_actlen);
+		/* Only if IN transfer */
+		if (usbd_xfer_isread(xfer)) {
+			memcpy(xfer-ux_buffer, xfer-ux_buf, xfer-ux_actlen);
+		}
 	}
 
-
 	if (!repeat) {
 		/* Remove request from queue. */
 



CVS commit: [nick-nhusb] src/sys/dev/usb

2015-03-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Mar 29 11:40:36 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhci.c

Log Message:
Unwrap short lines.


To generate a diff of this commit:
cvs rdiff -u -r1.264.4.28 -r1.264.4.29 src/sys/dev/usb/uhci.c

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

Modified files:

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.28 src/sys/dev/usb/uhci.c:1.264.4.29
--- src/sys/dev/usb/uhci.c:1.264.4.28	Sun Mar 29 11:40:00 2015
+++ src/sys/dev/usb/uhci.c	Sun Mar 29 11:40:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.28 2015/03/29 11:40:00 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.29 2015/03/29 11:40:36 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.28 2015/03/29 11:40:00 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.29 2015/03/29 11:40:36 skrll Exp $);
 
 #include sys/param.h
 
@@ -1613,8 +1613,7 @@ uhci_idone(uhci_intr_info_t *ii)
 		upipe-nexttoggle = UHCI_TD_GET_DT(le32toh(std-td.td_token));
 
 	status = UHCI_TD_ERROR;
-	DPRINTFN(10, actlen=%d, status=0x%x, actlen, status,
-	0, 0);
+	DPRINTFN(10, actlen=%d, status=0x%x, actlen, status, 0, 0);
 	xfer-ux_actlen = actlen;
 	if (status != 0) {
 



CVS commit: [nick-nhusb] src/sys/dev/usb

2015-03-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Mar 29 11:40:00 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhci.c

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.264.4.27 -r1.264.4.28 src/sys/dev/usb/uhci.c

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

Modified files:

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.27 src/sys/dev/usb/uhci.c:1.264.4.28
--- src/sys/dev/usb/uhci.c:1.264.4.27	Sun Mar 29 11:33:15 2015
+++ src/sys/dev/usb/uhci.c	Sun Mar 29 11:40:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.27 2015/03/29 11:33:15 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.28 2015/03/29 11:40:00 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.27 2015/03/29 11:33:15 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.28 2015/03/29 11:40:00 skrll Exp $);
 
 #include sys/param.h
 
@@ -1812,7 +1812,7 @@ uhci_run(uhci_softc_t *sc, int run, int 
  *  uhci_alloc_sqh allocates QHs
  * These two routines do their own free list management,
  * partly for speed, partly because allocating DMAable memory
- * has page size granularaity so much memory would be wasted if
+ * has page size granularity so much memory would be wasted if
  * only one TD/QH (32 bytes) was placed in each allocated chunk.
  */
 



CVS commit: src/sys/kern

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 15:08:04 UTC 2015

Modified Files:
src/sys/kern: subr_copy.c

Log Message:
Use #ifdef _RUMPKERNEL for now to prefer copyout over kcopy in tests.

Gross -- please fix me if you have a better approach.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/kern/subr_copy.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/kern/subr_copy.c
diff -u src/sys/kern/subr_copy.c:1.3 src/sys/kern/subr_copy.c:1.4
--- src/sys/kern/subr_copy.c:1.3	Sun Mar 29 15:05:34 2015
+++ src/sys/kern/subr_copy.c	Sun Mar 29 15:08:03 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_copy.c,v 1.3 2015/03/29 15:05:34 riastradh Exp $	*/
+/*	$NetBSD: subr_copy.c,v 1.4 2015/03/29 15:08:03 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_copy.c,v 1.3 2015/03/29 15:05:34 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_copy.c,v 1.4 2015/03/29 15:08:03 riastradh Exp $);
 
 #include sys/param.h
 #include sys/fcntl.h
@@ -211,6 +211,11 @@ copyin_vmspace(struct vmspace *vm, const
 	if (len == 0)
 		return (0);
 
+#ifdef _RUMPKERNEL		/* XXX */
+	if (__predict_true(vm == curproc-p_vmspace)) {
+		return copyin(uaddr, kaddr, len);
+	}
+#endif
 	if (VMSPACE_IS_KERNEL_P(vm)) {
 		return kcopy(uaddr, kaddr, len);
 	}
@@ -244,6 +249,11 @@ copyout_vmspace(struct vmspace *vm, cons
 	if (len == 0)
 		return (0);
 
+#ifdef _RUMPKERNEL		/* XXX */
+	if (__predict_true(vm == curproc-p_vmspace)) {
+		return copyout(kaddr, uaddr, len);
+	}
+#endif
 	if (VMSPACE_IS_KERNEL_P(vm)) {
 		return kcopy(kaddr, uaddr, len);
 	}



CVS commit: src/sys/ufs/ufs

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 14:39:41 UTC 2015

Modified Files:
src/sys/ufs/ufs: ufs_readwrite.c

Log Message:
WAPBL tx is always locked by ufs_bufrd caller, so never unlock it.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 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/ufs/ufs_readwrite.c
diff -u src/sys/ufs/ufs/ufs_readwrite.c:1.115 src/sys/ufs/ufs/ufs_readwrite.c:1.116
--- src/sys/ufs/ufs/ufs_readwrite.c:1.115	Sat Mar 28 19:24:05 2015
+++ src/sys/ufs/ufs/ufs_readwrite.c	Sun Mar 29 14:39:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_readwrite.c,v 1.115 2015/03/28 19:24:05 maxv Exp $	*/
+/*	$NetBSD: ufs_readwrite.c,v 1.116 2015/03/29 14:39:41 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: ufs_readwrite.c,v 1.115 2015/03/28 19:24:05 maxv Exp $);
+__KERNEL_RCSID(1, $NetBSD: ufs_readwrite.c,v 1.116 2015/03/29 14:39:41 riastradh Exp $);
 
 #ifdef LFS_READWRITE
 #define	FS			struct lfs
@@ -610,8 +610,6 @@ BUFWR(struct vnode *vp, struct uio *uio,
 
 	error = ufs_post_write_update(vp, uio, ioflag, cred, osize, resid,
 	extended, error);
-	if ((ioflag  IO_JOURNALLOCKED) == 0)
-		UFS_WAPBL_END(vp-v_mount);
 	fstrans_done(vp-v_mount);
 
 	return (error);



CVS commit: src/sys/kern

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 15:05:34 UTC 2015

Modified Files:
src/sys/kern: subr_copy.c

Log Message:
Back out previous.

It appears to be causing anita install to fail.  Evidently
VM_SPACE_IS_KERNEL_P(vm) is not mutually exclusive with `vm ==
curproc-p_vmspace' -- in particular, proc0's VM space is kernel.

Making this work in rump for tests will require another approach.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/kern/subr_copy.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/kern/subr_copy.c
diff -u src/sys/kern/subr_copy.c:1.2 src/sys/kern/subr_copy.c:1.3
--- src/sys/kern/subr_copy.c:1.2	Sat Mar 28 16:13:38 2015
+++ src/sys/kern/subr_copy.c	Sun Mar 29 15:05:34 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_copy.c,v 1.2 2015/03/28 16:13:38 riastradh Exp $	*/
+/*	$NetBSD: subr_copy.c,v 1.3 2015/03/29 15:05:34 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_copy.c,v 1.2 2015/03/28 16:13:38 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_copy.c,v 1.3 2015/03/29 15:05:34 riastradh Exp $);
 
 #include sys/param.h
 #include sys/fcntl.h
@@ -211,12 +211,12 @@ copyin_vmspace(struct vmspace *vm, const
 	if (len == 0)
 		return (0);
 
-	if (__predict_true(vm == curproc-p_vmspace)) {
-		return copyin(uaddr, kaddr, len);
-	}
 	if (VMSPACE_IS_KERNEL_P(vm)) {
 		return kcopy(uaddr, kaddr, len);
 	}
+	if (__predict_true(vm == curproc-p_vmspace)) {
+		return copyin(uaddr, kaddr, len);
+	}
 
 	iov.iov_base = kaddr;
 	iov.iov_len = len;
@@ -244,12 +244,12 @@ copyout_vmspace(struct vmspace *vm, cons
 	if (len == 0)
 		return (0);
 
-	if (__predict_true(vm == curproc-p_vmspace)) {
-		return copyout(kaddr, uaddr, len);
-	}
 	if (VMSPACE_IS_KERNEL_P(vm)) {
 		return kcopy(kaddr, uaddr, len);
 	}
+	if (__predict_true(vm == curproc-p_vmspace)) {
+		return copyout(kaddr, uaddr, len);
+	}
 
 	iov.iov_base = __UNCONST(kaddr); /* XXXUNCONST cast away const */
 	iov.iov_len = len;



CVS commit: src/sys/arch/mips/include

2015-03-29 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sun Mar 29 12:00:02 UTC 2015

Modified Files:
src/sys/arch/mips/include: cpuset.h types.h

Log Message:
use 32bit __cpuset_t in o32 kernels
ok matt@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/include/cpuset.h
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/mips/include/types.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/arch/mips/include/cpuset.h
diff -u src/sys/arch/mips/include/cpuset.h:1.2 src/sys/arch/mips/include/cpuset.h:1.3
--- src/sys/arch/mips/include/cpuset.h:1.2	Sun Feb 20 07:45:47 2011
+++ src/sys/arch/mips/include/cpuset.h	Sun Mar 29 12:00:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuset.h,v 1.2 2011/02/20 07:45:47 matt Exp $	*/
+/*	$NetBSD: cpuset.h,v 1.3 2015/03/29 12:00:02 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -33,10 +33,15 @@
 
 #define	CPUSET_SINGLE(cpu)		((__cpuset_t)1  (cpu))
 
+#if defined(__mips_o32)
+#define	CPUSET_ADD(set, cpu)		atomic_or_32((set), CPUSET_SINGLE(cpu))
+#define	CPUSET_DEL(set, cpu)		atomic_and_32((set), ~CPUSET_SINGLE(cpu))
+#define	CPUSET_SUB(set1, set2)		atomic_and_32((set1), ~(set2))
+#else
 #define	CPUSET_ADD(set, cpu)		atomic_or_64((set), CPUSET_SINGLE(cpu))
 #define	CPUSET_DEL(set, cpu)		atomic_and_64((set), ~CPUSET_SINGLE(cpu))
 #define	CPUSET_SUB(set1, set2)		atomic_and_64((set1), ~(set2))
-
+#endif
 #define	CPUSET_EXCEPT(set, cpu)		((set)  ~CPUSET_SINGLE(cpu))
 
 #define	CPUSET_HAS_P(set, cpu)		((set)  CPUSET_SINGLE(cpu))

Index: src/sys/arch/mips/include/types.h
diff -u src/sys/arch/mips/include/types.h:1.54 src/sys/arch/mips/include/types.h:1.55
--- src/sys/arch/mips/include/types.h:1.54	Sat Jan  4 00:10:03 2014
+++ src/sys/arch/mips/include/types.h	Sun Mar 29 12:00:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.54 2014/01/04 00:10:03 dsl Exp $	*/
+/*	$NetBSD: types.h,v 1.55 2015/03/29 12:00:02 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -131,9 +131,13 @@ typedef struct label_t {
 #define	PCU_UNIT_COUNT	2
 #endif
 
+#if defined(__mips_o32)
+typedef __uint32_t		__cpuset_t;
+#define	__CPUSET_MAXNUMCPU	32
+#else
 typedef __uint64_t		__cpuset_t;
 #define	__CPUSET_MAXNUMCPU	64
-
+#endif
 typedef	volatile unsigned int	__cpu_simple_lock_t;
 
 #define	__SIMPLELOCK_LOCKED	1



CVS commit: src/sys/net

2015-03-29 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sun Mar 29 13:30:43 UTC 2015

Modified Files:
src/sys/net: if_vlan.c

Log Message:
Correct frame padding length

vlan pads a frame with zeros up to 68 bytes
(ETHER_MIN_LEN + ETHER_VLAN_ENCAP_LEN). It expects
that even if the frame is untagged, it keeps 64 bytes
at least. However, it lacks concern about CRC
(4 bytes). So a sending frame can be 72 (68 + 4) bytes.

PR 49788


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/net/if_vlan.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/net/if_vlan.c
diff -u src/sys/net/if_vlan.c:1.79 src/sys/net/if_vlan.c:1.80
--- src/sys/net/if_vlan.c:1.79	Fri Jan 16 10:36:14 2015
+++ src/sys/net/if_vlan.c	Sun Mar 29 13:30:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vlan.c,v 1.79 2015/01/16 10:36:14 ozaki-r Exp $	*/
+/*	$NetBSD: if_vlan.c,v 1.80 2015/03/29 13:30:43 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_vlan.c,v 1.79 2015/01/16 10:36:14 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_vlan.c,v 1.80 2015/03/29 13:30:43 ozaki-r Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -806,9 +806,10 @@ vlan_start(struct ifnet *ifp)
  * after deleting a tag.
  */
 if (m-m_pkthdr.len 
-(ETHER_MIN_LEN + ETHER_VLAN_ENCAP_LEN)) {
+(ETHER_MIN_LEN - ETHER_CRC_LEN +
+ ETHER_VLAN_ENCAP_LEN)) {
 	m_copyback(m, m-m_pkthdr.len,
-	(ETHER_MIN_LEN +
+	(ETHER_MIN_LEN - ETHER_CRC_LEN +
 	 ETHER_VLAN_ENCAP_LEN) -
 	 m-m_pkthdr.len,
 	vlan_zero_pad_buff);



CVS commit: src/sys/fs/nilfs

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 14:12:28 UTC 2015

Modified Files:
src/sys/fs/nilfs: nilfs_subr.c nilfs_subr.h nilfs_vnops.c

Log Message:
Complete removal of cred argument from bread in nilfs.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/fs/nilfs/nilfs_subr.c
cvs rdiff -u -r1.3 -r1.4 src/sys/fs/nilfs/nilfs_subr.h
cvs rdiff -u -r1.30 -r1.31 src/sys/fs/nilfs/nilfs_vnops.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/fs/nilfs/nilfs_subr.c
diff -u src/sys/fs/nilfs/nilfs_subr.c:1.13 src/sys/fs/nilfs/nilfs_subr.c:1.14
--- src/sys/fs/nilfs/nilfs_subr.c:1.13	Sat Mar 28 19:24:05 2015
+++ src/sys/fs/nilfs/nilfs_subr.c	Sun Mar 29 14:12:28 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: nilfs_subr.c,v 1.13 2015/03/28 19:24:05 maxv Exp $ */
+/* $NetBSD: nilfs_subr.c,v 1.14 2015/03/29 14:12:28 riastradh Exp $ */
 
 /*
  * Copyright (c) 2008, 2009 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__KERNEL_RCSID(0, $NetBSD: nilfs_subr.c,v 1.13 2015/03/28 19:24:05 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: nilfs_subr.c,v 1.14 2015/03/29 14:12:28 riastradh Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -128,7 +128,7 @@ crc32_le(uint32_t crc, const uint8_t *bu
 /* dev reading */
 static int
 nilfs_dev_bread(struct nilfs_device *nilfsdev, uint64_t blocknr,
-	struct kauth_cred *cred, int flags, struct buf **bpp)
+	int flags, struct buf **bpp)
 {
 	int blk2dev = nilfsdev-blocksize / DEV_BSIZE;
 
@@ -140,7 +140,7 @@ nilfs_dev_bread(struct nilfs_device *nil
 /* read on a node */
 int
 nilfs_bread(struct nilfs_node *node, uint64_t blocknr,
-	struct kauth_cred *cred, int flags, struct buf **bpp)
+	int flags, struct buf **bpp)
 {
 	struct nilfs_device *nilfsdev = node-nilfsdev;
 	uint64_t vblocknr, pblockno;
@@ -155,7 +155,7 @@ nilfs_bread(struct nilfs_node *node, uin
 		error = nilfs_nvtop(node, 1, vblocknr, pblockno);
 		if (error)
 			return error;
-		return nilfs_dev_bread(nilfsdev, pblockno, cred, flags, bpp);
+		return nilfs_dev_bread(nilfsdev, pblockno, flags, bpp);
 	}
 
 	return bread(node-vnode, vblocknr, node-nilfsdev-blocksize,
@@ -181,7 +181,7 @@ nilfs_get_segment_log(struct nilfs_devic
 		if (*bpp)
 			brelse(*bpp, BC_AGE);
 		/* read in block */
-		error = nilfs_dev_bread(nilfsdev, *blocknr, NOCRED, 0, bpp);
+		error = nilfs_dev_bread(nilfsdev, *blocknr, 0, bpp);
 		if (error)
 			return error;
 	}
@@ -217,7 +217,7 @@ nilfs_btree_lookup_level(struct nilfs_no
 		return error;
 
 	/* get our block */
-	error = nilfs_dev_bread(nilfsdev, btree_blknr, NOCRED, 0, bp);
+	error = nilfs_dev_bread(nilfsdev, btree_blknr, 0, bp);
 	if (error) {
 		return error;
 	}
@@ -388,7 +388,7 @@ nilfs_vtop(struct nilfs_device *nilfsdev
 	nilfs_mdt_trans(nilfsdev-dat_mdt, vblocknr,
 		ldatblknr, entry_in_block);
 
-	error = nilfs_bread(nilfsdev-dat_node, ldatblknr, NOCRED, 0, bp);
+	error = nilfs_bread(nilfsdev-dat_node, ldatblknr, 0, bp);
 	if (error) {
 		printf(vtop: can't read in DAT block %PRIu64!\n, ldatblknr);
 		return error;
@@ -803,7 +803,7 @@ dirhash_fill(struct nilfs_node *dir_node
 
 	blocknr = diroffset / blocksize;
 	blkoff  = diroffset % blocksize;
-	error = nilfs_bread(dir_node, blocknr, NOCRED, 0, bp);
+	error = nilfs_bread(dir_node, blocknr, 0, bp);
 	if (error) {
 		dirh-flags |= DIRH_BROKEN;
 		dirhash_purge_entries(dirh);
@@ -815,8 +815,7 @@ dirhash_fill(struct nilfs_node *dir_node
 		if (blkoff = blocksize) {
 			blkoff = 0; blocknr++;
 			brelse(bp, BC_AGE);
-			error = nilfs_bread(dir_node, blocknr, NOCRED, 0,
-	bp);
+			error = nilfs_bread(dir_node, blocknr, 0, bp);
 			if (error) {
 dirh-flags |= DIRH_BROKEN;
 dirhash_purge_entries(dirh);
@@ -900,7 +899,7 @@ nilfs_lookup_name_in_dir(struct vnode *d
 
 		blocknr = diroffset / blocksize;
 		blkoff  = diroffset % blocksize;
-		error = nilfs_bread(dir_node, blocknr, NOCRED, 0, bp);
+		error = nilfs_bread(dir_node, blocknr, 0, bp);
 		if (error)
 			return EIO;
 

Index: src/sys/fs/nilfs/nilfs_subr.h
diff -u src/sys/fs/nilfs/nilfs_subr.h:1.3 src/sys/fs/nilfs/nilfs_subr.h:1.4
--- src/sys/fs/nilfs/nilfs_subr.h:1.3	Wed Oct 15 09:05:46 2014
+++ src/sys/fs/nilfs/nilfs_subr.h	Sun Mar 29 14:12:28 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: nilfs_subr.h,v 1.3 2014/10/15 09:05:46 hannken Exp $ */
+/* $NetBSD: nilfs_subr.h,v 1.4 2015/03/29 14:12:28 riastradh Exp $ */
 
 /*
  * Copyright (c) 2008, 2009 Reinoud Zandijk
@@ -46,7 +46,7 @@ int nilfs_get_segment_log(struct nilfs_d
 void nilfs_search_super_root(struct nilfs_device *nilfsdev);
 
 /* reading */
-int nilfs_bread(struct nilfs_node *node, uint64_t blocknr, struct kauth_cred *cred,
+int nilfs_bread(struct nilfs_node *node, uint64_t blocknr,
 	int flags, struct buf **bpp);
 
 /* btree operations */

Index: src/sys/fs/nilfs/nilfs_vnops.c
diff -u src/sys/fs/nilfs/nilfs_vnops.c:1.30 src/sys/fs/nilfs/nilfs_vnops.c:1.31
--- 

CVS commit: src/sys/kern

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 17:38:31 UTC 2015

Modified Files:
src/sys/kern: subr_copy.c

Log Message:
Back this out, per pooka's request.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_copy.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/kern/subr_copy.c
diff -u src/sys/kern/subr_copy.c:1.4 src/sys/kern/subr_copy.c:1.5
--- src/sys/kern/subr_copy.c:1.4	Sun Mar 29 15:08:03 2015
+++ src/sys/kern/subr_copy.c	Sun Mar 29 17:38:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_copy.c,v 1.4 2015/03/29 15:08:03 riastradh Exp $	*/
+/*	$NetBSD: subr_copy.c,v 1.5 2015/03/29 17:38:31 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_copy.c,v 1.4 2015/03/29 15:08:03 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_copy.c,v 1.5 2015/03/29 17:38:31 riastradh Exp $);
 
 #include sys/param.h
 #include sys/fcntl.h
@@ -211,11 +211,6 @@ copyin_vmspace(struct vmspace *vm, const
 	if (len == 0)
 		return (0);
 
-#ifdef _RUMPKERNEL		/* XXX */
-	if (__predict_true(vm == curproc-p_vmspace)) {
-		return copyin(uaddr, kaddr, len);
-	}
-#endif
 	if (VMSPACE_IS_KERNEL_P(vm)) {
 		return kcopy(uaddr, kaddr, len);
 	}
@@ -249,11 +244,6 @@ copyout_vmspace(struct vmspace *vm, cons
 	if (len == 0)
 		return (0);
 
-#ifdef _RUMPKERNEL		/* XXX */
-	if (__predict_true(vm == curproc-p_vmspace)) {
-		return copyout(kaddr, uaddr, len);
-	}
-#endif
 	if (VMSPACE_IS_KERNEL_P(vm)) {
 		return kcopy(kaddr, uaddr, len);
 	}



CVS commit: [netbsd-7] src

2015-03-29 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Mar 29 07:42:53 UTC 2015

Modified Files:
src/distrib/atari/floppies/common [netbsd-7]: list.images
src/sys/arch/atari/stand/installboot [netbsd-7]: Makefile installboot.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #651):
distrib/atari/floppies/common/list.images: revision 1.10
sys/arch/atari/stand/installboot/Makefile: revision 1.8
sys/arch/atari/stand/installboot/installboot.c: revision 1.34
Disable OS bootversion check on crunched binaries for installation media.
This oscheck() function seems implemented to check compatibility
between bootloaders and /netbsd kernel, but checking /netbsd using kvm(3)
doesn't make sense on installation or even future cross builds, and
probably we will never bump bootloader version without compatibility
per recent 14 years history.
This works around overflow of 1440KB 2HD sysinst.fs, and would also be
worth to pullup to netbsd-7.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.26.1 src/distrib/atari/floppies/common/list.images
cvs rdiff -u -r1.6.28.1 -r1.6.28.2 \
src/sys/arch/atari/stand/installboot/Makefile
cvs rdiff -u -r1.28 -r1.28.4.1 \
src/sys/arch/atari/stand/installboot/installboot.c

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

Modified files:

Index: src/distrib/atari/floppies/common/list.images
diff -u src/distrib/atari/floppies/common/list.images:1.9 src/distrib/atari/floppies/common/list.images:1.9.26.1
--- src/distrib/atari/floppies/common/list.images:1.9	Sun Feb 21 20:18:08 2010
+++ src/distrib/atari/floppies/common/list.images	Sun Mar 29 07:42:53 2015
@@ -1,7 +1,7 @@
-#	$NetBSD: list.images,v 1.9 2010/02/21 20:18:08 tsutsui Exp $
+#	$NetBSD: list.images,v 1.9.26.1 2015/03/29 07:42:53 snj Exp $
 
 SRCDIRS	bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/atari/stand
-LIBS	libhack.o -lprop -lrmt -lz -lutil -lcurses -lterminfo -lkvm -ll -lm
+LIBS	libhack.o -lprop -lrmt -lz -lutil -lcurses -lterminfo -ll -lm
 
 # init invokes the shell as -sh
 ARGVLN	sh -sh

Index: src/sys/arch/atari/stand/installboot/Makefile
diff -u src/sys/arch/atari/stand/installboot/Makefile:1.6.28.1 src/sys/arch/atari/stand/installboot/Makefile:1.6.28.2
--- src/sys/arch/atari/stand/installboot/Makefile:1.6.28.1	Wed Feb  4 06:50:46 2015
+++ src/sys/arch/atari/stand/installboot/Makefile	Sun Mar 29 07:42:53 2015
@@ -1,11 +1,14 @@
-#	$NetBSD: Makefile,v 1.6.28.1 2015/02/04 06:50:46 snj Exp $
+#	$NetBSD: Makefile,v 1.6.28.2 2015/03/29 07:42:53 snj Exp $
 
 WARNS=	4
 PROG=	installboot
 NOMAN=	# defined
 SRCS=	installboot.c disklabel.c
 BINDIR=	/usr/mdec
+.ifndef SMALLPROG
+CPPFLAGS+=	-DCHECK_OS_BOOTVERSION
 LDADD=	-lkvm
+.endif
 
 # XXX needs proper struct or union to calculate boot sector uint16_t cksums
 CFLAGS+=	-fno-strict-aliasing

Index: src/sys/arch/atari/stand/installboot/installboot.c
diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.28 src/sys/arch/atari/stand/installboot/installboot.c:1.28.4.1
--- src/sys/arch/atari/stand/installboot/installboot.c:1.28	Mon Mar 31 06:32:31 2014
+++ src/sys/arch/atari/stand/installboot/installboot.c	Sun Mar 29 07:42:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.c,v 1.28 2014/03/31 06:32:31 ozaki-r Exp $	*/
+/*	$NetBSD: installboot.c,v 1.28.4.1 2015/03/29 07:42:53 snj Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens
@@ -54,7 +54,9 @@
 #include installboot.h
 
 static void	usage(void);
+#ifdef CHECK_OS_BOOTVERSION
 static void	oscheck(void);
+#endif
 static u_int	abcksum(void *);
 static void	setNVpref(void);
 static void	setIDEpar(u_int8_t *, size_t);
@@ -99,8 +101,10 @@ main(int argc, char *argv[])
 	char		 *devchr;
 	int		 fd, c;
 
+#ifdef CHECK_OS_BOOTVERSION
 	/* check OS bootversion */
 	oscheck();
+#endif
 
 	/* parse options */
 	while ((c = getopt(argc, argv, Nmt:u:v)) != -1) {
@@ -177,6 +181,7 @@ main(int argc, char *argv[])
 	return(EXIT_SUCCESS);
 }
 
+#ifdef CHECK_OS_BOOTVERSION
 static void
 oscheck(void)
 {
@@ -208,6 +213,7 @@ oscheck(void)
 		errx(EXIT_FAILURE, Kern bootversion: %d, expected: %d,
 		kvers, BOOTVERSION);
 }
+#endif
 
 static void
 install_fd(char *devnm, struct disklabel *label)



CVS commit: [netbsd-7] src/sys/arch/sparc

2015-03-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar 29 08:48:26 UTC 2015

Modified Files:
src/sys/arch/sparc/include [netbsd-7]: openfirm.h
src/sys/arch/sparc/sparc [netbsd-7]: openfirm.c
src/sys/arch/sparc/stand/ofwboot [netbsd-7]: Locore.c

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #649):
sys/arch/sparc/sparc/openfirm.c: revision 1.20
sys/arch/sparc/include/openfirm.h: revision 1.8
sys/arch/sparc/stand/ofwboot/Locore.c: revision 1.14
Fix kernel loading failures from partitions started from over first
4GB of disks on sparc64.
Sync sparc64 kernel's OF_seek with ofwboot's one, but sparc version
is not changed.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.38.1 src/sys/arch/sparc/include/openfirm.h
cvs rdiff -u -r1.18 -r1.18.28.1 src/sys/arch/sparc/sparc/openfirm.c
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/arch/sparc/stand/ofwboot/Locore.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/sparc/include/openfirm.h
diff -u src/sys/arch/sparc/include/openfirm.h:1.7 src/sys/arch/sparc/include/openfirm.h:1.7.38.1
--- src/sys/arch/sparc/include/openfirm.h:1.7	Mon May 18 11:39:30 2009
+++ src/sys/arch/sparc/include/openfirm.h	Sun Mar 29 08:48:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: openfirm.h,v 1.7 2009/05/18 11:39:30 nakayama Exp $	*/
+/*	$NetBSD: openfirm.h,v 1.7.38.1 2015/03/29 08:48:25 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -57,6 +57,8 @@ typedef uint64_t cell_t;
 typedef uint32_t cell_t;
 #define HDL2CELL(x)	(cell_t)(x)
 #define ADR2CELL(x)	(cell_t)(x)
+#define HDQ2CELL_HI(x)	(cell_t)((x)  32)
+#define HDQ2CELL_LO(x)	(cell_t)(x)
 #endif /* SUN4U */
 
 int	OF_test(const char *);

Index: src/sys/arch/sparc/sparc/openfirm.c
diff -u src/sys/arch/sparc/sparc/openfirm.c:1.18 src/sys/arch/sparc/sparc/openfirm.c:1.18.28.1
--- src/sys/arch/sparc/sparc/openfirm.c:1.18	Mon Jul 18 21:00:28 2011
+++ src/sys/arch/sparc/sparc/openfirm.c	Sun Mar 29 08:48:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: openfirm.c,v 1.18 2011/07/18 21:00:28 martin Exp $	*/
+/*	$NetBSD: openfirm.c,v 1.18.28.1 2015/03/29 08:48:25 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: openfirm.c,v 1.18 2011/07/18 21:00:28 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: openfirm.c,v 1.18.28.1 2015/03/29 08:48:25 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -546,8 +546,8 @@ OF_seek(int handle, u_quad_t pos)
 	args.nargs = 3;
 	args.nreturns = 1;
 	args.handle = HDL2CELL(handle);
-	args.poshi = HDL2CELL(pos  32);
-	args.poslo = HDL2CELL(pos);
+	args.poshi = HDQ2CELL_HI(pos);
+	args.poslo = HDQ2CELL_LO(pos);
 	if (openfirmware(args) == -1)
 		return -1;
 	return args.status;

Index: src/sys/arch/sparc/stand/ofwboot/Locore.c
diff -u src/sys/arch/sparc/stand/ofwboot/Locore.c:1.13 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.13.4.1
--- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.13	Wed Dec 18 10:09:56 2013
+++ src/sys/arch/sparc/stand/ofwboot/Locore.c	Sun Mar 29 08:48:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: Locore.c,v 1.13 2013/12/18 10:09:56 martin Exp $	*/
+/*	$NetBSD: Locore.c,v 1.13.4.1 2015/03/29 08:48:26 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -302,8 +302,8 @@ OF_seek(int handle, u_quad_t pos)
 	args.nargs = 3;
 	args.nreturns = 1;
 	args.handle = HDL2CELL(handle);
-	args.poshi = HDL2CELL(pos  32);
-	args.poslo = HDL2CELL(pos);
+	args.poshi = HDQ2CELL_HI(pos);
+	args.poslo = HDQ2CELL_LO(pos);
 	if (openfirmware(args) == -1) {
 		return -1;
 	}



CVS commit: [netbsd-7] src/doc

2015-03-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar 29 09:09:50 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Tickets #649 and #650


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.246 -r1.1.2.247 src/doc/CHANGES-7.0

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-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.246 src/doc/CHANGES-7.0:1.1.2.247
--- src/doc/CHANGES-7.0:1.1.2.246	Sun Mar 29 07:46:21 2015
+++ src/doc/CHANGES-7.0	Sun Mar 29 09:09:50 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.246 2015/03/29 07:46:21 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.247 2015/03/29 09:09:50 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -19404,3 +19404,22 @@ distrib/atari/floppies/common/Makefile.i
 	than -Os.
 	[martin, ticket #652]
 
+sys/arch/sparc/include/openfirm.h		1.8
+sys/arch/sparc/sparc/openfirm.c			1.20
+sys/arch/sparc/stand/ofwboot/Locore.c		1.14
+
+	Fix kernel loading failures from partitions started from over first
+	4GB of disks on sparc64.
+	Sync sparc64 kernel's OF_seek with ofwboot's one, but sparc version
+	is not changed.
+	[nakayama, ticket #649]
+
+sys/compat/linux/common/linux_exec_elf32.c	1.92
+sys/compat/linux32/common/linux32_exec_elf32.c	1.18
+sys/compat/netbsd32/netbsd32_exec_elf32.c	1.39
+sys/compat/svr4_32/svr4_32_exec_elf32.c		1.24
+sys/kern/exec_elf.c1.71
+
+	Zero-fill the ELF auxiliary vectors to prevent userland leak.
+	[maxv, ticket #650]
+



CVS commit: src/sys/arch/riscv/include

2015-03-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Mar 29 09:43:26 UTC 2015

Modified Files:
src/sys/arch/riscv/include: lock.h

Log Message:
Use C11 atomic builtins instead of __asm.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/include/lock.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/arch/riscv/include/lock.h
diff -u src/sys/arch/riscv/include/lock.h:1.1 src/sys/arch/riscv/include/lock.h:1.2
--- src/sys/arch/riscv/include/lock.h:1.1	Fri Sep 19 17:36:26 2014
+++ src/sys/arch/riscv/include/lock.h	Sun Mar 29 09:43:26 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.1 2014/09/19 17:36:26 matt Exp $ */
+/* $NetBSD: lock.h,v 1.2 2015/03/29 09:43:26 matt Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -50,75 +50,51 @@ __SIMPLELOCK_UNLOCKED_P(__cpu_simple_loc
 static __inline void
 __cpu_simple_lock_clear(__cpu_simple_lock_t *__ptr)
 {
-#if 0
-	__atomic_clear(__ptr, __ATOMIC_RELAXED);
-#else
+#if 1
 	*__ptr = __SIMPLELOCK_UNLOCKED;
+#else
+	__atomic_store_n(__ptr, __SIMPLELOCK_UNLOCKED, __ATOMIC_RELAXED);
 #endif
 }
 
 static __inline void
 __cpu_simple_lock_set(__cpu_simple_lock_t *__ptr)
 {
-#if 0
-	(void)__atomic_test_and_set(__ptr, __ATOMIC_RELAXED);
-#else
+#if 1
 	*__ptr = __SIMPLELOCK_LOCKED;
+#else
+	__atomic_store_n(__ptr, __SIMPLELOCK_LOCKED, __ATOMIC_RELAXED);
 #endif
 }
 
 static __inline void __unused
 __cpu_simple_lock_init(__cpu_simple_lock_t *__ptr)
 {
-#if 0
-	__atomic_clear(__ptr, __ATOMIC_RELAXED);
-#else
+#if 1
 	*__ptr = __SIMPLELOCK_UNLOCKED;
+#else
+	__atomic_store_n(__ptr, __SIMPLELOCK_UNLOCKED, __ATOMIC_RELAXED);
 #endif
 }
 
 static __inline void __unused
 __cpu_simple_lock(__cpu_simple_lock_t *__ptr)
 {
-#if 0
-	while (__atomic_test_and_set(__ptr, __ATOMIC_ACQUIRE)) {
+	while (__atomic_exchange_n(__ptr, __SIMPLELOCK_LOCKED, __ATOMIC_ACQUIRE) == __SIMPLELOCK_LOCKED) {
 		/* do nothing */
 	}
-#else
-	int __tmp;
-	__asm(
-	\n	1:
-	\n\t	amoswap.w.aq	%[__tmp], %[__newval], 0(%[__ptr])
-	\n\t	bnez		%[__tmp], 1b
-	   :	[__tmp] =r (__tmp)
-	   :	[__newval] r (__SIMPLELOCK_LOCKED),
-		[__ptr] r (__ptr));
-#endif
 }
 
 static __inline int __unused
 __cpu_simple_lock_try(__cpu_simple_lock_t *__ptr)
 {
-#if 0
-	return !__atomic_test_and_set(__ptr, __ATOMIC_ACQUIRE);
-#else
-	int __oldval;
-	__asm(	amoswap.w.aq\t%[__oldval], %[__newval], 0(%[__ptr])
-	   :	[__oldval] =r (__oldval)
-	   :	[__newval] r (__SIMPLELOCK_LOCKED),
-		[__ptr] r (__ptr));
-	return __oldval == __SIMPLELOCK_UNLOCKED;
-#endif
+	return __atomic_exchange_n(__ptr, __SIMPLELOCK_LOCKED, __ATOMIC_ACQUIRE) == __SIMPLELOCK_LOCKED;
 }
 
 static __inline void __unused
 __cpu_simple_unlock(__cpu_simple_lock_t *__ptr)
 {
-#if 0
-	__atomic_clear(__ptr, __ATOMIC_RELEASE);
-#else
-	__asm(amoswap.w.rl\tx0, x0, 0(%[__ptr]) :: [__ptr] r (__ptr));
-#endif
+	__atomic_store_n(__ptr, __SIMPLELOCK_UNLOCKED, __ATOMIC_RELEASE);
 }
 
 #endif /* _RISCV_LOCK_H_ */



CVS commit: src/sys/arch/arm/include

2015-03-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Mar 29 09:49:54 UTC 2015

Modified Files:
src/sys/arch/arm/include: locore.h

Log Message:
If using TPIDRPRW_IS_CURLWP and !MP and ARMV7, use movw/movt to load address
of cpu_info_store


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/locore.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/arch/arm/include/locore.h
diff -u src/sys/arch/arm/include/locore.h:1.19 src/sys/arch/arm/include/locore.h:1.20
--- src/sys/arch/arm/include/locore.h:1.19	Wed Feb 25 13:52:42 2015
+++ src/sys/arch/arm/include/locore.h	Sun Mar 29 09:49:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.h,v 1.19 2015/02/25 13:52:42 joerg Exp $	*/
+/*	$NetBSD: locore.h,v 1.20 2015/03/29 09:49:54 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -87,7 +87,13 @@
 #define GET_CURLWP(rX)		GET_CURCPU(rX); ldr rX, [rX, #CI_CURLWP]
 #elif defined (TPIDRPRW_IS_CURLWP)
 #define GET_CURLWP(rX)		mrc	p15, 0, rX, c13, c0, 4
+#if defined (MULTIPROCESSOR)
 #define GET_CURCPU(rX)		GET_CURLWP(rX); ldr rX, [rX, #L_CPU]
+#elif defined(_ARM_ARCH_7)
+#define GET_CURCPU(rX)		movw rX, #:lower16:cpu_info_store; movt rX, #:upper16:cpu_info_store
+#else 
+#define GET_CURCPU(rX)		ldr rX, =_C_LABEL(cpu_info_store)
+#endif
 #elif !defined(MULTIPROCESSOR)
 #define GET_CURCPU(rX)		ldr rX, =_C_LABEL(cpu_info_store)
 #define GET_CURLWP(rX)		GET_CURCPU(rX); ldr rX, [rX, #CI_CURLWP]



CVS commit: [nick-nhusb] src/sys/dev/usb

2015-03-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Mar 29 11:33:15 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhci.c

Log Message:
DPRINTFN(1, ...) - DPRINTF(...)

No functional change


To generate a diff of this commit:
cvs rdiff -u -r1.264.4.26 -r1.264.4.27 src/sys/dev/usb/uhci.c

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

Modified files:

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.26 src/sys/dev/usb/uhci.c:1.264.4.27
--- src/sys/dev/usb/uhci.c:1.264.4.26	Sun Mar 29 08:08:01 2015
+++ src/sys/dev/usb/uhci.c	Sun Mar 29 11:33:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.26 2015/03/29 08:08:01 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.27 2015/03/29 11:33:15 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.26 2015/03/29 08:08:01 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.27 2015/03/29 11:33:15 skrll Exp $);
 
 #include sys/param.h
 
@@ -114,6 +114,7 @@ fail:
 #endif /* UHCI_DEBUG */
 #endif /* USB_DEBUG */
 
+#define	DPRINTF(FMT,A,B,C,D)	USBHIST_LOGN(uhcidebug,1,FMT,A,B,C,D)
 #define	DPRINTFN(N,FMT,A,B,C,D)	USBHIST_LOGN(uhcidebug,N,FMT,A,B,C,D)
 #define	UHCIHIST_FUNC()		USBHIST_FUNC()
 #define	UHCIHIST_CALLED(name)	USBHIST_CALLED(uhcidebug)
@@ -552,7 +553,7 @@ uhci_init(uhci_softc_t *sc)
 
 	UHCICMD(sc, UHCI_CMD_MAXP); /* Assume 64 byte packets at frame end */
 
-	DPRINTFN(1, Enabling..., 0, 0, 0, 0);
+	DPRINTF(Enabling..., 0, 0, 0, 0);
 
 	err = uhci_run(sc, 1, 0);		/* and here we go... */
 	UWRITE2(sc, UHCI_INTR, UHCI_INTR_TOCRCIE | UHCI_INTR_RIE |
@@ -747,10 +748,10 @@ Static void
 uhci_dumpregs(uhci_softc_t *sc)
 {
 	UHCIHIST_FUNC(); UHCIHIST_CALLED();
-	DPRINTFN(1, cmd =%04x  sts=%04x  intr   =%04x  frnum =%04x,
+	DPRINTF(cmd =%04x  sts=%04x  intr   =%04x  frnum =%04x,
 	UREAD2(sc, UHCI_CMD), UREAD2(sc, UHCI_STS),
 	UREAD2(sc, UHCI_INTR), UREAD2(sc, UHCI_FRNUM));
-	DPRINTFN(1, sof =%04x  portsc1=%04x  portsc2=%04x  flbase=%08x,
+	DPRINTF(sof =%04x  portsc1=%04x  portsc2=%04x  flbase=%08x,
 	UREAD1(sc, UHCI_SOF), UREAD2(sc, UHCI_PORTSC1),
 	UREAD2(sc, UHCI_PORTSC2), UREAD4(sc, UHCI_FLBASEADDR));
 }
@@ -763,33 +764,33 @@ uhci_dump_td(uhci_soft_td_t *p)
 	usb_syncmem(p-dma, p-offs, sizeof(p-td),
 	BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
 
-	DPRINTFN(1, TD(%p) at %08x, p, p-physaddr, 0, 0);
- 	DPRINTFN(1,link=0x%08x status=0x%08x 
+	DPRINTF(TD(%p) at %08x, p, p-physaddr, 0, 0);
+ 	DPRINTF(   link=0x%08x status=0x%08x 
 	token=0x%08x buffer=0x%08x,
 	 le32toh(p-td.td_link),
 	 le32toh(p-td.td_status),
 	 le32toh(p-td.td_token),
 	 le32toh(p-td.td_buffer));
 
-	DPRINTFN(1, bitstuff=%d crcto   =%d nak =%d babble  =%d,
+	DPRINTF(bitstuff=%d crcto   =%d nak =%d babble  =%d,
 	!!(le32toh(p-td.td_status)  UHCI_TD_BITSTUFF),
 	!!(le32toh(p-td.td_status)  UHCI_TD_CRCTO),
 	!!(le32toh(p-td.td_status)  UHCI_TD_NAK),
 	!!(le32toh(p-td.td_status)  UHCI_TD_BABBLE));
-	DPRINTFN(1, dbuffer =%d stalled =%d active  =%d ioc =%d,
+	DPRINTF(dbuffer =%d stalled =%d active  =%d ioc =%d,
 	!!(le32toh(p-td.td_status)  UHCI_TD_DBUFFER),
 	!!(le32toh(p-td.td_status)  UHCI_TD_STALLED),
 	!!(le32toh(p-td.td_status)  UHCI_TD_ACTIVE),
 	!!(le32toh(p-td.td_status)  UHCI_TD_IOC));
-	DPRINTFN(1, ios =%d ls  =%d spd =%d,
+	DPRINTF(ios =%d ls  =%d spd =%d,
 	!!(le32toh(p-td.td_status)  UHCI_TD_IOS),
 	!!(le32toh(p-td.td_status)  UHCI_TD_LS),
 	!!(le32toh(p-td.td_status)  UHCI_TD_SPD), 0);
-	DPRINTFN(1, errcnt  =%d actlen  =%d pid=%02x,
+	DPRINTF(errcnt  =%d actlen  =%d pid=%02x,
 	UHCI_TD_GET_ERRCNT(le32toh(p-td.td_status)),
 	UHCI_TD_GET_ACTLEN(le32toh(p-td.td_status)),
 	UHCI_TD_GET_PID(le32toh(p-td.td_token)), 0);
-	DPRINTFN(1, addr=%d  endpt=%d  D=%d  maxlen=%d,,
+	DPRINTF(addr=%d  endpt=%d  D=%d  maxlen=%d,,
 	UHCI_TD_GET_DEVADDR(le32toh(p-td.td_token)),
 	UHCI_TD_GET_ENDPT(le32toh(p-td.td_token)),
 	UHCI_TD_GET_DT(le32toh(p-td.td_token)),
@@ -804,7 +805,7 @@ uhci_dump_qh(uhci_soft_qh_t *sqh)
 	usb_syncmem(sqh-dma, sqh-offs, sizeof(sqh-qh),
 	BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
 
-	DPRINTFN(1, QH(%p) at %08x: hlink=%08x elink=%08x, sqh,
+	DPRINTF(QH(%p) at %08x: hlink=%08x elink=%08x, sqh,
 	(int)sqh-physaddr, le32toh(sqh-qh.qh_hlink),
 	le32toh(sqh-qh.qh_elink));
 
@@ -856,13 +857,13 @@ uhci_dump_qhs(uhci_soft_qh_t *sqh)
 	if (sqh-hlink != NULL  !(le32toh(sqh-qh.qh_hlink)  UHCI_PTR_T))
 		uhci_dump_qhs(sqh-hlink);
 	else
-		DPRINTFN(1, No QH, 0, 0, 0, 0);
+		DPRINTF(No QH, 0, 0, 0, 0);
 	usb_syncmem(sqh-dma, sqh-offs, sizeof(sqh-qh), BUS_DMASYNC_PREREAD);
 
 	if (sqh-elink != NULL  !(le32toh(sqh-qh.qh_elink)  UHCI_PTR_T))
 		uhci_dump_tds(sqh-elink);
 	else
-		

CVS commit: [nick-nhusb] src/sys/dev/usb

2015-03-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Mar 29 08:08:01 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhci.c

Log Message:
s/0/NULL/ for pointers


To generate a diff of this commit:
cvs rdiff -u -r1.264.4.25 -r1.264.4.26 src/sys/dev/usb/uhci.c

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

Modified files:

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.25 src/sys/dev/usb/uhci.c:1.264.4.26
--- src/sys/dev/usb/uhci.c:1.264.4.25	Thu Mar 19 17:26:43 2015
+++ src/sys/dev/usb/uhci.c	Sun Mar 29 08:08:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.25 2015/03/19 17:26:43 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.26 2015/03/29 08:08:01 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.25 2015/03/19 17:26:43 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.26 2015/03/29 08:08:01 skrll Exp $);
 
 #include sys/param.h
 
@@ -1970,7 +1970,7 @@ uhci_alloc_std_chain(struct uhci_pipe *u
 	maxp, ntd, 0, 0);
 
 	if (ntd == 0) {
-		*sp = *ep = 0;
+		*sp = *ep = NULL;
 		DPRINTFN(1, ntd=0, 0, 0, 0, 0);
 		return USBD_NORMAL_COMPLETION;
 	}



CVS commit: src/sys/arch/arm/nvidia

2015-03-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Mar 29 10:44:54 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_intr.h

Log Message:
bump max sources to 256


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_intr.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/arch/arm/nvidia/tegra_intr.h
diff -u src/sys/arch/arm/nvidia/tegra_intr.h:1.1 src/sys/arch/arm/nvidia/tegra_intr.h:1.2
--- src/sys/arch/arm/nvidia/tegra_intr.h:1.1	Sun Mar 29 10:41:59 2015
+++ src/sys/arch/arm/nvidia/tegra_intr.h	Sun Mar 29 10:44:54 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_intr.h,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */
+/* $NetBSD: tegra_intr.h,v 1.2 2015/03/29 10:44:54 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #ifndef _ARM_TEGRA_INTR_H
 #define _ARM_TEGRA_INTR_H
 
-#define PIC_MAXSOURCES		192
+#define PIC_MAXSOURCES		256
 #define PIC_MAXMAXSOURCES	(PIC_MAXSOURCES + 32)
 
 #include arm/cortex/gic_intr.h



CVS commit: src/sys/arch/evbarm/tegra

2015-03-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Mar 29 10:55:11 UTC 2015

Modified Files:
src/sys/arch/evbarm/tegra: tegra_machdep.c

Log Message:
no need to set arm_cpu_max here, it is done in soc specific code


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/tegra/tegra_machdep.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/evbarm/tegra/tegra_machdep.c
diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.1 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.2
--- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.1	Sun Mar 29 10:41:59 2015
+++ src/sys/arch/evbarm/tegra/tegra_machdep.c	Sun Mar 29 10:55:11 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_machdep.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */
+/* $NetBSD: tegra_machdep.c,v 1.2 2015/03/29 10:55:11 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.2 2015/03/29 10:55:11 jmcneill Exp $);
 
 #include opt_tegra.h
 #include opt_machdep.h
@@ -186,11 +186,6 @@ initarm(void *arg)
 	DPRINT( bootstrap);
 	tegra_bootstrap();
 
-#ifdef MULTIPROCESSOR
-	DPRINT( ncpu);
-	arm_cpu_max = 1 + __SHIFTOUT(armreg_l2ctrl_read(), L2CTRL_NUMCPU);
-#endif
-
 	/* Heads up ... Setup the CPU / MMU / TLB functions. */
 	DPRINT( cpufunc);
 	if (set_cpufuncs())



CVS commit: src/sbin/resize_ffs

2015-03-29 Thread Christian E. Hopps
Module Name:src
Committed By:   chopps
Date:   Sun Mar 29 19:33:55 UTC 2015

Modified Files:
src/sbin/resize_ffs: resize_ffs.8 resize_ffs.c

Log Message:
- Add -c to check to see if grow/shrink is required
- Divide by DEV_BSIZE when returning size of file.
- Update manpage


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sbin/resize_ffs/resize_ffs.8
cvs rdiff -u -r1.40 -r1.41 src/sbin/resize_ffs/resize_ffs.c

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

Modified files:

Index: src/sbin/resize_ffs/resize_ffs.8
diff -u src/sbin/resize_ffs/resize_ffs.8:1.13 src/sbin/resize_ffs/resize_ffs.8:1.14
--- src/sbin/resize_ffs/resize_ffs.8:1.13	Sun Aug 28 21:25:11 2011
+++ src/sbin/resize_ffs/resize_ffs.8	Sun Mar 29 19:33:55 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: resize_ffs.8,v 1.13 2011/08/28 21:25:11 wiz Exp $
+.\ $NetBSD: resize_ffs.8,v 1.14 2015/03/29 19:33:55 chopps Exp $
 .\
 .\ As its sole author, I explicitly place this man page in the public
 .\ domain.  Anyone may use it in any way for any purpose (though I would
@@ -17,7 +17,7 @@
 .Nd resize a file system on disk or in a file
 .Sh SYNOPSIS
 .Nm
-.Op Fl y
+.Op Fl cvy
 .Op Fl s Ar size
 .Ar special
 .Sh DESCRIPTION
@@ -55,6 +55,9 @@ determined from
 .Pp
 The options are as follows:
 .Bl -tag -width indent
+.It Fl c
+Check to see if the new size would change the file system. No changes
+will be made to the file system.
 .It Fl s
 Specify the file system size to which the file system should be
 resized.
@@ -66,6 +69,8 @@ Mostly used to shrink file systems.
 .It Fl y
 Disable sanity questions made by
 .Nm .
+.It Fl v
+Be more verbose.
 .El
 .Sh WARNING
 .Em Interrupting

Index: src/sbin/resize_ffs/resize_ffs.c
diff -u src/sbin/resize_ffs/resize_ffs.c:1.40 src/sbin/resize_ffs/resize_ffs.c:1.41
--- src/sbin/resize_ffs/resize_ffs.c:1.40	Sat Mar 28 17:25:33 2015
+++ src/sbin/resize_ffs/resize_ffs.c	Sun Mar 29 19:33:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: resize_ffs.c,v 1.40 2015/03/28 17:25:33 riastradh Exp $	*/
+/*	$NetBSD: resize_ffs.c,v 1.41 2015/03/29 19:33:55 chopps Exp $	*/
 /* From sources sent on February 17, 2003 */
 /*-
  * As its sole author, I explicitly place this code in the public
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: resize_ffs.c,v 1.40 2015/03/28 17:25:33 riastradh Exp $);
+__RCSID($NetBSD: resize_ffs.c,v 1.41 2015/03/29 19:33:55 chopps Exp $);
 
 #include sys/disk.h
 #include sys/disklabel.h
@@ -152,6 +152,7 @@ static unsigned char *iflags;
 /* global flags */
 int is_ufs2 = 0;
 int needswap = 0;
+int verbose = 0;
 
 static void usage(void) __dead;
 
@@ -2040,7 +2041,7 @@ get_dev_size(char *dev_name)
 		return pp-p_size;
 	}
 	if (fstat(fd, st) != -1  S_ISREG(st.st_mode))
-		return st.st_size;
+		return st.st_size / DEV_BSIZE;
 
 	return 0;
 }
@@ -2052,6 +2053,7 @@ int
 main(int argc, char **argv)
 {
 	int ch;
+	int CheckOnlyFlag;
 	int ExpertFlag;
 	int SFlag;
 	size_t i;
@@ -2062,9 +2064,13 @@ main(int argc, char **argv)
 	newsize = 0;
 	ExpertFlag = 0;
 	SFlag = 0;
+CheckOnlyFlag = 0;
 
-	while ((ch = getopt(argc, argv, s:y)) != -1) {
+	while ((ch = getopt(argc, argv, cs:vy)) != -1) {
 		switch (ch) {
+case 'c':
+			CheckOnlyFlag = 1;
+			break;
 		case 's':
 			SFlag = 1;
 			newsize = strtoll(optarg, NULL, 10);
@@ -2072,6 +2078,9 @@ main(int argc, char **argv)
 usage();
 			}
 			break;
+		case 'v':
+			verbose = 1;
+			break;
 		case 'y':
 			ExpertFlag = 1;
 			break;
@@ -2090,7 +2099,7 @@ main(int argc, char **argv)
 
 	special = *argv;
 
-	if (ExpertFlag == 0) {
+	if (ExpertFlag == 0  CheckOnlyFlag == 0) {
 		printf(It's required to manually run fsck on file system 
 		before you can resize it\n\n
 		 Did you run fsck on your disk (Yes/No) ? );
@@ -2165,6 +2174,25 @@ main(int argc, char **argv)
 	 * just once, so being generous is cheap. */
 	memcpy(newsb, oldsb, SBLOCKSIZE);
 	loadcgs();
+
+if (CheckOnlyFlag) {
+		/* Check to see if the newsize would change the file system. */
+		if (FFS_DBTOFSB(oldsb, newsize) == oldsb-fs_size) {
+			if (verbose) {
+printf(Wouldn't change: already % PRId64
+ blocks\n, newsize);
+			}
+			exit(1);
+		}
+		if (verbose) {
+			printf(Would change: newsize: % PRId64  oldsize: %
+			PRId64  fsdb: % PRId64 \n, FFS_DBTOFSB(oldsb, newsize),
+			(int64_t)oldsb-fs_size,
+			(int64_t)oldsb-fs_fsbtodb);
+		}
+		exit(0);
+}
+
 	if (newsize  FFS_FSBTODB(oldsb, oldsb-fs_size)) {
 		grow();
 	} else if (newsize  FFS_FSBTODB(oldsb, oldsb-fs_size)) {
@@ -2183,7 +2211,7 @@ static void
 usage(void)
 {
 
-	(void)fprintf(stderr, usage: %s [-y] [-s size] special\n,
+	(void)fprintf(stderr, usage: %s [-cvy] [-s size] special\n,
 	getprogname());
 	exit(EXIT_FAILURE);
 }



CVS commit: src/sbin/resize_ffs

2015-03-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Mar 29 19:42:15 UTC 2015

Modified Files:
src/sbin/resize_ffs: resize_ffs.8

Log Message:
New sentence, new line. Sort option descriptions.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sbin/resize_ffs/resize_ffs.8

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

Modified files:

Index: src/sbin/resize_ffs/resize_ffs.8
diff -u src/sbin/resize_ffs/resize_ffs.8:1.14 src/sbin/resize_ffs/resize_ffs.8:1.15
--- src/sbin/resize_ffs/resize_ffs.8:1.14	Sun Mar 29 19:33:55 2015
+++ src/sbin/resize_ffs/resize_ffs.8	Sun Mar 29 19:42:15 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: resize_ffs.8,v 1.14 2015/03/29 19:33:55 chopps Exp $
+.\ $NetBSD: resize_ffs.8,v 1.15 2015/03/29 19:42:15 wiz Exp $
 .\
 .\ As its sole author, I explicitly place this man page in the public
 .\ domain.  Anyone may use it in any way for any purpose (though I would
@@ -56,8 +56,8 @@ determined from
 The options are as follows:
 .Bl -tag -width indent
 .It Fl c
-Check to see if the new size would change the file system. No changes
-will be made to the file system.
+Check to see if the new size would change the file system.
+No changes will be made to the file system.
 .It Fl s
 Specify the file system size to which the file system should be
 resized.
@@ -66,11 +66,11 @@ It will not work correctly for file syst
 To see the
 exact value, have a look at the disk specification or the disklabel.
 Mostly used to shrink file systems.
+.It Fl v
+Be more verbose.
 .It Fl y
 Disable sanity questions made by
 .Nm .
-.It Fl v
-Be more verbose.
 .El
 .Sh WARNING
 .Em Interrupting



CVS commit: src/share/man/man9

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 21:02:06 UTC 2015

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

Log Message:
Cull some obsolete parts of buffercache(9) man page.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/share/man/man9/buffercache.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/buffercache.9
diff -u src/share/man/man9/buffercache.9:1.28 src/share/man/man9/buffercache.9:1.29
--- src/share/man/man9/buffercache.9:1.28	Sun Mar 29 20:56:01 2015
+++ src/share/man/man9/buffercache.9	Sun Mar 29 21:02:06 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: buffercache.9,v 1.28 2015/03/29 20:56:01 riastradh Exp $
+.\ $NetBSD: buffercache.9,v 1.29 2015/03/29 21:02:06 riastradh Exp $
 .\
 .\ Copyright (c)2003 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -223,13 +223,6 @@ will start read-ahead of blocks specifie
 .Fa rasizes ,
 .Fa nrablks .
 .\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-.It Fn breada vp blkno size rablkno rabsize cred flags bpp
-Same as
-.Fn breadn
-with single block read-ahead.
-This function is for compatibility with old filesystem code and
-shouldn't be used by new ones.
-.\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 .It Fn bwrite bp
 Write a block.
 Start I/O for write using
@@ -335,9 +328,3 @@ The buffer cache subsystem is implemente
 .%I Addison Wesley
 .%D 1996
 .Re
-.\ 
-.Sh BUGS
-In the current implementation,
-.Fn bread
-and its variants
-don't use a specified credential.



CVS commit: src/share/man/man9

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 21:08:36 UTC 2015

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

Log Message:
Mention B_WRITE.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/bufferio.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/bufferio.9
diff -u src/share/man/man9/bufferio.9:1.4 src/share/man/man9/bufferio.9:1.5
--- src/share/man/man9/bufferio.9:1.4	Sun Mar 29 21:08:08 2015
+++ src/share/man/man9/bufferio.9	Sun Mar 29 21:08:36 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: bufferio.9,v 1.4 2015/03/29 21:08:08 riastradh Exp $
+.\	$NetBSD: bufferio.9,v 1.5 2015/03/29 21:08:36 riastradh Exp $
 .\
 .\ Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -96,6 +96,9 @@ Caller must provide
 and must not call
 .Fn biowait bp .
 .El
+For legibility, callers should indicate writes by passing the
+pseudo-flag
+.Dv B_WRITE ,
 which is zero.
 .It Fa bp Ns Li -b_data
 Pointer to kernel virtual address of source/target for transfer.



CVS commit: src/share/man/man9

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 21:08:08 UTC 2015

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

Log Message:
Remove \ from example code.  Cargo-culted from I forget where.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/bufferio.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/bufferio.9
diff -u src/share/man/man9/bufferio.9:1.3 src/share/man/man9/bufferio.9:1.4
--- src/share/man/man9/bufferio.9:1.3	Sun Mar 29 21:06:26 2015
+++ src/share/man/man9/bufferio.9	Sun Mar 29 21:08:08 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: bufferio.9,v 1.3 2015/03/29 21:06:26 riastradh Exp $
+.\	$NetBSD: bufferio.9,v 1.4 2015/03/29 21:08:08 riastradh Exp $
 .\
 .\ Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -96,6 +96,7 @@ Caller must provide
 and must not call
 .Fn biowait bp .
 .El
+which is zero.
 .It Fa bp Ns Li -b_data
 Pointer to kernel virtual address of source/target for transfer.
 .It Fa bp Ns Li -b_bcount
@@ -198,51 +199,51 @@ or submitting the last nested I/O transf
 .Pp
 For example:
 .Bd -literal -offset abcd
-\struct buf *mbp, *bp;
-\size_t skipped = 0;
-\unsigned i;
-\int error = 0;
-\
-\mbp = getiobuf(vp, true);
-\mbp-b_data = data;
-\mbp-b_resid = mbp-b_bcount = datalen;
-\mbp-b_flags = B_WRITE;
-\
-\KASSERT(i  nsegs);
-\for (i = 0; i  nsegs; i++) {
-\	struct vnode *devvp;
-\	daddr_t blkno;
-\
-\	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-\	error = VOP_BMAP(vp, i*segsz, devvp, blkno, NULL);
-\	VOP_UNLOCK(vp);
-\	if (error == 0  nbn == -1)
-\		error = EIO;
-\	if (error) {
-\		skipped += segsz;
-\		break;
-\	}
-\
-\	bp = getiobuf(vp, true);
-\	nestiobuf_setup(bp, mbp, i*segsz, segsz);
-\	bp-b_blkno = blkno;
-\	if (i == nsegs - 1)	/* Last segment.  */
-\		break;
-\	VOP_STRATEGY(devvp, bp);
-\}
-\
-\/*
-\ * Account v_numoutput for master write.
-\ * (Must not vn_lock before last VOP_STRATEGY!)
-\ */
-\mutex_enter(vp-v_interlock);
-\vp-v_numoutput++;
-\mutex_exit(vp-v_interlock);
-\
-\if (skipped)
-\	nestiobuf_done(mbp, skipped, error);
-\else
-\	VOP_STRATEGY(devvp, bp);
+struct buf *mbp, *bp;
+size_t skipped = 0;
+unsigned i;
+int error = 0;
+
+mbp = getiobuf(vp, true);
+mbp-b_data = data;
+mbp-b_resid = mbp-b_bcount = datalen;
+mbp-b_flags = B_WRITE;
+
+KASSERT(i  nsegs);
+for (i = 0; i  nsegs; i++) {
+	struct vnode *devvp;
+	daddr_t blkno;
+
+	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	error = VOP_BMAP(vp, i*segsz, devvp, blkno, NULL);
+	VOP_UNLOCK(vp);
+	if (error == 0  nbn == -1)
+		error = EIO;
+	if (error) {
+		skipped += segsz;
+		break;
+	}
+
+	bp = getiobuf(vp, true);
+	nestiobuf_setup(bp, mbp, i*segsz, segsz);
+	bp-b_blkno = blkno;
+	if (i == nsegs - 1)	/* Last segment.  */
+		break;
+	VOP_STRATEGY(devvp, bp);
+}
+
+/*
+ * Account v_numoutput for master write.
+ * (Must not vn_lock before last VOP_STRATEGY!)
+ */
+mutex_enter(vp-v_interlock);
+vp-v_numoutput++;
+mutex_exit(vp-v_interlock);
+
+if (skipped)
+	nestiobuf_done(mbp, skipped, error);
+else
+	VOP_STRATEGY(devvp, bp);
 .Ed
 .Sh BLOCK DEVICE DRIVERS
 Block device drivers implement a



CVS commit: src

2015-03-29 Thread Christian E. Hopps
Module Name:src
Committed By:   chopps
Date:   Sun Mar 29 19:37:02 UTC 2015

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/sbin/resize_ffs: Makefile common.sh t_grow.sh
t_grow_swapped.sh t_shrink.sh t_shrink_swapped.sh
Added Files:
src/tests/sbin/resize_ffs: t_check.sh

Log Message:
- Add new tests for -c check flag in resize_ffs


To generate a diff of this commit:
cvs rdiff -u -r1.612 -r1.613 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/resize_ffs/Makefile
cvs rdiff -u -r1.13 -r1.14 src/tests/sbin/resize_ffs/common.sh
cvs rdiff -u -r0 -r1.1 src/tests/sbin/resize_ffs/t_check.sh
cvs rdiff -u -r1.8 -r1.9 src/tests/sbin/resize_ffs/t_grow.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/resize_ffs/t_grow_swapped.sh
cvs rdiff -u -r1.7 -r1.8 src/tests/sbin/resize_ffs/t_shrink.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/resize_ffs/t_shrink_swapped.sh

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.612 src/distrib/sets/lists/tests/mi:1.613
--- src/distrib/sets/lists/tests/mi:1.612	Fri Feb  6 22:24:15 2015
+++ src/distrib/sets/lists/tests/mi	Sun Mar 29 19:37:02 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.612 2015/02/06 22:24:15 rjs Exp $
+# $NetBSD: mi,v 1.613 2015/03/29 19:37:02 chopps Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3245,6 +3245,7 @@
 ./usr/tests/sbin/resize_ffs			tests-sbin-tests
 ./usr/tests/sbin/resize_ffs/Atffile		tests-sbin-tests	atf
 ./usr/tests/sbin/resize_ffs/Kyuafile		tests-sbin-tests	atf,kyua
+./usr/tests/sbin/resize_ffs/t_check		tests-sbin-tests	atf
 ./usr/tests/sbin/resize_ffs/t_grow		tests-sbin-tests	atf
 ./usr/tests/sbin/resize_ffs/t_grow_swapped	tests-sbin-tests	atf
 ./usr/tests/sbin/resize_ffs/t_resize_ffs	tests-obsolete		obsolete

Index: src/tests/sbin/resize_ffs/Makefile
diff -u src/tests/sbin/resize_ffs/Makefile:1.3 src/tests/sbin/resize_ffs/Makefile:1.4
--- src/tests/sbin/resize_ffs/Makefile:1.3	Wed Jan  5 02:25:27 2011
+++ src/tests/sbin/resize_ffs/Makefile	Sun Mar 29 19:37:02 2015
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2011/01/05 02:25:27 riz Exp $
+# $NetBSD: Makefile,v 1.4 2015/03/29 19:37:02 chopps Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/sbin/resize_ffs
 
-.for name in t_grow t_shrink t_grow_swapped t_shrink_swapped
+.for name in t_check t_grow t_shrink t_grow_swapped t_shrink_swapped
 TESTS_SH+=	${name}
 TESTS_SH_SRC_${name}=	common.sh ${name}.sh
 .endfor

Index: src/tests/sbin/resize_ffs/common.sh
diff -u src/tests/sbin/resize_ffs/common.sh:1.13 src/tests/sbin/resize_ffs/common.sh:1.14
--- src/tests/sbin/resize_ffs/common.sh:1.13	Tue Feb 19 21:08:25 2013
+++ src/tests/sbin/resize_ffs/common.sh	Sun Mar 29 19:37:02 2015
@@ -146,6 +146,8 @@ resize_ffs()
 	fi
 
 	umount mnt
+	# Check that resize needed
+	atf_check -s exit:0 -o ignore resize_ffs -c -y -s ${nsize} ${IMG}
 	atf_check -s exit:0 -o ignore resize_ffs -y -s ${nsize} ${IMG}
 	atf_check -s exit:0 -o ignore fsck_ffs -f -n -F ${IMG}
 	atf_check -s exit:0 -e ignore rump_ffs ${IMG} mnt
@@ -155,5 +157,7 @@ resize_ffs()
 	# checking everything because we don't delete on grow
 	check_data_range 1 ${numdata}
 	fi
+	# Check that no resize needed
+	atf_check -s exit:1 -o ignore resize_ffs -c -y -s ${nsize} ${IMG}
 	umount mnt
 }

Index: src/tests/sbin/resize_ffs/t_grow.sh
diff -u src/tests/sbin/resize_ffs/t_grow.sh:1.8 src/tests/sbin/resize_ffs/t_grow.sh:1.9
--- src/tests/sbin/resize_ffs/t_grow.sh:1.8	Tue Jan 11 00:50:02 2011
+++ src/tests/sbin/resize_ffs/t_grow.sh	Sun Mar 29 19:37:02 2015
@@ -1,4 +1,4 @@
-# $NetBSD: t_grow.sh,v 1.8 2011/01/11 00:50:02 riz Exp $
+# $NetBSD: t_grow.sh,v 1.9 2015/03/29 19:37:02 chopps Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -131,8 +131,10 @@ grow_ffsv1_partial_cg_body()
 	atf_check -o ignore -e ignore newfs -V1 -s 4000 -F ${IMG}
 
 	# size to grow to is chosen to cause partial cg
+	atf_check -s exit:0 -o ignore resize_ffs -c -y -s 5760 ${IMG}
 	atf_check -s exit:0 -o ignore resize_ffs -y -s 5760 ${IMG}
 	atf_check -s exit:0 -o ignore fsck_ffs -f -n -F ${IMG}
+	atf_check -s exit:1 -o ignore resize_ffs -c -y -s 5760 ${IMG}
 }
 
 atf_init_test_cases()

Index: src/tests/sbin/resize_ffs/t_grow_swapped.sh
diff -u src/tests/sbin/resize_ffs/t_grow_swapped.sh:1.2 src/tests/sbin/resize_ffs/t_grow_swapped.sh:1.3
--- src/tests/sbin/resize_ffs/t_grow_swapped.sh:1.2	Tue Jan 11 00:50:02 2011
+++ src/tests/sbin/resize_ffs/t_grow_swapped.sh	Sun Mar 29 19:37:02 2015
@@ -1,4 +1,4 @@
-# $NetBSD: t_grow_swapped.sh,v 1.2 2011/01/11 00:50:02 riz Exp $
+# $NetBSD: t_grow_swapped.sh,v 1.3 2015/03/29 19:37:02 chopps Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -130,8 +130,10 @@ grow_ffsv1_partial_cg_body()
 	atf_check -o ignore 

CVS commit: src

2015-03-29 Thread Christian E. Hopps
Module Name:src
Committed By:   chopps
Date:   Sun Mar 29 19:35:58 UTC 2015

Modified Files:
src/libexec/lfs_cleanerd: coalesce.c lfs_cleanerd.c
src/sbin/fsck_lfs: bufcache.c bufcache.h dir.c inode.c lfs.c pass6.c
segwrite.c setup.c
src/sbin/newfs_lfs: make_lfs.c

Log Message:
- Fix fallout for recent bread() change (removing cred arg).


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/libexec/lfs_cleanerd/coalesce.c
cvs rdiff -u -r1.37 -r1.38 src/libexec/lfs_cleanerd/lfs_cleanerd.c
cvs rdiff -u -r1.14 -r1.15 src/sbin/fsck_lfs/bufcache.c
cvs rdiff -u -r1.11 -r1.12 src/sbin/fsck_lfs/bufcache.h
cvs rdiff -u -r1.32 -r1.33 src/sbin/fsck_lfs/dir.c src/sbin/fsck_lfs/pass6.c
cvs rdiff -u -r1.52 -r1.53 src/sbin/fsck_lfs/inode.c
cvs rdiff -u -r1.43 -r1.44 src/sbin/fsck_lfs/lfs.c
cvs rdiff -u -r1.27 -r1.28 src/sbin/fsck_lfs/segwrite.c
cvs rdiff -u -r1.44 -r1.45 src/sbin/fsck_lfs/setup.c
cvs rdiff -u -r1.29 -r1.30 src/sbin/newfs_lfs/make_lfs.c

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

Modified files:

Index: src/libexec/lfs_cleanerd/coalesce.c
diff -u src/libexec/lfs_cleanerd/coalesce.c:1.23 src/libexec/lfs_cleanerd/coalesce.c:1.24
--- src/libexec/lfs_cleanerd/coalesce.c:1.23	Tue Jun 18 18:18:57 2013
+++ src/libexec/lfs_cleanerd/coalesce.c	Sun Mar 29 19:35:58 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: coalesce.c,v 1.23 2013/06/18 18:18:57 christos Exp $  */
+/*  $NetBSD: coalesce.c,v 1.24 2015/03/29 19:35:58 chopps Exp $  */
 
 /*-
  * Copyright (c) 2002, 2005 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@ get_dinode(struct clfs *fs, ino_t ino)
 	if (daddr == 0x0)
 		return NULL;
 
-	bread(fs-clfs_devvp, daddr, fs-lfs_ibsize, NOCRED, 0, bp);
+	bread(fs-clfs_devvp, daddr, fs-lfs_ibsize, 0, bp);
 	for (dip = (struct ulfs1_dinode *)bp-b_data;
 	 dip  (struct ulfs1_dinode *)(bp-b_data + fs-lfs_ibsize); dip++)
 		if (dip-di_inumber == ino) {
@@ -297,7 +297,7 @@ clean_inode(struct clfs *fs, ino_t ino)
 	bps = lfs_segtod(fs, 1);
 	for (tbip = bip; tbip  bip + nb; tbip += bps) {
 		do {
-			bread(fs-lfs_ivnode, 0, fs-lfs_bsize, NOCRED, 0, bp);
+			bread(fs-lfs_ivnode, 0, fs-lfs_bsize, 0, bp);
 			cip = *(CLEANERINFO *)bp-b_data;
 			brelse(bp, B_INVAL);
 

Index: src/libexec/lfs_cleanerd/lfs_cleanerd.c
diff -u src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.37 src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.38
--- src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.37	Sat Oct 19 17:19:30 2013
+++ src/libexec/lfs_cleanerd/lfs_cleanerd.c	Sun Mar 29 19:35:58 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_cleanerd.c,v 1.37 2013/10/19 17:19:30 christos Exp $	 */
+/* $NetBSD: lfs_cleanerd.c,v 1.38 2015/03/29 19:35:58 chopps Exp $	 */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -331,7 +331,7 @@ lfs_ientry(IFILE **ifpp, struct clfs *fs
 	int error;
 
 	error = bread(fs-lfs_ivnode, ino / fs-lfs_ifpb + fs-lfs_cleansz +
-		  fs-lfs_segtabsz, fs-lfs_bsize, NOCRED, 0, bpp);
+		  fs-lfs_segtabsz, fs-lfs_bsize, 0, bpp);
 	if (error)
 		syslog(LOG_ERR, %s: ientry failed for ino %d,
 			fs-lfs_fsmnt, (int)ino);
@@ -514,7 +514,7 @@ parse_pseg(struct clfs *fs, daddr_t dadd
 			syslog(LOG_WARNING, fixing short FINFO at %x (seg %d),
 			   odaddr, lfs_dtosn(fs, odaddr));
 			bread(fs-clfs_devvp, odaddr, fs-lfs_fsize,
-			NOCRED, 0, nbp);
+			0, nbp);
 			nssp = (SEGSUM *)nbp-b_data;
 			--nssp-ss_nfinfo;
 			nssp-ss_sumsum = cksum(nssp-ss_datasum,
@@ -1014,7 +1014,7 @@ clean_fs(struct clfs *fs, CLEANERINFO *c
 	npos = 0;
 	for (i = 0; i  fs-lfs_nseg; i+= fs-lfs_sepb) {
 		bread(fs-lfs_ivnode, fs-lfs_cleansz + i / fs-lfs_sepb,
-		  fs-lfs_bsize, NOCRED, 0, bp);
+		  fs-lfs_bsize, 0, bp);
 		for (j = 0; j  fs-lfs_sepb  i + j  fs-lfs_nseg; j++) {
 			sup = ((SEGUSE *)bp-b_data) + j;
 			fs-clfs_segtab[i + j].nbytes  = sup-su_nbytes;
@@ -1214,7 +1214,7 @@ needs_cleaning(struct clfs *fs, CLEANERI
 	 * the cached information, so invalidate the buffer before
 	 * handing it back.
 	 */
-	if (bread(fs-lfs_ivnode, 0, fs-lfs_bsize, NOCRED, 0, bp)) {
+	if (bread(fs-lfs_ivnode, 0, fs-lfs_bsize, 0, bp)) {
 		syslog(LOG_ERR, %s: can't read inode, fs-lfs_fsmnt);
 		return -1;
 	}

Index: src/sbin/fsck_lfs/bufcache.c
diff -u src/sbin/fsck_lfs/bufcache.c:1.14 src/sbin/fsck_lfs/bufcache.c:1.15
--- src/sbin/fsck_lfs/bufcache.c:1.14	Sat Oct 19 01:09:58 2013
+++ src/sbin/fsck_lfs/bufcache.c	Sun Mar 29 19:35:58 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: bufcache.c,v 1.14 2013/10/19 01:09:58 christos Exp $ */
+/* $NetBSD: bufcache.c,v 1.15 2015/03/29 19:35:58 chopps Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -339,8 +339,7 @@ brelse(struct ubuf * bp, int set)
 
 /* Read the given block from disk, return it B_BUSY. */
 int
-bread(struct uvnode * vp, daddr_t lbn, int size, void * unused,
-int flags, struct ubuf ** bpp)
+bread(struct uvnode * vp, daddr_t lbn, int size, int 

CVS commit: src/share/man/man9

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 20:56:01 UTC 2015

Modified Files:
src/share/man/man9: buffercache.9
Added Files:
src/share/man/man9: bufferio.9

Log Message:
New man page bufferio(9) for I/O transfer view of struct buf.

Move biowait/biodone from buffercache(9) man page.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/share/man/man9/buffercache.9
cvs rdiff -u -r0 -r1.1 src/share/man/man9/bufferio.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/buffercache.9
diff -u src/share/man/man9/buffercache.9:1.27 src/share/man/man9/buffercache.9:1.28
--- src/share/man/man9/buffercache.9:1.27	Sat Mar 28 19:24:04 2015
+++ src/share/man/man9/buffercache.9	Sun Mar 29 20:56:01 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: buffercache.9,v 1.27 2015/03/28 19:24:04 maxv Exp $
+.\ $NetBSD: buffercache.9,v 1.28 2015/03/29 20:56:01 riastradh Exp $
 .\
 .\ Copyright (c)2003 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -115,9 +115,7 @@
 .Nm geteblk ,
 .Nm incore ,
 .Nm allocbuf ,
-.Nm brelse ,
-.Nm biodone ,
-.Nm biowait
+.Nm brelse
 .Nd buffer cache interfaces
 .\ 
 .Sh SYNOPSIS
@@ -146,10 +144,6 @@
 .Fn allocbuf buf_t *bp int size int preserve
 .Ft void
 .Fn brelse buf_t *bp int set
-.Ft void
-.Fn biodone buf_t *bp
-.Ft int
-.Fn biowait buf_t *bp
 .\ 
 .Sh DESCRIPTION
 The
@@ -319,18 +313,6 @@ the buffer's additional contents.
 .\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 .It Fn brelse bp set
 Unbusy a buffer and release it to the free lists.
-.\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-.It Fn biodone bp
-Mark I/O complete on a buffer.
-If a callback has been requested by
-.Dv B_CALL ,
-do so.
-Otherwise, wakeup waiters.
-.\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-.It Fn biowait bp
-Wait for operations on the buffer to complete.
-When they do, extract and return the I/O's error value.
-.El
 .\ 
 .Sh CODE REFERENCES
 The buffer cache subsystem is implemented within the file
@@ -359,11 +341,3 @@ In the current implementation,
 .Fn bread
 and its variants
 don't use a specified credential.
-.Pp
-Because
-.Fn biodone
-and
-.Fn biowait
-do not really belong to
-.Nm ,
-they shouldn't be documented here.

Added files:

Index: src/share/man/man9/bufferio.9
diff -u /dev/null src/share/man/man9/bufferio.9:1.1
--- /dev/null	Sun Mar 29 20:56:01 2015
+++ src/share/man/man9/bufferio.9	Sun Mar 29 20:56:01 2015
@@ -0,0 +1,390 @@
+.\	$NetBSD: bufferio.9,v 1.1 2015/03/29 20:56:01 riastradh Exp $
+.\
+.\ Copyright (c) 2015 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Taylor R. Campbell.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\ POSSIBILITY OF SUCH DAMAGE.
+.\
+.Dd March 29, 2015
+.Dt BUFFERIO 9
+.Os
+.Sh NAME
+.Nm BUFFERIO ,
+.Nm biodone ,
+.Nm biowait ,
+.Nm getiobuf ,
+.Nm putiobuf ,
+.Nm nestiobuf_setup ,
+.Nm nestiobuf_done
+.Nd block I/O buffer transfers
+.Sh SYNOPSIS
+.In sys/buf.h
+.Ft void
+.Fn biodone struct buf *bp
+.Ft int
+.Fn biowait struct buf *bp
+.Ft struct buf *
+.Fn getiobuf struct vnode *vp bool waitok
+.Ft void
+.Fn putiobuf struct buf *bp
+.Ft void
+.Fn nestiobuf_setup struct buf *mbp struct buf *bp int offset \
+size_t size
+.Ft void
+.Fn nestiobuf_done struct buf *mbp int donebytes int error
+.Sh DESCRIPTION
+The
+.Nm
+subsystem manages block I/O buffer transfers, 

CVS commit: src/share/man/man9

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 21:06:26 UTC 2015

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

Log Message:
Use `Ap s' instead of `No 's', per signal from wizd.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/bufferio.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/bufferio.9
diff -u src/share/man/man9/bufferio.9:1.2 src/share/man/man9/bufferio.9:1.3
--- src/share/man/man9/bufferio.9:1.2	Sun Mar 29 21:05:21 2015
+++ src/share/man/man9/bufferio.9	Sun Mar 29 21:06:26 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: bufferio.9,v 1.2 2015/03/29 21:05:21 riastradh Exp $
+.\	$NetBSD: bufferio.9,v 1.3 2015/03/29 21:06:26 riastradh Exp $
 .\
 .\ Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -117,7 +117,7 @@ then before the user submits it to a blo
 increment
 .Fa vp Ns Li -v_numoutput .
 The user must not acquire
-.Fa vp Ns No 's
+.Fa vp Ns Ap s
 vnode lock between incrementing
 .Fa vp Ns Li -v_numoutput
 and submitting
@@ -183,7 +183,7 @@ For writes associated with a vnode
 accounts for
 .Fa vp Ns Li -v_numoutput ,
 so the caller is not allowed to acquire
-.Fa vp Ns No 's
+.Fa vp Ns Ap s
 vnode lock before submitting the nested I/O transfer to a block
 device.
 However, the caller is responsible for accounting the master buffer in
@@ -191,7 +191,7 @@ However, the caller is responsible for a
 This must be done very carefully because after incrementing
 .Fa vp Ns Li -v_numoutput ,
 the caller is not allowed to acquire
-.Fa vp Ns No 's
+.Fa vp Ns Ap s
 vnode lock before either calling
 .Fn nestiobuf_done
 or submitting the last nested I/O transfer to a block device.



CVS commit: src/share/man/man9

2015-03-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar 29 21:05:21 UTC 2015

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

Log Message:
Clarify that getiobuf must be paired with putiobuf, not brelse.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/bufferio.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/bufferio.9
diff -u src/share/man/man9/bufferio.9:1.1 src/share/man/man9/bufferio.9:1.2
--- src/share/man/man9/bufferio.9:1.1	Sun Mar 29 20:56:01 2015
+++ src/share/man/man9/bufferio.9	Sun Mar 29 21:05:21 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: bufferio.9,v 1.1 2015/03/29 20:56:01 riastradh Exp $
+.\	$NetBSD: bufferio.9,v 1.2 2015/03/29 21:05:21 riastradh Exp $
 .\
 .\ Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -341,6 +341,16 @@ If
 is false,
 returns null if none can be allocated immediately.
 .Pp
+The resulting
+.Li struct buf
+pointer must eventually be passed to
+.Fn putiobuf
+to release it.
+Do
+.Em not
+use
+.Xr brelse 9 .
+.Pp
 May sleep if
 .Fa waitok
 is true.



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

2015-03-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Mar 29 21:11:17 UTC 2015

Modified Files:
src/sys/arch/evbarm/conf: README.evbarm

Log Message:
hey there's a README here! add ALLWINNER_A80, BPI, CUBIEBOARD, CUBIETRUCK, 
HUMMINGBIRD_A31, JETSONTK1, ODROID-C1, ROCKCHIP configs


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

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/evbarm/conf/README.evbarm
diff -u src/sys/arch/evbarm/conf/README.evbarm:1.9 src/sys/arch/evbarm/conf/README.evbarm:1.10
--- src/sys/arch/evbarm/conf/README.evbarm:1.9	Mon Mar  9 22:05:06 2015
+++ src/sys/arch/evbarm/conf/README.evbarm	Sun Mar 29 21:11:17 2015
@@ -1,14 +1,18 @@
-$NetBSD: README.evbarm,v 1.9 2015/03/09 22:05:06 skrll Exp $
+$NetBSD: README.evbarm,v 1.10 2015/03/29 21:11:17 jmcneill Exp $
 
 config		date		boards
 ---
 ADI_BRH		2003/01/25	ADI Eng. Big Read Head i80200 eval board
+ALLWINNER_A80	2014/12/05	Cubietech Cubieboard 4
 ARMADILLO210	2006/02/06	Atmark Techno Armadillo-210
 ARMADILLO9	2005/11/13	Atmark Techno Armadillo-9
 BCM5301X	2012/08/31	Broadcom BCM95301X evaluation/reference board
 BEAGLEBOARD	2008/10/22	TI OMAP3530 BeagleBoard
 BEAGLEBOARDXM	2008/08/20	TI DM37xx BeagleBoard-XM
 BEAGLEBONE	2012/08/20	TI AM335x BeagleBone
+BPI		2014/09/07	Banana Pi
+CUBIEBOARD	2013/09/03	Cubietech Cubieboard 1  2
+CUBIETRUCK	2014/04/11	Cubietech Cubietruck
 CP3100		2006/11/08	Certance IOP321 CP-3100
 DEVKIT8000	2010/09/08	Embest OMAP3530 DevKit8000 eval Kit 
 DNS323		2010/10/02	D-Link DNS-323 Marvell SoC based NAS
@@ -16,6 +20,7 @@ GEMINI		2008/10/24	Cortina Systems SL351
 GUMSTIX		2006/10/16	Gumstix Inc. PXA255/270 based boards
 HDL_G		2006/04/16	I-O DATA HDL-G Giga LANDISK
 HPT5325		2012/03/31	HP t5325 Thin Client
+HUMMINGBIRD_A31	2014/10/10	Merrii Hummingbird A31
 IGEPV2		2010/06/16	IGEPv2 OMAP3530 eval board
 IMX31LITE	2008/04/27	Freescale i.M31 DEV LITE KIT
 INTEGRATOR	2001/10/27	ARM Integrator board
@@ -24,6 +29,7 @@ IQ80310		2001/09/05	Intel IQ80310 eval b
 IQ80321		2002/03/27	Intel IQ321 eval board
 IXDP425		2003/04/08	Intel IXDP425/IXCDP1100 development platform
 IXM1200		2002/07/15	Intel IMX1200 eval board
+JETSONTK1	2015/05/29	NVIDIA Jetson TK1 development kit
 KOBO		2014/07/25	Kobo touch (eReaders)
 KUROBOX_PRO	2010/10/02	Kuroutoshikou KURO-BOX/PRO
 LUBBOCK		2003/06/18	Intel Lubbock DBPXA250 board
@@ -36,12 +42,14 @@ N900		2012/12/07	Nokia N900 smartphone
 NAPPI		2002/07/15	Netwise APlication Platform Board
 NETWALKER	2010/11/13	Sharp NetWalker
 NSLU2		2006/02/28	Linksys NSLU2 (a.k.a. Slug)
+ODROID-C1	2015/02/07	Hardkernel ODROID-C1
 OPENBLOCKS_A6	2012/08/01	Plat'Home. OpenBlockS A6
 OPENBLOCKS_AX3	2013/09/30	Plat'Home. OpenBlockS AX3
 OPENRD		2012/08/10	open-rd.org Marvell Orion board
 OSK5912		2007/01/06	TI OMAP 5912 OSK board
 OVERO		2010/07/10	Gumstix Inc. Overo COMS boards
 PANDABOARD	2012/08/20	TI OMAP4430 PandaBoard
+ROCKCHIP	2014/12/26	Radxa Rock/Lite/Pro, MINIX NEO X7, Rayeager PX2
 SHEEVAPLUG	2010/10/02	Marvell SheevaPlug
 SMDK2410	2003/07/31	Samsung SMDK2410 S3C2410 eval board
 SMDK2800	2002/11/20	Samsung SMDK2800 S3C2800 eval board



CVS commit: src/sys/arch/arm/arm32

2015-03-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Mar 29 22:26:18 UTC 2015

Added Files:
src/sys/arch/arm/arm32: armv7_generic_space.c

Log Message:
Shared armv7 bus space implementation.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/arm32/armv7_generic_space.c

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/arm/arm32/armv7_generic_space.c
diff -u /dev/null src/sys/arch/arm/arm32/armv7_generic_space.c:1.1
--- /dev/null	Sun Mar 29 22:26:18 2015
+++ src/sys/arch/arm/arm32/armv7_generic_space.c	Sun Mar 29 22:26:18 2015
@@ -0,0 +1,416 @@
+/*	$NetBSD: armv7_generic_space.c,v 1.1 2015/03/29 22:26:18 jmcneill Exp $	*/
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nick Hudson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: armv7_generic_space.c,v 1.1 2015/03/29 22:26:18 jmcneill Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+
+#include uvm/uvm_extern.h
+
+#include sys/bus.h
+
+/* Prototypes for all the bus_space structure functions */
+bs_protos(armv7_generic);
+bs_protos(armv7_generic_a4x);
+bs_protos(a4x);
+bs_protos(bs_notimpl);
+bs_protos(generic);
+bs_protos(generic_armv4);
+
+#if __ARMEB__
+#define NSWAP(n)	n ## _swap
+#else
+#define NSWAP(n)	n
+#endif
+
+struct bus_space armv7_generic_bs_tag = {
+	/* cookie */
+	(void *) 0,
+
+	/* mapping/unmapping */
+	armv7_generic_bs_map,
+	armv7_generic_bs_unmap,
+	armv7_generic_bs_subregion,
+
+	/* allocation/deallocation */
+	armv7_generic_bs_alloc,	/* not implemented */
+	armv7_generic_bs_free,	/* not implemented */
+
+	/* get kernel virtual address */
+	armv7_generic_bs_vaddr,
+
+	/* mmap */
+	armv7_generic_bs_mmap,
+
+	/* barrier */
+	armv7_generic_bs_barrier,
+
+	/* read (single) */
+	generic_bs_r_1,
+	NSWAP(generic_armv4_bs_r_2),
+	NSWAP(generic_bs_r_4),
+	bs_notimpl_bs_r_8,
+
+	/* read multiple */
+	generic_bs_rm_1,
+	NSWAP(generic_armv4_bs_rm_2),
+	NSWAP(generic_bs_rm_4),
+	bs_notimpl_bs_rm_8,
+
+	/* read region */
+	generic_bs_rr_1,
+	NSWAP(generic_armv4_bs_rr_2),
+	NSWAP(generic_bs_rr_4),
+	bs_notimpl_bs_rr_8,
+
+	/* write (single) */
+	generic_bs_w_1,
+	NSWAP(generic_armv4_bs_w_2),
+	NSWAP(generic_bs_w_4),
+	bs_notimpl_bs_w_8,
+
+	/* write multiple */
+	generic_bs_wm_1,
+	NSWAP(generic_armv4_bs_wm_2),
+	NSWAP(generic_bs_wm_4),
+	bs_notimpl_bs_wm_8,
+
+	/* write region */
+	generic_bs_wr_1,
+	NSWAP(generic_armv4_bs_wr_2),
+	NSWAP(generic_bs_wr_4),
+	bs_notimpl_bs_wr_8,
+
+	/* set multiple */
+	bs_notimpl_bs_sm_1,
+	bs_notimpl_bs_sm_2,
+	bs_notimpl_bs_sm_4,
+	bs_notimpl_bs_sm_8,
+
+	/* set region */
+	generic_bs_sr_1,
+	NSWAP(generic_armv4_bs_sr_2),
+	bs_notimpl_bs_sr_4,
+	bs_notimpl_bs_sr_8,
+
+	/* copy */
+	bs_notimpl_bs_c_1,
+	generic_armv4_bs_c_2,
+	bs_notimpl_bs_c_4,
+	bs_notimpl_bs_c_8,
+
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+	/* read (single) */
+	generic_bs_r_1,
+	NSWAP(generic_armv4_bs_r_2),
+	NSWAP(generic_bs_r_4),
+	bs_notimpl_bs_r_8,
+
+	/* read multiple */
+	generic_bs_rm_1,
+	NSWAP(generic_armv4_bs_rm_2),
+	NSWAP(generic_bs_rm_4),
+	bs_notimpl_bs_rm_8,
+
+	/* read region */
+	generic_bs_rr_1,
+	NSWAP(generic_armv4_bs_rr_2),
+	NSWAP(generic_bs_rr_4),
+	bs_notimpl_bs_rr_8,
+
+	/* write (single) */
+	generic_bs_w_1,
+	NSWAP(generic_armv4_bs_w_2),
+	NSWAP(generic_bs_w_4),
+	bs_notimpl_bs_w_8,
+
+	/* write multiple */
+	generic_bs_wm_1,
+	NSWAP(generic_armv4_bs_wm_2),
+	NSWAP(generic_bs_wm_4),
+	bs_notimpl_bs_wm_8,
+
+	/* write region */
+	

CVS commit: src/sys/arch

2015-03-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Mar 29 22:27:04 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: files.tegra tegra_io.c tegra_mc.c tegra_pmc.c
tegra_soc.c tegra_var.h
src/sys/arch/evbarm/tegra: tegra_machdep.c
Removed Files:
src/sys/arch/arm/nvidia: tegra_space.c

Log Message:
Use shared armv7_generic_space


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/files.tegra \
src/sys/arch/arm/nvidia/tegra_io.c src/sys/arch/arm/nvidia/tegra_mc.c \
src/sys/arch/arm/nvidia/tegra_pmc.c src/sys/arch/arm/nvidia/tegra_soc.c \
src/sys/arch/arm/nvidia/tegra_var.h
cvs rdiff -u -r1.1 -r0 src/sys/arch/arm/nvidia/tegra_space.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/tegra/tegra_machdep.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/nvidia/files.tegra
diff -u src/sys/arch/arm/nvidia/files.tegra:1.1 src/sys/arch/arm/nvidia/files.tegra:1.2
--- src/sys/arch/arm/nvidia/files.tegra:1.1	Sun Mar 29 10:41:59 2015
+++ src/sys/arch/arm/nvidia/files.tegra	Sun Mar 29 22:27:04 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.tegra,v 1.1 2015/03/29 10:41:59 jmcneill Exp $
+#	$NetBSD: files.tegra,v 1.2 2015/03/29 22:27:04 jmcneill Exp $
 #
 # Configuration info for NVIDIA Tegra ARM Peripherals
 #
@@ -10,10 +10,10 @@ file	arch/arm/arm32/arm32_boot.c
 file	arch/arm/arm32/arm32_kvminit.c
 file	arch/arm/arm32/arm32_reboot.c
 file	arch/arm/arm32/irq_dispatch.S
+file	arch/arm/arm32/armv7_generic_space.c
+file	arch/arm/arm/bus_space_a4x.S
 
 file	arch/arm/nvidia/tegra_soc.c
-file	arch/arm/nvidia/tegra_space.c
-file	arch/arm/arm/bus_space_a4x.S
 file	arch/arm/nvidia/soc_tegra124.c		soc_tegra124
 
 # On-board I/O
Index: src/sys/arch/arm/nvidia/tegra_io.c
diff -u src/sys/arch/arm/nvidia/tegra_io.c:1.1 src/sys/arch/arm/nvidia/tegra_io.c:1.2
--- src/sys/arch/arm/nvidia/tegra_io.c:1.1	Sun Mar 29 10:41:59 2015
+++ src/sys/arch/arm/nvidia/tegra_io.c	Sun Mar 29 22:27:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_io.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */
+/* $NetBSD: tegra_io.c,v 1.2 2015/03/29 22:27:04 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_tegra.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_io.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_io.c,v 1.2 2015/03/29 22:27:04 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -127,8 +127,8 @@ tegraio_scan(device_t self, bus_space_ha
 	for (const struct tegra_locators *loc = locators; loc  eloc; loc++) {
 		struct tegraio_attach_args tio = {
 			.tio_loc = *loc,
-			.tio_bst = tegra_bs_tag,
-			.tio_a4x_bst = tegra_a4x_bs_tag,
+			.tio_bst = armv7_generic_bs_tag,
+			.tio_a4x_bst = armv7_generic_a4x_bs_tag,
 			.tio_bsh = bsh,
 			.tio_dmat = tegra_dma_tag,
 		};
Index: src/sys/arch/arm/nvidia/tegra_mc.c
diff -u src/sys/arch/arm/nvidia/tegra_mc.c:1.1 src/sys/arch/arm/nvidia/tegra_mc.c:1.2
--- src/sys/arch/arm/nvidia/tegra_mc.c:1.1	Sun Mar 29 10:41:59 2015
+++ src/sys/arch/arm/nvidia/tegra_mc.c	Sun Mar 29 22:27:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_mc.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */
+/* $NetBSD: tegra_mc.c,v 1.2 2015/03/29 22:27:04 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_mc.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_mc.c,v 1.2 2015/03/29 22:27:04 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -91,7 +91,7 @@ tegra_mc_memsize(void)
 		bst = mc_softc-sc_bst;
 		bsh = mc_softc-sc_bsh;
 	} else {
-		bst = tegra_bs_tag;
+		bst = armv7_generic_bs_tag;
 		bus_space_subregion(bst, tegra_apb_bsh,
 		TEGRA_MC_OFFSET, TEGRA_MC_SIZE, bsh);
 	}
Index: src/sys/arch/arm/nvidia/tegra_pmc.c
diff -u src/sys/arch/arm/nvidia/tegra_pmc.c:1.1 src/sys/arch/arm/nvidia/tegra_pmc.c:1.2
--- src/sys/arch/arm/nvidia/tegra_pmc.c:1.1	Sun Mar 29 10:41:59 2015
+++ src/sys/arch/arm/nvidia/tegra_pmc.c	Sun Mar 29 22:27:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmc.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */
+/* $NetBSD: tegra_pmc.c,v 1.2 2015/03/29 22:27:04 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_pmc.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_pmc.c,v 1.2 2015/03/29 22:27:04 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -92,7 +92,7 @@ tegra_pmc_reset(void)
 		bst = pmc_softc-sc_bst;
 		bsh = pmc_softc-sc_bsh;
 	} else {
-		bst = tegra_bs_tag;
+		bst = armv7_generic_bs_tag;
 		bus_space_subregion(bst, tegra_apb_bsh,
 		TEGRA_PMC_OFFSET, TEGRA_PMC_SIZE, bsh);
 	}
Index: 

CVS commit: src/sys/arch

2015-03-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Mar 29 22:49:44 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic: amlogic_board.c amlogic_cpufreq.c
amlogic_io.c amlogic_var.h files.amlogic
src/sys/arch/evbarm/amlogic: amlogic_machdep.c
Removed Files:
src/sys/arch/arm/amlogic: amlogic_space.c

Log Message:
Use shared armv7_generic_space


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/amlogic/amlogic_board.c \
src/sys/arch/arm/amlogic/files.amlogic
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/amlogic/amlogic_cpufreq.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/amlogic/amlogic_io.c \
src/sys/arch/arm/amlogic/amlogic_var.h
cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/amlogic/amlogic_space.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbarm/amlogic/amlogic_machdep.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/amlogic/amlogic_board.c
diff -u src/sys/arch/arm/amlogic/amlogic_board.c:1.9 src/sys/arch/arm/amlogic/amlogic_board.c:1.10
--- src/sys/arch/arm/amlogic/amlogic_board.c:1.9	Sun Mar  8 12:44:55 2015
+++ src/sys/arch/arm/amlogic/amlogic_board.c	Sun Mar 29 22:49:44 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_board.c,v 1.9 2015/03/08 12:44:55 jmcneill Exp $ */
+/* $NetBSD: amlogic_board.c,v 1.10 2015/03/29 22:49:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_amlogic.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amlogic_board.c,v 1.9 2015/03/08 12:44:55 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: amlogic_board.c,v 1.10 2015/03/29 22:49:44 jmcneill Exp $);
 
 #define	_ARM32_BUS_DMA_PRIVATE
 #include sys/param.h
@@ -55,14 +55,14 @@ struct arm32_bus_dma_tag amlogic_dma_tag
 };
 
 #define CBUS_READ(x)		\
-	bus_space_read_4(amlogic_bs_tag, amlogic_core_bsh, \
+	bus_space_read_4(armv7_generic_bs_tag, amlogic_core_bsh, \
 			 AMLOGIC_CBUS_OFFSET + (x))
 #define CBUS_WRITE(x, v)	\
-	bus_space_write_4(amlogic_bs_tag, amlogic_core_bsh, \
+	bus_space_write_4(armv7_generic_bs_tag, amlogic_core_bsh, \
 			  AMLOGIC_CBUS_OFFSET + (x), (v))
 
 #define CBUS_SET_CLEAR(x, s, c)	\
-	amlogic_reg_set_clear(amlogic_bs_tag, amlogic_core_bsh, \
+	amlogic_reg_set_clear(armv7_generic_bs_tag, amlogic_core_bsh, \
 			  AMLOGIC_CBUS_OFFSET + (x), (s), (c))
 
 void
@@ -70,7 +70,7 @@ amlogic_bootstrap(void)
 {
 	int error;
 
-	error = bus_space_map(amlogic_bs_tag, AMLOGIC_CORE_BASE,
+	error = bus_space_map(armv7_generic_bs_tag, AMLOGIC_CORE_BASE,
 	AMLOGIC_CORE_SIZE, 0, amlogic_core_bsh);
 	if (error)
 		panic(%s: failed to map CORE registers: %d, __func__, error);
@@ -260,7 +260,7 @@ amlogic_usbphy_clkgate_enable(int port)
 void
 amlogic_usbphy_init(int port)
 {
-	bus_space_tag_t bst = amlogic_bs_tag;
+	bus_space_tag_t bst = armv7_generic_bs_tag;
 	bus_space_handle_t bsh = amlogic_core_bsh;
 	bus_size_t ctrl_reg, cfg_reg, adp_bc_reg, gpioao_reg;
 	uint32_t ctrl, cfg, adp_bc, gpioao;
Index: src/sys/arch/arm/amlogic/files.amlogic
diff -u src/sys/arch/arm/amlogic/files.amlogic:1.9 src/sys/arch/arm/amlogic/files.amlogic:1.10
--- src/sys/arch/arm/amlogic/files.amlogic:1.9	Sun Mar 22 17:28:22 2015
+++ src/sys/arch/arm/amlogic/files.amlogic	Sun Mar 29 22:49:44 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amlogic,v 1.9 2015/03/22 17:28:22 jmcneill Exp $
+#	$NetBSD: files.amlogic,v 1.10 2015/03/29 22:49:44 jmcneill Exp $
 #
 # Configuration info for Amlogic ARM Peripherals
 #
@@ -10,11 +10,11 @@ file	arch/arm/arm32/arm32_boot.c
 file	arch/arm/arm32/arm32_kvminit.c
 file	arch/arm/arm32/arm32_reboot.c
 file	arch/arm/arm32/irq_dispatch.S
+file	arch/arm/arm32/armv7_generic_space.c
+file	arch/arm/arm/bus_space_a4x.S
 
 file	arch/arm/amlogic/amlogic_board.c
 file	arch/arm/amlogic/amlogic_cpufreq.c
-file	arch/arm/amlogic/amlogic_space.c
-file	arch/arm/arm/bus_space_a4x.S
 
 # On-board I/O
 device	amlogicio { [port=-1] } : bus_space_generic

Index: src/sys/arch/arm/amlogic/amlogic_cpufreq.c
diff -u src/sys/arch/arm/amlogic/amlogic_cpufreq.c:1.2 src/sys/arch/arm/amlogic/amlogic_cpufreq.c:1.3
--- src/sys/arch/arm/amlogic/amlogic_cpufreq.c:1.2	Tue Mar 17 22:29:40 2015
+++ src/sys/arch/arm/amlogic/amlogic_cpufreq.c	Sun Mar 29 22:49:44 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_cpufreq.c,v 1.2 2015/03/17 22:29:40 jmcneill Exp $ */
+/* $NetBSD: amlogic_cpufreq.c,v 1.3 2015/03/29 22:49:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -31,7 +31,7 @@
 #include opt_amlogic.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amlogic_cpufreq.c,v 1.2 2015/03/17 22:29:40 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: amlogic_cpufreq.c,v 1.3 2015/03/29 22:49:44 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -68,10 +68,10 @@ static u_int	meson8b_cpu_get_rate(void);
 static size_t	meson8b_cpu_get_available(u_int *, size_t);
 
 #define 

CVS commit: src/sys/arch/arm/rockchip

2015-03-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Mar 29 22:56:44 UTC 2015

Removed Files:
src/sys/arch/arm/rockchip: rockchip_space.c

Log Message:
Use shared armv7_generic_space


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/rockchip/rockchip_space.c

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2015-03-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Mar 29 23:35:08 UTC 2015

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: aes.inc

Log Message:
No need to use -fno-integrated-assembler with clang


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc

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/openssl/lib/libcrypto/arch/arm/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc:1.3	Fri Mar 20 08:32:27 2015
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc	Sun Mar 29 23:35:08 2015
@@ -1,7 +1,4 @@
 .PATH.S: ${.PARSEDIR}
 AES_SRCS = aes-armv4.S aesv8-armx.S bsaes-armv7.S aes_cbc.c
 AESCPPFLAGS = -DAES_ASM -DBSAES_ASM
-.if ${ACTIVE_CC} == clang
-AFLAGS.aes-armv4.S= -fno-integrated-as
-.endif
 .include ../../aes.inc