Re: CVS commit: src

2014-02-13 Thread David Laight
On Thu, Feb 13, 2014 at 08:22:32AM +0100, Christoph Egger wrote:
   
  +ENTRY(fngetsw)
  +   fnstsw  %ax
  +   ret
  +
 
 Not sure if you mean fngetsw here (copy  paste) ?

No, I want to return the status word in %ax, rather that write
it to a memory location.

David

-- 
David Laight: da...@l8s.co.uk


CVS commit: src/sys/fs/union

2014-02-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Feb 13 09:50:31 UTC 2014

Modified Files:
src/sys/fs/union: union_vnops.c

Log Message:
Fix the DOT and DOTDOT case for union_lookup1().


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/fs/union/union_vnops.c

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

Modified files:

Index: src/sys/fs/union/union_vnops.c
diff -u src/sys/fs/union/union_vnops.c:1.52 src/sys/fs/union/union_vnops.c:1.53
--- src/sys/fs/union/union_vnops.c:1.52	Fri Feb  7 15:29:22 2014
+++ src/sys/fs/union/union_vnops.c	Thu Feb 13 09:50:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vnops.c,v 1.52 2014/02/07 15:29:22 hannken Exp $	*/
+/*	$NetBSD: union_vnops.c,v 1.53 2014/02/13 09:50:31 hannken Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994, 1995
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: union_vnops.c,v 1.52 2014/02/07 15:29:22 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: union_vnops.c,v 1.53 2014/02/13 09:50:31 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -228,14 +228,19 @@ union_lookup1(struct vnode *udvp, struct
 error = VOP_LOOKUP(dvp, tdvp, cnp);
 	if (error)
 		return (error);
-	error = vn_lock(tdvp, LK_EXCLUSIVE);
-	if (error) {
-		vrele(tdvp);
-		return error;
+	if (dvp != tdvp) {
+		if (cnp-cn_flags  ISDOTDOT)
+			VOP_UNLOCK(dvp);
+		error = vn_lock(tdvp, LK_EXCLUSIVE);
+		if (cnp-cn_flags  ISDOTDOT)
+			vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
+		if (error) {
+			vrele(tdvp);
+			return error;
+		}
+		dvp = tdvp;
 	}
 
-	dvp = tdvp;
-
 	/*
 	 * Lastly check if the current node is a mount point in
 	 * which case walk up the mount hierarchy making sure not to



CVS commit: src/sys/fs/union

2014-02-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Feb 13 09:55:04 UTC 2014

Modified Files:
src/sys/fs/union: union.h union_subr.c union_vnops.c

Log Message:
Get rid of UN_KLOCK to keep a lock on vput().  It is not really needed
and makes the source difficult to read.  Always hold references to the
union nodes until the operation is done.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/fs/union/union.h
cvs rdiff -u -r1.60 -r1.61 src/sys/fs/union/union_subr.c
cvs rdiff -u -r1.53 -r1.54 src/sys/fs/union/union_vnops.c

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

Modified files:

Index: src/sys/fs/union/union.h
diff -u src/sys/fs/union/union.h:1.24 src/sys/fs/union/union.h:1.25
--- src/sys/fs/union/union.h:1.24	Mon Nov  5 17:24:11 2012
+++ src/sys/fs/union/union.h	Thu Feb 13 09:55:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: union.h,v 1.24 2012/11/05 17:24:11 dholland Exp $	*/
+/*	$NetBSD: union.h,v 1.25 2014/02/13 09:55:04 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994 The Regents of the University of California.
@@ -134,7 +134,6 @@ struct union_node {
 	off_t			un_lowersz;	/* l: size of lower object */
 };
 
-#define UN_KLOCK	0x08		/* Keep upper node locked on vput */
 #define UN_CACHED	0x10		/* In union cache */
 
 extern int union_allocvp(struct vnode **, struct mount *,

Index: src/sys/fs/union/union_subr.c
diff -u src/sys/fs/union/union_subr.c:1.60 src/sys/fs/union/union_subr.c:1.61
--- src/sys/fs/union/union_subr.c:1.60	Fri Feb  7 15:29:22 2014
+++ src/sys/fs/union/union_subr.c	Thu Feb 13 09:55:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_subr.c,v 1.60 2014/02/07 15:29:22 hannken Exp $	*/
+/*	$NetBSD: union_subr.c,v 1.61 2014/02/13 09:55:04 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.60 2014/02/07 15:29:22 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.61 2014/02/13 09:55:04 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -439,9 +439,6 @@ found:
 			vrele(uppervp);
 		}
 
-		if (un-un_uppervp)
-			un-un_flags = ~UN_KLOCK;
-
 		/*
 		 * Save information about the lower layer.
 		 * This needs to keep track of pathname

Index: src/sys/fs/union/union_vnops.c
diff -u src/sys/fs/union/union_vnops.c:1.53 src/sys/fs/union/union_vnops.c:1.54
--- src/sys/fs/union/union_vnops.c:1.53	Thu Feb 13 09:50:31 2014
+++ src/sys/fs/union/union_vnops.c	Thu Feb 13 09:55:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vnops.c,v 1.53 2014/02/13 09:50:31 hannken Exp $	*/
+/*	$NetBSD: union_vnops.c,v 1.54 2014/02/13 09:55:04 hannken Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994, 1995
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: union_vnops.c,v 1.53 2014/02/13 09:50:31 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: union_vnops.c,v 1.54 2014/02/13 09:55:04 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1156,18 +1156,19 @@ union_remove(void *v)
 		struct vnode *dvp = dun-un_uppervp;
 		struct vnode *vp = un-un_uppervp;
 
+		/*
+		 * Account for VOP_REMOVE to vrele dvp and vp.
+		 * Note: VOP_REMOVE will unlock dvp and vp.
+		 */
 		vref(dvp);
-		dun-un_flags |= UN_KLOCK;
-		vput(ap-a_dvp);
 		vref(vp);
-		un-un_flags |= UN_KLOCK;
-		vput(ap-a_vp);
-
 		if (union_dowhiteout(un, cnp-cn_cred))
 			cnp-cn_flags |= DOWHITEOUT;
 		error = VOP_REMOVE(dvp, vp, cnp);
 		if (!error)
 			union_removed_upper(un);
+		vrele(ap-a_dvp);
+		vrele(ap-a_vp);
 	} else {
 		error = union_mkwhiteout(
 			MOUNTTOUNIONMOUNT(UNIONTOV(dun)-v_mount),
@@ -1258,11 +1259,15 @@ union_link(void *v)
 		return (error);
 	}
 
+	/*
+	 * Account for VOP_LINK to vrele dvp.
+	 * Note: VOP_LINK will unlock dvp.
+	 */
 	vref(dvp);
-	dun-un_flags |= UN_KLOCK;
-	vput(ap-a_dvp);
+	error = VOP_LINK(dvp, vp, cnp);
+	vrele(ap-a_dvp);
 
-	return (VOP_LINK(dvp, vp, cnp));
+	return error;
 }
 
 int
@@ -1283,6 +1288,11 @@ union_rename(void *v)
 	struct vnode *tdvp = ap-a_tdvp;
 	struct vnode *tvp = ap-a_tvp;
 
+	/*
+	 * Account for VOP_RENAME to vrele all nodes.
+	 * Note: VOP_RENAME will unlock tdvp.
+	 */
+
 	if (fdvp-v_op == union_vnodeop_p) {	/* always true */
 		struct union_node *un = VTOUNION(fdvp);
 		if (un-un_uppervp == NULLVP) {
@@ -1330,8 +1340,6 @@ union_rename(void *v)
 
 		tdvp = un-un_uppervp;
 		vref(tdvp);
-		un-un_flags |= UN_KLOCK;
-		vput(ap-a_tdvp);
 	}
 
 	if (tvp != NULLVP  tvp-v_op == union_vnodeop_p) {
@@ -1340,9 +1348,7 @@ union_rename(void *v)
 		tvp = un-un_uppervp;
 		if (tvp != NULLVP) {
 			vref(tvp);
-			un-un_flags |= UN_KLOCK;
 		}
-		vput(ap-a_tvp);
 	}
 
 	error = VOP_RENAME(fdvp, fvp, ap-a_fcnp, tdvp, tvp, ap-a_tcnp);
@@ -1362,6 +1368,12 @@ out:
 	if (fvp != ap-a_fvp) {
 		vrele(ap-a_fvp);
 	}
+	if (tdvp != ap-a_tdvp) {
+		vrele(ap-a_tdvp);
+	}
+	if (tvp != ap-a_tvp) {
+		vrele(ap-a_tvp);
+	}
 	return (error);
 }
 
@@ -1428,18 +1440,19 @@ union_rmdir(void *v)
 		struct vnode 

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

2014-02-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 13 11:08:46 UTC 2014

Modified Files:
src/sys/arch/hppa/hppa: vm_machdep.c

Log Message:
Slight code re-arrangement. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/hppa/hppa/vm_machdep.c

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

Modified files:

Index: src/sys/arch/hppa/hppa/vm_machdep.c
diff -u src/sys/arch/hppa/hppa/vm_machdep.c:1.52 src/sys/arch/hppa/hppa/vm_machdep.c:1.53
--- src/sys/arch/hppa/hppa/vm_machdep.c:1.52	Wed Mar  7 22:10:50 2012
+++ src/sys/arch/hppa/hppa/vm_machdep.c	Thu Feb 13 11:08:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.52 2012/03/07 22:10:50 skrll Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.53 2014/02/13 11:08:46 skrll Exp $	*/
 
 /*	$OpenBSD: vm_machdep.c,v 1.64 2008/09/30 18:54:26 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.52 2012/03/07 22:10:50 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.53 2014/02/13 11:08:46 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -116,7 +116,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 
 	uv = uvm_lwp_getuarea(l2);
 	sp = (register_t)uv + PAGE_SIZE;
-	l2-l_md.md_regs = tf = (struct trapframe *)sp;
+	tf = l2-l_md.md_regs = (struct trapframe *)sp;
 	sp += sizeof(struct trapframe);
 
 	/* copy the l1's trapframe to l2 */



CVS commit: src/bin/hostname

2014-02-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Thu Feb 13 12:00:29 UTC 2014

Modified Files:
src/bin/hostname: hostname.1 hostname.c

Log Message:
Remove options added in 1.18, commitid: UhxHPgtT2Pzeg4Yw due to some
level of controversy about their inclusion.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/bin/hostname/hostname.1
cvs rdiff -u -r1.20 -r1.21 src/bin/hostname/hostname.c

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

Modified files:

Index: src/bin/hostname/hostname.1
diff -u src/bin/hostname/hostname.1:1.19 src/bin/hostname/hostname.1:1.20
--- src/bin/hostname/hostname.1:1.19	Fri Jul 19 11:19:23 2013
+++ src/bin/hostname/hostname.1	Thu Feb 13 12:00:29 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: hostname.1,v 1.19 2013/07/19 11:19:23 wiz Exp $
+.\	$NetBSD: hostname.1,v 1.20 2014/02/13 12:00:29 elric Exp $
 .\
 .\ Copyright (c) 1983, 1988, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)hostname.1	8.2 (Berkeley) 4/28/95
 .\
-.Dd July 19, 2013
+.Dd April 28, 1995
 .Dt HOSTNAME 1
 .Os
 .Sh NAME
@@ -37,7 +37,7 @@
 .Nd set or print name of current host system
 .Sh SYNOPSIS
 .Nm
-.Op Fl AadfIis
+.Op Fl s
 .Op Ar name-of-host
 .Sh DESCRIPTION
 .Nm
@@ -50,36 +50,14 @@ time.
 .Pp
 Options:
 .Bl -tag -width flag
-.It Fl A
-Display the FQDN of each address on all interfaces.
-.It Fl a
-Display alias name(s) of the host.
-.It Fl d
-Display the DNS domain.
-.It Fl f
-Display the FQDN for the hostname.
-.It Fl I
-Display each IP address on all interfaces.
-.It Fl i
-Display the IP address(es) for the hostname.
 .It Fl s
-Display the short hostname.
+Trims off any domain information from the printed
+name.
 .El
-.Sh NOTES
-With the exception of
-.Fl I
-and
-.Fl s ,
-the other options will retrieve their results from the resolver.
 .Sh SEE ALSO
 .Xr domainname 1 ,
-.Xr getaddrinfo 3 ,
-.Xr gethostbyname 3 ,
 .Xr gethostname 3 ,
-.Xr getifaddrs 3 ,
-.Xr getnameinfo 3 ,
-.Xr sethostname 3 ,
-.Xr hosts 5
+.Xr sethostname 3
 .Sh HISTORY
 The
 .Nm

Index: src/bin/hostname/hostname.c
diff -u src/bin/hostname/hostname.c:1.20 src/bin/hostname/hostname.c:1.21
--- src/bin/hostname/hostname.c:1.20	Fri Jul 19 15:53:00 2013
+++ src/bin/hostname/hostname.c	Thu Feb 13 12:00:29 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: hostname.c,v 1.20 2013/07/19 15:53:00 christos Exp $ */
+/* $NetBSD: hostname.c,v 1.21 2014/02/13 12:00:29 elric Exp $ */
 
 /*
  * Copyright (c) 1988, 1993
@@ -39,19 +39,13 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = @(#)hostname.c	8.2 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: hostname.c,v 1.20 2013/07/19 15:53:00 christos Exp $);
+__RCSID($NetBSD: hostname.c,v 1.21 2014/02/13 12:00:29 elric Exp $);
 #endif
 #endif /* not lint */
 
 #include sys/param.h
-#include sys/socket.h
-
-#include net/if.h
-#include netinet/in.h
 
 #include err.h
-#include ifaddrs.h
-#include netdb.h
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -62,36 +56,13 @@ __dead static void usage(void);
 int
 main(int argc, char *argv[])
 {
-	int ch, Aflag, aflag, dflag, Iflag, iflag, fflag, sflag, i;
+	int ch, sflag;
 	char *p, hostname[MAXHOSTNAMELEN + 1];
-	struct addrinfo hints, *ainfos, *ai;
-	struct hostent *hent;
-	struct ifaddrs *ifa, *ifp;
-	struct sockaddr_in6 *sin6;
-	char buf[MAX(MAXHOSTNAMELEN + 1, INET6_ADDRSTRLEN)];
 
 	setprogname(argv[0]);
-	Aflag = aflag = dflag = Iflag = iflag = fflag = sflag = 0;
-	while ((ch = getopt(argc, argv, AadIifs)) != -1)
+	sflag = 0;
+	while ((ch = getopt(argc, argv, s)) != -1)
 		switch (ch) {
-		case 'A':
-			Aflag = 1;
-			break;
-		case 'a':
-			aflag = 1;
-			break;
-		case 'd':
-			dflag = 1;
-			break;
-		case 'I':
-			Iflag = 1;
-			break;
-		case 'i':
-			iflag = 1;
-			break;
-		case 'f':
-			fflag = 1;
-			break;
 		case 's':
 			sflag = 1;
 			break;
@@ -108,90 +79,13 @@ main(int argc, char *argv[])
 	if (*argv) {
 		if (sethostname(*argv, strlen(*argv)))
 			err(1, sethostname);
-	} else if (Aflag || Iflag) {
-		if (getifaddrs(ifa) == -1)
-			err(1, getifaddrs);
-		for (ifp = ifa; ifp; ifp = ifp-ifa_next) {
-			if (ifp-ifa_addr == NULL ||
-			ifp-ifa_flags  IFF_LOOPBACK ||
-			!(ifp-ifa_flags  IFF_UP))
-continue;
-
-			switch(ifp-ifa_addr-sa_family) {
-			case AF_INET:
-break;
-			case AF_INET6:
-/* Skip link local addresses */
-sin6 = (struct sockaddr_in6 *)ifp-ifa_addr;
-if (IN6_IS_ADDR_LINKLOCAL(sin6-sin6_addr) ||
-IN6_IS_ADDR_MC_LINKLOCAL(sin6-sin6_addr))
-	continue;
-break;
-			default:
-/* We only translate IPv4 or IPv6 addresses */
-continue;
-			}
-			i = getnameinfo(ifp-ifa_addr, ifp-ifa_addr-sa_len,
-			buf, sizeof(buf), NULL, 0,
-			Iflag ? NI_NUMERICHOST: NI_NAMEREQD);
-			if (i) {
-if (Iflag  i != EAI_NONAME)
-	errx(1, getnameinfo: %s,
-	gai_strerror(i));
-			} else
-printf(%s\n, buf);
-		}
-		

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

2014-02-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 13 15:04:18 UTC 2014

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

Log Message:
Simplify cpu_spawn_return - setregs has done all the work already.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/hppa/hppa/trap.c

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

Modified files:

Index: src/sys/arch/hppa/hppa/trap.c
diff -u src/sys/arch/hppa/hppa/trap.c:1.104 src/sys/arch/hppa/hppa/trap.c:1.105
--- src/sys/arch/hppa/hppa/trap.c:1.104	Fri Oct 25 09:46:10 2013
+++ src/sys/arch/hppa/hppa/trap.c	Thu Feb 13 15:04:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.104 2013/10/25 09:46:10 martin Exp $	*/
+/*	$NetBSD: trap.c,v 1.105 2014/02/13 15:04:18 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.104 2013/10/25 09:46:10 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.105 2014/02/13 15:04:18 skrll Exp $);
 
 /* #define INTRDEBUG */
 /* #define TRAPDEBUG */
@@ -983,27 +983,6 @@ child_return(void *arg)
 void
 cpu_spawn_return(struct lwp *l)
 {
-	struct proc *p = l-l_proc;
-	pmap_t pmap = p-p_vmspace-vm_map.pmap;
-	pa_space_t space = pmap-pm_space;
-	struct trapframe *tf = l-l_md.md_regs;
-
-	/* Load all of the user's space registers. */
-	tf-tf_sr0 = tf-tf_sr1 = tf-tf_sr3 = tf-tf_sr2 =
-	tf-tf_sr4 = tf-tf_sr5 = tf-tf_sr6 = space;
-	tf-tf_iisq_head = tf-tf_iisq_tail = space;
-
-	/* Load the protection registers */
-	tf-tf_pidr1 = tf-tf_pidr2 = pmap-pm_pid;
-
-	/*
-	 * theoretically these could be inherited from the father,
-	 * but just in case.
-	 */
-	tf-tf_sr7 = HPPA_SID_KERNEL;
-	mfctl(CR_EIEM, tf-tf_eiem);
-	tf-tf_ipsw = PSW_C | PSW_Q | PSW_P | PSW_D | PSW_I /* | PSW_L */ |
-	(curcpu()-ci_psw  PSW_O);
 
 	userret(l, l-l_md.md_regs-tf_iioq_head, 0);
 #ifdef DEBUG



CVS commit: src/distrib/sets/lists/comp

2014-02-13 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Thu Feb 13 17:42:24 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: md.amd64

Log Message:
Mark i386/npx.h obsolete.
I'd forgotten it was released here as well.


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/distrib/sets/lists/comp/md.amd64

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

Modified files:

Index: src/distrib/sets/lists/comp/md.amd64
diff -u src/distrib/sets/lists/comp/md.amd64:1.214 src/distrib/sets/lists/comp/md.amd64:1.215
--- src/distrib/sets/lists/comp/md.amd64:1.214	Tue Feb 11 20:17:16 2014
+++ src/distrib/sets/lists/comp/md.amd64	Thu Feb 13 17:42:24 2014
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.214 2014/02/11 20:17:16 dsl Exp $
+# $NetBSD: md.amd64,v 1.215 2014/02/13 17:42:24 dsl Exp $
 
 ./usr/include/amd64comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
@@ -327,7 +327,7 @@
 ./usr/include/i386/mtrr.h			comp-c-include
 ./usr/include/i386/multiboot.h			comp-c-include
 ./usr/include/i386/mutex.h			comp-c-include
-./usr/include/i386/npx.h			comp-c-include
+./usr/include/i386/npx.h			comp-c-include		obsolete
 ./usr/include/i386/param.h			comp-c-include
 ./usr/include/i386/pcb.h			comp-c-include
 ./usr/include/i386/pio.h			comp-c-include



CVS commit: src/sys/arch/x86

2014-02-13 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Thu Feb 13 19:37:08 UTC 2014

Modified Files:
src/sys/arch/x86/include: cpu_extended_state.h cpufunc.h
src/sys/arch/x86/x86: fpu.c

Log Message:
Check the argument types for the fpu asm functions.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/cpu_extended_state.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/include/cpufunc.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/fpu.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/x86/include/cpu_extended_state.h
diff -u src/sys/arch/x86/include/cpu_extended_state.h:1.5 src/sys/arch/x86/include/cpu_extended_state.h:1.6
--- src/sys/arch/x86/include/cpu_extended_state.h:1.5	Wed Feb 12 23:24:09 2014
+++ src/sys/arch/x86/include/cpu_extended_state.h	Thu Feb 13 19:37:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_extended_state.h,v 1.5 2014/02/12 23:24:09 dsl Exp $	*/
+/*	$NetBSD: cpu_extended_state.h,v 1.6 2014/02/13 19:37:08 dsl Exp $	*/
 
 #ifndef _X86_CPU_EXTENDED_STATE_H_
 #define _X86_CPU_EXTENDED_STATE_H_
@@ -55,13 +55,13 @@ union fp_addr {
 		uint16_t fa_seg;	/* code/data (etc) segment */
 		uint16_t fa_opcode;	/* last opcode (sometimes) */
 	} fa_32;
-} __packed;
+} __packed __aligned(4);
 
 /* The x87 registers are 80 bits */
 struct fpacc87 {
 	uint64_t	f87_mantissa;	/* mantissa */
 	uint16_t	f87_exp_sign;	/* exponent and sign */
-} __packed;
+} __packed __aligned(2);
 
 /* The x87 registers padded out to 16 bytes for fxsave */
 struct fpaccfx {
@@ -88,9 +88,9 @@ struct ymmreg {
  * The fxsave 'Abridged tag word' in inverted.
  */
 struct save87 {
-	uint32_t	s87_cw;		/* control word (16bits) */
-	uint32_t	s87_sw;		/* status word (16bits) */
-	uint32_t	s87_tw;		/* tag word (16bits) */
+	uint16_t	s87_cw __aligned(4);	/* control word (16bits) */
+	uint16_t	s87_sw __aligned(4);	/* status word (16bits) */
+	uint16_t	s87_tw __aligned(4);	/* tag word (16bits) */
 	union fp_addr	s87_ip;		/* floating point instruction pointer */
 #define s87_opcode s87_ip.fa_32.fa_opcode	/* opcode last executed (11bits) */
 	union fp_addr	s87_dp;		/* floating operand offset */
@@ -103,7 +103,6 @@ struct fxsave {
 /*0*/	uint16_t	fx_cw;		/* FPU Control Word */
 	uint16_t	fx_sw;		/* FPU Status Word */
 	uint8_t		fx_tw;		/* FPU Tag Word (abridged) */
-	uint8_t		fx_reserved1;
 	uint16_t	fx_opcode;	/* FPU Opcode */
 	union fp_addr	fx_ip;		/* FPU Instruction Pointer */
 /*16*/	union fp_addr	fx_dp;		/* FPU Data pointer */

Index: src/sys/arch/x86/include/cpufunc.h
diff -u src/sys/arch/x86/include/cpufunc.h:1.16 src/sys/arch/x86/include/cpufunc.h:1.17
--- src/sys/arch/x86/include/cpufunc.h:1.16	Wed Feb 12 23:24:09 2014
+++ src/sys/arch/x86/include/cpufunc.h	Thu Feb 13 19:37:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.h,v 1.16 2014/02/12 23:24:09 dsl Exp $	*/
+/*	$NetBSD: cpufunc.h,v 1.17 2014/02/13 19:37:08 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -76,25 +76,30 @@ void	breakpoint(void);
 void	x86_hlt(void);
 void	x86_stihlt(void);
 u_int	x86_getss(void);
-void	fldcw(void *);
+
+struct save87;
+struct fxsave;
+void	fldcw(const uint16_t *);
 void	fnclex(void);
 void	fninit(void);
-void	fnsave(void *);
+void	fnsave(struct save87 *);
 void	fnstcw(uint16_t *);
 uint16_t fngetsw(void);
 void	fnstsw(uint16_t *);
-void	fp_divide_by_0(void);
-void	frstor(void *);
+void	frstor(const struct save87 *);
 void	fwait(void);
 void	clts(void);
 void	stts(void);
+void	fxsave(struct fxsave *);
+void	fxrstor(const struct fxsave *);
+void	x86_ldmxcsr(const uint32_t *);
+void	x86_stmxcsr(uint32_t *);
+
 void	fldummy(void);
-void	fxsave(void *);
-void	fxrstor(void *);
+void	fp_divide_by_0(void);
+
 void	x86_monitor(const void *, uint32_t, uint32_t);
 void	x86_mwait(uint32_t, uint32_t);
-void	x86_ldmxcsr(const uint32_t *);
-void	x86_stmxcsr(uint32_t *);
 /* x86_cpuid2() writes four 32bit values, %eax, %ebx, %ecx and %edx */
 #define	x86_cpuid(a,b)	x86_cpuid2((a),0,(b))
 void	x86_cpuid2(uint32_t, uint32_t, uint32_t *);

Index: src/sys/arch/x86/x86/fpu.c
diff -u src/sys/arch/x86/x86/fpu.c:1.3 src/sys/arch/x86/x86/fpu.c:1.4
--- src/sys/arch/x86/x86/fpu.c:1.3	Wed Feb 12 23:24:09 2014
+++ src/sys/arch/x86/x86/fpu.c	Thu Feb 13 19:37:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.3 2014/02/12 23:24:09 dsl Exp $	*/
+/*	$NetBSD: fpu.c,v 1.4 2014/02/13 19:37:08 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.  All
@@ -100,7 +100,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fpu.c,v 1.3 2014/02/12 23:24:09 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: fpu.c,v 1.4 2014/02/13 19:37:08 dsl Exp $);
 
 #include opt_multiprocessor.h
 
@@ -458,7 +458,7 @@ fpudna(struct trapframe *frame)
 		 * but we don't care since we're about to call fxrstor() anyway.
 		 */
 		fldummy();
-		fxrstor(pcb-pcb_savefpu);
+		fxrstor(pcb-pcb_savefpu.sv_xmm);
 	} else {
 		

CVS commit: src/sys/fs/union

2014-02-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb 13 21:05:26 UTC 2014

Modified Files:
src/sys/fs/union: union_vnops.c

Log Message:
Remove an unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/fs/union/union_vnops.c

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

Modified files:

Index: src/sys/fs/union/union_vnops.c
diff -u src/sys/fs/union/union_vnops.c:1.54 src/sys/fs/union/union_vnops.c:1.55
--- src/sys/fs/union/union_vnops.c:1.54	Thu Feb 13 09:55:04 2014
+++ src/sys/fs/union/union_vnops.c	Thu Feb 13 21:05:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vnops.c,v 1.54 2014/02/13 09:55:04 hannken Exp $	*/
+/*	$NetBSD: union_vnops.c,v 1.55 2014/02/13 21:05:26 martin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994, 1995
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: union_vnops.c,v 1.54 2014/02/13 09:55:04 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: union_vnops.c,v 1.55 2014/02/13 21:05:26 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1647,9 +1647,7 @@ union_unlock(void *v)
 		int a_flags;
 	} */ *ap = v;
 	struct vnode *vp;
-	struct union_node *un;
 
-	un = VTOUNION(ap-a_vp);
 	vp = LOCKVP(ap-a_vp);
 	if (vp == ap-a_vp)
 		genfs_unlock(ap);



CVS commit: src/usr.bin/config

2014-02-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Feb 13 22:36:28 UTC 2014

Modified Files:
src/usr.bin/config: config.5 config.samples.5

Log Message:
Fix some typos found by Rich Neswold and reported in PR 48597.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/config/config.5
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/config/config.samples.5

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/config/config.5
diff -u src/usr.bin/config/config.5:1.21 src/usr.bin/config/config.5:1.22
--- src/usr.bin/config/config.5:1.21	Wed Mar  3 13:53:22 2010
+++ src/usr.bin/config/config.5	Thu Feb 13 22:36:28 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: config.5,v 1.21 2010/03/03 13:53:22 pooka Exp $
+.\ $NetBSD: config.5,v 1.22 2014/02/13 22:36:28 wiz Exp $
 .\
 .\  Copyright (c) 2006, 2007 The NetBSD Foundation.
 .\  All rights reserved.
@@ -264,7 +264,7 @@ argument has the latest prefix popped ou
 The
 .Ar path
 argument is either absolute or relative to the current defined prefix, which
-defaults to the top of ther kernel source tree.
+defaults to the top of the kernel source tree.
 .It Ic ifdef Ar attribute
 .It Ic ifndef Ar attribute
 .It Ic elifdef Ar attribute

Index: src/usr.bin/config/config.samples.5
diff -u src/usr.bin/config/config.samples.5:1.4 src/usr.bin/config/config.samples.5:1.5
--- src/usr.bin/config/config.samples.5:1.4	Wed Apr 30 13:11:00 2008
+++ src/usr.bin/config/config.samples.5	Thu Feb 13 22:36:28 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: config.samples.5,v 1.4 2008/04/30 13:11:00 martin Exp $
+.\ $NetBSD: config.samples.5,v 1.5 2014/02/13 22:36:28 wiz Exp $
 .\
 .\  Copyright (c) 2006 The NetBSD Foundation.
 .\  All rights reserved.
@@ -72,7 +72,7 @@ the bus.
 The driver has to try accessing the device in order to discover it.
 That implies locators must be specified to some extent: a driver would
 usually need the base address of the device, some need the IRQ line that the
-device is configured to use, thoug some others would just try a set of known
+device is configured to use, though some others would just try a set of known
 values, at the risk of badly interacting with other devices on the bus.
 .Ss Hard-wiring kernel configuration
 This technique consists in specifying exactly the location of the devices on a
@@ -184,7 +184,7 @@ no device at isa0
 .Ed
 .Ss Interface attributes
 .Em Interface attributes
-are a subtility of
+are a subtlety of
 .Xr config 1
 and
 .Xr autoconf 9 ,



CVS commit: src/lib/librumpuser

2014-02-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 14 00:33:51 UTC 2014

Modified Files:
src/lib/librumpuser: rumpuser.3

Log Message:
minor clarification: rumpuser_thread_create() is used to create the host
thread context for kernel threads, never for application threads.

per discussion with justin


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/librumpuser/rumpuser.3

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

Modified files:

Index: src/lib/librumpuser/rumpuser.3
diff -u src/lib/librumpuser/rumpuser.3:1.16 src/lib/librumpuser/rumpuser.3:1.17
--- src/lib/librumpuser/rumpuser.3:1.16	Mon Jul 22 12:36:56 2013
+++ src/lib/librumpuser/rumpuser.3	Fri Feb 14 00:33:51 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: rumpuser.3,v 1.16 2013/07/22 12:36:56 njoly Exp $
+.\ $NetBSD: rumpuser.3,v 1.17 2014/02/14 00:33:51 pooka Exp $
 .\
 .\ Copyright (c) 2013 Antti Kantee.  All rights reserved.
 .\
@@ -23,7 +23,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd May 15, 2013
+.Dd February 13, 2013
 .Dt RUMPUSER 3
 .Os
 .Sh NAME
@@ -455,7 +455,9 @@ The number of random bytes written into
 .Fa int priority int cpuidx void **cookie
 .Fc
 .Pp
-Create a thread.
+Create a schedulable host thread context.
+The rump kernel will call this interface when it creates a kernel thread.
+The scheduling policy for the new thread is defined by the hypervisor.
 In case the hypervisor wants to optimize the scheduling of the
 threads, it can perform heuristics on the
 .Fa thrname ,
@@ -465,7 +467,8 @@ and
 parameters.
 .Bl -tag -width xenum_rumpclock
 .It Fa fun
-function that the new thread must call
+function that the new thread must call.
+This call will never return.
 .It Fa arg
 argument to be passed to
 .Fa fun



CVS commit: src/lib/libukfs

2014-02-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 14 01:11:04 UTC 2014

Modified Files:
src/lib/libukfs: ukfs.3

Log Message:
some minor updates and reality-checks


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libukfs/ukfs.3

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

Modified files:

Index: src/lib/libukfs/ukfs.3
diff -u src/lib/libukfs/ukfs.3:1.12 src/lib/libukfs/ukfs.3:1.13
--- src/lib/libukfs/ukfs.3:1.12	Sat Jul 20 21:39:57 2013
+++ src/lib/libukfs/ukfs.3	Fri Feb 14 01:11:04 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: ukfs.3,v 1.12 2013/07/20 21:39:57 wiz Exp $
+.\ $NetBSD: ukfs.3,v 1.13 2014/02/14 01:11:04 pooka Exp $
 .\
 .\ Copyright (c) 2008 Antti Kantee.  All rights reserved.
 .\
@@ -23,7 +23,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd November 22, 2009
+.Dd February 13, 2014
 .Dt UKFS 3
 .Os
 .Sh NAME
@@ -44,17 +44,17 @@ requires no special kernel support apart
 As
 .Nm
 is built upon
-.Xr rump 3 ,
-all kernel file systems which are supported by rump are available.
-It allows to write utilities for accessing file systems without having
-to duplicate file system internals knowledge already present in kernel
-file system drivers.
+.Xr rump 3
+kernels, all kernel file systems which are supported by rump kernels
+are available.  It allows to write utilities for accessing file systems
+without having to duplicate file system internals knowledge already
+present in kernel file system drivers.
 .Pp
 .Nm
 provides a high-level pathname based interface for accessing file systems.
 If a lower level interface it desired,
 .Xr rump 3
-should be used directly.
+kernels should be used directly.
 However, much like system calls, the interfaces of
 .Nm ,
 are self-contained and require no tracking and release of resources.
@@ -91,7 +91,7 @@ is used at runtime to dynamically load a
 file system module.
 For this to succeed, the
 .Xr rump 3
-library and the module targetted must be compiled with compatible kernel
+kernel and the module targetted must be compiled with compatible kernel
 versions and the application must be dynamically linked.
 Additionally, since this routine does not handle dependencies, all the
 dependencies of the library must be loaded beforehand.
@@ -101,7 +101,7 @@ for success.
 .Fn ukfs_modload_dir
 loads all
 .Xr rump 3
-file system modules in directory
+kernel file system components in directory
 .Fa dirname .
 It looks for libraries which begin with
 .Pa librumpfs_
@@ -316,13 +316,5 @@ first appeared in
 .An Antti Kantee Aq Mt po...@cs.hut.fi
 .Sh NOTES
 .Nm
-should be considered experimental technology and may change without warning.
-.Sh BUGS
-On Linux, dynamically linked binaries can include support for only
-one file system due to restrictions with the dynamic linker.
-If more are desired, they must be loaded at runtime using
-.Fn ukfs_modload .
-Even though
-.Nx
-does not have this restriction, portable programs should load all
-file system drivers dynamically.
+was an early attempt at an interface for kernel file systems
+running in userspace.



CVS commit: src/sys/rump/librump/rumpnet

2014-02-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 14 01:27:48 UTC 2014

Modified Files:
src/sys/rump/librump/rumpnet: rump_net_private.h

Log Message:
g/c prototype of imaginary routine


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpnet/rump_net_private.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/rump/librump/rumpnet/rump_net_private.h
diff -u src/sys/rump/librump/rumpnet/rump_net_private.h:1.7 src/sys/rump/librump/rumpnet/rump_net_private.h:1.8
--- src/sys/rump/librump/rumpnet/rump_net_private.h:1.7	Wed Jul  3 15:08:01 2013
+++ src/sys/rump/librump/rumpnet/rump_net_private.h	Fri Feb 14 01:27:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_net_private.h,v 1.7 2013/07/03 15:08:01 pooka Exp $	*/
+/*	$NetBSD: rump_net_private.h,v 1.8 2014/02/14 01:27:48 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -37,8 +37,6 @@ do {	\
 }\
 } while (/*CONSTCOND*/0)
 
-void		rump_net_components(void);
-
 #include rumpnet_if_priv.h
 
 #endif /* _SYS_RUMP_NET_PRIVATE_H_ */



CVS commit: src/sys/rump

2014-02-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 14 01:43:13 UTC 2014

Modified Files:
src/sys/rump/librump/rumpnet: netisr.c rump_net.c rump_net_private.h
src/sys/rump/net/lib/libnetinet: component.c
src/sys/rump/net/lib/libnetinet6: component.c
src/sys/rump/net/lib/libnetmpls: component.c

Log Message:
Register netisr's from component constructors instead of via a hardcoded
global list.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpnet/netisr.c
cvs rdiff -u -r1.16 -r1.17 src/sys/rump/librump/rumpnet/rump_net.c
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpnet/rump_net_private.h
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/net/lib/libnetinet/component.c
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/libnetinet6/component.c
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libnetmpls/component.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/rump/librump/rumpnet/netisr.c
diff -u src/sys/rump/librump/rumpnet/netisr.c:1.6 src/sys/rump/librump/rumpnet/netisr.c:1.7
--- src/sys/rump/librump/rumpnet/netisr.c:1.6	Thu Jul 18 15:59:27 2013
+++ src/sys/rump/librump/rumpnet/netisr.c	Fri Feb 14 01:43:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netisr.c,v 1.6 2013/07/18 15:59:27 kefren Exp $	*/
+/*	$NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,17 +26,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netisr.c,v 1.6 2013/07/18 15:59:27 kefren Exp $);
+__KERNEL_RCSID(0, $NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $);
 
 #include sys/param.h
 #include sys/intr.h
 
-#include netinet/in.h
-#include netinet/ip_var.h
-#include netinet/if_inarp.h
-#include netinet/ip6.h
-#include netinet6/ip6_var.h
-#include netmpls/mpls_var.h
 #include net/netisr.h
 
 #include rump/rumpuser.h
@@ -51,48 +45,10 @@ schednetisr(int isr)
 	softint_schedule(netisrs[isr]);
 }
 
-/*
- * Aliases are needed only for static linking (dlsym() is not supported).
- */
-void __netisr_stub(void);
-void
-__netisr_stub(void)
-{
-
-	panic(netisr called but networking stack missing);
-}
-__weak_alias(ipintr,__netisr_stub);
-__weak_alias(arpintr,__netisr_stub);
-__weak_alias(ip6intr,__netisr_stub);
-__weak_alias(mplsintr,__netisr_stub);
-
 void
-rump_netisr_init(void)
+rump_netisr_register(int level, void (*handler)(void))
 {
-	void *iphand, *arphand, *ip6hand, *mplshand, *sym;
 
-	iphand = ipintr;
-	if ((sym = rumpuser_dl_globalsym(rumpns_ipintr)) != NULL)
-		iphand = sym;
-
-	arphand = arpintr;
-	if ((sym = rumpuser_dl_globalsym(rumpns_arpintr)) != NULL)
-		arphand = sym;
-
-	ip6hand = ip6intr;
-	if ((sym = rumpuser_dl_globalsym(rumpns_ip6intr)) != NULL)
-		ip6hand = sym;
-
-	mplshand = mplsintr;
-	if ((sym = rumpuser_dl_globalsym(rumpns_mplsintr)) != NULL)
-		mplshand = sym;
-		
-	netisrs[NETISR_IP] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
-	(void (*)(void *))iphand, NULL);
-	netisrs[NETISR_ARP] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
-	(void (*)(void *))arphand, NULL);
-	netisrs[NETISR_IPV6] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
-	(void (*)(void *))ip6hand, NULL);
-	netisrs[NETISR_MPLS] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
-	(void (*)(void *))mplshand, NULL);
+	netisrs[level] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
+	(void (*)(void *))handler, NULL);
 }

Index: src/sys/rump/librump/rumpnet/rump_net.c
diff -u src/sys/rump/librump/rumpnet/rump_net.c:1.16 src/sys/rump/librump/rumpnet/rump_net.c:1.17
--- src/sys/rump/librump/rumpnet/rump_net.c:1.16	Mon Jan 14 16:50:54 2013
+++ src/sys/rump/librump/rumpnet/rump_net.c	Fri Feb 14 01:43:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_net.c,v 1.16 2013/01/14 16:50:54 pooka Exp $	*/
+/*	$NetBSD: rump_net.c,v 1.17 2014/02/14 01:43:13 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump_net.c,v 1.16 2013/01/14 16:50:54 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_net.c,v 1.17 2014/02/14 01:43:13 pooka Exp $);
 
 #include sys/param.h
 
@@ -50,7 +50,6 @@ RUMP_COMPONENT(RUMP__FACTION_NET)
 	soinit();
 
 	domaininit(false);
-	rump_netisr_init();
 
 	rump_component_init(RUMP_COMPONENT_NET);
 	rump_component_init(RUMP_COMPONENT_NET_ROUTE);

Index: src/sys/rump/librump/rumpnet/rump_net_private.h
diff -u src/sys/rump/librump/rumpnet/rump_net_private.h:1.8 src/sys/rump/librump/rumpnet/rump_net_private.h:1.9
--- src/sys/rump/librump/rumpnet/rump_net_private.h:1.8	Fri Feb 14 01:27:48 2014
+++ src/sys/rump/librump/rumpnet/rump_net_private.h	Fri Feb 14 01:43:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_net_private.h,v 1.8 2014/02/14 01:27:48 pooka Exp $	*/
+/*	$NetBSD: rump_net_private.h,v 1.9 2014/02/14 01:43:13 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights 

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

2014-02-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri Feb 14 01:52:58 UTC 2014

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Document NAT algorithm option in the grammar of map.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/npf/npfctl/npf.conf.5

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

Modified files:

Index: src/usr.sbin/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.38 src/usr.sbin/npf/npfctl/npf.conf.5:1.39
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.38	Sat Feb  8 01:20:09 2014
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Fri Feb 14 01:52:58 2014
@@ -1,4 +1,4 @@
-.\$NetBSD: npf.conf.5,v 1.38 2014/02/08 01:20:09 rmind Exp $
+.\$NetBSD: npf.conf.5,v 1.39 2014/02/14 01:52:58 rmind Exp $
 .\
 .\ Copyright (c) 2009-2014 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 February 8, 2014
+.Dd February 14, 2014
 .Dt NPF.CONF 5
 .Os
 .Sh NAME
@@ -229,7 +229,8 @@ table-def	= table table-id type ( h
 
 ; Mapping for address translation.
 
-map		= map interface ( static | dynamic )
+map		= map interface
+		  ( static [ algo algorithm ] | dynamic )
 		  net-seg ( - | - | - ) net-seg
 		  [ pass filt-opts ]
 



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

2014-02-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri Feb 14 02:01:12 UTC 2014

Modified Files:
src/usr.sbin/npf/npfctl: todo

Log Message:
G/C some todo items


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/npf/npfctl/todo

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/todo
diff -u src/usr.sbin/npf/npfctl/todo:1.10 src/usr.sbin/npf/npfctl/todo:1.11
--- src/usr.sbin/npf/npfctl/todo:1.10	Wed Mar 13 02:44:28 2013
+++ src/usr.sbin/npf/npfctl/todo	Fri Feb 14 02:01:12 2014
@@ -7,35 +7,12 @@
print the error messages. Or it should be called enable/disable since
this is what it does. It does not start because like an engine with
no fuel, an npf with no configuration does not do much.
--- able to specify interfaces before they are created
--- docs/examples out of date
 -- npf starts up too late (after traffic can go through)
--- need libpcap in /
 -- although the framework checks the file for consistency, returning EINVAL
for system failures is probably not good enough. For example if a module
failed to autoload, it is probably an error and it should be reported
differently?
--- npf algorithms like icmp, are loaded via modules. Perhaps it is better
-   to have some config magic to autoload it instead of needing to run a
-   module command. algorithm icmp { }
 -- startup/stop script does not load and save session state
 -- add algo for with short
 -- implement port-unr
 -- implement block return-icmp in log final all with ipopts
-
-ok npf and dependent modules should autoload automagically as they are used
-ok have a way to register cloners? through a mapping file? consistently naming
-   the cloner modules? if_cloner? Split if_npflog from the ext_log module and
-   added autoloading for cloners.
-ok normalise - normalize (the official project language is US/English)
-ok modules should move from /usr/lib to /lib
-ok parse dynamic map rule properly inet4($ext_if) does not work
-ok create npflog interface automatically
-ok need to bring interface npflog up
-ok parse 'port ftp-data' properly
-ok fix usage
-ok get better messages from the kernel when things fail: Ok with
-   DEBUG/DIAGNOSTIC, you get the file/line in the kernel that failed 
-   which is good enough.
-ok 'ifconfig npflog0 destroy; modunload if_npflog'. Remove dependency
-   on npf_ext_log module, since if_npflog can load and unload independently.



CVS commit: src/doc

2014-02-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri Feb 14 02:07:49 UTC 2014

Modified Files:
src/doc: CHANGES

Log Message:
Mention some NPF improvements: static (stateless) NAT, support for NPTv6
and CDB based tables.


To generate a diff of this commit:
cvs rdiff -u -r1.1887 -r1.1888 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1887 src/doc/CHANGES:1.1888
--- src/doc/CHANGES:1.1887	Tue Feb 11 16:15:06 2014
+++ src/doc/CHANGES	Fri Feb 14 02:07:49 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1887 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1888 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -345,5 +345,9 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		[mlelstv 20140121]
 	ohci(4): Support the National Semiconductor PC87560 as found in
 		many hppa machines. [skrll 20140128]
+	npf: Added support for CDB based tables. [rmind 20140206]
+	npf: Added support for static (stateless) NAT. [rmind 20140207]
 	atf(7): Import atf 0.19.  [jmmv 20140208]
 	atf(7): Import atf 0.20.  [jmmv 20140211]
+	npf: Added support for IPv6-to-IPv6 Network Prefix Translation
+		(NPTv6), as per RFC 6296. [rmind 20140213]



CVS commit: src/sys/dev/usb

2014-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 14 04:17:41 UTC 2014

Modified Files:
src/sys/dev/usb: if_urtwn.c if_urtwnreg.h

Log Message:
ibss and hostap support from stsp @ openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/if_urtwnreg.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/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.25 src/sys/dev/usb/if_urtwn.c:1.26
--- src/sys/dev/usb/if_urtwn.c:1.25	Sat Aug 10 17:15:26 2013
+++ src/sys/dev/usb/if_urtwn.c	Thu Feb 13 23:17:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.25 2013/08/10 21:15:26 jnemeth Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.26 2014/02/14 04:17:41 christos Exp $	*/
 /*	$OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.25 2013/08/10 21:15:26 jnemeth Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.26 2014/02/14 04:17:41 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -246,6 +246,7 @@ static int	urtwn_init(struct ifnet *);
 static void	urtwn_stop(struct ifnet *, int);
 static int	urtwn_reset(struct ifnet *);
 static void	urtwn_chip_stop(struct urtwn_softc *);
+static void	urtwn_newassoc(struct ieee80211_node *, int);
 
 /* Aliases. */
 #define	urtwn_bb_write	urtwn_write_4
@@ -352,6 +353,8 @@ urtwn_attach(device_t parent, device_t s
 	/* Set device capabilities. */
 	ic-ic_caps =
 	IEEE80211_C_MONITOR |	/* Monitor mode supported. */
+	IEEE80211_C_IBSS |		/* IBSS mode supported */
+	IEEE80211_C_HOSTAP |	/* HostAp mode supported */
 	IEEE80211_C_SHPREAMBLE |	/* Short preamble supported. */
 	IEEE80211_C_SHSLOT |	/* Short slot time supported. */
 	IEEE80211_C_WME |		/* 802.11e */
@@ -383,6 +386,7 @@ urtwn_attach(device_t parent, device_t s
 	ieee80211_ifattach(ic);
 
 	/* override default methods */
+	ic-ic_newassoc = urtwn_newassoc;
 	ic-ic_reset = urtwn_reset;
 	ic-ic_wme.wme_update = urtwn_wme_update;
 
@@ -1498,6 +1502,15 @@ urtwn_next_scan(void *arg)
 	splx(s);
 }
 
+static void
+urtwn_newassoc(struct ieee80211_node *ni, int isnew)
+{
+	DPRINTFN(DBG_FN, (%s: new node %s\n, __func__,
+	ether_sprintf(ni-ni_macaddr)));
+	/* start with lowest Tx rate */
+	ni-ni_txrate = 0;
+}
+
 static int
 urtwn_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
 {
@@ -1527,7 +1540,7 @@ urtwn_newstate_cb(struct urtwn_softc *sc
 	enum ieee80211_state ostate = ic-ic_state;
 	enum ieee80211_state nstate = cmd-state;
 	uint32_t reg;
-	uint8_t sifs_time;
+	uint8_t sifs_time, msr;
 	int s;
 
 	DPRINTFN(DBG_FN|DBG_STM, (%s: %s: %s(%d)-%s(%d)\n,
@@ -1744,7 +1757,10 @@ urtwn_newstate_cb(struct urtwn_softc *sc
 		/* Set beacon interval. */
 		urtwn_write_2(sc, R92C_BCN_INTERVAL, ni-ni_intval);
 
-		if (ic-ic_opmode == IEEE80211_M_STA) {
+msr = urtwn_read_1(sc, R92C_MSR);
+msr = 0xfc;
+		switch (ic-ic_opmode) {
+		case IEEE80211_M_STA:
 			/* Allow Rx from our BSSID only. */
 			urtwn_write_4(sc, R92C_RCR,
 			urtwn_read_4(sc, R92C_RCR) |
@@ -1752,7 +1768,28 @@ urtwn_newstate_cb(struct urtwn_softc *sc
 
 			/* Enable TSF synchronization. */
 			urtwn_tsf_sync_enable(sc);
-		}
+			/*FALLTHROUGH*/
+		default:
+msr |= R92C_MSR_ADHOC;
+			break;
+		case IEEE80211_M_HOSTAP:
+urtwn_write_2(sc, R92C_BCNTCFG, 0x000f);
+
+/* Allow Rx from any BSSID. */
+urtwn_write_4(sc, R92C_RCR,
+urtwn_read_4(sc, R92C_RCR) 
+~(R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN));
+
+/* Reset TSF timer to zero. */
+reg = urtwn_read_4(sc, R92C_TCR);
+reg = ~0x01;
+urtwn_write_4(sc, R92C_TCR, reg);
+reg |= 0x01;
+urtwn_write_4(sc, R92C_TCR, reg);
+msr |= R92C_MSR_AP;
+			break;
+}
+urtwn_write_1(sc, R92C_MSR, msr);
 
 		sifs_time = 10;
 		urtwn_write_1(sc, R92C_SIFS_CCK + 1, sifs_time);
@@ -3732,8 +3769,8 @@ urtwn_init(struct ifnet *ifp)
 
 	/* Initialize beacon parameters. */
 	urtwn_write_2(sc, R92C_TBTT_PROHIBIT, 0x6404);
-	urtwn_write_1(sc, R92C_DRVERLYINT, 0x05);
-	urtwn_write_1(sc, R92C_BCNDMATIM, 0x02);
+	urtwn_write_1(sc, R92C_DRVERLYINT, R92C_DRIVER_EARLY_INT_TIME);
+	urtwn_write_1(sc, R92C_BCNDMATIM, R92C_DMA_ATIME_INT_TIME);
 	urtwn_write_2(sc, R92C_BCNTCFG, 0x660f);
 
 	/* Setup AMPDU aggregation. */

Index: src/sys/dev/usb/if_urtwnreg.h
diff -u src/sys/dev/usb/if_urtwnreg.h:1.3 src/sys/dev/usb/if_urtwnreg.h:1.4
--- src/sys/dev/usb/if_urtwnreg.h:1.3	Mon Jan 28 18:46:33 2013
+++ src/sys/dev/usb/if_urtwnreg.h	Thu 

CVS commit: src/sys/dev/usb

2014-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 14 04:20:43 UTC 2014

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

Log Message:
Add the 4G part of my modem, no driver yet.


To generate a diff of this commit:
cvs rdiff -u -r1.663 -r1.664 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.663 src/sys/dev/usb/usbdevs:1.664
--- src/sys/dev/usb/usbdevs:1.663	Mon Jan 13 03:23:58 2014
+++ src/sys/dev/usb/usbdevs	Thu Feb 13 23:20:43 2014
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.663 2014/01/13 08:23:58 reinoud Exp $
+$NetBSD: usbdevs,v 1.664 2014/02/14 04:20:43 christos Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -531,6 +531,7 @@ vendor AMIT		0x18c5	AMIT
 vendor QCOM		0x18e8	Qcom
 vendor LINKSYS3		0x1915	Linksys
 vendor MEINBERG		0x1938	Meinberg Funkuhren
+vendor BECEEM		0x198f	Beceem Communications
 vendor ZTE		0x19d2	ZTE
 vendor QUANTA		0x1a32	Quanta
 vendor TERMINUS		0x1a40	Terminus Technology
@@ -997,6 +998,9 @@ product BALTECH CARDREADER	0x	Card r
 /* BB Electronics products */
 product BBELECTRONICS USOTL4	0xAC01	uLinks RS-422/485
 
+/* Beceem Communications products */
+product	BECEEM 250U		0x0220	Mobile WiMax SS
+
 /* Belkin products */
 /*product BELKIN F5U111		0x	F5U111 Ethernet adapter*/
 product BELKIN2 F5U002		0x0002	F5U002 Parallel printer adapter



CVS commit: src/sys/dev/usb

2014-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 14 04:22:13 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.655 -r1.656 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.656 -r1.657 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.655 src/sys/dev/usb/usbdevs.h:1.656
--- src/sys/dev/usb/usbdevs.h:1.655	Mon Jan 13 03:24:17 2014
+++ src/sys/dev/usb/usbdevs.h	Thu Feb 13 23:22:13 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.655 2014/01/13 08:24:17 reinoud Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.656 2014/02/14 04:22:13 christos Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.663 2014/01/13 08:23:58 reinoud Exp
+ *	NetBSD: usbdevs,v 1.664 2014/02/14 04:20:43 christos Exp
  */
 
 /*
@@ -538,6 +538,7 @@
 #define	USB_VENDOR_QCOM	0x18e8		/* Qcom */
 #define	USB_VENDOR_LINKSYS3	0x1915		/* Linksys */
 #define	USB_VENDOR_MEINBERG	0x1938		/* Meinberg Funkuhren */
+#define	USB_VENDOR_BECEEM	0x198f		/* Beceem Communications */
 #define	USB_VENDOR_ZTE	0x19d2		/* ZTE */
 #define	USB_VENDOR_QUANTA	0x1a32		/* Quanta */
 #define	USB_VENDOR_TERMINUS	0x1a40		/* Terminus Technology */
@@ -1004,6 +1005,9 @@
 /* BB Electronics products */
 #define	USB_PRODUCT_BBELECTRONICS_USOTL4	0xAC01		/* uLinks RS-422/485 */
 
+/* Beceem Communications products */
+#define	USB_PRODUCT_BECEEM_250U	0x0220		/* Mobile WiMax SS */
+
 /* Belkin products */
 /*product BELKIN F5U111		0x	F5U111 Ethernet adapter*/
 #define	USB_PRODUCT_BELKIN2_F5U002	0x0002		/* F5U002 Parallel printer adapter */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.656 src/sys/dev/usb/usbdevs_data.h:1.657
--- src/sys/dev/usb/usbdevs_data.h:1.656	Mon Jan 13 03:24:17 2014
+++ src/sys/dev/usb/usbdevs_data.h	Thu Feb 13 23:22:13 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.656 2014/01/13 08:24:17 reinoud Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.657 2014/02/14 04:22:13 christos Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.663 2014/01/13 08:23:58 reinoud Exp
+ *	NetBSD: usbdevs,v 1.664 2014/02/14 04:20:43 christos Exp
  */
 
 /*
@@ -1931,6 +1931,10 @@ const struct usb_vendor usb_vendors[] = 
 	Meinberg Funkuhren,
 	},
 	{
+	USB_VENDOR_BECEEM,
+	Beceem Communications,
+	},
+	{
 	USB_VENDOR_ZTE,
 	ZTE,
 	},
@@ -2147,7 +2151,7 @@ const struct usb_vendor usb_vendors[] = 
 	GNU Radio USRP,
 	},
 };
-const int usb_nvendors = 527;
+const int usb_nvendors = 528;
 
 const struct usb_product usb_products[] = {
 	{
@@ -3315,6 +3319,10 @@ const struct usb_product usb_products[] 
 	uLinks RS-422/485,
 	},
 	{
+	USB_VENDOR_BECEEM, USB_PRODUCT_BECEEM_250U,
+	Mobile WiMax SS,
+	},
+	{
 	USB_VENDOR_BELKIN2, USB_PRODUCT_BELKIN2_F5U002,
 	F5U002 Parallel printer adapter,
 	},
@@ -10099,4 +10107,4 @@ const struct usb_product usb_products[] 
 	Prestige,
 	},
 };
-const int usb_nproducts = 1987;
+const int usb_nproducts = 1988;



CVS commit: src/share/man/man4

2014-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 14 04:24:41 UTC 2014

Modified Files:
src/share/man/man4: urtwn.4

Log Message:
mention ibss and hostap support


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/urtwn.4

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

Modified files:

Index: src/share/man/man4/urtwn.4
diff -u src/share/man/man4/urtwn.4:1.8 src/share/man/man4/urtwn.4:1.9
--- src/share/man/man4/urtwn.4:1.8	Sat Aug 10 17:32:07 2013
+++ src/share/man/man4/urtwn.4	Thu Feb 13 23:24:41 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: urtwn.4,v 1.8 2013/08/10 21:32:07 jnemeth Exp $
+.\ $NetBSD: urtwn.4,v 1.9 2014/02/14 04:24:41 christos Exp $
 .\ $OpenBSD: urtwn.4,v 1.15 2011/11/26 06:39:33 ckuethe Exp $
 .\
 .\ Copyright (c) 2010 Damien Bergamini damien.bergam...@free.fr
@@ -15,7 +15,7 @@
 .\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\
-.Dd August 10, 2013
+.Dd Fabruary 13, 2014
 .Dt URTWN 4
 .Os
 .Sh NAME
@@ -51,6 +51,18 @@ Also known as
 mode, this is used when associating with an access point, through
 which all traffic passes.
 This mode is the default.
+.It IBSS mode
+Also known as
+.Em IEEE ad-hoc
+mode or
+.Em peer-to-peer
+mode.
+This is the standardized method of operating without an access point.
+Stations associate with a service set.
+However, actual connections between stations are peer-to-peer.
+.It Host AP
+In this mode the driver acts as an access point (base station)
+for other cards.
 .It monitor mode
 In this mode the driver is able to receive packets without
 associating with an access point.



CVS commit: src/lib/libukfs

2014-02-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb 14 07:27:37 UTC 2014

Modified Files:
src/lib/libukfs: ukfs.3

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libukfs/ukfs.3

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

Modified files:

Index: src/lib/libukfs/ukfs.3
diff -u src/lib/libukfs/ukfs.3:1.13 src/lib/libukfs/ukfs.3:1.14
--- src/lib/libukfs/ukfs.3:1.13	Fri Feb 14 01:11:04 2014
+++ src/lib/libukfs/ukfs.3	Fri Feb 14 07:27:37 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: ukfs.3,v 1.13 2014/02/14 01:11:04 pooka Exp $
+.\ $NetBSD: ukfs.3,v 1.14 2014/02/14 07:27:37 wiz Exp $
 .\
 .\ Copyright (c) 2008 Antti Kantee.  All rights reserved.
 .\
@@ -46,7 +46,8 @@ As
 is built upon
 .Xr rump 3
 kernels, all kernel file systems which are supported by rump kernels
-are available.  It allows to write utilities for accessing file systems
+are available.
+It allows to write utilities for accessing file systems
 without having to duplicate file system internals knowledge already
 present in kernel file system drivers.
 .Pp



CVS commit: src/share/man/man4

2014-02-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb 14 07:29:06 UTC 2014

Modified Files:
src/share/man/man4: urtwn.4

Log Message:
Fix typo in Dd.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/urtwn.4

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

Modified files:

Index: src/share/man/man4/urtwn.4
diff -u src/share/man/man4/urtwn.4:1.9 src/share/man/man4/urtwn.4:1.10
--- src/share/man/man4/urtwn.4:1.9	Fri Feb 14 04:24:41 2014
+++ src/share/man/man4/urtwn.4	Fri Feb 14 07:29:06 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: urtwn.4,v 1.9 2014/02/14 04:24:41 christos Exp $
+.\ $NetBSD: urtwn.4,v 1.10 2014/02/14 07:29:06 wiz Exp $
 .\ $OpenBSD: urtwn.4,v 1.15 2011/11/26 06:39:33 ckuethe Exp $
 .\
 .\ Copyright (c) 2010 Damien Bergamini damien.bergam...@free.fr
@@ -15,7 +15,7 @@
 .\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\
-.Dd Fabruary 13, 2014
+.Dd February 13, 2014
 .Dt URTWN 4
 .Os
 .Sh NAME



CVS commit: src/sys/kern

2014-02-13 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Feb 14 07:30:07 UTC 2014

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

Log Message:
Fix memory leak.

ok christos@ agc@


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/kern/exec_elf.c

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

Modified files:

Index: src/sys/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.54 src/sys/kern/exec_elf.c:1.55
--- src/sys/kern/exec_elf.c:1.54	Sat Jan 25 19:44:11 2014
+++ src/sys/kern/exec_elf.c	Fri Feb 14 07:30:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.54 2014/01/25 19:44:11 christos Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.55 2014/02/14 07:30:07 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.54 2014/01/25 19:44:11 christos Exp $);
+__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.55 2014/02/14 07:30:07 maxv Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pax.h
@@ -823,6 +823,7 @@ exec_elf_makecmds(struct lwp *l, struct 
 
 		if ((error = elf_load_file(l, epp, interp,
 		epp-ep_vmcmds, interp_offset, ap, pos)) != 0) {
+			kmem_free(ap, sizeof(*ap));
 			goto bad;
 		}
 		ap-arg_interp = epp-ep_vmcmds.evs_cmds[j].ev_addr;



CVS commit: src/sys/fs/union

2014-02-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Feb 13 09:50:31 UTC 2014

Modified Files:
src/sys/fs/union: union_vnops.c

Log Message:
Fix the DOT and DOTDOT case for union_lookup1().


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/fs/union/union_vnops.c

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



CVS commit: src/sys/fs/union

2014-02-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Feb 13 09:55:04 UTC 2014

Modified Files:
src/sys/fs/union: union.h union_subr.c union_vnops.c

Log Message:
Get rid of UN_KLOCK to keep a lock on vput().  It is not really needed
and makes the source difficult to read.  Always hold references to the
union nodes until the operation is done.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/fs/union/union.h
cvs rdiff -u -r1.60 -r1.61 src/sys/fs/union/union_subr.c
cvs rdiff -u -r1.53 -r1.54 src/sys/fs/union/union_vnops.c

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



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

2014-02-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 13 11:08:46 UTC 2014

Modified Files:
src/sys/arch/hppa/hppa: vm_machdep.c

Log Message:
Slight code re-arrangement. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/hppa/hppa/vm_machdep.c

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



CVS commit: src/bin/hostname

2014-02-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Thu Feb 13 12:00:29 UTC 2014

Modified Files:
src/bin/hostname: hostname.1 hostname.c

Log Message:
Remove options added in 1.18, commitid: UhxHPgtT2Pzeg4Yw due to some
level of controversy about their inclusion.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/bin/hostname/hostname.1
cvs rdiff -u -r1.20 -r1.21 src/bin/hostname/hostname.c

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



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

2014-02-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 13 15:04:18 UTC 2014

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

Log Message:
Simplify cpu_spawn_return - setregs has done all the work already.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/hppa/hppa/trap.c

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



CVS commit: src/distrib/sets/lists/comp

2014-02-13 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Thu Feb 13 17:42:24 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: md.amd64

Log Message:
Mark i386/npx.h obsolete.
I'd forgotten it was released here as well.


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/distrib/sets/lists/comp/md.amd64

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



CVS commit: src/sys/arch/x86

2014-02-13 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Thu Feb 13 19:37:08 UTC 2014

Modified Files:
src/sys/arch/x86/include: cpu_extended_state.h cpufunc.h
src/sys/arch/x86/x86: fpu.c

Log Message:
Check the argument types for the fpu asm functions.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/cpu_extended_state.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/include/cpufunc.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/fpu.c

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



CVS commit: src/sys/fs/union

2014-02-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb 13 21:05:26 UTC 2014

Modified Files:
src/sys/fs/union: union_vnops.c

Log Message:
Remove an unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/fs/union/union_vnops.c

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



CVS commit: src/usr.bin/config

2014-02-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Feb 13 22:36:28 UTC 2014

Modified Files:
src/usr.bin/config: config.5 config.samples.5

Log Message:
Fix some typos found by Rich Neswold and reported in PR 48597.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/config/config.5
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/config/config.samples.5

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



CVS commit: src/lib/librumpuser

2014-02-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 14 00:33:51 UTC 2014

Modified Files:
src/lib/librumpuser: rumpuser.3

Log Message:
minor clarification: rumpuser_thread_create() is used to create the host
thread context for kernel threads, never for application threads.

per discussion with justin


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/librumpuser/rumpuser.3

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



CVS commit: src/lib/libukfs

2014-02-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 14 01:11:04 UTC 2014

Modified Files:
src/lib/libukfs: ukfs.3

Log Message:
some minor updates and reality-checks


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libukfs/ukfs.3

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



CVS commit: src/sys/rump/librump/rumpnet

2014-02-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 14 01:27:48 UTC 2014

Modified Files:
src/sys/rump/librump/rumpnet: rump_net_private.h

Log Message:
g/c prototype of imaginary routine


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpnet/rump_net_private.h

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



CVS commit: src/sys/rump

2014-02-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 14 01:43:13 UTC 2014

Modified Files:
src/sys/rump/librump/rumpnet: netisr.c rump_net.c rump_net_private.h
src/sys/rump/net/lib/libnetinet: component.c
src/sys/rump/net/lib/libnetinet6: component.c
src/sys/rump/net/lib/libnetmpls: component.c

Log Message:
Register netisr's from component constructors instead of via a hardcoded
global list.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpnet/netisr.c
cvs rdiff -u -r1.16 -r1.17 src/sys/rump/librump/rumpnet/rump_net.c
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpnet/rump_net_private.h
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/net/lib/libnetinet/component.c
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/libnetinet6/component.c
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libnetmpls/component.c

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



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

2014-02-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri Feb 14 01:52:58 UTC 2014

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Document NAT algorithm option in the grammar of map.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/npf/npfctl/npf.conf.5

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



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

2014-02-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri Feb 14 02:01:12 UTC 2014

Modified Files:
src/usr.sbin/npf/npfctl: todo

Log Message:
G/C some todo items


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/npf/npfctl/todo

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



CVS commit: src/doc

2014-02-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri Feb 14 02:07:49 UTC 2014

Modified Files:
src/doc: CHANGES

Log Message:
Mention some NPF improvements: static (stateless) NAT, support for NPTv6
and CDB based tables.


To generate a diff of this commit:
cvs rdiff -u -r1.1887 -r1.1888 src/doc/CHANGES

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



CVS commit: src/sys/dev/usb

2014-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 14 04:20:43 UTC 2014

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

Log Message:
Add the 4G part of my modem, no driver yet.


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

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



CVS commit: src/sys/dev/usb

2014-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 14 04:22:13 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.655 -r1.656 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.656 -r1.657 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.



CVS commit: src/share/man/man4

2014-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 14 04:24:41 UTC 2014

Modified Files:
src/share/man/man4: urtwn.4

Log Message:
mention ibss and hostap support


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/urtwn.4

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



CVS commit: src/sys/dev/usb

2014-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 14 04:17:41 UTC 2014

Modified Files:
src/sys/dev/usb: if_urtwn.c if_urtwnreg.h

Log Message:
ibss and hostap support from stsp @ openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/if_urtwnreg.h

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



CVS commit: src/lib/libukfs

2014-02-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb 14 07:27:37 UTC 2014

Modified Files:
src/lib/libukfs: ukfs.3

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libukfs/ukfs.3

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



CVS commit: src/share/man/man4

2014-02-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb 14 07:29:06 UTC 2014

Modified Files:
src/share/man/man4: urtwn.4

Log Message:
Fix typo in Dd.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/urtwn.4

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



CVS commit: src/sys/kern

2014-02-13 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Feb 14 07:30:07 UTC 2014

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

Log Message:
Fix memory leak.

ok christos@ agc@


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/kern/exec_elf.c

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