CVS commit: src/tools/compat

2012-12-09 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Dec  9 15:22:54 UTC 2012

Modified Files:
src/tools/compat: Makefile

Log Message:
Use a find | while read loop to install all *.h files anywhere
under ${.OBJDIR}/include, and remove the previous hack of touching a
dummy file in each subdirectory.  This should fix a problem on some
platforms where include files directly under ${.OBJDIR}/include (not in
a subdirectory) were not installed.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/tools/compat/Makefile

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

Modified files:

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.61 src/tools/compat/Makefile:1.62
--- src/tools/compat/Makefile:1.61	Sun Dec  2 12:34:51 2012
+++ src/tools/compat/Makefile	Sun Dec  9 15:22:54 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.61 2012/12/02 12:34:51 apb Exp $
+#	$NetBSD: Makefile,v 1.62 2012/12/09 15:22:54 apb Exp $
 
 HOSTLIB=	nbcompat
 
@@ -106,12 +106,12 @@ install.includes: .PHONY
 	${_MKMSG_INSTALL} ${HOST_INCSDIR}/*
 	${HOST_INSTALL_DIR} ${HOST_INCSDIR}
 	${HOST_INSTALL_DIR} ${HOST_INCSDIR}/compat
-	${HOST_INSTALL_FILE} ${INCFILES} ${HOST_INCSDIR}/compat/
 .for _d in ${INCSUBDIRS}
 	${HOST_INSTALL_DIR} ${HOST_INCSDIR}/compat/${_d}
-	touch include/${_d}/dummy # ensure dir is not empty
-	${HOST_INSTALL_FILE} include/${_d}/* ${HOST_INCSDIR}/compat/${_d}/
 .endfor
+	(cd include  find . -name '*.h' -print | while read f ; do \
+	${HOST_INSTALL_FILE} $$f ${HOST_INCSDIR}/compat/$$f ; \
+	 done)
 
 # Install defs.mk in ${TOOLDIR}/share/compat
 install.defs.mk: .PHONY ${HOST_SHAREDIR}/compat/defs.mk



CVS commit: src/tools/compat

2012-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 18:08:08 UTC 2012

Modified Files:
src/tools/compat: Makefile

Log Message:
Include bsd.own.mk to give a chance to ${TOOLDIR} to be defined before
using it in rules. Before there was another .mk file included before ${TOOLDIR}
was used.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/tools/compat/Makefile

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

Modified files:

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.62 src/tools/compat/Makefile:1.63
--- src/tools/compat/Makefile:1.62	Sun Dec  9 10:22:54 2012
+++ src/tools/compat/Makefile	Sun Dec  9 13:08:08 2012
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.62 2012/12/09 15:22:54 apb Exp $
+#	$NetBSD: Makefile,v 1.63 2012/12/09 18:08:08 christos Exp $
+
+.include bsd.own.mk
 
 HOSTLIB=	nbcompat
 



CVS commit: src/tools/compat

2012-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 19:15:49 UTC 2012

Modified Files:
src/tools/compat: Makefile

Log Message:
make this work


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/tools/compat/Makefile

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

Modified files:

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.63 src/tools/compat/Makefile:1.64
--- src/tools/compat/Makefile:1.63	Sun Dec  9 13:08:08 2012
+++ src/tools/compat/Makefile	Sun Dec  9 14:15:48 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.63 2012/12/09 18:08:08 christos Exp $
+#	$NetBSD: Makefile,v 1.64 2012/12/09 19:15:48 christos Exp $
 
 .include bsd.own.mk
 
@@ -94,7 +94,7 @@ HOST_LIBDIR=	${TOOLDIR}/lib
 HOST_INCSDIR=	${TOOLDIR}/include
 HOST_SHAREDIR= ${TOOLDIR}/share
 
-install:	.PHONY install.lib install.includes install.defs.mk
+install:	.PHONY install.lib includes install.defs.mk
 
 # Install lib${HOSTLIB}.a in ${TOOLDIR}/lib
 install.lib: .PHONY ${HOST_LIBDIR}/lib${HOSTLIB}.a
@@ -103,17 +103,22 @@ ${HOST_LIBDIR}/lib${HOSTLIB}.a: lib${HOS
 	${HOST_INSTALL_DIR} ${HOST_LIBDIR}
 	${HOST_INSTALL_FILE} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
 
-# Install include files in ${TOOLDIR}/include/compat
-install.includes: .PHONY
-	${_MKMSG_INSTALL} ${HOST_INCSDIR}/*
-	${HOST_INSTALL_DIR} ${HOST_INCSDIR}
-	${HOST_INSTALL_DIR} ${HOST_INCSDIR}/compat
+.for _f in ${INCFILES}
+HOST_INCINSTFILES+= ${HOST_INCSDIR}/compat/${_f}
+${HOST_INCSDIR}/compat/${_f}: ${_f}
+	${_MKTARGET_INSTALL}
+	${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
+.endfor
+
 .for _d in ${INCSUBDIRS}
-	${HOST_INSTALL_DIR} ${HOST_INCSDIR}/compat/${_d}
+HOST_INCINSTDIRS+= ${HOST_INCSDIR}/compat/${_d}
+${HOST_INCSDIR}/compat/${_d}:
+	${_MKTARGET_INSTALL}
+	${HOST_INSTALL_DIR} ${.TARGET}
 .endfor
-	(cd include  find . -name '*.h' -print | while read f ; do \
-	${HOST_INSTALL_FILE} $$f ${HOST_INCSDIR}/compat/$$f ; \
-	 done)
+
+# Install include files in ${TOOLDIR}/include/compat
+includes: .PHONY ${HOST_INCINSTDIRS} .WAIT ${HOST_INCINSTFILES}
 
 # Install defs.mk in ${TOOLDIR}/share/compat
 install.defs.mk: .PHONY ${HOST_SHAREDIR}/compat/defs.mk



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

2012-12-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Dec  9 20:43:54 UTC 2012

Modified Files:
src/sys/arch/x86/include: pci_machdep_common.h

Log Message:
Remove trailing whitespace on blank lines.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x86/include/pci_machdep_common.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/x86/include/pci_machdep_common.h
diff -u src/sys/arch/x86/include/pci_machdep_common.h:1.9 src/sys/arch/x86/include/pci_machdep_common.h:1.10
--- src/sys/arch/x86/include/pci_machdep_common.h:1.9	Fri Jun 15 13:58:34 2012
+++ src/sys/arch/x86/include/pci_machdep_common.h	Sun Dec  9 20:43:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep_common.h,v 1.9 2012/06/15 13:58:34 yamt Exp $	*/
+/*	$NetBSD: pci_machdep_common.h,v 1.10 2012/12/09 20:43:54 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -139,11 +139,11 @@ int		pchb_get_bus_number(pci_chipset_tag
 void pci_device_foreach(pci_chipset_tag_t, int,
 			void (*)(pci_chipset_tag_t, pcitag_t, void*),
 			void *);
-
+
 void pci_device_foreach_min(pci_chipset_tag_t, int, int,
 			void (*)(pci_chipset_tag_t, pcitag_t, void*),
 			void *);
-
+
 void pci_bridge_foreach(pci_chipset_tag_t, int, int,
 	void (*) (pci_chipset_tag_t, pcitag_t, void *), void *);
 



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

2012-12-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Dec  9 21:30:02 UTC 2012

Modified Files:
src/sys/arch/x86/include: pci_machdep_common.h

Log Message:
Reflect that this file is now for the x86 ports and not just i386 in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/include/pci_machdep_common.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/x86/include/pci_machdep_common.h
diff -u src/sys/arch/x86/include/pci_machdep_common.h:1.10 src/sys/arch/x86/include/pci_machdep_common.h:1.11
--- src/sys/arch/x86/include/pci_machdep_common.h:1.10	Sun Dec  9 20:43:54 2012
+++ src/sys/arch/x86/include/pci_machdep_common.h	Sun Dec  9 21:30:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep_common.h,v 1.10 2012/12/09 20:43:54 jakllsch Exp $	*/
+/*	$NetBSD: pci_machdep_common.h,v 1.11 2012/12/09 21:30:02 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -42,7 +42,7 @@
 #endif
 
 /*
- * i386-specific PCI structure and type definitions.
+ * x86-specific PCI structure and type definitions.
  * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
  *
  * Configuration tag; created from a {bus,device,function} triplet by
@@ -90,7 +90,7 @@ struct pci_chipset_tag {
 };
 
 /*
- * i386-specific PCI variables and functions.
+ * x86-specific PCI variables and functions.
  * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
  */
 int		pci_bus_flags(void);



CVS commit: src/tools/compat

2012-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 21:48:04 UTC 2012

Modified Files:
src/tools/compat: Makefile

Log Message:
handle the list of files and directories generated dynamically by configure


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/tools/compat/Makefile

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

Modified files:

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.64 src/tools/compat/Makefile:1.65
--- src/tools/compat/Makefile:1.64	Sun Dec  9 14:15:48 2012
+++ src/tools/compat/Makefile	Sun Dec  9 16:48:04 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.64 2012/12/09 19:15:48 christos Exp $
+#	$NetBSD: Makefile,v 1.65 2012/12/09 21:48:04 christos Exp $
 
 .include bsd.own.mk
 
@@ -76,7 +76,11 @@ defs.mk: config.cache
 	@touch ${.TARGET}
 
 INCFILES=	nbtool_config.h
-INCSUBDIRS=	sys machine rpc arpa
+# Generate the list of include files generated by configure the ./ is so that
+# the list is not empty.
+_INCCONFFILES!=	cd include  find . -name '*.h'  echo ./
+INCCONFFILES=	${_INCCONFFILES:S@./@@}
+INCSUBDIRS=	${INCCONFFILES:H:O:u:N.}
 CLEANDIRFILES+= ${INCFILES}
 
 # CLEANDIRFILES may not contain directory names
@@ -92,7 +96,7 @@ include/.stamp:
 
 HOST_LIBDIR=	${TOOLDIR}/lib
 HOST_INCSDIR=	${TOOLDIR}/include
-HOST_SHAREDIR= ${TOOLDIR}/share
+HOST_SHAREDIR=	${TOOLDIR}/share
 
 install:	.PHONY install.lib includes install.defs.mk
 
@@ -110,6 +114,13 @@ ${HOST_INCSDIR}/compat/${_f}: ${_f}
 	${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
 .endfor
 
+.for _f in ${INCCONFFILES}
+HOST_INCINSTFILES+= ${HOST_INCSDIR}/compat/${_f}
+${HOST_INCSDIR}/compat/${_f}: include/${_f}
+	${_MKTARGET_INSTALL}
+	${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
+.endfor
+
 .for _d in ${INCSUBDIRS}
 HOST_INCINSTDIRS+= ${HOST_INCSDIR}/compat/${_d}
 ${HOST_INCSDIR}/compat/${_d}:



CVS commit: src

2012-12-09 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sun Dec  9 22:06:21 UTC 2012

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64
src/etc/mtree: NetBSD.dist.mips64eb NetBSD.dist.mips64el
NetBSD.dist.sparc64 NetBSD.dist.x86_64
src/lib/npf/ext_log: Makefile
src/lib/npf/ext_normalise: Makefile

Log Message:
Make the compat libs of npf extension shared libraries go to the
compat directories instead of overwriting the arch native libs.
Also, make sure the compat directories get created. Tested on amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/distrib/sets/lists/base/ad.mips64eb \
src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.180 -r1.181 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.169 -r1.170 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.3 -r1.4 src/etc/mtree/NetBSD.dist.mips64eb \
src/etc/mtree/NetBSD.dist.sparc64 src/etc/mtree/NetBSD.dist.x86_64
cvs rdiff -u -r1.4 -r1.5 src/etc/mtree/NetBSD.dist.mips64el
cvs rdiff -u -r1.1 -r1.2 src/lib/npf/ext_log/Makefile
cvs rdiff -u -r1.1 -r1.2 src/lib/npf/ext_normalise/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/base/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.104 src/distrib/sets/lists/base/ad.mips64eb:1.105
--- src/distrib/sets/lists/base/ad.mips64eb:1.104	Tue Dec  4 23:38:57 2012
+++ src/distrib/sets/lists/base/ad.mips64eb	Sun Dec  9 22:06:21 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.104 2012/12/04 23:38:57 spz Exp $
+# $NetBSD: ad.mips64eb,v 1.105 2012/12/09 22:06:21 spz Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -290,6 +290,13 @@
 ./usr/lib/64/lua/5.1base-compat-shlib	compat
 ./usr/lib/64/lua/5.1/gpio.so			base-compat-shlib	compat,pic
 ./usr/lib/64/lua/5.1/sqlite.so			base-compat-shlib	compat,pic
+./usr/lib/64/npfbase-npf-shlib		compat
+./usr/lib/64/npf/ext_log.so			base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_log.so.0			base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_log.so.0.0			base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_normalise.so		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_normalise.so.0		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_normalise.so.0.0		base-npf-shlib		compat,pic
 ./usr/lib/64/securitybase-compat-shlib
 ./usr/lib/64/security/pam_afslog.so.3		base-compat-shlib	compat,pic,kerberos,pam
 ./usr/lib/64/security/pam_chroot.so.3		base-compat-shlib	compat,pic,pam
@@ -596,6 +603,13 @@
 ./usr/lib/o32/lua/5.1base-compat-shlib	compat
 ./usr/lib/o32/lua/5.1/gpio.so			base-compat-shlib	compat,pic
 ./usr/lib/o32/lua/5.1/sqlite.so			base-compat-shlib	compat,pic
+./usr/lib/o32/npfbase-npf-shlib		compat
+./usr/lib/o32/npf/ext_log.so			base-npf-shlib		compat,pic
+./usr/lib/o32/npf/ext_log.so.0			base-npf-shlib		compat,pic
+./usr/lib/o32/npf/ext_log.so.0.0		base-npf-shlib		compat,pic
+./usr/lib/o32/npf/ext_normalise.so		base-npf-shlib		compat,pic
+./usr/lib/o32/npf/ext_normalise.so.0		base-npf-shlib		compat,pic
+./usr/lib/o32/npf/ext_normalise.so.0.0		base-npf-shlib		compat,pic
 ./usr/lib/o32/securitybase-compat-shlib
 ./usr/lib/o32/security/pam_afslog.so.3		base-compat-shlib	compat,pic,kerberos,pam
 ./usr/lib/o32/security/pam_chroot.so.3		base-compat-shlib	compat,pic,pam
Index: src/distrib/sets/lists/base/ad.mips64el
diff -u src/distrib/sets/lists/base/ad.mips64el:1.104 src/distrib/sets/lists/base/ad.mips64el:1.105
--- src/distrib/sets/lists/base/ad.mips64el:1.104	Tue Dec  4 23:38:57 2012
+++ src/distrib/sets/lists/base/ad.mips64el	Sun Dec  9 22:06:21 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.104 2012/12/04 23:38:57 spz Exp $
+# $NetBSD: ad.mips64el,v 1.105 2012/12/09 22:06:21 spz Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -290,6 +290,13 @@
 ./usr/lib/64/lua/5.1base-compat-shlib	compat
 ./usr/lib/64/lua/5.1/gpio.so			base-compat-shlib	compat,pic
 ./usr/lib/64/lua/5.1/sqlite.so			base-compat-shlib	compat,pic
+./usr/lib/64/npfbase-npf-shlib		compat
+./usr/lib/64/npf/ext_log.so			base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_log.so.0			base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_log.so.0.0			base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_normalise.so		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_normalise.so.0		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_normalise.so.0.0		base-npf-shlib		compat,pic
 ./usr/lib/64/securitybase-compat-shlib
 ./usr/lib/64/security/pam_afslog.so.3		base-compat-shlib	compat,pic,kerberos,pam
 ./usr/lib/64/security/pam_chroot.so.3		base-compat-shlib	compat,pic,pam
@@ -596,6 +603,13 @@
 ./usr/lib/o32/lua/5.1base-compat-shlib	

CVS commit: src/share/examples/npf

2012-12-09 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Dec  9 22:12:26 UTC 2012

Modified Files:
src/share/examples/npf: host-npf.conf soho_gw-npf.conf

Log Message:
Fix syntax error in the example, fix one rule and G/C rid procedure.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/examples/npf/host-npf.conf \
src/share/examples/npf/soho_gw-npf.conf

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

Modified files:

Index: src/share/examples/npf/host-npf.conf
diff -u src/share/examples/npf/host-npf.conf:1.3 src/share/examples/npf/host-npf.conf:1.4
--- src/share/examples/npf/host-npf.conf:1.3	Tue Dec  4 18:48:32 2012
+++ src/share/examples/npf/host-npf.conf	Sun Dec  9 22:12:26 2012
@@ -1,4 +1,4 @@
-# $NetBSD: host-npf.conf,v 1.3 2012/12/04 18:48:32 spz Exp $
+# $NetBSD: host-npf.conf,v 1.4 2012/12/09 22:12:26 rmind Exp $
 #
 # this is an example of NPF rules for a host (i.e., not routing) with
 # two network interfaces, wired and wifi
@@ -6,6 +6,7 @@
 # it does both IPv4 and IPv6 and allows for DHCP in v4 and SLAAC in v6
 # it also does IPSEC on the wifi
 #
+
 $wired_if = wm0
 $wired_v4 = { inet4(wm0) }
 $wired_v6 = { inet6(wm0) }
@@ -30,10 +31,6 @@ procedure log {
  log: npflog0
 }
 
-procedure rid {
- normalise: random-id
-}
-
 group (name wired, interface $wired_if) {
 
 	# not being picky about our own address here
@@ -64,16 +61,16 @@ group (name wired, interface $wired_if
 
 	# only SYN packets need to generate state
 	pass stateful out final family inet6 proto tcp flags S/SA \
-		from $wired_v6 apply rid 
+		from $wired_v6
 	pass stateful out final family inet  proto tcp flags S/SA \
-		from $wired_v4 apply rid 
+		from $wired_v4
 	# pass the other tcp packets without generating extra state
-	pass out final family inet6 proto tcp from $wired_v6 apply rid 
-	pass out final family inet  proto tcp from $wired_v4 apply rid 
+	pass out final family inet6 proto tcp from $wired_v6
+	pass out final family inet  proto tcp from $wired_v4
 
 	# all other types of traffic, generate state per packet
-	pass stateful out final family inet6 from $wired_v6 apply rid 
-	pass stateful out final family inet  from $wired_v4 apply rid 
+	pass stateful out final family inet6 from $wired_v6
+	pass stateful out final family inet  from $wired_v4
 
 }
 
@@ -107,16 +104,16 @@ group (name wifi, interface $wifi_if) 
 
 	# only SYN packets need to generate state
 pass stateful out final family inet6 proto tcp flags S/SA \
-		from $wifi_v6 apply rid 
+		from $wifi_v6
 pass stateful out final family inet  proto tcp flags S/SA \
-		from $wifi_v4 apply rid 
+		from $wifi_v4
 	# pass the other tcp packets without generating extra state
-pass out final family inet6 proto tcp from $wifi_v6 apply rid 
-pass out final family inet  proto tcp from $wifi_v4 apply rid 
+pass out final family inet6 proto tcp from $wifi_v6
+pass out final family inet  proto tcp from $wifi_v4
 
 	# all other types of traffic, generate state per packet
-pass stateful out final family inet6 from $wifi_v6 apply rid 
-pass stateful out final family inet  from $wifi_v4 apply rid 
+pass stateful out final family inet6 from $wifi_v6
+pass stateful out final family inet  from $wifi_v4
 }
 
 group (default) {
Index: src/share/examples/npf/soho_gw-npf.conf
diff -u src/share/examples/npf/soho_gw-npf.conf:1.3 src/share/examples/npf/soho_gw-npf.conf:1.4
--- src/share/examples/npf/soho_gw-npf.conf:1.3	Tue Dec  4 18:48:32 2012
+++ src/share/examples/npf/soho_gw-npf.conf	Sun Dec  9 22:12:26 2012
@@ -1,10 +1,11 @@
-# $NetBSD: soho_gw-npf.conf,v 1.3 2012/12/04 18:48:32 spz Exp $
+# $NetBSD: soho_gw-npf.conf,v 1.4 2012/12/09 22:12:26 rmind Exp $
 #
 # SOHO border
 #
 # This is a natting border gateway/webserver/mailserver/nameserver
 # IPv4 only
 #
+
 $ext_if = wm0
 $ext_v4 = inet4(wm0)
 $ext_addrs = { ifnet(wm0) }
@@ -27,18 +28,14 @@ map $ext_if dynamic 198.51.100.0/24 - $
 
 # NAT traffic arriving on port 9022 of the external interface address
 # to host 198.51.100.2 port 22
-map $ext_if dynamic 198.51.100.2 port 22 - $ext_v4 9022
+map $ext_if dynamic 198.51.100.2 port 22 - $ext_v4 port 9022
 
 procedure log {
 	log: npflog0
 }
 
-procedure rid {
-	normalise: random-id
-}
-
 group (name external, interface $ext_if) {
-	pass stateful out final from $ext_addrs apply rid
+	pass stateful out final all
 
 	block in final from 1
 	pass stateful in final family inet proto tcp to $ext_v4 port ssh \
@@ -62,4 +59,3 @@ group (default) {
 	pass final on lo0 all
 	block all
 }
-



CVS commit: src/tools/compat

2012-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 23:18:30 UTC 2012

Modified Files:
src/tools/compat: Makefile

Log Message:
restore the find loop to include files generated by configure


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/tools/compat/Makefile

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

Modified files:

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.65 src/tools/compat/Makefile:1.66
--- src/tools/compat/Makefile:1.65	Sun Dec  9 16:48:04 2012
+++ src/tools/compat/Makefile	Sun Dec  9 18:18:30 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.65 2012/12/09 21:48:04 christos Exp $
+#	$NetBSD: Makefile,v 1.66 2012/12/09 23:18:30 christos Exp $
 
 .include bsd.own.mk
 
@@ -76,11 +76,7 @@ defs.mk: config.cache
 	@touch ${.TARGET}
 
 INCFILES=	nbtool_config.h
-# Generate the list of include files generated by configure the ./ is so that
-# the list is not empty.
-_INCCONFFILES!=	cd include  find . -name '*.h'  echo ./
-INCCONFFILES=	${_INCCONFFILES:S@./@@}
-INCSUBDIRS=	${INCCONFFILES:H:O:u:N.}
+INCSUBDIRS=	sys machine rpc arpa
 CLEANDIRFILES+= ${INCFILES}
 
 # CLEANDIRFILES may not contain directory names
@@ -96,7 +92,7 @@ include/.stamp:
 
 HOST_LIBDIR=	${TOOLDIR}/lib
 HOST_INCSDIR=	${TOOLDIR}/include
-HOST_SHAREDIR=	${TOOLDIR}/share
+HOST_SHAREDIR= ${TOOLDIR}/share
 
 install:	.PHONY install.lib includes install.defs.mk
 
@@ -114,13 +110,6 @@ ${HOST_INCSDIR}/compat/${_f}: ${_f}
 	${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
 .endfor
 
-.for _f in ${INCCONFFILES}
-HOST_INCINSTFILES+= ${HOST_INCSDIR}/compat/${_f}
-${HOST_INCSDIR}/compat/${_f}: include/${_f}
-	${_MKTARGET_INSTALL}
-	${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
-.endfor
-
 .for _d in ${INCSUBDIRS}
 HOST_INCINSTDIRS+= ${HOST_INCSDIR}/compat/${_d}
 ${HOST_INCSDIR}/compat/${_d}:
@@ -130,6 +119,10 @@ ${HOST_INCSDIR}/compat/${_d}:
 
 # Install include files in ${TOOLDIR}/include/compat
 includes: .PHONY ${HOST_INCINSTDIRS} .WAIT ${HOST_INCINSTFILES}
+	@(cd include  find . -name '*.h' -print | while read f ; do \
+	${HOST_INSTALL_FILE} $$f ${HOST_INCSDIR}/compat/$$f ; \
+	done)
+
 
 # Install defs.mk in ${TOOLDIR}/share/compat
 install.defs.mk: .PHONY ${HOST_SHAREDIR}/compat/defs.mk



CVS commit: src/tools/host-mkdep

2012-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 23:42:16 UTC 2012

Modified Files:
src/tools/host-mkdep: host-mkdep.in

Log Message:
ignore --sysroot=/


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/tools/host-mkdep/host-mkdep.in

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

Modified files:

Index: src/tools/host-mkdep/host-mkdep.in
diff -u src/tools/host-mkdep/host-mkdep.in:1.21 src/tools/host-mkdep/host-mkdep.in:1.22
--- src/tools/host-mkdep/host-mkdep.in:1.21	Sun Aug 26 18:37:19 2012
+++ src/tools/host-mkdep/host-mkdep.in	Sun Dec  9 18:42:16 2012
@@ -1,6 +1,6 @@
 #!@BSHELL@ -
 #
-#	$NetBSD: host-mkdep.in,v 1.21 2012/08/26 22:37:19 jmmv Exp $
+#	$NetBSD: host-mkdep.in,v 1.22 2012/12/09 23:42:16 christos Exp $
 #
 # Copyright (c) 1991, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -177,6 +177,8 @@ else
 shift
 cppargs=${cppargs%x}
 ;;
+		--sysroot*)
+;;
 
 		-*)		
 echo $0: Unknown option: $1 12 # all other -options



CVS commit: src/tools/host-mkdep

2012-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 23:53:39 UTC 2012

Modified Files:
src/tools/host-mkdep: host-mkdep.in

Log Message:
forgetting to shift turns this into a cpu burner.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tools/host-mkdep/host-mkdep.in

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

Modified files:

Index: src/tools/host-mkdep/host-mkdep.in
diff -u src/tools/host-mkdep/host-mkdep.in:1.22 src/tools/host-mkdep/host-mkdep.in:1.23
--- src/tools/host-mkdep/host-mkdep.in:1.22	Sun Dec  9 18:42:16 2012
+++ src/tools/host-mkdep/host-mkdep.in	Sun Dec  9 18:53:39 2012
@@ -1,6 +1,6 @@
 #!@BSHELL@ -
 #
-#	$NetBSD: host-mkdep.in,v 1.22 2012/12/09 23:42:16 christos Exp $
+#	$NetBSD: host-mkdep.in,v 1.23 2012/12/09 23:53:39 christos Exp $
 #
 # Copyright (c) 1991, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -178,6 +178,7 @@ else
 cppargs=${cppargs%x}
 ;;
 		--sysroot*)
+shift
 ;;
 
 		-*)		



CVS commit: src

2012-12-09 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Mon Dec 10 00:32:25 UTC 2012

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/comp: shl.mi
src/distrib/sets/lists/modules: md.evbppc mi
src/lib/npf: Makefile
src/sys/modules: Makefile
src/sys/net/npf: files.npf
Added Files:
src/lib/npf/ext_rndblock: Makefile npfext_rndblock.c shlib_version
src/sys/modules/npf_ext_rndblock: Makefile
src/sys/net/npf: npf_ext_rndblock.c

Log Message:
Add NPF rndblock extension to randomly drop packets (using a random function
with a percentage or modulo operation).  This is a demo module, although it can
be used for packet loss simulation.  Example of a procedure in npf.conf:

procedure somedrop {
# Drop 1.9% of the traffic
rndblock: percentage 1.9
}


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/distrib/sets/lists/base/ad.mips64eb \
src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.181 -r1.182 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.170 -r1.171 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.642 -r1.643 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.240 -r1.241 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.28 -r1.29 src/distrib/sets/lists/modules/md.evbppc
cvs rdiff -u -r1.48 -r1.49 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.1 -r1.2 src/lib/npf/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/npf/ext_rndblock/Makefile \
src/lib/npf/ext_rndblock/npfext_rndblock.c \
src/lib/npf/ext_rndblock/shlib_version
cvs rdiff -u -r1.116 -r1.117 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/npf_ext_rndblock/Makefile
cvs rdiff -u -r1.8 -r1.9 src/sys/net/npf/files.npf
cvs rdiff -u -r0 -r1.1 src/sys/net/npf/npf_ext_rndblock.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/sets/lists/base/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.105 src/distrib/sets/lists/base/ad.mips64eb:1.106
--- src/distrib/sets/lists/base/ad.mips64eb:1.105	Sun Dec  9 22:06:21 2012
+++ src/distrib/sets/lists/base/ad.mips64eb	Mon Dec 10 00:32:24 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.105 2012/12/09 22:06:21 spz Exp $
+# $NetBSD: ad.mips64eb,v 1.106 2012/12/10 00:32:24 rmind Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -297,6 +297,9 @@
 ./usr/lib/64/npf/ext_normalise.so		base-npf-shlib		compat,pic
 ./usr/lib/64/npf/ext_normalise.so.0		base-npf-shlib		compat,pic
 ./usr/lib/64/npf/ext_normalise.so.0.0		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_rndblock.so		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_rndblock.so.0		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_rndblock.so.0.0		base-npf-shlib		compat,pic
 ./usr/lib/64/securitybase-compat-shlib
 ./usr/lib/64/security/pam_afslog.so.3		base-compat-shlib	compat,pic,kerberos,pam
 ./usr/lib/64/security/pam_chroot.so.3		base-compat-shlib	compat,pic,pam
@@ -610,6 +613,9 @@
 ./usr/lib/o32/npf/ext_normalise.so		base-npf-shlib		compat,pic
 ./usr/lib/o32/npf/ext_normalise.so.0		base-npf-shlib		compat,pic
 ./usr/lib/o32/npf/ext_normalise.so.0.0		base-npf-shlib		compat,pic
+./usr/lib/o32/npf/ext_rndblock.so		base-npf-shlib		compat,pic
+./usr/lib/o32/npf/ext_rndblock.so.0		base-npf-shlib		compat,pic
+./usr/lib/o32/npf/ext_rndblock.so.0.0		base-npf-shlib		compat,pic
 ./usr/lib/o32/securitybase-compat-shlib
 ./usr/lib/o32/security/pam_afslog.so.3		base-compat-shlib	compat,pic,kerberos,pam
 ./usr/lib/o32/security/pam_chroot.so.3		base-compat-shlib	compat,pic,pam
Index: src/distrib/sets/lists/base/ad.mips64el
diff -u src/distrib/sets/lists/base/ad.mips64el:1.105 src/distrib/sets/lists/base/ad.mips64el:1.106
--- src/distrib/sets/lists/base/ad.mips64el:1.105	Sun Dec  9 22:06:21 2012
+++ src/distrib/sets/lists/base/ad.mips64el	Mon Dec 10 00:32:24 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.105 2012/12/09 22:06:21 spz Exp $
+# $NetBSD: ad.mips64el,v 1.106 2012/12/10 00:32:24 rmind Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -297,6 +297,9 @@
 ./usr/lib/64/npf/ext_normalise.so		base-npf-shlib		compat,pic
 ./usr/lib/64/npf/ext_normalise.so.0		base-npf-shlib		compat,pic
 ./usr/lib/64/npf/ext_normalise.so.0.0		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_rndblock.so		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_rndblock.so.0		base-npf-shlib		compat,pic
+./usr/lib/64/npf/ext_rndblock.so.0.0		base-npf-shlib		compat,pic
 ./usr/lib/64/securitybase-compat-shlib
 ./usr/lib/64/security/pam_afslog.so.3		base-compat-shlib	compat,pic,kerberos,pam
 ./usr/lib/64/security/pam_chroot.so.3		base-compat-shlib	

CVS commit: src/tools/compat

2012-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 10 00:34:56 UTC 2012

Modified Files:
src/tools/compat: Makefile

Log Message:
first define HOSTLIB and then include bsd.own.mk!


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/tools/compat/Makefile

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

Modified files:

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.66 src/tools/compat/Makefile:1.67
--- src/tools/compat/Makefile:1.66	Sun Dec  9 18:18:30 2012
+++ src/tools/compat/Makefile	Sun Dec  9 19:34:56 2012
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.66 2012/12/09 23:18:30 christos Exp $
-
-.include bsd.own.mk
+#	$NetBSD: Makefile,v 1.67 2012/12/10 00:34:56 christos Exp $
 
 HOSTLIB=	nbcompat
 
+.include bsd.own.mk
+
 SRCS=		atoll.c basename.c cdbr.c cdbw.c dirname.c \
 		fgetln.c flock.c fparseln.c fpurge.c \
 		getcap.c getline.c getmode.c getopt_long.c gettemp.c \



CVS commit: src/sys/net/npf

2012-12-09 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Mon Dec 10 01:11:14 UTC 2012

Modified Files:
src/sys/net/npf: npf.h npf_inet.c npf_mbuf.c

Log Message:
npf_rwrcksum: handle delayed checksums in the network stack; also fix
non-NPF_NAT_PORTS case and add some comments.  PR/47235.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/net/npf/npf.h
cvs rdiff -u -r1.17 -r1.18 src/sys/net/npf/npf_inet.c
cvs rdiff -u -r1.7 -r1.8 src/sys/net/npf/npf_mbuf.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/npf/npf.h
diff -u src/sys/net/npf/npf.h:1.22 src/sys/net/npf/npf.h:1.23
--- src/sys/net/npf/npf.h:1.22	Mon Oct 29 02:27:11 2012
+++ src/sys/net/npf/npf.h	Mon Dec 10 01:11:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.h,v 1.22 2012/10/29 02:27:11 rmind Exp $	*/
+/*	$NetBSD: npf.h,v 1.23 2012/12/10 01:11:13 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -146,6 +146,7 @@ int		nbuf_advstore(nbuf_t **, void **, u
 int		nbuf_fetch_datum(nbuf_t *, void *, size_t, void *);
 int		nbuf_store_datum(nbuf_t *, void *, size_t, void *);
 
+void		nbuf_cksum_barrier(nbuf_t *);
 int		nbuf_add_tag(nbuf_t *, uint32_t, uint32_t);
 int		nbuf_find_tag(nbuf_t *, uint32_t, void **);
 

Index: src/sys/net/npf/npf_inet.c
diff -u src/sys/net/npf/npf_inet.c:1.17 src/sys/net/npf/npf_inet.c:1.18
--- src/sys/net/npf/npf_inet.c:1.17	Sun Sep 16 13:47:41 2012
+++ src/sys/net/npf/npf_inet.c	Mon Dec 10 01:11:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_inet.c,v 1.17 2012/09/16 13:47:41 rmind Exp $	*/
+/*	$NetBSD: npf_inet.c,v 1.18 2012/12/10 01:11:13 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_inet.c,v 1.17 2012/09/16 13:47:41 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_inet.c,v 1.18 2012/12/10 01:11:13 rmind Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -597,65 +597,80 @@ npf_rwrcksum(npf_cache_t *npc, nbuf_t *n
 {
 	const int proto = npf_cache_ipproto(npc);
 	npf_addr_t *oaddr;
-	in_port_t *oport;
-	uint16_t *cksum;
+	uint16_t *ocksum;
+	in_port_t oport;
 	u_int offby;
 
-	/* Checksum update for IPv4 header. */
+	/* XXX: NetBSD - process delayed checksums. */
+	if (di == PFIL_OUT  proto != IPPROTO_ICMP) {
+		nbuf_cksum_barrier(nbuf);
+		npc-npc_info = ~(NPC_LAYER4 | NPC_TCP | NPC_UDP);
+		if (!npf_cache_all(npc, nbuf)) {
+			return false;
+		}
+	}
+
+	oaddr = (di == PFIL_OUT) ? npc-npc_srcip : npc-npc_dstip;
+
 	if (npf_iscached(npc, NPC_IP4)) {
 		struct ip *ip = npc-npc_ip.v4;
 		uint16_t ipsum;
 
-		oaddr = (di == PFIL_OUT) ? npc-npc_srcip : npc-npc_dstip;
+		/* Recalculate IPv4 checksum, advance to it and rewrite. */
 		ipsum = npf_addr_cksum(ip-ip_sum, npc-npc_alen, oaddr, addr);
-
-		/* Advance to the IPv4 checksum and rewrite it. */
 		offby = offsetof(struct ip, ip_sum);
 		if (nbuf_advstore(nbuf, n_ptr, offby, sizeof(ipsum), ipsum))
 			return false;
-
 		ip-ip_sum = ipsum;
-		offby = npf_cache_hlen(npc) - offby;
 	} else {
 		/* No checksum for IPv6. */
 		KASSERT(npf_iscached(npc, NPC_IP6));
-		oaddr = NULL;
 		offby = 0;
-		return false;	/* XXX: Not yet supported. */
 	}
 
-	/* Determine whether TCP/UDP checksum update is needed. */
-	if (proto == IPPROTO_ICMP || port == 0) {
+	/* Nothing else to do for ICMP. */
+	if (proto == IPPROTO_ICMP) {
 		return true;
 	}
 	KASSERT(npf_iscached(npc, NPC_TCP) || npf_iscached(npc, NPC_UDP));
+	offby = npf_cache_hlen(npc) - offby;
 
-	/* Calculate TCP/UDP checksum. */
+	/*
+	 * Calculate TCP/UDP checksum:
+	 * - Skip if UDP and the current checksum is zero.
+	 * - Fixup the IP address change.
+	 * - Fixup the port change, if required (non-zero).
+	 */
 	if (proto == IPPROTO_TCP) {
 		struct tcphdr *th = npc-npc_l4.tcp;
 
-		cksum = th-th_sum;
+		ocksum = th-th_sum;
 		offby += offsetof(struct tcphdr, th_sum);
-		oport = (di == PFIL_OUT) ? th-th_sport : th-th_dport;
+		oport = (di == PFIL_OUT) ? th-th_sport : th-th_dport;
 	} else {
 		struct udphdr *uh = npc-npc_l4.udp;
 
 		KASSERT(proto == IPPROTO_UDP);
-		cksum = uh-uh_sum;
-		if (*cksum == 0) {
+		ocksum = uh-uh_sum;
+		if (*ocksum == 0) {
 			/* No need to update. */
 			return true;
 		}
 		offby += offsetof(struct udphdr, uh_sum);
-		oport = (di == PFIL_OUT) ? uh-uh_sport : uh-uh_dport;
+		oport = (di == PFIL_OUT) ? uh-uh_sport : uh-uh_dport;
+	}
+
+	uint16_t cksum = *ocksum;
+	cksum = npf_addr_cksum(cksum, npc-npc_alen, oaddr, addr);
+	if (port) {
+		cksum = npf_fixup16_cksum(cksum, oport, port);
 	}
-	*cksum = npf_addr_cksum(*cksum, npc-npc_alen, oaddr, addr);
-	*cksum = npf_fixup16_cksum(*cksum, *oport, port);
 
 	/* Advance to TCP/UDP checksum and rewrite it. */
-	if (nbuf_advstore(nbuf, n_ptr, offby, sizeof(uint16_t), cksum)) {
+	if (nbuf_advstore(nbuf, n_ptr, offby, sizeof(cksum), cksum)) {
 		return false;
 	}
+	*ocksum = cksum;
 	return true;
 }
 


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

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 01:35:28 UTC 2012

Modified Files:
src/sys/arch/arm/vfp: vfp_init.c

Log Message:
move inlines into FPU_VFP


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/vfp/vfp_init.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/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.10 src/sys/arch/arm/vfp/vfp_init.c:1.11
--- src/sys/arch/arm/vfp/vfp_init.c:1.10	Sat Dec  8 06:49:00 2012
+++ src/sys/arch/arm/vfp/vfp_init.c	Mon Dec 10 01:35:28 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: vfp_init.c,v 1.10 2012/12/08 06:49:00 matt Exp $ */
+/*  $NetBSD: vfp_init.c,v 1.11 2012/12/10 01:35:28 matt Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -102,8 +102,11 @@ read_fpinst2(void)
 /* FMXR X, fpinst2 */
 #define write_fpinst2(X) __asm __volatile(mcr p10, 7, %0, c10, c0, 0 : \
 			: r (X))
+
+#ifdef FPU_VFP
+
 /* FLDMD X, {d0-d15} */
-static void
+static inline void
 load_vfpregs_lo(uint64_t *p)
 {
 	/* vldmia rN, {d0-d15} */
@@ -111,7 +114,7 @@ load_vfpregs_lo(uint64_t *p)
 }
 
 /* FSTMD X, {d0-d15} */
-static void
+static inline void
 save_vfpregs_lo(uint64_t *p)
 {
 	__asm __volatile(stc\tp11, c0, [%0], {32} :: r (p) : memory);
@@ -119,22 +122,20 @@ save_vfpregs_lo(uint64_t *p)
 
 #ifdef CPU_CORTEX
 /* FLDMD X, {d16-d31} */
-static void
+static inline void
 load_vfpregs_hi(uint64_t *p)
 {
 	__asm __volatile(ldcl\tp11, c0, [%0], {32} :: r (p[16]) : memory);
 }
 
 /* FLDMD X, {d16-d31} */
-static void
+static inline void
 save_vfpregs_hi(uint64_t *p)
 {
 	__asm __volatile(stcl\tp11, c0, [%0], {32} :: r (p[16]) : memory);
 }
 #endif
 
-#ifdef FPU_VFP
-
 /* The real handler for VFP bounces.  */
 static int vfp_handler(u_int, u_int, trapframe_t *, int);
 static int vfp_handler(u_int, u_int, trapframe_t *, int);



CVS commit: src/sys/arch/arm

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 01:37:31 UTC 2012

Modified Files:
src/sys/arch/arm/arm32: arm32_machdep.c cpuswitch.S fault.c genassym.cf
vm_machdep.c
src/sys/arch/arm/include: pcb.h

Log Message:
Rename pcb_sp/PCB_SP to pcb_ksp/PCB_KSP so that ipsec.c will compile.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/arm/arm32/cpuswitch.S
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/arm/arm32/fault.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/arm/arm32/genassym.cf
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/arm/arm32/vm_machdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/include/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/arch/arm/arm32/arm32_machdep.c
diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.85 src/sys/arch/arm/arm32/arm32_machdep.c:1.86
--- src/sys/arch/arm/arm32/arm32_machdep.c:1.85	Sat Oct 27 17:17:36 2012
+++ src/sys/arch/arm/arm32/arm32_machdep.c	Mon Dec 10 01:37:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_machdep.c,v 1.85 2012/10/27 17:17:36 chs Exp $	*/
+/*	$NetBSD: arm32_machdep.c,v 1.86 2012/12/10 01:37:30 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: arm32_machdep.c,v 1.85 2012/10/27 17:17:36 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: arm32_machdep.c,v 1.86 2012/12/10 01:37:30 matt Exp $);
 
 #include opt_modular.h
 #include opt_md.h
@@ -268,8 +268,8 @@ cpu_startup(void)
 
 	struct lwp * const l = lwp0;
 	struct pcb * const pcb = lwp_getpcb(l);
-	pcb-pcb_sp = uvm_lwp_getuarea(l) + USPACE_SVC_STACK_TOP;
-	lwp_settrapframe(l, (struct trapframe *)pcb-pcb_sp - 1);
+	pcb-pcb_ksp = uvm_lwp_getuarea(l) + USPACE_SVC_STACK_TOP;
+	lwp_settrapframe(l, (struct trapframe *)pcb-pcb_ksp - 1);
 }
 
 /*

Index: src/sys/arch/arm/arm32/cpuswitch.S
diff -u src/sys/arch/arm/arm32/cpuswitch.S:1.74 src/sys/arch/arm/arm32/cpuswitch.S:1.75
--- src/sys/arch/arm/arm32/cpuswitch.S:1.74	Wed Dec  5 19:05:45 2012
+++ src/sys/arch/arm/arm32/cpuswitch.S	Mon Dec 10 01:37:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuswitch.S,v 1.74 2012/12/05 19:05:45 matt Exp $	*/
+/*	$NetBSD: cpuswitch.S,v 1.75 2012/12/10 01:37:30 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -89,7 +89,7 @@
 #include machine/asm.h
 #include machine/cpu.h
 
-	RCSID($NetBSD: cpuswitch.S,v 1.74 2012/12/05 19:05:45 matt Exp $)
+	RCSID($NetBSD: cpuswitch.S,v 1.75 2012/12/10 01:37:30 matt Exp $)
 
 /* LINTSTUB: include sys/param.h */
 	
@@ -258,7 +258,7 @@ ENTRY(cpu_switchto)
 	ldr	r10, [r7, #(PCB_R10)]
 	ldr	r11, [r7, #(PCB_R11)]
 	ldr	r12, [r7, #(PCB_R12)]
-	ldr	r13, [r7, #(PCB_SP)]
+	ldr	r13, [r7, #(PCB_KSP)]
 #elif defined(_ARM_ARCH_6)
 	ldrd	r8, [r7, #(PCB_R8)]
 	ldrd	r10, [r7, #(PCB_R10)]
@@ -430,7 +430,7 @@ ENTRY_NP(softint_switch)
 	mcr	p15, 0, r4, c13, c0, 4		/* restore pinned lwp */
 #endif
 	str	r4, [r7, #(CI_CURLWP)]		/* restore pinned lwp */
-	ldr	sp, [r2, #(PCB_SP)]	/* now running on the old stack. */
+	ldr	sp, [r2, #(PCB_KSP)]	/* now running on the old stack. */
 
 	/* At this point we can allow IRQ's again. */
 	msr	cpsr_c, r6

Index: src/sys/arch/arm/arm32/fault.c
diff -u src/sys/arch/arm/arm32/fault.c:1.86 src/sys/arch/arm/arm32/fault.c:1.87
--- src/sys/arch/arm/arm32/fault.c:1.86	Mon Nov 12 18:00:35 2012
+++ src/sys/arch/arm/arm32/fault.c	Mon Dec 10 01:37:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fault.c,v 1.86 2012/11/12 18:00:35 skrll Exp $	*/
+/*	$NetBSD: fault.c,v 1.87 2012/12/10 01:37:30 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
 #include opt_kgdb.h
 
 #include sys/types.h
-__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.86 2012/11/12 18:00:35 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.87 2012/12/10 01:37:30 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -642,7 +642,7 @@ dab_buserr(trapframe_t *tf, u_int fsr, u
 		 * If the current trapframe is at the top of the kernel stack,
 		 * the fault _must_ have come from user mode.
 		 */
-		if (tf != ((trapframe_t *)pcb-pcb_sp) - 1) {
+		if (tf != ((trapframe_t *)pcb-pcb_ksp) - 1) {
 			/*
 			 * Kernel mode. We're either about to die a
 			 * spectacular death, or pcb_onfault will come

Index: src/sys/arch/arm/arm32/genassym.cf
diff -u src/sys/arch/arm/arm32/genassym.cf:1.56 src/sys/arch/arm/arm32/genassym.cf:1.57
--- src/sys/arch/arm/arm32/genassym.cf:1.56	Sun Oct 21 15:46:00 2012
+++ src/sys/arch/arm/arm32/genassym.cf	Mon Dec 10 01:37:30 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.56 2012/10/21 15:46:00 matt Exp $
+#	$NetBSD: genassym.cf,v 1.57 2012/12/10 01:37:30 matt Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -130,7 +130,7 @@ define	PCB_R9			offsetof(struct pcb, pcb
 define	PCB_R10			offsetof(struct pcb, 

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

2012-12-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 10 02:03:45 UTC 2012

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

Log Message:
whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.1083 -r1.1084 src/sys/arch/i386/conf/GENERIC

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

Modified files:

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1083 src/sys/arch/i386/conf/GENERIC:1.1084
--- src/sys/arch/i386/conf/GENERIC:1.1083	Wed Dec  5 16:19:46 2012
+++ src/sys/arch/i386/conf/GENERIC	Mon Dec 10 02:03:45 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1083 2012/12/05 16:19:46 christos Exp $
+# $NetBSD: GENERIC,v 1.1084 2012/12/10 02:03:45 dholland Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	arch/i386/conf/std.i386
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1083 $
+#ident 		GENERIC-$Revision: 1.1084 $
 
 maxusers	64		# estimated number of users
 
@@ -972,7 +972,7 @@ jme*	at pci? dev ? function ?	# JMicron 
 le*	at pci? dev ? function ?	# PCnet-PCI Ethernet
 lii*	at pci? dev ? function ?	# Atheros L2 Fast-Ethernet
 lmc*	at pci? dev ? function ?	# Lan Media Corp SSI/HSSI/DS3
-malo*   at pci? dev ? function ?# Marvell Libertas Wireless
+malo*	at pci? dev ? function ?	# Marvell Libertas Wireless
 mskc*	at pci? dev ? function ?	# Marvell Yukon 2 Gigabit Ethernet
 msk*	at mskc?			# Marvell Yukon 2 Gigabit Ethernet
 mtd*	at pci? dev ? function ?	# Myson MTD803 3-in-1 Ethernet



CVS commit: src/sys/compat/netbsd32

2012-12-09 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Dec 10 02:21:58 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32_compat_12.c

Log Message:
fix these *stat routines: don't pass a kernel stack buffer
to a function that will try to copyout() to it.
just do both layers of compat translation here.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/netbsd32_compat_12.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/netbsd32/netbsd32_compat_12.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_12.c:1.32 src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33
--- src/sys/compat/netbsd32/netbsd32_compat_12.c:1.32	Fri Jan 30 13:01:36 2009
+++ src/sys/compat/netbsd32/netbsd32_compat_12.c	Mon Dec 10 02:21:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_12.c,v 1.32 2009/01/30 13:01:36 njoly Exp $	*/
+/*	$NetBSD: netbsd32_compat_12.c,v 1.33 2012/12/10 02:21:58 chs Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_12.c,v 1.32 2009/01/30 13:01:36 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_12.c,v 1.33 2012/12/10 02:21:58 chs Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h
@@ -35,11 +35,15 @@ __KERNEL_RCSID(0, $NetBSD: netbsd32_com
 
 #include sys/param.h
 #include sys/systm.h
+#include sys/filedesc.h
 #include sys/mount.h
 #include sys/mman.h
+#include sys/namei.h
 #include sys/proc.h
 #include sys/stat.h
 #include sys/swap.h
+#include sys/vfs_syscalls.h
+
 #include sys/syscallargs.h
 
 #include compat/sys/stat.h
@@ -126,23 +130,19 @@ compat_12_netbsd32_stat12(struct lwp *l,
 		syscallarg(const netbsd32_charp) path;
 		syscallarg(netbsd32_stat12p_t) ub;
 	} */
-	struct netbsd32_stat12 *sp32, sb32;
+	struct netbsd32_stat12 sb32;
 	struct stat12 sb12;
-	struct stat12 *sp12 = sb12;
-	struct compat_12_sys_stat_args ua;
-	int rv;
-
-	NETBSD32TOP_UAP(path, const char);
-	SCARG(ua, ub) = sb12;
+	struct stat sb;
+	int error;
 
-	rv = compat_12_sys_stat(l, ua, retval);
-	if (rv)
-		return (rv);
+	error = do_sys_stat(SCARG_P32(uap, path), FOLLOW, sb);
+	if (error)
+		return (error);
 
-	sp32 = SCARG_P32(uap, ub);
-	netbsd32_stat12_to_netbsd32(sp12, sb32);
+	compat_12_stat_conv(sb, sb12);
+	netbsd32_stat12_to_netbsd32(sb12, sb32);
 
-	return (copyout(sb32, sp32, sizeof sb32));
+	return (copyout(sb32, SCARG_P32(uap, ub), sizeof sb32));
 }
 
 int
@@ -152,22 +152,19 @@ compat_12_netbsd32_fstat12(struct lwp *l
 		syscallarg(int) fd;
 		syscallarg(netbsd32_stat12p_t) sb;
 	} */
-	struct netbsd32_stat12 *sp32, sb32;
+	struct netbsd32_stat12 sb32;
 	struct stat12 sb12;
-	struct stat12 *sp12 = sb12;
-	struct compat_12_sys_fstat_args ua;
-	int rv;
+	struct stat sb;
+	int error;
 
-	NETBSD32TO64_UAP(fd);
-	SCARG(ua, sb) = sb12;
-	rv = compat_12_sys_fstat(l, ua, retval);
-	if (rv)
-		return (rv);
+	error = do_sys_fstat(SCARG(uap, fd), sb);
+	if (error)
+		return (error);
 
-	sp32 = SCARG_P32(uap, sb);
-	netbsd32_stat12_to_netbsd32(sp12, sb32);
+	compat_12_stat_conv(sb, sb12);
+	netbsd32_stat12_to_netbsd32(sb12, sb32);
 
-	return (copyout(sb32, sp32, sizeof sb32));
+	return (copyout(sb32, SCARG_P32(uap, sb), sizeof sb32));
 }
 
 int
@@ -177,23 +174,19 @@ compat_12_netbsd32_lstat12(struct lwp *l
 		syscallarg(const netbsd32_charp) path;
 		syscallarg(netbsd32_stat12p_t) ub;
 	} */
-	struct netbsd32_stat12 *sp32, sb32;
+	struct netbsd32_stat12 sb32;
 	struct stat12 sb12;
-	struct stat12 *sp12 = sb12;
-	struct compat_12_sys_lstat_args ua;
-	int rv;
-
-	NETBSD32TOP_UAP(path, const char);
-	SCARG(ua, ub) = sb12;
+	struct stat sb;
+	int error;
 
-	rv = compat_12_sys_lstat(l, ua, retval);
-	if (rv)
-		return (rv);
+	error = do_sys_stat(SCARG_P32(uap, path), NOFOLLOW, sb);
+	if (error)
+		return (error);
 
-	sp32 = SCARG_P32(uap, ub);
-	netbsd32_stat12_to_netbsd32(sp12, sb32);
+	compat_12_stat_conv(sb, sb12);
+	netbsd32_stat12_to_netbsd32(sb12, sb32);
 
-	return (copyout(sb32, sp32, sizeof sb32));
+	return (copyout(sb32, SCARG_P32(uap, ub), sizeof sb32));
 }
 
 int



CVS commit: src/usr.sbin/npf/npfctl

2012-12-09 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Mon Dec 10 02:26:04 UTC 2012

Modified Files:
src/usr.sbin/npf/npfctl: npf_build.c npf_disassemble.c npfctl.8
npfctl.c npfctl.h

Log Message:
npfctl: add 'validate' command to check the config, but not load it.  Update
the man page.  Also add a small note about 'debug' command, PR/47298.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/npf/npfctl/npf_build.c
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/npf/npfctl/npf_disassemble.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/npf/npfctl/npfctl.8
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/npf/npfctl/npfctl.c
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/npf/npfctl/npfctl.h

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

Modified files:

Index: src/usr.sbin/npf/npfctl/npf_build.c
diff -u src/usr.sbin/npf/npfctl/npf_build.c:1.15 src/usr.sbin/npf/npfctl/npf_build.c:1.16
--- src/usr.sbin/npf/npfctl/npf_build.c:1.15	Mon Nov 26 20:34:28 2012
+++ src/usr.sbin/npf/npfctl/npf_build.c	Mon Dec 10 02:26:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_build.c,v 1.15 2012/11/26 20:34:28 rmind Exp $	*/
+/*	$NetBSD: npf_build.c,v 1.16 2012/12/10 02:26:04 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2011-2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: npf_build.c,v 1.15 2012/11/26 20:34:28 rmind Exp $);
+__RCSID($NetBSD: npf_build.c,v 1.16 2012/12/10 02:26:04 rmind Exp $);
 
 #include sys/types.h
 #include sys/ioctl.h
@@ -85,6 +85,12 @@ npfctl_config_send(int fd, const char *o
 	return error;
 }
 
+nl_config_t *
+npfctl_config_ref(void)
+{
+	return npf_conf;
+}
+
 unsigned long
 npfctl_debug_addif(const char *ifname)
 {

Index: src/usr.sbin/npf/npfctl/npf_disassemble.c
diff -u src/usr.sbin/npf/npfctl/npf_disassemble.c:1.12 src/usr.sbin/npf/npfctl/npf_disassemble.c:1.13
--- src/usr.sbin/npf/npfctl/npf_disassemble.c:1.12	Thu Nov 15 22:20:27 2012
+++ src/usr.sbin/npf/npfctl/npf_disassemble.c	Mon Dec 10 02:26:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_disassemble.c,v 1.12 2012/11/15 22:20:27 rmind Exp $	*/
+/*	$NetBSD: npf_disassemble.c,v 1.13 2012/12/10 02:26:04 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  * FIXME: config generation should be redesigned..
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: npf_disassemble.c,v 1.12 2012/11/15 22:20:27 rmind Exp $);
+__RCSID($NetBSD: npf_disassemble.c,v 1.13 2012/12/10 02:26:04 rmind Exp $);
 
 #include stdio.h
 #include stdlib.h
@@ -702,13 +702,18 @@ npfctl_config_show(int fd)
 	bool active, loaded;
 	int error = 0;
 
-	ncf = npf_config_retrieve(fd, active, loaded);
-	if (ncf == NULL) {
-		return errno;
-	}
-	printf(Filtering:\t%s\nConfiguration:\t%s\n\n,
-	active ? active : inactive,
-	loaded ? loaded : empty);
+	if (fd) {
+		ncf = npf_config_retrieve(fd, active, loaded);
+		if (ncf == NULL) {
+			return errno;
+		}
+		printf(Filtering:\t%s\nConfiguration:\t%s\n\n,
+		active ? active : inactive,
+		loaded ? loaded : empty);
+	} else {
+		ncf = npfctl_config_ref();
+		loaded = true;
+	}
 
 	if (loaded) {
 		_npf_table_foreach(ncf, npfctl_show_table);

Index: src/usr.sbin/npf/npfctl/npfctl.8
diff -u src/usr.sbin/npf/npfctl/npfctl.8:1.10 src/usr.sbin/npf/npfctl/npfctl.8:1.11
--- src/usr.sbin/npf/npfctl/npfctl.8:1.10	Thu Nov 15 22:22:53 2012
+++ src/usr.sbin/npf/npfctl/npfctl.8	Mon Dec 10 02:26:04 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: npfctl.8,v 1.10 2012/11/15 22:22:53 rmind Exp $
+.\	$NetBSD: npfctl.8,v 1.11 2012/12/10 02:26:04 rmind Exp $
 .\
 .\ Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 15, 2012
+.Dd December 10, 2012
 .Dt NPFCTL 8
 .Os
 .Sh NAME
@@ -79,6 +79,12 @@ Show the current state and configuration
 Syntax of printed configuration is for the user and may not match the
 .Xr npf.conf 5
 syntax.
+.It Ic validate Op Ar path
+Validate the configuration file and the processed form.
+The configuration file at
+.Pa /etc/npf.conf
+will be used unless a file is specified by
+.Ar path .
 .It Ic table Ar tid Ic add Aq Ar addr/mask
 In table
 .Ar tid ,
@@ -117,6 +123,10 @@ Any existing sessions during the load op
 Administrator may want to start packet inspection after the session loading.
 .It Ic stats
 Print various statistics.
+.It Ic debug
+Process the configuration file, print the n-code of each rule
+and dump the raw configuration.
+This is primarily for developer use.
 .El
 .Sh PERFORMANCE
 Reloading the configuration is a relatively expensive operation.

Index: src/usr.sbin/npf/npfctl/npfctl.c
diff -u src/usr.sbin/npf/npfctl/npfctl.c:1.24 src/usr.sbin/npf/npfctl/npfctl.c:1.25
--- src/usr.sbin/npf/npfctl/npfctl.c:1.24	Thu Nov 15 22:20:27 2012
+++ src/usr.sbin/npf/npfctl/npfctl.c	Mon Dec 10 02:26:04 2012
@@ -1,4 

CVS commit: src/sys/arch/arm

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 04:58:54 UTC 2012

Modified Files:
src/sys/arch/arm/conf: files.arm
Added Files:
src/sys/arch/arm/vfp: pmap_vfp.S

Log Message:
Add code to use VFP(or Neon) instructions to zero or copy a page via
pmap_zero_page and pmap_copy_page.  (Not hooked into vfp_init yet).
Requires FPU_VFP


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/arm/conf/files.arm
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/vfp/pmap_vfp.S

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

Modified files:

Index: src/sys/arch/arm/conf/files.arm
diff -u src/sys/arch/arm/conf/files.arm:1.113 src/sys/arch/arm/conf/files.arm:1.114
--- src/sys/arch/arm/conf/files.arm:1.113	Wed Dec  5 19:05:47 2012
+++ src/sys/arch/arm/conf/files.arm	Mon Dec 10 04:58:54 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.arm,v 1.113 2012/12/05 19:05:47 matt Exp $
+#	$NetBSD: files.arm,v 1.114 2012/12/10 04:58:54 matt Exp $
 
 # temporary define to allow easy moving to ../arch/arm/arm32
 defflagARM32
@@ -52,6 +52,7 @@ obsolete defflagARMFPE
 
 # VFP support
 file	arch/arm/vfp/vfp_init.c			arm32
+file	arch/arm/vfp/pmap_vfp.S			arm32  fpu_vfp
 
 # PMAP_DEBUG (heavily abused option)
 defflagPMAP_DEBUG

Added files:

Index: src/sys/arch/arm/vfp/pmap_vfp.S
diff -u /dev/null src/sys/arch/arm/vfp/pmap_vfp.S:1.1
--- /dev/null	Mon Dec 10 04:58:54 2012
+++ src/sys/arch/arm/vfp/pmap_vfp.S	Mon Dec 10 04:58:54 2012
@@ -0,0 +1,101 @@
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * 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 opt_cputypes.h
+
+#include machine/asm.h
+#include assym.h
+
+/*
+ * This zeroes a page 64-bytes at a time.  64 is chosen over 32 since
+ * 64 is the cache line size of the Cortex-A8.
+ */
+ENTRY(pmap_zero_page_vfp)
+	mrc	p10, 7, r3, c8, c0, 0
+	orr	r2, r3, #VFP_FPEXC_EN
+	mcr	p10, 7, r2, c8, c0, 0
+	vpush	{d0-d7}
+#if (CPU_CORTEX == 0)
+	mov	ip, #0
+	vmov	s0, ip
+	vmov	s1, ip
+	vmov.f64 d1, d0
+	vmov.f64 d2, d0
+	vmov.f64 d3, d0
+	vmov.f64 d4, d0
+	vmov.f64 d5, d0
+	vmov.f64 d6, d0
+	vmov.f64 d7, d0
+#else
+	veor	q0, q0, q0
+	veor	q1, q1, q1
+	veor	q2, q2, q2
+	veor	q3, q3, q3
+#endif
+	add	r2, r0, #PAGE_SIZE
+1:	vstmia	r0!, {d0-d7}
+	vstmia	r0!, {d0-d7}
+	vstmia	r0!, {d0-d7}
+	vstmia	r0!, {d0-d7}
+	cmp	r0, r2
+	blt	1b
+	vpop	{d0-d7}
+	mcr	p10, 7, r3, c8, c0, 0
+	bx	lr
+END(pmap_zero_page_vfp)
+
+/*
+ * This copies a page 64-bytes at a time.  64 is chosen over 32 since
+ * 64 is the cache line size of the Cortex-A8.
+ */
+ENTRY(pmap_copy_page_vfp)
+	pld	[r0]			@ preload the first 128 bytes
+	pld	[r0, #32]
+	pld	[r0, #64]
+	pld	[r0, #96]
+	mrc	p10, 7, r3, c8, c0, 0
+	orr	r2, r3, #VFP_FPEXC_EN
+	mcr	p10, 7, r2, c8, c0, 0
+	vpush	{d0-d7}
+	add	r2, r0, #PAGE_SIZE-128
+1:	pld	[r0, #128]		@ preload the next 128
+	pld	[r0, #160]
+	pld	[r0, #192]
+	pld	[r0, #224]
+2:	vldmia	r0!, {d0-d7}		@ read   0-63
+	vstmia	r1!, {d0-d7}		@ write  0-63
+	vldmia	r0!, {d0-d7}		@ read  64-127
+	vstmia	r1!, {d0-d7}		@ write 64-127
+	cmp	r0, r2
+	blt	1b
+	beq	2b
+	vpop	{d0-d7}
+	mcr	p10, 7, r3, c8, c0, 0
+	bx	lr
+END(pmap_copy_page_vfp)



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

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 05:01:44 UTC 2012

Modified Files:
src/sys/arch/evbarm/conf: mk.tisdp24xx std.imx31

Log Message:
Add -mfpu=vfp since these are arm11


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/mk.tisdp24xx
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/std.imx31

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/mk.tisdp24xx
diff -u src/sys/arch/evbarm/conf/mk.tisdp24xx:1.3 src/sys/arch/evbarm/conf/mk.tisdp24xx:1.4
--- src/sys/arch/evbarm/conf/mk.tisdp24xx:1.3	Sat Jul 14 07:32:50 2012
+++ src/sys/arch/evbarm/conf/mk.tisdp24xx	Mon Dec 10 05:01:43 2012
@@ -1,5 +1,5 @@
-#	$NetBSD: mk.tisdp24xx,v 1.3 2012/07/14 07:32:50 matt Exp $
-CPPFLAGS+= -march=armv6k -mtune=arm1136jf-s
+#	$NetBSD: mk.tisdp24xx,v 1.4 2012/12/10 05:01:43 matt Exp $
+CPPFLAGS+= -march=armv6k -mtune=arm1136jf-s -mfpu=vfp
 
 SYSTEM_FIRST_OBJ=	sdp24xx_start.o
 SYSTEM_FIRST_SFILE=	${THISARM}/tisdp24xx/sdp24xx_start.S

Index: src/sys/arch/evbarm/conf/std.imx31
diff -u src/sys/arch/evbarm/conf/std.imx31:1.5 src/sys/arch/evbarm/conf/std.imx31:1.6
--- src/sys/arch/evbarm/conf/std.imx31:1.5	Sat Jul 14 07:32:50 2012
+++ src/sys/arch/evbarm/conf/std.imx31	Mon Dec 10 05:01:43 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: std.imx31,v 1.5 2012/07/14 07:32:50 matt Exp $
+#	$NetBSD: std.imx31,v 1.6 2012/12/10 05:01:43 matt Exp $
 #
 # standard NetBSD/evbarm options for FreeScale I.MX31
 
@@ -11,7 +11,7 @@ include arch/evbarm/conf/files.imx31
 options 	EXEC_ELF32
 options 	EXEC_SCRIPT
 options 	KERNEL_BASE_EXT=0x8000
-makeoptions	CPUFLAGS=-march=armv6k -mtune=arm1136j-s
+makeoptions	CPUFLAGS=-march=armv6k -mtune=arm1136j-s -mfpu=vfp
 
 
 # To support easy transit to ../arch/arm/arm32



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

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 05:02:14 UTC 2012

Modified Files:
src/sys/arch/evbarm/conf: mk.rpi

Log Message:
Add -mfpu=vfp since these are arm11


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/mk.rpi

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/mk.rpi
diff -u src/sys/arch/evbarm/conf/mk.rpi:1.1 src/sys/arch/evbarm/conf/mk.rpi:1.2
--- src/sys/arch/evbarm/conf/mk.rpi:1.1	Thu Jul 26 06:21:57 2012
+++ src/sys/arch/evbarm/conf/mk.rpi	Mon Dec 10 05:02:14 2012
@@ -1,6 +1,6 @@
-#	$NetBSD: mk.rpi,v 1.1 2012/07/26 06:21:57 skrll Exp $
+#	$NetBSD: mk.rpi,v 1.2 2012/12/10 05:02:14 matt Exp $
 
-CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s
+CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s -mfpu=vfp
 
 SYSTEM_FIRST_OBJ=	rpi_start.o
 SYSTEM_FIRST_SFILE=	${THISARM}/rpi/rpi_start.S



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

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 05:03:42 UTC 2012

Modified Files:
src/sys/arch/arm/arm32: genassym.cf

Log Message:
Add VFP_FPEXC_EN


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/arm/arm32/genassym.cf

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/genassym.cf
diff -u src/sys/arch/arm/arm32/genassym.cf:1.57 src/sys/arch/arm/arm32/genassym.cf:1.58
--- src/sys/arch/arm/arm32/genassym.cf:1.57	Mon Dec 10 01:37:30 2012
+++ src/sys/arch/arm/arm32/genassym.cf	Mon Dec 10 05:03:42 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.57 2012/12/10 01:37:30 matt Exp $
+#	$NetBSD: genassym.cf,v 1.58 2012/12/10 05:03:42 matt Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -46,6 +46,7 @@ include netinet/ip_var.h
 include uvm/uvm_extern.h
 
 include arm/fiq.h
+include arm/vfpreg.h
 
 include arm/arm32/pte.h
 include machine/pmap.h
@@ -188,6 +189,7 @@ define	CI_CC_NTRAP		offsetof(struct cpu_
 define	CI_CC_NINTR		offsetof(struct cpu_info, ci_data.cpu_nintr)
 define	CI_CC_NSOFT		offsetof(struct cpu_info, ci_data.cpu_nsoft)
 
+define	VFP_FPEXC_EN		VFP_FPEXC_EN
 
 # Constants required for in_cksum() and friends.
 define	M_LENoffsetof(struct mbuf, m_len)



CVS commit: src/sys/dev

2012-12-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 10 06:07:34 UTC 2012

Modified Files:
src/sys/dev: lockstat.c

Log Message:
Fix off by one.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/lockstat.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/lockstat.c
diff -u src/sys/dev/lockstat.c:1.15 src/sys/dev/lockstat.c:1.16
--- src/sys/dev/lockstat.c:1.15	Mon Apr 28 20:23:46 2008
+++ src/sys/dev/lockstat.c	Mon Dec 10 06:07:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lockstat.c,v 1.15 2008/04/28 20:23:46 martin Exp $	*/
+/*	$NetBSD: lockstat.c,v 1.16 2012/12/10 06:07:34 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lockstat.c,v 1.15 2008/04/28 20:23:46 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: lockstat.c,v 1.16 2012/12/10 06:07:34 msaitoh Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -270,7 +270,7 @@ lockstat_stop(lsdisable_t *ld)
 
 	cpuno = 0;
 	for (CPU_INFO_FOREACH(cii, ci)) {
-		if (cpuno  sizeof(ld-ld_freq) / sizeof(ld-ld_freq[0])) {
+		if (cpuno = sizeof(ld-ld_freq) / sizeof(ld-ld_freq[0])) {
 			log(LOG_WARNING, lockstat: too many CPUs\n);
 			break;
 		}



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

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 06:50:28 UTC 2012

Modified Files:
src/sys/arch/arm/arm32: genassym.cf

Log Message:
add __HAVE_MM_MD_DIRECT_MAPPED_PHYS


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/arm/arm32/genassym.cf

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/genassym.cf
diff -u src/sys/arch/arm/arm32/genassym.cf:1.58 src/sys/arch/arm/arm32/genassym.cf:1.59
--- src/sys/arch/arm/arm32/genassym.cf:1.58	Mon Dec 10 05:03:42 2012
+++ src/sys/arch/arm/arm32/genassym.cf	Mon Dec 10 06:50:28 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.58 2012/12/10 05:03:42 matt Exp $
+#	$NetBSD: genassym.cf,v 1.59 2012/12/10 06:50:28 matt Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -63,6 +63,10 @@ ifdef __ARM_FIQ_INDIRECT
 define	__ARM_FIQ_INDIRECT	1
 endif
 
+ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+define	__HAVE_MM_MD_DIRECT_MAPPED_PHYS	1
+endif
+
 ifdef __HAVE_FAST_SOFTINTS
 define	__HAVE_FAST_SOFTINTS	1
 endif



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

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 06:51:05 UTC 2012

Modified Files:
src/sys/arch/arm/vfp: pmap_vfp.S

Log Message:
Make sure we can deal with VA != PA but still we need to have all of PA mapped.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/vfp/pmap_vfp.S

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

Modified files:

Index: src/sys/arch/arm/vfp/pmap_vfp.S
diff -u src/sys/arch/arm/vfp/pmap_vfp.S:1.1 src/sys/arch/arm/vfp/pmap_vfp.S:1.2
--- src/sys/arch/arm/vfp/pmap_vfp.S:1.1	Mon Dec 10 04:58:54 2012
+++ src/sys/arch/arm/vfp/pmap_vfp.S	Mon Dec 10 06:51:05 2012
@@ -32,11 +32,19 @@
 #include machine/asm.h
 #include assym.h
 
+RCSID($NetBSD: pmap_vfp.S,v 1.2 2012/12/10 06:51:05 matt Exp $)
+
+#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+
 /*
  * This zeroes a page 64-bytes at a time.  64 is chosen over 32 since
  * 64 is the cache line size of the Cortex-A8.
  */
 ENTRY(pmap_zero_page_vfp)
+	ldr	ip, .Lkbase		@ phys
+	ldr	r3, .Lkbase+4		@ virt
+	sub	r3, r3, ip		@ diff = virt - phys
+	add	r0, r0, r3		@ phys - virt
 	mrc	p10, 7, r3, c8, c0, 0
 	orr	r2, r3, #VFP_FPEXC_EN
 	mcr	p10, 7, r2, c8, c0, 0
@@ -75,6 +83,11 @@ END(pmap_zero_page_vfp)
  * 64 is the cache line size of the Cortex-A8.
  */
 ENTRY(pmap_copy_page_vfp)
+	ldr	ip, .Lkbase		@ phys
+	ldr	r3, .Lkbase+4		@ virt
+	sub	r3, r3, ip		@ diff = virt - phys
+	add	r0, r0, r3		@ convert from phys to virt
+	add	r1, r1, r3		@ convert from phys to virt
 	pld	[r0]			@ preload the first 128 bytes
 	pld	[r0, #32]
 	pld	[r0, #64]
@@ -99,3 +112,10 @@ ENTRY(pmap_copy_page_vfp)
 	mcr	p10, 7, r3, c8, c0, 0
 	bx	lr
 END(pmap_copy_page_vfp)
+
+	.p2align 2
+.Lkbase:
+	.word	KERNEL_BASE_phys
+	.word	KERNEL_BASE_virt
+
+#endif /* __HAVE_MM_MD_DIRECT_MAPPED_PHYS */



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

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 06:51:50 UTC 2012

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

Log Message:
if __HAVE_MM_MD_DIRECT_MAPPED_PHYS is defined, make sure mapallmem_p is true.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/arm32/arm32_kvminit.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/arm32_kvminit.c
diff -u src/sys/arch/arm/arm32/arm32_kvminit.c:1.14 src/sys/arch/arm/arm32/arm32_kvminit.c:1.15
--- src/sys/arch/arm/arm32/arm32_kvminit.c:1.14	Wed Oct 24 21:31:06 2012
+++ src/sys/arch/arm/arm32/arm32_kvminit.c	Mon Dec 10 06:51:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_kvminit.c,v 1.14 2012/10/24 21:31:06 skrll Exp $	*/
+/*	$NetBSD: arm32_kvminit.c,v 1.15 2012/12/10 06:51:49 matt Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -122,7 +122,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.14 2012/10/24 21:31:06 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.15 2012/12/10 06:51:49 matt Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -372,6 +372,10 @@ arm32_kernel_vm_init(vaddr_t kernel_vm_b
 	const size_t cpu_num = 1;
 #endif
 
+#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+	KASSERT(mapallmem_p);
+#endif
+
 	/*
 	 * Calculate the number of L2 pages needed for mapping the
 	 * kernel + data + stuff.  Assume 2 L2 pages for kernel, 1 for vectors,



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

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 06:53:52 UTC 2012

Modified Files:
src/sys/arch/arm/include/arm32: pmap.h

Log Message:
Add pmap_{copy,zero}_page_vfp


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/arm/include/arm32/pmap.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/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.115 src/sys/arch/arm/include/arm32/pmap.h:1.116
--- src/sys/arch/arm/include/arm32/pmap.h:1.115	Mon Nov 12 18:00:37 2012
+++ src/sys/arch/arm/include/arm32/pmap.h	Mon Dec 10 06:53:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.115 2012/11/12 18:00:37 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.116 2012/12/10 06:53:52 matt Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -465,6 +465,11 @@ pmap_ptesync(pt_entry_t *ptep, size_t cn
 
 /* ARM MMU configuration */
 
+#ifdef FPU_VFP
+void	pmap_copy_page_vfp(paddr_t, paddr_t);
+void	pmap_zero_page_vfp(paddr_t);
+#endif
+
 #if (ARM_MMU_GENERIC + ARM_MMU_SA1 + ARM_MMU_V6 + ARM_MMU_V7) != 0
 void	pmap_copy_page_generic(paddr_t, paddr_t);
 void	pmap_zero_page_generic(paddr_t);



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

2012-12-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 10 06:54:23 UTC 2012

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

Log Message:
Change a KASSERT to a KASSERTMSG


To generate a diff of this commit:
cvs rdiff -u -r1.242 -r1.243 src/sys/arch/arm/arm32/pmap.c

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

Modified files:

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.242 src/sys/arch/arm/arm32/pmap.c:1.243
--- src/sys/arch/arm/arm32/pmap.c:1.242	Mon Nov 12 18:00:35 2012
+++ src/sys/arch/arm/arm32/pmap.c	Mon Dec 10 06:54:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.242 2012/11/12 18:00:35 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.243 2012/12/10 06:54:23 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -212,7 +212,7 @@
 #include arm/cpuconf.h
 #include arm/arm32/katelib.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.242 2012/11/12 18:00:35 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.243 2012/12/10 06:54:23 matt Exp $);
 
 #ifdef PMAP_DEBUG
 
@@ -3050,7 +3050,9 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_
 		KASSERT(uvm_page_locked_p(pg));
 #endif
 		KASSERT((md-pvh_attrs  PVF_DMOD) == 0 || (md-pvh_attrs  (PVF_DIRTY|PVF_NC)));
-		KASSERT(arm_cache_prefer_mask == 0 || ((md-pvh_attrs  PVF_WRITE) == 0) == (md-urw_mappings + md-krw_mappings == 0));
+		KASSERTMSG(arm_cache_prefer_mask == 0 || ((md-pvh_attrs  PVF_WRITE) == 0) == (md-urw_mappings + md-krw_mappings == 0),
+		pg %p: attrs=%#x urw=%u krw=%u, pg,
+		md-pvh_attrs, md-urw_mappings, md-krw_mappings);
 	}
 #endif