CVS commit: src/share/misc

2014-05-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 30 07:26:06 UTC 2014

Modified Files:
src/share/misc: bsd-family-tree

Log Message:
Sync with FreeBSD:
- Add DragonFly 3.6.0 and 3.6.1
- Add FreeBSD 9.2 and 10.0
- Add Mac OS X 10.9
- Add OpenBSD 5.4
- Change the master's URL.
Add some releases:
- Add NetBSD 5.1.4 and 5.2.2
- Add OpenBSD 5.5


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/share/misc/bsd-family-tree

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

Modified files:

Index: src/share/misc/bsd-family-tree
diff -u src/share/misc/bsd-family-tree:1.55 src/share/misc/bsd-family-tree:1.56
--- src/share/misc/bsd-family-tree:1.55	Fri May 30 05:37:04 2014
+++ src/share/misc/bsd-family-tree	Fri May 30 07:26:06 2014
@@ -256,6 +256,9 @@ FreeBSD 5.2   |  |  
  | |  8.3 |  | |  ||   |
  | |   |  |  | |   NetBSD  |   |
  | |   |  |  | |5.1.3  |   |
+ | |   |  |  | |  ||   |
+ | |   |  |  | |   NetBSD  |   |
+ | |   |  |  | |5.1.4  |   |
  | |   |  |  | |   OpenBSD 5.1 |
  | |   |   Mac OS X  | `.  |   |
  | |   | 10.8|   \ |   |
@@ -263,34 +266,43 @@ FreeBSD 5.2   |  |  
  | |   |  |  | | ||OpenBSD 5.2 DragonFly 3.2.1
  |  FreeBSD|  |  | | | NetBSD  |   |
  |9.1  |  |  | | |   5.2   |   |
- | |  |  | | |||   |
- | |  |  | | | NetBSD  |   |
- | |  |  | | |  5.2.1  |   |
- | |  |  | | | |   |
- | |  |  | |  \|   |
- | |  |  | |   NetBSD  |   |
- | |  |  | |6.0.1  |   |
- | |  |  | |  |   OpenBSD 5.3  DragonFly 3.4.1
- | |  |  | |   NetBSD  |   |
- | |  |  | |6.0.2  |   |
- | |  |  | |  ||   |
- | |  |  | |  NetBSD 6.0.3 |   |
- | |  |  | |  ||   |
- | |  |  | |  NetBSD 6.0.4 |   |
- | |  |  | |  ||   |
- | |  |  | |  NetBSD 6.0.5 |   |
- | |  |  | |   |   |
- | |  |  |  `-NetBSD 6.1   |   |
- |  FreeBSD   |  | |   |   |
- |8.4 |  |NetBSD 6.1.1 |   |
- ||  | |   |   |
- ||  |NetBSD 6.1.2 |   |
- ||  | |   |   |
- ||  |NetBSD 6.1.3 |   |
- ||  | |   |   |
+ | |   |  |  | | |||   |
+ | |   |  |  | | | NetBSD  |   |
+ | |   |  |  | | |  5.2.1  |   |
+ | |   |  |  | | |||   |
+ | |   |  |  | | | NetBSD  |   |
+ | |   |  |  | | |  5.2.2  |   |
+ | |   |  |  | | | |   |
+ | |   |  |  | |  \|   |
+ | |   |  |  | |   NetBSD  |   |
+ | |   |  |  | |6.0.1  |   |
+ | |   |  |  | |  |   OpenBSD 5.3  DragonFly 3.4.1
+ | |   |  |  | |   NetBSD  |   |
+ | |   |  |  | |6.0.2  |   |
+ | |   |  |  | |  ||   |
+ | |   |  |  | |  NetBSD 6.0.3 |   |
+ | |   |  |  | |  ||   |
+ | |   |  |  | |  NetBSD 6.0.4 |   |
+ | |   |  

CVS commit: src/usr.bin/calendar/calendars

2014-05-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 30 08:36:28 UTC 2014

Modified Files:
src/usr.bin/calendar/calendars: calendar.netbsd

Log Message:
Add 5.1.4, 5.2.2.  6.0.4 and 6.1.3.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/calendar/calendars/calendar.netbsd

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

Modified files:

Index: src/usr.bin/calendar/calendars/calendar.netbsd
diff -u src/usr.bin/calendar/calendars/calendar.netbsd:1.30 src/usr.bin/calendar/calendars/calendar.netbsd:1.31
--- src/usr.bin/calendar/calendars/calendar.netbsd:1.30	Sat Apr 19 15:51:46 2014
+++ src/usr.bin/calendar/calendars/calendar.netbsd	Fri May 30 08:36:28 2014
@@ -3,6 +3,10 @@
 01/07   NetBSD/dreamcast port started, 2001
 01/17   NetBSD/hpcsh port started, 2001
 01/23   NetBSD/arc port started, 2000
+01/25   NetBSD 5.1.4 released, 2014
+01/25   NetBSD 5.2.2 released, 2014
+01/25   NetBSD 6.0.4 released, 2014
+01/25   NetBSD 6.1.3 released, 2014
 01/27   NetBSD 5.1.4 released, 2014
 01/27   NetBSD 5.2.2 released, 2014
 01/27   NetBSD 6.0.4 released, 2014



CVS commit: src/distrib/sets

2014-05-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri May 30 08:37:35 UTC 2014

Modified Files:
src/distrib/sets: regpkg

Log Message:
Convert mtree spec path characters with sed(1) to avoid tool'ifying vis(1).


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/regpkg

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/regpkg
diff -u src/distrib/sets/regpkg:1.21 src/distrib/sets/regpkg:1.22
--- src/distrib/sets/regpkg:1.21	Sat May 24 13:27:13 2014
+++ src/distrib/sets/regpkg	Fri May 30 08:37:35 2014
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# $NetBSD: regpkg,v 1.21 2014/05/24 13:27:13 uebayasi Exp $
+# $NetBSD: regpkg,v 1.22 2014/05/30 08:37:35 uebayasi Exp $
 #
 # Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -628,7 +628,7 @@ EOF
 	# @name line and a lot of @comment MD5: lines.
 	#
 	{
-		rcsid='$NetBSD: regpkg,v 1.21 2014/05/24 13:27:13 uebayasi Exp $'
+		rcsid='$NetBSD: regpkg,v 1.22 2014/05/30 08:37:35 uebayasi Exp $'
 		utcdate=$(${ENV_CMD} TZ=UTC LOCALE=C \
 			${DATE} '+%Y-%m-%d %H:%M')
 		user=${USER:-root}
@@ -807,7 +807,7 @@ create_syspkg_tgz()
 		# Escape some characters to match the new mtree(8) format.
 		# C.f. usr.sbin/mtree/spec.c:vispath()
 		# XXX escape only '[' for now
-		vis -o -e '[' \
+		${SED} -e 's,\[,\\133,g' \
 		${spec1}
 
 		# If metalog was specified, attributes from metalog override



CVS commit: src/sys/ufs/ffs

2014-05-30 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri May 30 08:40:09 UTC 2014

Modified Files:
src/sys/ufs/ffs: ffs_snapshot.c

Log Message:
Testing v_usecount == 1 for exclusive reference will not always
work -- remove and test only readonly.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/ufs/ffs/ffs_snapshot.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/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.134 src/sys/ufs/ffs/ffs_snapshot.c:1.135
--- src/sys/ufs/ffs/ffs_snapshot.c:1.134	Sat May 24 16:34:04 2014
+++ src/sys/ufs/ffs/ffs_snapshot.c	Fri May 30 08:40:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.134 2014/05/24 16:34:04 christos Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.135 2014/05/30 08:40:09 hannken Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.134 2014/05/24 16:34:04 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.135 2014/05/30 08:40:09 hannken Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -423,11 +423,11 @@ snapshot_setup(struct mount *mp, struct 
 	struct inode *ip = VTOI(vp);
 
 	/*
-	 * Check mount, exclusive reference and owner.
+	 * Check mount, readonly reference and owner.
 	 */
 	if (vp-v_mount != mp)
 		return EXDEV;
-	if (vp-v_usecount != 1 || vp-v_writecount != 0)
+	if (vp-v_writecount != 0)
 		return EBUSY;
 	error = kauth_authorize_system(l-l_cred, KAUTH_SYSTEM_FS_SNAPSHOT,
 	0, mp, vp, NULL);



CVS commit: src/sys/fs/msdosfs

2014-05-30 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri May 30 08:42:35 UTC 2014

Modified Files:
src/sys/fs/msdosfs: msdosfs_denode.c

Log Message:
msdosfs_reclaim(): add missing fstrans and protect change
of v_data with v_interlock as msdosfs_sync() now needs it.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/fs/msdosfs/msdosfs_denode.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/msdosfs/msdosfs_denode.c
diff -u src/sys/fs/msdosfs/msdosfs_denode.c:1.48 src/sys/fs/msdosfs/msdosfs_denode.c:1.49
--- src/sys/fs/msdosfs/msdosfs_denode.c:1.48	Thu Dec 20 08:03:42 2012
+++ src/sys/fs/msdosfs/msdosfs_denode.c	Fri May 30 08:42:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_denode.c,v 1.48 2012/12/20 08:03:42 hannken Exp $	*/
+/*	$NetBSD: msdosfs_denode.c,v 1.49 2014/05/30 08:42:35 hannken Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: msdosfs_denode.c,v 1.48 2012/12/20 08:03:42 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: msdosfs_denode.c,v 1.49 2014/05/30 08:42:35 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -671,8 +671,10 @@ msdosfs_reclaim(void *v)
 		struct vnode *a_vp;
 	} */ *ap = v;
 	struct vnode *vp = ap-a_vp;
+	struct mount *mp = vp-v_mount;
 	struct denode *dep = VTODE(vp);
 
+	fstrans_start(mp, FSTRANS_LAZY);
 #ifdef MSDOSFS_DEBUG
 	printf(msdosfs_reclaim(): dep %p, file %s, refcnt %ld\n,
 	dep, dep-de_Name, dep-de_refcnt);
@@ -694,9 +696,15 @@ msdosfs_reclaim(void *v)
 #if 0 /* XXX */
 	dep-de_flag = 0;
 #endif
+	/*
+	 * To interlock with msdosfs_sync().
+	 */
 	genfs_node_destroy(vp);
-	pool_put(msdosfs_denode_pool, dep);
+	mutex_enter(vp-v_interlock);
 	vp-v_data = NULL;
+	mutex_exit(vp-v_interlock);
+	pool_put(msdosfs_denode_pool, dep);
+	fstrans_done(mp);
 	return (0);
 }
 



CVS commit: src/sys/kern

2014-05-30 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri May 30 08:46:00 UTC 2014

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

Log Message:
vfs_vnode_iterator_next(): if a vnode is reclaiming (VI_XLOCK) skip
the filter.  Vget() will wait until the vnode disappeared.  No more
dangling vnode panics on unmount.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/kern/vfs_mount.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/vfs_mount.c
diff -u src/sys/kern/vfs_mount.c:1.29 src/sys/kern/vfs_mount.c:1.30
--- src/sys/kern/vfs_mount.c:1.29	Sat May 24 16:34:04 2014
+++ src/sys/kern/vfs_mount.c	Fri May 30 08:46:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_mount.c,v 1.29 2014/05/24 16:34:04 christos Exp $	*/
+/*	$NetBSD: vfs_mount.c,v 1.30 2014/05/30 08:46:00 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_mount.c,v 1.29 2014/05/24 16:34:04 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_mount.c,v 1.30 2014/05/30 08:46:00 hannken Exp $);
 
 #define _VFS_VNODE_PRIVATE
 
@@ -393,9 +393,8 @@ again:
 	   		return NULL;
 		}
 		mutex_enter(vp-v_interlock);
-		while (ISSET(vp-v_iflag, VI_MARKER) ||
-		ISSET(vp-v_iflag, VI_XLOCK) ||
-		(f  !(*f)(cl, vp))) {
+		if (ISSET(vp-v_iflag, VI_MARKER) ||
+		(f  !ISSET(vp-v_iflag, VI_XLOCK)  !(*f)(cl, vp))) {
 			mutex_exit(vp-v_interlock);
 			vp = TAILQ_NEXT(vp, v_mntvnodes);
 			goto again;



CVS commit: src/sys/nfs

2014-05-30 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri May 30 08:47:45 UTC 2014

Modified Files:
src/sys/nfs: nfs_node.c nfs_var.h nfs_vfsops.c nfsmount.h nfsnode.h

Log Message:
Change NFS from rbtree to vcache.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/nfs/nfs_node.c
cvs rdiff -u -r1.91 -r1.92 src/sys/nfs/nfs_var.h
cvs rdiff -u -r1.228 -r1.229 src/sys/nfs/nfs_vfsops.c
cvs rdiff -u -r1.51 -r1.52 src/sys/nfs/nfsmount.h
cvs rdiff -u -r1.72 -r1.73 src/sys/nfs/nfsnode.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/nfs/nfs_node.c
diff -u src/sys/nfs/nfs_node.c:1.117 src/sys/nfs/nfs_node.c:1.118
--- src/sys/nfs/nfs_node.c:1.117	Thu Feb 27 16:51:38 2014
+++ src/sys/nfs/nfs_node.c	Fri May 30 08:47:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_node.c,v 1.117 2014/02/27 16:51:38 hannken Exp $	*/
+/*	$NetBSD: nfs_node.c,v 1.118 2014/05/30 08:47:45 hannken Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_node.c,v 1.117 2014/02/27 16:51:38 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_node.c,v 1.118 2014/05/30 08:47:45 hannken Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs.h
@@ -106,120 +106,36 @@ nfs_node_done(void)
 	workqueue_destroy(nfs_sillyworkq);
 }
 
-struct fh_match {
-	nfsfh_t *fhm_fhp;
-	size_t fhm_fhsize;
-	size_t fhm_fhoffset;
-};
-
-static int
-nfs_compare_nodes(void *ctx, const void *parent, const void *node)
-{
-	const struct nfsnode * const pnp = parent;
-	const struct nfsnode * const np = node;
-
-	if (pnp-n_fhsize != np-n_fhsize)
-		return np-n_fhsize - pnp-n_fhsize;
-
-	return memcmp(np-n_fhp, pnp-n_fhp, np-n_fhsize);
-}
-
-static int
-nfs_compare_node_fh(void *ctx, const void *b, const void *key)
-{
-	const struct nfsnode * const pnp = b;
-	const struct fh_match * const fhm = key;
-
-	if (pnp-n_fhsize != fhm-fhm_fhsize)
-		return fhm-fhm_fhsize - pnp-n_fhsize;
-
-	return memcmp(fhm-fhm_fhp, pnp-n_fhp, pnp-n_fhsize);
-}
-
-static const rb_tree_ops_t nfs_node_rbtree_ops = {
-	.rbto_compare_nodes = nfs_compare_nodes,
-	.rbto_compare_key = nfs_compare_node_fh,
-	.rbto_node_offset = offsetof(struct nfsnode, n_rbnode),
-	.rbto_context = NULL
-};
-
-void
-nfs_rbtinit(struct nfsmount *nmp)
-{
-
-	rb_tree_init(nmp-nm_rbtree, nfs_node_rbtree_ops);
-}
-
 /*
- * Look up a vnode/nfsnode by file handle.
- * Callers must check for mount points!!
- * In all cases, a pointer to a
- * nfsnode structure is returned.
+ * Initialize this vnode / nfs node pair.
+ * Caller assures no other thread will try to load this node.
  */
 int
-nfs_nget1(struct mount *mntp, nfsfh_t *fhp, int fhsize, struct nfsnode **npp,
-int lkflags)
+nfs_loadvnode(struct mount *mp, struct vnode *vp,
+const void *key, size_t key_len, const void **new_key)
 {
+	int fhsize = key_len;
+	const nfsfh_t *fhp = key;
 	struct nfsnode *np;
-	struct vnode *vp;
-	struct nfsmount *nmp = VFSTONFS(mntp);
-	int error;
-	struct fh_match fhm;
-
-	fhm.fhm_fhp = fhp;
-	fhm.fhm_fhsize = fhsize;
 
-loop:
-	rw_enter(nmp-nm_rbtlock, RW_READER);
-	np = rb_tree_find_node(nmp-nm_rbtree, fhm);
-	if (np != NULL) {
-		vp = NFSTOV(np);
-		mutex_enter(vp-v_interlock);
-		rw_exit(nmp-nm_rbtlock);
-		error = vget(vp, LK_EXCLUSIVE | lkflags);
-		if (error == EBUSY)
-			return error;
-		if (error)
-			goto loop;
-		*npp = np;
-		return(0);
-	}
-	rw_exit(nmp-nm_rbtlock);
-
-	error = getnewvnode(VT_NFS, mntp, nfsv2_vnodeop_p, NULL, vp);
-	if (error) {
-		*npp = 0;
-		return (error);
-	}
+	/* Aloocate and initialize the nfsnode. */
 	np = pool_get(nfs_node_pool, PR_WAITOK);
 	memset(np, 0, sizeof *np);
-	np-n_vnode = vp;
-
-	/*
-	 * Insert the nfsnode in the hash queue for its new file handle
-	 */
-
 	if (fhsize  NFS_SMALLFH) {
 		np-n_fhp = kmem_alloc(fhsize, KM_SLEEP);
 	} else
 		np-n_fhp = np-n_fh;
+	vp-v_tag = VT_NFS;
+	vp-v_type = VNON;
+	vp-v_op = nfsv2_vnodeop_p;
+	vp-v_data = np;
 	memcpy(np-n_fhp, fhp, fhsize);
 	np-n_fhsize = fhsize;
 	np-n_accstamp = -1;
 	np-n_vattr = pool_get(nfs_vattr_pool, PR_WAITOK);
+	np-n_vnode = vp;
 
-	rw_enter(nmp-nm_rbtlock, RW_WRITER);
-	if (NULL != rb_tree_find_node(nmp-nm_rbtree, fhm)) {
-		rw_exit(nmp-nm_rbtlock);
-		if (fhsize  NFS_SMALLFH) {
-			kmem_free(np-n_fhp, fhsize);
-		}
-		pool_put(nfs_vattr_pool, np-n_vattr);
-		pool_put(nfs_node_pool, np);
-		ungetnewvnode(vp);
-		goto loop;
-	}
-	vp-v_data = np;
+	/* Initialize genfs node. */
 	genfs_node_init(vp, nfs_genfsops);
 	/*
 	 * Initalize read/write creds to useful values. VOP_OPEN will
@@ -229,15 +145,35 @@ loop:
 	kauth_cred_hold(np-n_rcred);
 	np-n_wcred = curlwp-l_cred;
 	kauth_cred_hold(np-n_wcred);
-	error = VOP_LOCK(vp, LK_EXCLUSIVE);
-	KASSERT(error == 0);
 	NFS_INVALIDATE_ATTRCACHE(np);
 	uvm_vnp_setsize(vp, 0);
-	(void)rb_tree_insert_node(nmp-nm_rbtree, np);
-	rw_exit(nmp-nm_rbtlock);
+	*new_key = np-n_fhp;
+	return 0;
+}
 
-	*npp = np;
-	return 

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

2014-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 11:46:48 UTC 2014

Modified Files:
src/sys/arch/mips/include: asm.h

Log Message:
Drop undocumented and redundant 0 argument to .ent.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/mips/include/asm.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/asm.h
diff -u src/sys/arch/mips/include/asm.h:1.46 src/sys/arch/mips/include/asm.h:1.47
--- src/sys/arch/mips/include/asm.h:1.46	Thu Nov 10 00:37:38 2011
+++ src/sys/arch/mips/include/asm.h	Fri May 30 11:46:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.46 2011/11/10 00:37:38 joerg Exp $	*/
+/*	$NetBSD: asm.h,v 1.47 2014/05/30 11:46:48 joerg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -117,7 +117,7 @@
  *	No profilable local leaf routine.
  */
 #define	STATIC_LEAF_NOPROFILE(x)	\
-	.ent	_C_LABEL(x), 0;		\
+	.ent	_C_LABEL(x);		\
 _C_LABEL(x): ;\
 	.frame sp, 0, ra
 
@@ -169,7 +169,7 @@ _C_LABEL(x):
  *	No profilable local nested routine.
  */
 #define	STATIC_NESTED_NOPROFILE(x, fsize, retpc)	\
-	.ent	_C_LABEL(x), 0;			\
+	.ent	_C_LABEL(x);			\
 _C_LABEL(x): ;	\
 	.frame	sp, fsize, retpc
 
@@ -234,7 +234,7 @@ _C_LABEL(x):
  *	XXX: regmask should be used to generate .mask
  */
 #define	VECTOR(x, regmask)		\
-	.ent	_C_LABEL(x),0;		\
+	.ent	_C_LABEL(x);		\
 	EXPORT(x);			\
 
 #define	VECTOR_END(x)			\



CVS commit: src/usr.sbin/makefs/cd9660

2014-05-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri May 30 13:14:48 UTC 2014

Modified Files:
src/usr.sbin/makefs/cd9660: iso9660_rrip.c

Log Message:
PR kern/48852 (which should have been bin/ in retrospect): apply patch
from Thomas Schmitt to fix rockridge encoding of device nodes.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/makefs/cd9660/iso9660_rrip.c

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

Modified files:

Index: src/usr.sbin/makefs/cd9660/iso9660_rrip.c
diff -u src/usr.sbin/makefs/cd9660/iso9660_rrip.c:1.13 src/usr.sbin/makefs/cd9660/iso9660_rrip.c:1.14
--- src/usr.sbin/makefs/cd9660/iso9660_rrip.c:1.13	Tue Jul 30 16:02:23 2013
+++ src/usr.sbin/makefs/cd9660/iso9660_rrip.c	Fri May 30 13:14:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: iso9660_rrip.c,v 1.13 2013/07/30 16:02:23 reinoud Exp $	*/
+/*	$NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $	*/
 
 /*
  * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -44,7 +44,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(__lint)
-__RCSID($NetBSD: iso9660_rrip.c,v 1.13 2013/07/30 16:02:23 reinoud Exp $);
+__RCSID($NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $);
 #endif  /* !__lint */
 
 static void cd9660_rrip_initialize_inode(cd9660node *);
@@ -657,13 +657,14 @@ cd9660node_rrip_pn(struct ISO_SUSP_ATTRI
 	pn_field-attr.rr_entry.PN.h.length[0] = 20;
 	pn_field-attr.rr_entry.PN.h.version[0] = 1;
 
-	if (sizeof (fnode-inode-st.st_dev)  32)
-		cd9660_bothendian_dword((uint64_t)fnode-inode-st.st_dev  32,
+	if (sizeof (fnode-inode-st.st_rdev)  4)
+		cd9660_bothendian_dword(
+		(uint64_t)fnode-inode-st.st_rdev  32,
 		pn_field-attr.rr_entry.PN.high);
 	else
 		cd9660_bothendian_dword(0, pn_field-attr.rr_entry.PN.high);
 
-	cd9660_bothendian_dword(fnode-inode-st.st_dev  0x,
+	cd9660_bothendian_dword(fnode-inode-st.st_rdev  0x,
 		pn_field-attr.rr_entry.PN.low);
 	return 1;
 }



CVS commit: src/distrib/vax/cdroms/installcd

2014-05-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri May 30 13:19:43 UTC 2014

Modified Files:
src/distrib/vax/cdroms/installcd: etc.rc

Log Message:
Make it deal with /dev being the result of a MAKDEV all instead of
MAKEDEV init by mounting a ptyfs if needed.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/vax/cdroms/installcd/etc.rc

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

Modified files:

Index: src/distrib/vax/cdroms/installcd/etc.rc
diff -u src/distrib/vax/cdroms/installcd/etc.rc:1.2 src/distrib/vax/cdroms/installcd/etc.rc:1.3
--- src/distrib/vax/cdroms/installcd/etc.rc:1.2	Fri May 23 12:25:46 2014
+++ src/distrib/vax/cdroms/installcd/etc.rc	Fri May 30 13:19:42 2014
@@ -1,4 +1,4 @@
-# $NetBSD: etc.rc,v 1.2 2014/05/23 12:25:46 martin Exp $
+# $NetBSD: etc.rc,v 1.3 2014/05/30 13:19:42 martin Exp $
 #
 # Copyright (c) 1997 Perry E. Metzger
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -51,6 +51,16 @@ EOM
 	exec sh
 }
 
+# if /dev has not been populated by init, it may be a stock MAKEDEV all
+# variant without opty - in which case we need to mount a ptyfs
+if [ ! -r /dev/ttypf ]; then
+	if mount | grep '^ptyfs on /dev/pts' /dev/null 21; then
+		# do not mount it again
+	else
+		mount -t ptyfs ptyfs /dev/pts
+	fi
+fi
+
 # mount a few tempfs to allow modifications over the CD contents
 mount -t tmpfs tmpfs /tmp || lowmemfail
 mount -t tmpfs tmpfs /var || lowmemfail



CVS commit: src/distrib/vax/cdroms/installcd

2014-05-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri May 30 13:23:05 UTC 2014

Modified Files:
src/distrib/vax/cdroms/installcd: Makefile

Log Message:
The current vax /boot is super slow unziping kernels - and this is a CD, wich
has space enough, so unzip the kernel on it to speed up the boot process.
XXX The /boot bug should nevertheless be fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/vax/cdroms/installcd/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/vax/cdroms/installcd/Makefile
diff -u src/distrib/vax/cdroms/installcd/Makefile:1.3 src/distrib/vax/cdroms/installcd/Makefile:1.4
--- src/distrib/vax/cdroms/installcd/Makefile:1.3	Wed May 21 14:21:35 2014
+++ src/distrib/vax/cdroms/installcd/Makefile	Fri May 30 13:23:05 2014
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.3 2014/05/21 14:21:35 martin Exp $
+#	$NetBSD: Makefile,v 1.4 2014/05/30 13:23:05 martin Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
-CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd
+CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd.gz
 CDRELEASE_NOISOS=true
 
 # for PRINTOBJDIR
@@ -28,6 +28,7 @@ image_md_pre:
 	for f in ${SYSINSTDIR}/sysinstmsgs.??; do \
 		${INSTALL} ${COPY} $$f cdrom; \
 	done
+	${TOOL_GZIP} -d cdrom/netbsd.gz
 	${MKDIR} cdrom/var
 	${MKDIR} cdrom/kern
 



CVS commit: src/distrib/vax/cdroms/installcd

2014-05-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri May 30 13:24:22 UTC 2014

Modified Files:
src/distrib/vax/cdroms/installcd: Makefile

Log Message:
Pre-populate /dev on the CD - with rockridge extensions we can do this and
it saves us one tmpfs (or mfs) instance, which helps quite a bit on low
memory machines.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/vax/cdroms/installcd/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/vax/cdroms/installcd/Makefile
diff -u src/distrib/vax/cdroms/installcd/Makefile:1.4 src/distrib/vax/cdroms/installcd/Makefile:1.5
--- src/distrib/vax/cdroms/installcd/Makefile:1.4	Fri May 30 13:23:05 2014
+++ src/distrib/vax/cdroms/installcd/Makefile	Fri May 30 13:24:22 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2014/05/30 13:23:05 martin Exp $
+#	$NetBSD: Makefile,v 1.5 2014/05/30 13:24:22 martin Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd.gz
@@ -29,6 +29,7 @@ image_md_pre:
 		${INSTALL} ${COPY} $$f cdrom; \
 	done
 	${TOOL_GZIP} -d cdrom/netbsd.gz
+	(cd cdrom/dev  ${HOST_SH} ./MAKEDEV all)
 	${MKDIR} cdrom/var
 	${MKDIR} cdrom/kern
 



CVS commit: src/lib/libc/sys

2014-05-30 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri May 30 16:11:01 UTC 2014

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

Log Message:
len argument is of unsigned type (size_t) and thus cannot be negative;
remove corresponding statement in ERRORS.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/sys/munmap.2

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

Modified files:

Index: src/lib/libc/sys/munmap.2
diff -u src/lib/libc/sys/munmap.2:1.20 src/lib/libc/sys/munmap.2:1.21
--- src/lib/libc/sys/munmap.2:1.20	Sat Oct 15 21:35:50 2011
+++ src/lib/libc/sys/munmap.2	Fri May 30 16:11:01 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: munmap.2,v 1.20 2011/10/15 21:35:50 rmind Exp $
+.\	$NetBSD: munmap.2,v 1.21 2014/05/30 16:11:01 njoly Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -62,9 +62,7 @@ will fail if:
 .It Bq Er EINVAL
 The
 .Fa addr
-parameter was not page aligned, the
-.Fa len
-parameter was negative, or
+parameter was not page aligned, or
 some part of the region being unmapped is outside the
 valid address range for a process.
 .El



CVS commit: src/sys/dev/usb

2014-05-30 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Fri May 30 16:11:52 UTC 2014

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Added Realtek devices.


To generate a diff of this commit:
cvs rdiff -u -r1.671 -r1.672 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.671 src/sys/dev/usb/usbdevs:1.672
--- src/sys/dev/usb/usbdevs:1.671	Tue May 27 13:41:01 2014
+++ src/sys/dev/usb/usbdevs	Fri May 30 16:11:52 2014
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.671 2014/05/27 13:41:01 ryoon Exp $
+$NetBSD: usbdevs,v 1.672 2014/05/30 16:11:52 nonaka Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2647,6 +2647,7 @@ product RATOC REXUSB60		0xb000	USB seria
 product RATOC REXUSB60F		0xb020	USB serial adapter REX-USB60F
 
 /* Realtek products */
+product REALTEK RTL8188ETV	0x0179	RTL8188ETV
 product REALTEK RTL8188CTV	0x018a	RTL8188CTV
 product REALTEK RTL8188RU_2	0x317f	RTL8188RU
 product REALTEK RTL8150L	0x8150	RTL8150L USB-Ethernet Bridge
@@ -2659,6 +2660,7 @@ product REALTEK RTL8174		0x8174	RTL8174
 product REALTEK RTL8188CU_0	0x8176  RTL8188CU
 product REALTEK RTL8191CU	0x8177	RTL8191CU
 product REALTEK RTL8192CU	0x8178	RTL8192CU
+product REALTEK RTL8188EU	0x8179	RTL8188EU
 product REALTEK RTL8188CU_1	0x817a	RTL8188CU
 product REALTEK RTL8188CU_2	0x817b	RTL8188CU
 product REALTEK RTL8192CE	0x817c	RTL8192CE



CVS commit: src/sys/dev/usb

2014-05-30 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Fri May 30 16:12:22 UTC 2014

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.663 -r1.664 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.664 -r1.665 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.663 src/sys/dev/usb/usbdevs.h:1.664
--- src/sys/dev/usb/usbdevs.h:1.663	Tue May 27 13:41:48 2014
+++ src/sys/dev/usb/usbdevs.h	Fri May 30 16:12:22 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.663 2014/05/27 13:41:48 ryoon Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.664 2014/05/30 16:12:22 nonaka Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.670 2014/05/25 06:10:25 ryoon Exp
+ *	NetBSD: usbdevs,v 1.672 2014/05/30 16:11:52 nonaka Exp
  */
 
 /*
@@ -2654,6 +2654,7 @@
 #define	USB_PRODUCT_RATOC_REXUSB60F	0xb020		/* USB serial adapter REX-USB60F */
 
 /* Realtek products */
+#define	USB_PRODUCT_REALTEK_RTL8188ETV	0x0179		/* RTL8188ETV */
 #define	USB_PRODUCT_REALTEK_RTL8188CTV	0x018a		/* RTL8188CTV */
 #define	USB_PRODUCT_REALTEK_RTL8188RU_2	0x317f		/* RTL8188RU */
 #define	USB_PRODUCT_REALTEK_RTL8150L	0x8150		/* RTL8150L USB-Ethernet Bridge */
@@ -2666,6 +2667,7 @@
 #define	USB_PRODUCT_REALTEK_RTL8188CU_0	0x8176		/* RTL8188CU */
 #define	USB_PRODUCT_REALTEK_RTL8191CU	0x8177		/* RTL8191CU */
 #define	USB_PRODUCT_REALTEK_RTL8192CU	0x8178		/* RTL8192CU */
+#define	USB_PRODUCT_REALTEK_RTL8188EU	0x8179		/* RTL8188EU */
 #define	USB_PRODUCT_REALTEK_RTL8188CU_1	0x817a		/* RTL8188CU */
 #define	USB_PRODUCT_REALTEK_RTL8188CU_2	0x817b		/* RTL8188CU */
 #define	USB_PRODUCT_REALTEK_RTL8192CE	0x817c		/* RTL8192CE */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.664 src/sys/dev/usb/usbdevs_data.h:1.665
--- src/sys/dev/usb/usbdevs_data.h:1.664	Tue May 27 13:41:48 2014
+++ src/sys/dev/usb/usbdevs_data.h	Fri May 30 16:12:22 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.664 2014/05/27 13:41:48 ryoon Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.665 2014/05/30 16:12:22 nonaka Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.670 2014/05/25 06:10:25 ryoon Exp
+ *	NetBSD: usbdevs,v 1.672 2014/05/30 16:11:52 nonaka Exp
  */
 
 /*
@@ -8079,6 +8079,10 @@ const struct usb_product usb_products[] 
 	USB serial adapter REX-USB60F,
 	},
 	{
+	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188ETV,
+	RTL8188ETV,
+	},
+	{
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188CTV,
 	RTL8188CTV,
 	},
@@ -8127,6 +8131,10 @@ const struct usb_product usb_products[] 
 	RTL8192CU,
 	},
 	{
+	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188EU,
+	RTL8188EU,
+	},
+	{
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188CU_1,
 	RTL8188CU,
 	},
@@ -10139,4 +10147,4 @@ const struct usb_product usb_products[] 
 	Prestige,
 	},
 };
-const int usb_nproducts = 1995;
+const int usb_nproducts = 1997;



CVS commit: src/share/mk

2014-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 18:31:58 UTC 2014

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Always use our exception handling code for eARM.


To generate a diff of this commit:
cvs rdiff -u -r1.810 -r1.811 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.810 src/share/mk/bsd.own.mk:1.811
--- src/share/mk/bsd.own.mk:1.810	Fri May 30 18:30:32 2014
+++ src/share/mk/bsd.own.mk	Fri May 30 18:31:58 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.810 2014/05/30 18:30:32 joerg Exp $
+#	$NetBSD: bsd.own.mk,v 1.811 2014/05/30 18:31:58 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -98,7 +98,7 @@ HAVE_LIBGCC?=	yes
 .endif
 
 # ia64 is not support
-.if ${MKLLVM:Uno} == yes
+.if ${MKLLVM:Uno} == yes || !empty(MACHINE_ARCH:Mearm*)
 HAVE_LIBGCC_EH?=	no
 .else
 HAVE_LIBGCC_EH?=	yes



CVS commit: src/share/mk

2014-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 18:30:32 UTC 2014

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Remove platform support list for libc unwinder, just keep comment about
ia64 state.


To generate a diff of this commit:
cvs rdiff -u -r1.809 -r1.810 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.809 src/share/mk/bsd.own.mk:1.810
--- src/share/mk/bsd.own.mk:1.809	Fri May 23 18:51:31 2014
+++ src/share/mk/bsd.own.mk	Fri May 30 18:30:32 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.809 2014/05/23 18:51:31 matt Exp $
+#	$NetBSD: bsd.own.mk,v 1.810 2014/05/30 18:30:32 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -86,7 +86,6 @@ EXTERNAL_GCC_SUBDIR=	/does/not/exist
 
 .if !empty(MACHINE_ARCH:Mearm*)
 _LIBC_COMPILER_RT.${MACHINE_ARCH}=	yes
-_LIBC_UNWIND_SUPPORT.${MACHINE_ARCH}=	yes
 .endif
 
 _LIBC_COMPILER_RT.i386=		yes
@@ -98,22 +97,8 @@ HAVE_LIBGCC?=	no
 HAVE_LIBGCC?=	yes
 .endif
 
-_LIBC_UNWIND_SUPPORT.alpha=	yes
-_LIBC_UNWIND_SUPPORT.hppa=	yes
-_LIBC_UNWIND_SUPPORT.i386=	yes
-_LIBC_UNWIND_SUPPORT.m68k=	yes
-_LIBC_UNWIND_SUPPORT.mipseb=	yes
-_LIBC_UNWIND_SUPPORT.mipsel=	yes
-_LIBC_UNWIND_SUPPORT.mips64eb=	yes
-_LIBC_UNWIND_SUPPORT.mips64el=	yes
-_LIBC_UNWIND_SUPPORT.powerpc=	yes
-_LIBC_UNWIND_SUPPORT.sh3el=	yes
-_LIBC_UNWIND_SUPPORT.sh3eb=	yes
-_LIBC_UNWIND_SUPPORT.sparc=	yes
-_LIBC_UNWIND_SUPPORT.sparc64=	yes
-_LIBC_UNWIND_SUPPORT.vax=	yes
-_LIBC_UNWIND_SUPPORT.x86_64=	yes
-.if ${MKLLVM:Uno} == yes  ${_LIBC_UNWIND_SUPPORT.${MACHINE_ARCH}:Uno} == yes
+# ia64 is not support
+.if ${MKLLVM:Uno} == yes
 HAVE_LIBGCC_EH?=	no
 .else
 HAVE_LIBGCC_EH?=	yes



CVS commit: src/external/gpl3/gcc/dist/gcc

2014-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 18:31:31 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/gcc/common/config/arm: arm-common.c
src/external/gpl3/gcc/dist/gcc/config/arm: arm.h netbsd-eabi.h

Log Message:
Switch eARM to using normal DWARF exception handling.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c
diff -u src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c:1.1.1.1 src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c:1.2
--- src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c:1.1.1.1	Sat Mar  1 08:43:12 2014
+++ src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c	Fri May 30 18:31:31 2014
@@ -48,6 +48,9 @@ arm_except_unwind_info (struct gcc_optio
 return UI_SJLJ;
 #endif
 
+  if (ARM_DWARF_UNWIND_TABLES)
+return UI_DWARF2;
+
   /* If not using ARM EABI unwind tables... */
   if (ARM_UNWIND_INFO)
 {

Index: src/external/gpl3/gcc/dist/gcc/config/arm/arm.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.8 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.9
--- src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.8	Tue May 27 09:18:54 2014
+++ src/external/gpl3/gcc/dist/gcc/config/arm/arm.h	Fri May 30 18:31:31 2014
@@ -889,6 +889,11 @@ extern int arm_arch_thumb_hwdiv;
 #define ARM_UNWIND_INFO  0
 #endif
 
+/* Overriden by config/arm/netbsd-eabi.h.  */
+#ifndef ARM_DWARF_UNWIND_TABLES
+#define ARM_DWARF_UNWIND_TABLES 0
+#endif
+
 /* Use r0 and r1 to pass exception handling information.  */
 #define EH_RETURN_DATA_REGNO(N) (((N)  2) ? N : INVALID_REGNUM)
 
@@ -899,11 +904,21 @@ extern int arm_arch_thumb_hwdiv;
 #ifndef ARM_TARGET2_DWARF_FORMAT
 #define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_pcrel
 
+#  if ARM_DWARF_UNWIND_TABLES
+/* DWARF unwinding uses the normal indirect/pcrel vs absptr format
+   for 32bit platforms. */
+#  define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
+((flag_pic \
+  ((GLOBAL) || (CODE))) \
+ ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \
+ : DW_EH_PE_absptr)
+#  else
 /* ttype entries (the only interesting data references used)
use TARGET2 relocations.  */
-#define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
-  (((code) == 0  (data) == 1  ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
-			   : DW_EH_PE_absptr)
+#  define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
+(((code) == 0  (data) == 1  ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
+ : DW_EH_PE_absptr)
+#  endif
 #endif
 
 /* The native (Norcroft) Pascal compiler for the ARM passes the static chain

Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.12 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.13
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.12	Sat Mar  1 09:44:50 2014
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h	Fri May 30 18:31:31 2014
@@ -45,6 +45,13 @@
 #undef ARM_DEFAULT_ABI
 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
 
+#undef ARM_EABI_UNWIND_TABLES
+#define ARM_EABI_UNWIND_TABLES 0
+#undef ARM_UNWIND_INFO
+#define ARM_UNWIND_INFO 0
+#undef ARM_DWARF_UNWIND_TABLES
+#define ARM_DWARF_UNWIND_TABLES 1
+
 #undef TARGET_OS_CPP_BUILTINS
 #define TARGET_OS_CPP_BUILTINS()		\
   do		\
@@ -52,6 +59,8 @@
   if (TARGET_AAPCS_BASED)			\
 	TARGET_BPABI_CPP_BUILTINS();		\
   NETBSD_OS_CPP_BUILTINS_ELF();		\
+  if (ARM_DWARF_UNWIND_TABLES)		\
+	builtin_define (__ARM_DWARF_EH__);	\
   if (ARM_EABI_UNWIND_TABLES)		\
 	builtin_define (__UNWIND_TABLES__);	\
 }		\



CVS commit: src/share/mk

2014-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 18:39:29 UTC 2014

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
If clang is requested for i386, amd64 or eARM, also build libc++.


To generate a diff of this commit:
cvs rdiff -u -r1.811 -r1.812 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.811 src/share/mk/bsd.own.mk:1.812
--- src/share/mk/bsd.own.mk:1.811	Fri May 30 18:31:58 2014
+++ src/share/mk/bsd.own.mk	Fri May 30 18:39:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.811 2014/05/30 18:31:58 joerg Exp $
+#	$NetBSD: bsd.own.mk,v 1.812 2014/05/30 18:39:29 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1083,6 +1083,16 @@ MKMAN:=		no
 MKNLS:=		no
 .endif
 
+.if !empty(MACHINE_ARCH:Mearm*)
+_NEEDS_LIBCXX.${MACHINE_ARCH}=	yes
+.endif
+_NEEDS_LIBCXX.i386=	yes
+_NEEDS_LIBCXX.x86_64=	yes
+
+.if ${MKLLVM} == yes  ${_NEEDS_LIBCXX.${MACHINE_ARCH}:Uno} == yes
+MKLIBCXX:=	yes
+.endif
+
 #
 # install(1) parameters.
 #



CVS commit: src

2014-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 18:33:30 UTC 2014

Modified Files:
src: UPDATING

Log Message:
Add note about the eARM flag day for C++.


To generate a diff of this commit:
cvs rdiff -u -r1.254 -r1.255 src/UPDATING

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.254 src/UPDATING:1.255
--- src/UPDATING:1.254	Sat Feb  1 13:29:45 2014
+++ src/UPDATING	Fri May 30 18:33:30 2014
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.254 2014/02/01 13:29:45 skrll Exp $
+$NetBSD: UPDATING,v 1.255 2014/05/30 18:33:30 joerg Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -16,6 +16,10 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
+20140530:
+	ARM eABI switched to DWARF based exception handling. This requires
+	rebuilding all C++ code. It is strongly advised to do a clean build.
+
 20140131:
 	The new compiler_rt/libc integration moved a few things. It is strongly
 	advised to do a clean build. At least lib/libc, the compat version(s)



CVS commit: src/usr.bin/calendar/calendars

2014-05-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 30 19:01:52 UTC 2014

Modified Files:
src/usr.bin/calendar/calendars: calendar.netbsd

Log Message:
Remove duplicated lines.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/calendar/calendars/calendar.netbsd

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

Modified files:

Index: src/usr.bin/calendar/calendars/calendar.netbsd
diff -u src/usr.bin/calendar/calendars/calendar.netbsd:1.31 src/usr.bin/calendar/calendars/calendar.netbsd:1.32
--- src/usr.bin/calendar/calendars/calendar.netbsd:1.31	Fri May 30 08:36:28 2014
+++ src/usr.bin/calendar/calendars/calendar.netbsd	Fri May 30 19:01:52 2014
@@ -3,10 +3,6 @@
 01/07   NetBSD/dreamcast port started, 2001
 01/17   NetBSD/hpcsh port started, 2001
 01/23   NetBSD/arc port started, 2000
-01/25   NetBSD 5.1.4 released, 2014
-01/25   NetBSD 5.2.2 released, 2014
-01/25   NetBSD 6.0.4 released, 2014
-01/25   NetBSD 6.1.3 released, 2014
 01/27   NetBSD 5.1.4 released, 2014
 01/27   NetBSD 5.2.2 released, 2014
 01/27   NetBSD 6.0.4 released, 2014



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

2014-05-30 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Fri May 30 21:55:32 UTC 2014

Modified Files:
src/sys/arch/sparc64/sparc64: locore.s

Log Message:
Remove debugging code introduced by accident in locore.s revision 1.357


To generate a diff of this commit:
cvs rdiff -u -r1.358 -r1.359 src/sys/arch/sparc64/sparc64/locore.s

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.358 src/sys/arch/sparc64/sparc64/locore.s:1.359
--- src/sys/arch/sparc64/sparc64/locore.s:1.358	Mon May  5 19:04:47 2014
+++ src/sys/arch/sparc64/sparc64/locore.s	Fri May 30 21:55:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.358 2014/05/05 19:04:47 palle Exp $	*/
+/*	$NetBSD: locore.s,v 1.359 2014/05/30 21:55:32 palle Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -4402,12 +4402,12 @@ ENTRY_NOPROFILE(cpu_initialize)	/* for c
 	wrpr	%g0, 0, %tl
 #endif
 
-#if 1
-!	set	_C_LABEL(pmapdebug), %o1
-!	ld	[%o1], %o1
-!	sethi	%hi(0x4), %o2
-!	btst	%o2, %o1
-!	bz	0f
+#ifdef DEBUG
+	set	_C_LABEL(pmapdebug), %o1
+	ld	[%o1], %o1
+	sethi	%hi(0x4), %o2
+	btst	%o2, %o1
+	bz	0f
 
 	LDPTR	[%l7 + CI_SPINUP], %o1
 	set	1f, %o0		! Debug printf



CVS commit: src/usr.sbin/ifmcstat

2014-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 22:20:48 UTC 2014

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

Log Message:
Inline trivial helper function.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/ifmcstat/ifmcstat.c

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

Modified files:

Index: src/usr.sbin/ifmcstat/ifmcstat.c
diff -u src/usr.sbin/ifmcstat/ifmcstat.c:1.15 src/usr.sbin/ifmcstat/ifmcstat.c:1.16
--- src/usr.sbin/ifmcstat/ifmcstat.c:1.15	Fri May 30 02:31:40 2014
+++ src/usr.sbin/ifmcstat/ifmcstat.c	Fri May 30 22:20:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifmcstat.c,v 1.15 2014/05/30 02:31:40 joerg Exp $	*/
+/*	$NetBSD: ifmcstat.c,v 1.16 2014/05/30 22:20:48 joerg Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,6 @@ static void kread(u_long, void *, int);
 static void acmc(struct ether_multi *);
 static void if6_addrlist(struct ifaddr *);
 static void in6_multilist(struct in6_multi *);
-static struct in6_multi * in6_multientry(struct in6_multi *);
 
 #define	KREAD(addr, buf, type) \
 	kread((u_long)addr, (void *)buf, sizeof(type))
@@ -233,20 +232,15 @@ if6_addrlist(struct ifaddr *ifap)
 	}
 }
 
-static struct in6_multi *
-in6_multientry(struct in6_multi *mc)
-{
-	struct in6_multi multi;
-
-	KREAD(mc, multi, struct in6_multi);
-	printf(\t\tgroup %s, inet6_n2a(multi.in6m_addr));
-	printf( refcnt %u\n, multi.in6m_refcount);
-	return(multi.in6m_entry.le_next);
-}
-
 static void
 in6_multilist(struct in6_multi *mc)
 {
-	while (mc)
-		mc = in6_multientry(mc);
+	struct in6_multi multi;
+
+	while (mc) {
+		KREAD(mc, multi, struct in6_multi);
+		printf(\t\tgroup %s, inet6_n2a(multi.in6m_addr));
+		printf( refcnt %u\n, multi.in6m_refcount);
+		mc = multi.in6m_entry.le_next;
+	}
 }



CVS commit: src/sys/net/npf

2014-05-30 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri May 30 23:26:06 UTC 2014

Modified Files:
src/sys/net/npf: npf.h npf_conf.c npf_impl.h npf_nat.c npf_ruleset.c

Log Message:
- npf_nat_freepolicy: handle a race condition when a new connection might
  be associated with a NAT policy which is going away and npfctl reload
  would wait for its natural expiration (potentially long time).
- Remove npf_ruleset_natreload() by merging into npf_ruleset_reload().
- npf_ruleset_reload: eliminate a small time period when a valid NAT
  policy might be inactive during the reload operation.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/net/npf/npf.h
cvs rdiff -u -r1.5 -r1.6 src/sys/net/npf/npf_conf.c
cvs rdiff -u -r1.51 -r1.52 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.27 -r1.28 src/sys/net/npf/npf_nat.c
cvs rdiff -u -r1.30 -r1.31 src/sys/net/npf/npf_ruleset.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.39 src/sys/net/npf/npf.h:1.40
--- src/sys/net/npf/npf.h:1.39	Mon May 19 18:45:51 2014
+++ src/sys/net/npf/npf.h	Fri May 30 23:26:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.h,v 1.39 2014/05/19 18:45:51 jakllsch Exp $	*/
+/*	$NetBSD: npf.h,v 1.40 2014/05/30 23:26:06 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -203,14 +203,14 @@ bool		npf_autounload_p(void);
 #endif	/* _KERNEL */
 
 /* Rule attributes. */
-#define	NPF_RULE_PASS			0x0001
-#define	NPF_RULE_GROUP			0x0002
-#define	NPF_RULE_FINAL			0x0004
-#define	NPF_RULE_STATEFUL		0x0008
-#define	NPF_RULE_RETRST			0x0010
-#define	NPF_RULE_RETICMP		0x0020
-#define	NPF_RULE_DYNAMIC		0x0040
-#define	NPF_RULE_MULTIENDS		0x0080
+#define	NPF_RULE_PASS			0x0001
+#define	NPF_RULE_GROUP			0x0002
+#define	NPF_RULE_FINAL			0x0004
+#define	NPF_RULE_STATEFUL		0x0008
+#define	NPF_RULE_RETRST			0x0010
+#define	NPF_RULE_RETICMP		0x0020
+#define	NPF_RULE_DYNAMIC		0x0040
+#define	NPF_RULE_MULTIENDS		0x0080
 
 #define	NPF_DYNAMIC_GROUP		(NPF_RULE_GROUP | NPF_RULE_DYNAMIC)
 
@@ -219,6 +219,9 @@ bool		npf_autounload_p(void);
 #define	NPF_RULE_DIMASK			(NPF_RULE_IN | NPF_RULE_OUT)
 #define	NPF_RULE_FORW			0x4000
 
+/* Private range of rule attributes (not public and should not be set). */
+#define	NPF_RULE_PRIVMASK		0x0f00
+
 #define	NPF_RULE_MAXNAMELEN		64
 #define	NPF_RULE_MAXKEYLEN		32
 

Index: src/sys/net/npf/npf_conf.c
diff -u src/sys/net/npf/npf_conf.c:1.5 src/sys/net/npf/npf_conf.c:1.6
--- src/sys/net/npf/npf_conf.c:1.5	Fri Nov 22 00:25:51 2013
+++ src/sys/net/npf/npf_conf.c	Fri May 30 23:26:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_conf.c,v 1.5 2013/11/22 00:25:51 rmind Exp $	*/
+/*	$NetBSD: npf_conf.c,v 1.6 2014/05/30 23:26:06 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_conf.c,v 1.5 2013/11/22 00:25:51 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_conf.c,v 1.6 2014/05/30 23:26:06 rmind Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -146,7 +146,7 @@ npf_config_reload(prop_dictionary_t dict
 	if ((onc = npf_config) != NULL) {
 		npf_ruleset_reload(rset, onc-n_rules);
 		npf_tableset_reload(tset, onc-n_tables);
-		npf_ruleset_natreload(nset, onc-n_nat_rules);
+		npf_ruleset_reload(nset, onc-n_nat_rules);
 	}
 
 	/*

Index: src/sys/net/npf/npf_impl.h
diff -u src/sys/net/npf/npf_impl.h:1.51 src/sys/net/npf/npf_impl.h:1.52
--- src/sys/net/npf/npf_impl.h:1.51	Mon May 19 18:45:51 2014
+++ src/sys/net/npf/npf_impl.h	Fri May 30 23:26:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_impl.h,v 1.51 2014/05/19 18:45:51 jakllsch Exp $	*/
+/*	$NetBSD: npf_impl.h,v 1.52 2014/05/30 23:26:06 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -258,7 +258,6 @@ npf_ruleset_t *	npf_ruleset_create(size_
 void		npf_ruleset_destroy(npf_ruleset_t *);
 void		npf_ruleset_insert(npf_ruleset_t *, npf_rule_t *);
 void		npf_ruleset_reload(npf_ruleset_t *, npf_ruleset_t *);
-void		npf_ruleset_natreload(npf_ruleset_t *, npf_ruleset_t *);
 npf_rule_t *	npf_ruleset_matchnat(npf_ruleset_t *, npf_natpolicy_t *);
 npf_rule_t *	npf_ruleset_sharepm(npf_ruleset_t *, npf_natpolicy_t *);
 void		npf_ruleset_freealg(npf_ruleset_t *, npf_alg_t *);

Index: src/sys/net/npf/npf_nat.c
diff -u src/sys/net/npf/npf_nat.c:1.27 src/sys/net/npf/npf_nat.c:1.28
--- src/sys/net/npf/npf_nat.c:1.27	Fri Mar 14 11:29:44 2014
+++ src/sys/net/npf/npf_nat.c	Fri May 30 23:26:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_nat.c,v 1.27 2014/03/14 11:29:44 rmind Exp $	*/
+/*	$NetBSD: npf_nat.c,v 1.28 2014/05/30 23:26:06 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2014 Mindaugas Rasiukevicius rmind at netbsd org
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_nat.c,v 1.27 2014/03/14 11:29:44 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: