CVS commit: src/usr.bin/fstat

2015-03-07 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Mar  8 06:46:51 UTC 2015

Modified Files:
src/usr.bin/fstat: fstat.c

Log Message:
Resolve names of datagram services correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/usr.bin/fstat/fstat.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/fstat

2015-03-07 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Mar  8 06:46:51 UTC 2015

Modified Files:
src/usr.bin/fstat: fstat.c

Log Message:
Resolve names of datagram services correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/usr.bin/fstat/fstat.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.bin/fstat/fstat.c
diff -u src/usr.bin/fstat/fstat.c:1.108 src/usr.bin/fstat/fstat.c:1.109
--- src/usr.bin/fstat/fstat.c:1.108	Fri Feb 14 20:43:34 2014
+++ src/usr.bin/fstat/fstat.c	Sun Mar  8 06:46:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstat.c,v 1.108 2014/02/14 20:43:34 christos Exp $	*/
+/*	$NetBSD: fstat.c,v 1.109 2015/03/08 06:46:51 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = @(#)fstat.c	8.3 (Berkeley) 5/2/95;
 #else
-__RCSID($NetBSD: fstat.c,v 1.108 2014/02/14 20:43:34 christos Exp $);
+__RCSID($NetBSD: fstat.c,v 1.109 2015/03/08 06:46:51 mlelstv Exp $);
 #endif
 #endif /* not lint */
 
@@ -165,10 +165,10 @@ static const char   *layer_filestat(stru
 static int	msdosfs_filestat(struct vnode *, struct filestat *);
 static int	nfs_filestat(struct vnode *, struct filestat *);
 static const char *inet_addrstr(char *, size_t, const struct in_addr *,
-uint16_t);
+uint16_t, bool);
 #ifdef INET6
 static const char *inet6_addrstr(char *, size_t, const struct in6_addr *,
-uint16_t);
+uint16_t, bool);
 #endif
 static const char *at_addrstr(char *, size_t, const struct sockaddr_at *);
 static void	socktrans(struct socket *, int);
@@ -877,11 +877,14 @@ getmnton(struct mount *m)
 }
 
 static const char *
-inet_addrstr(char *buf, size_t len, const struct in_addr *a, uint16_t p)
+inet_addrstr(char *buf, size_t len, const struct in_addr *a, uint16_t p, bool isdg)
 {
 	char addr[256], serv[256];
 	struct sockaddr_in sin;
-	const int niflags = nflg ? (NI_NUMERICHOST|NI_NUMERICSERV) : 0;
+	const int niflags =
+		(nflg ? (NI_NUMERICHOST|NI_NUMERICSERV) : 0) |
+		(isdg ? NI_DGRAM : 0);
+
 
 	(void)memset(sin, 0, sizeof(sin));
 	sin.sin_family = AF_INET;
@@ -914,11 +917,13 @@ inet_addrstr(char *buf, size_t len, cons
 
 #ifdef INET6
 static const char *
-inet6_addrstr(char *buf, size_t len, const struct in6_addr *a, uint16_t p)
+inet6_addrstr(char *buf, size_t len, const struct in6_addr *a, uint16_t p, bool isdg)
 {
 	char addr[256], serv[256];
 	struct sockaddr_in6 sin6;
-	const int niflags = nflg ? (NI_NUMERICHOST|NI_NUMERICSERV) : 0;
+	const int niflags =
+		(nflg ? (NI_NUMERICHOST|NI_NUMERICSERV) : 0) |
+		(isdg ? NI_DGRAM : 0);
 
 	(void)memset(sin6, 0, sizeof(sin6));
 	sin6.sin6_family = AF_INET6;
@@ -1010,6 +1015,7 @@ socktrans(struct socket *sock, int i)
 	int len;
 	char dname[32];
 	char lbuf[512], fbuf[512], pbuf[24];
+	bool isdgram;
 
 	pbuf[0] = '\0';
 	/* fill in socket */
@@ -1054,12 +1060,14 @@ socktrans(struct socket *sock, int i)
 	 */
 	fbuf[0] = '\0';
 	lbuf[0] = '\0';
+	isdgram = false;
 	switch(dom.dom_family) {
 	case AF_INET:
 		getinetproto(pbuf, sizeof(pbuf), proto.pr_protocol);
 		switch (proto.pr_protocol) {
-		case IPPROTO_TCP:
 		case IPPROTO_UDP:
+			isdgram = true;
+		case IPPROTO_TCP:
 			if (so.so_pcb == NULL)
 break;
 			if (kvm_read(kd, (u_long)so.so_pcb, (char *)inpcb,
@@ -1068,9 +1076,9 @@ socktrans(struct socket *sock, int i)
 goto bad;
 			}
 			inet_addrstr(lbuf, sizeof(lbuf), inpcb.inp_laddr,
-			ntohs(inpcb.inp_lport));
+			ntohs(inpcb.inp_lport), isdgram);
 			inet_addrstr(fbuf, sizeof(fbuf), inpcb.inp_faddr,
-			ntohs(inpcb.inp_fport));
+			ntohs(inpcb.inp_fport), isdgram);
 			break;
 		default:
 			break;
@@ -1080,8 +1088,9 @@ socktrans(struct socket *sock, int i)
 	case AF_INET6:
 		getinetproto(pbuf, sizeof(pbuf), proto.pr_protocol);
 		switch (proto.pr_protocol) {
-		case IPPROTO_TCP:
 		case IPPROTO_UDP:
+			isdgram = true;
+		case IPPROTO_TCP:
 			if (so.so_pcb == NULL)
 break;
 			if (kvm_read(kd, (u_long)so.so_pcb, (char *)in6pcb,
@@ -1090,9 +1099,9 @@ socktrans(struct socket *sock, int i)
 goto bad;
 			}
 			inet6_addrstr(lbuf, sizeof(lbuf), in6pcb.in6p_laddr,
-			ntohs(in6pcb.in6p_lport));
+			ntohs(in6pcb.in6p_lport), isdgram);
 			inet6_addrstr(fbuf, sizeof(fbuf), in6pcb.in6p_faddr,
-			ntohs(in6pcb.in6p_fport));
+			ntohs(in6pcb.in6p_fport), isdgram);
 			break;
 		default:
 			break;



CVS commit: src

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 14:16:51 UTC 2015

Modified Files:
src/distrib/sets/lists/modules: md.amd64 md.evbppc.powerpc md.i386 mi
src/sys/dev/i2c: au8522.c cx24227.c dbcool.c hytp14.c i2c_exec.c
lg3303.c mt2131.c nxt2k.c sdtemp.c spdmem_i2c.c tvpll.c xc3028.c
xc5k.c zl10353.c
src/sys/modules: Makefile
Added Files:
src/sys/modules/i2cexec: Makefile

Log Message:
i2c devices don't actually have a dependency on iic (the bus driver)
but on i2cexec. Create an i2cexec module (i2c_exec.c) to mirror the
dependencies in files.i2c and switch device drivers to depend on i2cexec
module instead.

A kernel with a USB stack and no I2C controller / bus attachment would spit
out a bunch of WARNING: module error: can't find builtin dependency `iic'
messages at boot. This change solves that problem.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/modules/md.evbppc.powerpc
cvs rdiff -u -r1.54 -r1.55 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.70 -r1.71 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/au8522.c src/sys/dev/i2c/cx24227.c \
src/sys/dev/i2c/xc3028.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/i2c/dbcool.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/hytp14.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/i2c/i2c_exec.c \
src/sys/dev/i2c/spdmem_i2c.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/lg3303.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/mt2131.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/nxt2k.c src/sys/dev/i2c/zl10353.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/i2c/sdtemp.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/tvpll.c src/sys/dev/i2c/xc5k.c
cvs rdiff -u -r1.142 -r1.143 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/i2cexec/Makefile

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

Modified files:

Index: src/distrib/sets/lists/modules/md.amd64
diff -u src/distrib/sets/lists/modules/md.amd64:1.50 src/distrib/sets/lists/modules/md.amd64:1.51
--- src/distrib/sets/lists/modules/md.amd64:1.50	Thu Dec 11 22:14:13 2014
+++ src/distrib/sets/lists/modules/md.amd64	Sat Mar  7 14:16:51 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.50 2014/12/11 22:14:13 riastradh Exp $
+# $NetBSD: md.amd64,v 1.51 2015/03/07 14:16:51 jmcneill Exp $
 #
 # NOTE that there are two sets of files here:
 # @MODULEDIR@ and amd64-xen
@@ -340,6 +340,8 @@
 ./stand/amd64-xen/@OSRELEASE@/modules/i915drm/i915drm.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/i915drmkms			base-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/i915drmkms/i915drmkms.kmod	base-kernel-modules	kmod,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/i2cexecbase-kernel-modules	kmod,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/i2cexec/i2cexec.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/if_axebase-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/if_axe/if_axe.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/if_axenbase-kernel-modules	kmod,compatmodules

Index: src/distrib/sets/lists/modules/md.evbppc.powerpc
diff -u src/distrib/sets/lists/modules/md.evbppc.powerpc:1.4 src/distrib/sets/lists/modules/md.evbppc.powerpc:1.5
--- src/distrib/sets/lists/modules/md.evbppc.powerpc:1.4	Thu Sep 18 19:45:24 2014
+++ src/distrib/sets/lists/modules/md.evbppc.powerpc	Sat Mar  7 14:16:51 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc.powerpc,v 1.4 2014/09/18 19:45:24 wiz Exp $
+# $NetBSD: md.evbppc.powerpc,v 1.5 2015/03/07 14:16:51 jmcneill Exp $
 ./stand/powerpc-4xx			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod,compatmodules
@@ -96,6 +96,8 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/hfs/hfs.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/hythygtemp			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/hythygtemp/hythygtemp.kmod	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/i2cexecbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/i2cexec/i2cexec.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/if_axebase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/if_axe/if_axe.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/if_axenbase-kernel-modules	kmod,compatmodules
@@ -335,6 +337,8 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/hfs/hfs.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/hythygtemp			

CVS commit: src

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 14:16:51 UTC 2015

Modified Files:
src/distrib/sets/lists/modules: md.amd64 md.evbppc.powerpc md.i386 mi
src/sys/dev/i2c: au8522.c cx24227.c dbcool.c hytp14.c i2c_exec.c
lg3303.c mt2131.c nxt2k.c sdtemp.c spdmem_i2c.c tvpll.c xc3028.c
xc5k.c zl10353.c
src/sys/modules: Makefile
Added Files:
src/sys/modules/i2cexec: Makefile

Log Message:
i2c devices don't actually have a dependency on iic (the bus driver)
but on i2cexec. Create an i2cexec module (i2c_exec.c) to mirror the
dependencies in files.i2c and switch device drivers to depend on i2cexec
module instead.

A kernel with a USB stack and no I2C controller / bus attachment would spit
out a bunch of WARNING: module error: can't find builtin dependency `iic'
messages at boot. This change solves that problem.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/modules/md.evbppc.powerpc
cvs rdiff -u -r1.54 -r1.55 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.70 -r1.71 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/au8522.c src/sys/dev/i2c/cx24227.c \
src/sys/dev/i2c/xc3028.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/i2c/dbcool.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/hytp14.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/i2c/i2c_exec.c \
src/sys/dev/i2c/spdmem_i2c.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/lg3303.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/mt2131.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/nxt2k.c src/sys/dev/i2c/zl10353.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/i2c/sdtemp.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/tvpll.c src/sys/dev/i2c/xc5k.c
cvs rdiff -u -r1.142 -r1.143 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/i2cexec/Makefile

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



CVS commit: src/external/cddl/osnet/dev/systrace

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:14:09 UTC 2015

Modified Files:
src/external/cddl/osnet/dev/systrace: systrace.c

Log Message:
- cleanup FreeBSD ifdefs
- remove unused code
- adjust to NetBSD struct emul and types.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/systrace/systrace.c

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

Modified files:

Index: src/external/cddl/osnet/dev/systrace/systrace.c
diff -u src/external/cddl/osnet/dev/systrace/systrace.c:1.4 src/external/cddl/osnet/dev/systrace/systrace.c:1.5
--- src/external/cddl/osnet/dev/systrace/systrace.c:1.4	Sun Jan 12 12:49:30 2014
+++ src/external/cddl/osnet/dev/systrace/systrace.c	Sat Mar  7 10:14:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: systrace.c,v 1.4 2014/01/12 17:49:30 riz Exp $	*/
+/*	$NetBSD: systrace.c,v 1.5 2015/03/07 15:14:09 christos Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -38,9 +38,6 @@
 #include sys/cpuvar.h
 #include sys/fcntl.h
 #include sys/filio.h
-#ifdef __FreeBSD__
-#include sys/kdb.h
-#endif
 #include sys/kernel.h
 #include sys/kmem.h
 #include sys/kthread.h
@@ -53,44 +50,40 @@
 #include sys/poll.h
 #include sys/proc.h
 #include sys/selinfo.h
-#ifdef __FreeBSD__
-#include sys/smp.h
-#include sys/sysproto.h
-#include sys/sysent.h
-#endif
 #include sys/syscallargs.h
 #include sys/uio.h
 #include sys/unistd.h
 
 #include sys/dtrace.h
 
-#ifdef LINUX_SYSTRACE
-#include linux.h
-#include linux_syscall.h
-#include linux_proto.h
-#include linux_syscallnames.c
-#include linux_systrace.c
-extern struct sysent linux_sysent[];
-#define	DEVNAME		dtrace/linsystrace
-#define	PROVNAME	linsyscall
-#define	MAXSYSCALL	LINUX_SYS_MAXSYSCALL
-#define	SYSCALLNAMES	linux_syscallnames
-#define	SYSENT		linux_sysent
+#include emultrace.h
+
+#define	CONCAT(x,y)	__CONCAT(x,y)
+#define	STRING(s)	__STRING(s)
+
+#ifndef NATIVE
+extern const char	* const CONCAT(emulname,_syscallnames)[];
+extern 	struct sysent 	CONCAT(emulname,_sysent)[];
+#define	MODNAME		CONCAT(dtrace_syscall_,emulname)
+#define	MODDEP		dtrace_syscall,compat_ STRING(emulname)
+#define	MAXSYSCALL	CONCAT(EMULNAME,_SYS_MAXSYSCALL)
+#define	SYSCALLNAMES	CONCAT(emulname,_syscallnames)
+#define	SYSENT		CONCAT(emulname,_sysent)
+#define	PROVNAME	STRING(emulname) _syscall
 #else
-/*
- * The syscall arguments are processed into a DTrace argument array
- * using a generated function. See sys/kern/makesyscalls.sh.
- */
-#include sys/syscall.h
-#include kern/systrace_args.c
 extern const char	* const syscallnames[];
-#define	DEVNAME		dtrace/systrace
-#define	PROVNAME	syscall
+#define	MODNAME		dtrace_syscall
+#define	MODDEP		dtrace
 #define	MAXSYSCALL	SYS_MAXSYSCALL
 #define	SYSCALLNAMES	syscallnames
 #define	SYSENT		sysent
+#define	PROVNAME	syscall
 #endif
 
+#define	MODCMD		CONCAT(MODNAME,_modcmd)
+#define EMUL		CONCAT(emul_,emulname)
+extern struct emul 	EMUL;
+
 #define	SYSTRACE_ARTIFICIAL_FRAMES	1
 
 #define	SYSTRACE_SHIFT			16
@@ -103,9 +96,6 @@ extern const char	* const syscallnames[]
 #error 1  SYSTRACE_SHIFT must exceed number of system calls
 #endif
 
-#ifdef __FreeBSD__
-static d_open_t	systrace_open;
-#endif
 static int	systrace_unload(void);
 static void	systrace_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *);
 static void	systrace_provide(void *, const dtrace_probedesc_t *);
@@ -114,23 +104,6 @@ static int	systrace_enable(void *, dtrac
 static void	systrace_disable(void *, dtrace_id_t, void *);
 static void	systrace_load(void *);
 
-#ifdef __FreeBSD__
-static struct cdevsw systrace_cdevsw = {
-	.d_version	= D_VERSION,
-	.d_open		= systrace_open,
-#ifdef LINUX_SYSTRACE
-	.d_name		= linsystrace,
-#else
-	.d_name		= systrace,
-#endif
-};
-#endif
-
-static union	{
-	const char	* const *p_constnames;
-	char		**pp_syscallnames;
-} uglyhack = { SYSCALLNAMES };
-
 static dtrace_pattr_t systrace_attr = {
 { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON },
 { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN },
@@ -152,12 +125,8 @@ static dtrace_pops_t systrace_pops = {
 	systrace_destroy
 };
 
-#ifdef __FreeBSD__
-static struct cdev		*systrace_cdev;
-#endif
 static dtrace_provider_id_t	systrace_id;
 
-#if !defined(LINUX_SYSTRACE)
 /*
  * Probe callback function.
  *
@@ -166,48 +135,40 @@ static dtrace_provider_id_t	systrace_id;
  *   compat syscall from something like Linux.
  */
 static void
-systrace_probe(u_int32_t id, int sysnum, struct sysent *se, void *params)
+systrace_probe(uint32_t id, register_t sysnum, const struct sysent *se,
+const void *params, const register_t *ret, int error)
 {
-	int		n_args	= 0;
-	union systrace_probe_args_un	uargs[SYS_MAXSYSARGS];
+	size_t		n_args	= 0;
+	uintptr_t	uargs[SYS_MAXSYSARGS];
 
-	/*
-	 * Check if this syscall has an argument conversion function
-	 * registered.
-	 */
-	if (se-sy_systrace_args_func != NULL)
-		/*
-		 * Convert the 

CVS commit: src/sys/compat/sunos

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:15:24 UTC 2015

Modified Files:
src/sys/compat/sunos: Makefile

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/sunos/Makefile

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

Modified files:

Index: src/sys/compat/sunos/Makefile
diff -u src/sys/compat/sunos/Makefile:1.6 src/sys/compat/sunos/Makefile:1.7
--- src/sys/compat/sunos/Makefile:1.6	Tue Jan 14 13:51:25 2014
+++ src/sys/compat/sunos/Makefile	Sat Mar  7 10:15:24 2015
@@ -1,5 +1,5 @@
-#	$NetBSD: Makefile,v 1.6 2014/01/14 18:51:25 christos Exp $
+#	$NetBSD: Makefile,v 1.7 2015/03/07 15:15:24 christos Exp $
 
-SYACALL_PREFIX=sunos
+SYSCALL_PREFIX=sunos
 
 .include bsd.syscall.mk



CVS commit: src/external/cddl/osnet/dist/uts/common

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:14:29 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c
src/external/cddl/osnet/dist/uts/common/sys: dtrace.h

Log Message:
constify


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
cvs rdiff -u -r1.10 -r1.11 \
src/external/cddl/osnet/dist/uts/common/sys/dtrace.h

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



CVS commit: src/external/cddl/osnet/dist/uts/common

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:14:29 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c
src/external/cddl/osnet/dist/uts/common/sys: dtrace.h

Log Message:
constify


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
cvs rdiff -u -r1.10 -r1.11 \
src/external/cddl/osnet/dist/uts/common/sys/dtrace.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/cddl/osnet/dist/uts/common/dtrace/dtrace.c
diff -u src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.29 src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.30
--- src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.29	Sat Jan 31 08:36:29 2015
+++ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c	Sat Mar  7 10:14:29 2015
@@ -7892,8 +7892,8 @@ dtrace_probe_lookup_match(dtrace_probe_t
  * name and probe name.
  */
 dtrace_id_t
-dtrace_probe_lookup(dtrace_provider_id_t prid, char *mod,
-char *func, char *name)
+dtrace_probe_lookup(dtrace_provider_id_t prid, const char *mod,
+const char *func, const char *name)
 {
 	dtrace_probekey_t pkey;
 	dtrace_id_t id;
@@ -7901,11 +7901,11 @@ dtrace_probe_lookup(dtrace_provider_id_t
 
 	pkey.dtpk_prov = ((dtrace_provider_t *)prid)-dtpv_name;
 	pkey.dtpk_pmatch = dtrace_match_string;
-	pkey.dtpk_mod = mod;
+	pkey.dtpk_mod = __UNCONST(mod);
 	pkey.dtpk_mmatch = mod ? dtrace_match_string : dtrace_match_nul;
-	pkey.dtpk_func = func;
+	pkey.dtpk_func = __UNCONST(func);
 	pkey.dtpk_fmatch = func ? dtrace_match_string : dtrace_match_nul;
-	pkey.dtpk_name = name;
+	pkey.dtpk_name = __UNCONST(name);
 	pkey.dtpk_nmatch = name ? dtrace_match_string : dtrace_match_nul;
 	pkey.dtpk_id = DTRACE_IDNONE;
 

Index: src/external/cddl/osnet/dist/uts/common/sys/dtrace.h
diff -u src/external/cddl/osnet/dist/uts/common/sys/dtrace.h:1.10 src/external/cddl/osnet/dist/uts/common/sys/dtrace.h:1.11
--- src/external/cddl/osnet/dist/uts/common/sys/dtrace.h:1.10	Sat Mar 15 04:00:19 2014
+++ src/external/cddl/osnet/dist/uts/common/sys/dtrace.h	Sat Mar  7 10:14:29 2015
@@ -2055,8 +2055,8 @@ extern int dtrace_register(const char *,
 extern int dtrace_unregister(dtrace_provider_id_t);
 extern int dtrace_condense(dtrace_provider_id_t);
 extern void dtrace_invalidate(dtrace_provider_id_t);
-extern dtrace_id_t dtrace_probe_lookup(dtrace_provider_id_t, char *,
-char *, char *);
+extern dtrace_id_t dtrace_probe_lookup(dtrace_provider_id_t, const char *,
+const char *, const char *);
 extern dtrace_id_t dtrace_probe_create(dtrace_provider_id_t, const char *,
 const char *, const char *, int, void *);
 extern void *dtrace_probe_arg(dtrace_provider_id_t, dtrace_id_t);



CVS commit: src/external/cddl/osnet/dev/systrace

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:14:09 UTC 2015

Modified Files:
src/external/cddl/osnet/dev/systrace: systrace.c

Log Message:
- cleanup FreeBSD ifdefs
- remove unused code
- adjust to NetBSD struct emul and types.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/systrace/systrace.c

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



CVS commit: src/sys/compat

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:22:39 UTC 2015

Modified Files:
src/sys/compat/linux/arch/amd64: syscalls.conf
src/sys/compat/linux/arch/i386: syscalls.conf
src/sys/compat/linux32/arch/amd64: syscalls.conf

Log Message:
Add systrace output file


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/linux/arch/amd64/syscalls.conf
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux/arch/i386/syscalls.conf
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux32/arch/amd64/syscalls.conf

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



CVS commit: src/sys/compat

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:22:39 UTC 2015

Modified Files:
src/sys/compat/linux/arch/amd64: syscalls.conf
src/sys/compat/linux/arch/i386: syscalls.conf
src/sys/compat/linux32/arch/amd64: syscalls.conf

Log Message:
Add systrace output file


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/linux/arch/amd64/syscalls.conf
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux/arch/i386/syscalls.conf
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux32/arch/amd64/syscalls.conf

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

Modified files:

Index: src/sys/compat/linux/arch/amd64/syscalls.conf
diff -u src/sys/compat/linux/arch/amd64/syscalls.conf:1.2 src/sys/compat/linux/arch/amd64/syscalls.conf:1.3
--- src/sys/compat/linux/arch/amd64/syscalls.conf:1.2	Sun Dec 11 07:20:14 2005
+++ src/sys/compat/linux/arch/amd64/syscalls.conf	Sat Mar  7 10:22:38 2015
@@ -1,9 +1,10 @@
-#	$NetBSD: syscalls.conf,v 1.2 2005/12/11 12:20:14 christos Exp $
+#	$NetBSD: syscalls.conf,v 1.3 2015/03/07 15:22:38 christos Exp $
 
 sysnames=linux_syscalls.c
 sysnumhdr=linux_syscall.h
 syssw=linux_sysent.c
 sysarghdr=linux_syscallargs.h
+systrace=linux_systrace_args.c
 compatopts=
 libcompatopts=
 

Index: src/sys/compat/linux/arch/i386/syscalls.conf
diff -u src/sys/compat/linux/arch/i386/syscalls.conf:1.6 src/sys/compat/linux/arch/i386/syscalls.conf:1.7
--- src/sys/compat/linux/arch/i386/syscalls.conf:1.6	Sun Dec 11 07:20:14 2005
+++ src/sys/compat/linux/arch/i386/syscalls.conf	Sat Mar  7 10:22:38 2015
@@ -1,9 +1,10 @@
-#	$NetBSD: syscalls.conf,v 1.6 2005/12/11 12:20:14 christos Exp $
+#	$NetBSD: syscalls.conf,v 1.7 2015/03/07 15:22:38 christos Exp $
 
 sysnames=linux_syscalls.c
 sysnumhdr=linux_syscall.h
 syssw=linux_sysent.c
 sysarghdr=linux_syscallargs.h
+systrace=linux_systrace_args.c
 compatopts=
 libcompatopts=
 

Index: src/sys/compat/linux32/arch/amd64/syscalls.conf
diff -u src/sys/compat/linux32/arch/amd64/syscalls.conf:1.1 src/sys/compat/linux32/arch/amd64/syscalls.conf:1.2
--- src/sys/compat/linux32/arch/amd64/syscalls.conf:1.1	Thu Feb  9 14:18:57 2006
+++ src/sys/compat/linux32/arch/amd64/syscalls.conf	Sat Mar  7 10:22:38 2015
@@ -1,9 +1,10 @@
-#	$NetBSD: syscalls.conf,v 1.1 2006/02/09 19:18:57 manu Exp $
+#	$NetBSD: syscalls.conf,v 1.2 2015/03/07 15:22:38 christos Exp $
 
 sysnames=linux32_syscalls.c
 sysnumhdr=linux32_syscall.h
 syssw=linux32_sysent.c
 sysarghdr=linux32_syscallargs.h
+systrace=linux32_systrace_args.c
 compatopts=
 libcompatopts=
 



CVS commit: src/sys/arch/m68k/m68k

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:54:57 UTC 2015

Modified Files:
src/sys/arch/m68k/m68k: linux_syscall.c m68k_syscall.c sunos_syscall.c

Log Message:
adjust to new trace_{enter,exit} signatures.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/m68k/m68k/linux_syscall.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/m68k/m68k/m68k_syscall.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/m68k/m68k/sunos_syscall.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/m68k/m68k/linux_syscall.c
diff -u src/sys/arch/m68k/m68k/linux_syscall.c:1.23 src/sys/arch/m68k/m68k/linux_syscall.c:1.24
--- src/sys/arch/m68k/m68k/linux_syscall.c:1.23	Mon Mar 24 16:06:32 2014
+++ src/sys/arch/m68k/m68k/linux_syscall.c	Sat Mar  7 13:54:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_syscall.c,v 1.23 2014/03/24 20:06:32 christos Exp $	*/
+/*	$NetBSD: linux_syscall.c,v 1.24 2015/03/07 18:54:57 christos Exp $	*/
 
 /*-
  * Portions Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.23 2014/03/24 20:06:32 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.24 2015/03/07 18:54:57 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_execfmt.h
@@ -216,7 +216,7 @@ linux_syscall_fancy(register_t code, str
 		break;
 	}
 
-	if ((error = trace_enter(code, args, callp-sy_narg)) != 0)
+	if ((error = trace_enter(code, callp, args)) != 0)
 		goto out;
 
 	rval[0] = 0;
@@ -252,5 +252,5 @@ out:
 		break;
 	}
 
-	trace_exit(code, rval, error);
+	trace_exit(code, callp, args, rval, error);
 }

Index: src/sys/arch/m68k/m68k/m68k_syscall.c
diff -u src/sys/arch/m68k/m68k/m68k_syscall.c:1.49 src/sys/arch/m68k/m68k/m68k_syscall.c:1.50
--- src/sys/arch/m68k/m68k/m68k_syscall.c:1.49	Fri Oct 25 16:45:35 2013
+++ src/sys/arch/m68k/m68k/m68k_syscall.c	Sat Mar  7 13:54:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: m68k_syscall.c,v 1.49 2013/10/25 20:45:35 martin Exp $	*/
+/*	$NetBSD: m68k_syscall.c,v 1.50 2015/03/07 18:54:57 christos Exp $	*/
 
 /*-
  * Portions Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: m68k_syscall.c,v 1.49 2013/10/25 20:45:35 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: m68k_syscall.c,v 1.50 2015/03/07 18:54:57 christos Exp $);
 
 #include opt_execfmt.h
 #include opt_compat_netbsd.h
@@ -335,7 +335,7 @@ syscall_fancy(register_t code, struct lw
 			goto bad;
 	}
 
-	if ((error = trace_enter(code, args, callp-sy_narg)) != 0)
+	if ((error = trace_enter(code, callp, args)) != 0)
 		goto out;
 
 	rval[0] = 0;
@@ -387,7 +387,7 @@ out:
 		break;
 	}
 
-	trace_exit(code, rval, error);
+	trace_exit(code, callp, args, rval, error);
 }
 
 void

Index: src/sys/arch/m68k/m68k/sunos_syscall.c
diff -u src/sys/arch/m68k/m68k/sunos_syscall.c:1.22 src/sys/arch/m68k/m68k/sunos_syscall.c:1.23
--- src/sys/arch/m68k/m68k/sunos_syscall.c:1.22	Tue Feb  8 15:20:16 2011
+++ src/sys/arch/m68k/m68k/sunos_syscall.c	Sat Mar  7 13:54:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos_syscall.c,v 1.22 2011/02/08 20:20:16 rmind Exp $	*/
+/*	$NetBSD: sunos_syscall.c,v 1.23 2015/03/07 18:54:57 christos Exp $	*/
 
 /*-
  * Portions Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sunos_syscall.c,v 1.22 2011/02/08 20:20:16 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: sunos_syscall.c,v 1.23 2015/03/07 18:54:57 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_execfmt.h
@@ -273,7 +273,7 @@ sunos_syscall_fancy(register_t code, str
 			goto bad;
 	}
 
-	if ((error = trace_enter(code, args, callp-sy_narg)) != 0)
+	if ((error = trace_enter(code, callp, args)) != 0)
 		goto out;
 
 	rval[0] = 0;
@@ -315,5 +315,5 @@ out:
 			frame-f_regs[SP] -= sizeof (int);
 	}
 
-	trace_exit(code, rval, error);
+	trace_exit(code, callp, args, rval, error);
 }



CVS commit: src/sys/arch/m68k/m68k

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:54:57 UTC 2015

Modified Files:
src/sys/arch/m68k/m68k: linux_syscall.c m68k_syscall.c sunos_syscall.c

Log Message:
adjust to new trace_{enter,exit} signatures.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/m68k/m68k/linux_syscall.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/m68k/m68k/m68k_syscall.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/m68k/m68k/sunos_syscall.c

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



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:38:08 UTC 2015

Modified Files:
src/sys/kern: Makefile kern_syscall.c makesyscalls.sh syscalls.conf

Log Message:
Adjust for systrace based on the FreeBSD code:
- create new file systrace_args.c that use used to convert the syscall
  arguments to an array, and functions that print the types of the
  entry and return arguments.
- call the systrace probe from the trace_enter and trace_exit functions


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/kern/Makefile
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/kern_syscall.c
cvs rdiff -u -r1.145 -r1.146 src/sys/kern/makesyscalls.sh
cvs rdiff -u -r1.21 -r1.22 src/sys/kern/syscalls.conf

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/Makefile
diff -u src/sys/kern/Makefile:1.17 src/sys/kern/Makefile:1.18
--- src/sys/kern/Makefile:1.17	Wed Jan 15 20:15:34 2014
+++ src/sys/kern/Makefile	Sat Mar  7 11:38:07 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2014/01/16 01:15:34 christos Exp $
+#	$NetBSD: Makefile,v 1.18 2015/03/07 16:38:07 christos Exp $
 #
 #	from: @(#)Makefile	8.2 (Berkeley) 3/21/94
 
@@ -11,7 +11,7 @@ all:
 	@false
 
 SYSCALLSRC = makesyscalls.sh syscalls.conf syscalls.master
-init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC}
+init_sysent.c syscalls.c systrace_args.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC}
 	${HOST_SH} makesyscalls.sh syscalls.conf syscalls.master
 
 VNODEIFSRC = vnode_if.sh vnode_if.src

Index: src/sys/kern/kern_syscall.c
diff -u src/sys/kern/kern_syscall.c:1.9 src/sys/kern/kern_syscall.c:1.10
--- src/sys/kern/kern_syscall.c:1.9	Sat Dec 14 01:27:57 2013
+++ src/sys/kern/kern_syscall.c	Sat Mar  7 11:38:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_syscall.c,v 1.9 2013/12/14 06:27:57 pgoyette Exp $	*/
+/*	$NetBSD: kern_syscall.c,v 1.10 2015/03/07 16:38:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,13 +30,14 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_syscall.c,v 1.9 2013/12/14 06:27:57 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_syscall.c,v 1.10 2015/03/07 16:38:07 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_modular.h
 #include opt_syscall_debug.h
 #include opt_ktrace.h
 #include opt_ptrace.h
+#include opt_dtrace.h
 #endif
 
 /* XXX To get syscall prototypes. */
@@ -370,15 +371,22 @@ trace_is_enabled(struct proc *p)
  * a system call is actually executed.
  */
 int
-trace_enter(register_t code, const register_t *args, int narg)
+trace_enter(register_t code, const struct sysent *sy, const void *args)
 {
 	int error = 0;
 
+#ifdef KDTRACE_HOOKS
+	if (sy-sy_entry) {
+		struct emul *e = curlwp-l_proc-p_emul;
+		(*e-e_dtrace_syscall)(sy-sy_entry, code, sy, args, NULL, 0);
+	}
+#endif
+
 #ifdef SYSCALL_DEBUG
 	scdebug_call(code, args);
 #endif /* SYSCALL_DEBUG */
 
-	ktrsyscall(code, args, narg);
+	ktrsyscall(code, args, sy-sy_narg);
 
 #ifdef PTRACE
 	if ((curlwp-l_proc-p_slflag  (PSL_SYSCALL|PSL_TRACED)) ==
@@ -401,12 +409,20 @@ trace_enter(register_t code, const regis
  * system call number range for emulation the process runs under.
  */
 void
-trace_exit(register_t code, register_t rval[], int error)
+trace_exit(register_t code, const struct sysent *sy, const void *args,
+register_t rval[], int error)
 {
-#ifdef PTRACE
+#if defined(PTRACE) || defined(KDTRACE_HOOKS)
 	struct proc *p = curlwp-l_proc;
 #endif
 
+#ifdef KDTRACE_HOOKS
+	if (sy-sy_return) {
+		(*p-p_emul-e_dtrace_syscall)(sy-sy_return, code, sy, args,
+		rval, error);
+	}
+#endif
+
 #ifdef SYSCALL_DEBUG
 	scdebug_ret(code, error, rval);
 #endif /* SYSCALL_DEBUG */

Index: src/sys/kern/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.145 src/sys/kern/makesyscalls.sh:1.146
--- src/sys/kern/makesyscalls.sh:1.145	Thu Jul 24 07:58:45 2014
+++ src/sys/kern/makesyscalls.sh	Sat Mar  7 11:38:07 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.145 2014/07/24 11:58:45 pooka Exp $
+#	$NetBSD: makesyscalls.sh,v 1.146 2015/03/07 16:38:07 christos Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -61,6 +61,7 @@ esac
 # source the config file.
 sys_nosys=sys_nosys	# default is sys_nosys(), if not specified otherwise
 maxsysargs=8		# default limit is 8 (32bit) arguments
+systrace=/dev/null
 rumpcalls=/dev/null
 rumpcallshdr=/dev/null
 rumpsysmap=/dev/null
@@ -75,15 +76,17 @@ sysent=sysent.switch
 sysnamesbottom=sysnames.bottom
 rumptypes=rumphdr.types
 rumpprotos=rumphdr.protos
+systracetmp=systrace.$$
+systraceret=systraceret.$$
 
-trap rm $sysdcl $sysprotos $sysent $sysnamesbottom $rumpsysent $rumptypes $rumpprotos 0
+trap rm $sysdcl $sysprotos $sysent $sysnamesbottom $rumpsysent $rumptypes $rumpprotos $systracetmp $systraceret 0
 
 # Awk program (must support nawk extensions)
 # Use awk at Berkeley, nawk or gawk 

CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:38:49 UTC 2015

Modified Files:
src/sys/kern: init_sysent.c sys_syscall.c syscalls.c
Added Files:
src/sys/kern: systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/sys_syscall.c
cvs rdiff -u -r1.280 -r1.281 src/sys/kern/syscalls.c
cvs rdiff -u -r0 -r1.1 src/sys/kern/systrace_args.c

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



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:38:08 UTC 2015

Modified Files:
src/sys/kern: Makefile kern_syscall.c makesyscalls.sh syscalls.conf

Log Message:
Adjust for systrace based on the FreeBSD code:
- create new file systrace_args.c that use used to convert the syscall
  arguments to an array, and functions that print the types of the
  entry and return arguments.
- call the systrace probe from the trace_enter and trace_exit functions


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/kern/Makefile
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/kern_syscall.c
cvs rdiff -u -r1.145 -r1.146 src/sys/kern/makesyscalls.sh
cvs rdiff -u -r1.21 -r1.22 src/sys/kern/syscalls.conf

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



CVS commit: src/sys/sys

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:39:20 UTC 2015

Modified Files:
src/sys/sys: syscall.h syscallargs.h syscallvar.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/sys/sys/syscall.h
cvs rdiff -u -r1.259 -r1.260 src/sys/sys/syscallargs.h
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/syscallvar.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/sys/syscall.h
diff -u src/sys/sys/syscall.h:1.276 src/sys/sys/syscall.h:1.277
--- src/sys/sys/syscall.h:1.276	Sat Feb 21 19:53:28 2015
+++ src/sys/sys/syscall.h	Sat Mar  7 11:39:20 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.h,v 1.276 2015/02/22 00:53:28 christos Exp $ */
+/* $NetBSD: syscall.h,v 1.277 2015/03/07 16:39:20 christos Exp $ */
 
 /*
  * System call numbers.

Index: src/sys/sys/syscallargs.h
diff -u src/sys/sys/syscallargs.h:1.259 src/sys/sys/syscallargs.h:1.260
--- src/sys/sys/syscallargs.h:1.259	Sat Feb 21 19:53:28 2015
+++ src/sys/sys/syscallargs.h	Sat Mar  7 11:39:20 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: syscallargs.h,v 1.259 2015/02/22 00:53:28 christos Exp $ */
+/* $NetBSD: syscallargs.h,v 1.260 2015/03/07 16:39:20 christos Exp $ */
 
 /*
  * System call argument lists.

Index: src/sys/sys/syscallvar.h
diff -u src/sys/sys/syscallvar.h:1.9 src/sys/sys/syscallvar.h:1.10
--- src/sys/sys/syscallvar.h:1.9	Mon Mar  3 22:24:03 2014
+++ src/sys/sys/syscallvar.h	Sat Mar  7 11:39:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscallvar.h,v 1.9 2014/03/04 03:24:03 matt Exp $	*/
+/*	$NetBSD: syscallvar.h,v 1.10 2015/03/07 16:39:20 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,6 +36,10 @@
 #error nothing of interest to userspace here
 #endif
 
+#if defined(_KERNEL)  defined(_KERNEL_OPT)
+#include opt_dtrace.h
+#endif
+
 #include sys/systm.h
 #include sys/proc.h
 
@@ -72,8 +76,13 @@ sy_invoke(const struct sysent *sy, struc
 	(sy-sy_flags  SYCALL_INDIRECT) == 0;
 	int error;
 
-	if (__predict_true(!do_trace)
-	|| (error = trace_enter(code, uap, sy-sy_narg)) == 0) {
+#ifdef KDTRACE_HOOKS
+#define KDTRACE_ENTRY(a)	(a)
+#else
+#define KDTRACE_ENTRY(a)	(0)
+#endif
+	if (__predict_true(!(do_trace || KDTRACE_ENTRY(sy-sy_entry)))
+	|| (error = trace_enter(code, sy, uap)) == 0) {
 		rval[0] = 0;
 #if !defined(__mips__)  !defined(__m68k__)
 		/*
@@ -85,8 +94,8 @@ sy_invoke(const struct sysent *sy, struc
 		error = sy_call(sy, l, uap, rval);
 	}
 
-	if (__predict_false(do_trace)) {
-		trace_exit(code, rval, error);
+	if (__predict_false(do_trace || KDTRACE_ENTRY(sy-sy_return))) {
+		trace_exit(code, sy, uap, rval, error);
 	}
 	return error;
 }



CVS commit: src/sys/sys

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:39:20 UTC 2015

Modified Files:
src/sys/sys: syscall.h syscallargs.h syscallvar.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/sys/sys/syscall.h
cvs rdiff -u -r1.259 -r1.260 src/sys/sys/syscallargs.h
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/syscallvar.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

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:40:05 UTC 2015

Modified Files:
src/sys/rump/include/rump: rump_syscalls.h
src/sys/rump/librump/rumpkern: rump_syscalls.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.105 -r1.106 src/sys/rump/librump/rumpkern/rump_syscalls.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/amd64/amd64

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:41:40 UTC 2015

Modified Files:
src/sys/arch/amd64/amd64: linux32_syscall.c linux_syscall.c
netbsd32_syscall.c

Log Message:
add dtrace hooks


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/amd64/linux32_syscall.c \
src/sys/arch/amd64/amd64/linux_syscall.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amd64/amd64/netbsd32_syscall.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/amd64/amd64

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:41:40 UTC 2015

Modified Files:
src/sys/arch/amd64/amd64: linux32_syscall.c linux_syscall.c
netbsd32_syscall.c

Log Message:
add dtrace hooks


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/amd64/linux32_syscall.c \
src/sys/arch/amd64/amd64/linux_syscall.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amd64/amd64/netbsd32_syscall.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/amd64/amd64/linux32_syscall.c
diff -u src/sys/arch/amd64/amd64/linux32_syscall.c:1.31 src/sys/arch/amd64/amd64/linux32_syscall.c:1.32
--- src/sys/arch/amd64/amd64/linux32_syscall.c:1.31	Tue Nov 25 14:54:08 2014
+++ src/sys/arch/amd64/amd64/linux32_syscall.c	Sat Mar  7 13:41:40 2015
@@ -1,7 +1,7 @@
-/*	$NetBSD: linux32_syscall.c,v 1.31 2014/11/25 19:54:08 christos Exp $ */
+/*	$NetBSD: linux32_syscall.c,v 1.32 2015/03/07 18:41:40 christos Exp $ */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux32_syscall.c,v 1.31 2014/11/25 19:54:08 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_syscall.c,v 1.32 2015/03/07 18:41:40 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -63,14 +63,14 @@ linux32_syscall(struct trapframe *frame)
 	args[4] = frame-tf_rdi  0x;
 	args[5] = frame-tf_rbp  0x;
 
-	if (__predict_false(p-p_trace_enabled)) {
+	if (__predict_false(p-p_trace_enabled || KDTRACE_ENTRY(callp-sy_return))) {
 		narg = callp-sy_narg;
 		if (__predict_false(narg  __arraycount(args)))
 			panic(impossible syscall narg, code %d, narg %zu,
 			code, narg);
 		for (i = 0; i  narg; i++)
 			args64[i] = args[i]  0x;
-		if ((error = trace_enter(code, args64, narg)) != 0)
+		if ((error = trace_enter(code, callp, args64)) != 0)
 			goto out;
 	}
 
@@ -102,7 +102,11 @@ out:
 		break;
 	}
 
-	if (__predict_false(p-p_trace_enabled))
-		trace_exit(code, rval, error);
+	if (__predict_false(p-p_trace_enabled || KDTRACE_ENTRY(callp-sy_return))) {
+		narg = callp-sy_narg;
+		for (i = 0; i  narg; i++)
+			args64[i] = args[i]  0x;
+		trace_exit(code, callp, args64, rval, error);
+	}
 	userret(l);
 }
Index: src/sys/arch/amd64/amd64/linux_syscall.c
diff -u src/sys/arch/amd64/amd64/linux_syscall.c:1.31 src/sys/arch/amd64/amd64/linux_syscall.c:1.32
--- src/sys/arch/amd64/amd64/linux_syscall.c:1.31	Sun Dec 19 19:25:24 2010
+++ src/sys/arch/amd64/amd64/linux_syscall.c	Sat Mar  7 13:41:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_syscall.c,v 1.31 2010/12/20 00:25:24 matt Exp $ */
+/*	$NetBSD: linux_syscall.c,v 1.32 2015/03/07 18:41:40 christos Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.31 2010/12/20 00:25:24 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.32 2015/03/07 18:41:40 christos Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_linux.h
@@ -97,8 +97,8 @@ linux_syscall(struct trapframe *frame)
 	 * already adjacent in the syscall trapframe.
 	 */
 
-	if (__predict_false(p-p_trace_enabled)
-	 (error = trace_enter(code, args, callp-sy_narg)) != 0)
+	if (__predict_false(p-p_trace_enabled || KDTRACE_ENTRY(callp-sy_entry))
+	 (error = trace_enter(code, callp, args)) != 0)
 		goto out;
 
 	rval[0] = 0;
@@ -126,8 +126,8 @@ out:
 		break;
 	}
 
-	if (__predict_false(p-p_trace_enabled))
-		trace_exit(code, rval, error);
+	if (__predict_false(p-p_trace_enabled || KDTRACE_ENTRY(callp-sy_return)))
+		trace_exit(code, callp, args, rval, error);
 
 	userret(l);
 }

Index: src/sys/arch/amd64/amd64/netbsd32_syscall.c
diff -u src/sys/arch/amd64/amd64/netbsd32_syscall.c:1.32 src/sys/arch/amd64/amd64/netbsd32_syscall.c:1.33
--- src/sys/arch/amd64/amd64/netbsd32_syscall.c:1.32	Fri May 16 08:55:43 2014
+++ src/sys/arch/amd64/amd64/netbsd32_syscall.c	Sat Mar  7 13:41:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_syscall.c,v 1.32 2014/05/16 12:55:43 njoly Exp $	*/
+/*	$NetBSD: netbsd32_syscall.c,v 1.33 2015/03/07 18:41:40 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -29,8 +29,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if defined(_KERNEL)  defined(_KERNEL_OPT)
+#include opt_dtrace.h
+#endif
+
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_syscall.c,v 1.32 2014/05/16 12:55:43 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_syscall.c,v 1.33 2015/03/07 18:41:40 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -88,12 +92,12 @@ netbsd32_syscall(struct trapframe *frame
 			goto bad;
 	}
 
-	if (__predict_false(p-p_trace_enabled)
+	if (__predict_false(p-p_trace_enabled || KDTRACE_ENTRY(callp-sy_entry))
 	 !__predict_false(callp-sy_flags  SYCALL_INDIRECT)) {
 		int narg = callp-sy_argsize  2;
 		for (i = 0; i  narg; i++)
 			args64[i] = args[i];
-		error = 

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

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:52:47 UTC 2015

Modified Files:
src/sys/arch/arm/arm: linux_syscall.c

Log Message:
adjust to new trace_{enter,exit}


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/arm/linux_syscall.c

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

Modified files:

Index: src/sys/arch/arm/arm/linux_syscall.c
diff -u src/sys/arch/arm/arm/linux_syscall.c:1.26 src/sys/arch/arm/arm/linux_syscall.c:1.27
--- src/sys/arch/arm/arm/linux_syscall.c:1.26	Thu Apr  3 12:22:20 2014
+++ src/sys/arch/arm/arm/linux_syscall.c	Sat Mar  7 13:52:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_syscall.c,v 1.26 2014/04/03 16:22:20 rjs Exp $	*/
+/*	$NetBSD: linux_syscall.c,v 1.27 2015/03/07 18:52:46 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.26 2014/04/03 16:22:20 rjs Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.27 2015/03/07 18:52:46 christos Exp $);
 
 #include sys/device.h
 #include sys/errno.h
@@ -182,7 +182,7 @@ linux_syscall_fancy(trapframe_t *frame, 
 	args = frame-tf_r0;
 	callp = p-p_emul-e_sysent + code;
 
-	if ((error = trace_enter(code, args, callp-sy_narg)) != 0)
+	if ((error = trace_enter(code, callp, args)) != 0)
 		goto out;
 
 	rval[0] = 0;
@@ -209,7 +209,7 @@ out:
 		break;
 	}
 
-	trace_exit(code, rval, error);
+	trace_exit(code, callp, args, rval, error);
 
 	userret(l);
 }



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

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:52:47 UTC 2015

Modified Files:
src/sys/arch/arm/arm: linux_syscall.c

Log Message:
adjust to new trace_{enter,exit}


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/arm/linux_syscall.c

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



CVS commit: src/external/cddl/osnet/dev/systrace

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 17:47:09 UTC 2015

Modified Files:
src/external/cddl/osnet/dev/systrace: systrace.c

Log Message:
we have space for 2 more arguments so use it.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dev/systrace/systrace.c

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

Modified files:

Index: src/external/cddl/osnet/dev/systrace/systrace.c
diff -u src/external/cddl/osnet/dev/systrace/systrace.c:1.5 src/external/cddl/osnet/dev/systrace/systrace.c:1.6
--- src/external/cddl/osnet/dev/systrace/systrace.c:1.5	Sat Mar  7 10:14:09 2015
+++ src/external/cddl/osnet/dev/systrace/systrace.c	Sat Mar  7 12:47:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: systrace.c,v 1.5 2015/03/07 15:14:09 christos Exp $	*/
+/*	$NetBSD: systrace.c,v 1.6 2015/03/07 17:47:09 christos Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -139,17 +139,18 @@ systrace_probe(uint32_t id, register_t s
 const void *params, const register_t *ret, int error)
 {
 	size_t		n_args	= 0;
-	uintptr_t	uargs[SYS_MAXSYSARGS];
+	uintptr_t	uargs[SYS_MAXSYSARGS + 3];
 
 	memset(uargs, 0, sizeof(uargs));
-	if (params) {
+	if (ret) {
 		/* entry syscall, convert params */
 		systrace_args(sysnum, params, uargs, n_args);
 	} else {
-		/* return syscall, set values (XXX: errno?) */
+		/* return syscall, set values and params: */
 		uargs[0] = ret[0];
 		uargs[1] = ret[1];
 		uargs[2] = error;
+		systrace_args(sysnum, params, uargs + 3, n_args);
 	}
 	/* Process the probe using the converted argments. */
 	/* XXX: fix for more arguments! */



CVS commit: src/external/cddl/osnet/dev/systrace

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 17:47:09 UTC 2015

Modified Files:
src/external/cddl/osnet/dev/systrace: systrace.c

Log Message:
we have space for 2 more arguments so use it.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dev/systrace/systrace.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/i386/i386

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:50:01 UTC 2015

Modified Files:
src/sys/arch/i386/i386: freebsd_syscall.c ibcs2_syscall.c
linux_syscall.c svr4_syscall.c

Log Message:
adjust to new trace_{enter,exit} and dtrace


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/i386/i386/freebsd_syscall.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/i386/i386/ibcs2_syscall.c
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/i386/i386/linux_syscall.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/i386/i386/svr4_syscall.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/i386/i386/freebsd_syscall.c
diff -u src/sys/arch/i386/i386/freebsd_syscall.c:1.39 src/sys/arch/i386/i386/freebsd_syscall.c:1.40
--- src/sys/arch/i386/i386/freebsd_syscall.c:1.39	Thu Jul 12 14:13:08 2012
+++ src/sys/arch/i386/i386/freebsd_syscall.c	Sat Mar  7 13:50:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: freebsd_syscall.c,v 1.39 2012/07/12 18:13:08 dsl Exp $	*/
+/*	$NetBSD: freebsd_syscall.c,v 1.40 2015/03/07 18:50:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: freebsd_syscall.c,v 1.39 2012/07/12 18:13:08 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: freebsd_syscall.c,v 1.40 2015/03/07 18:50:01 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -112,8 +112,8 @@ freebsd_syscall(struct trapframe *frame)
 			goto bad;
 	}
 
-	if (!__predict_false(p-p_trace_enabled)
-	|| (error = trace_enter(code, args, callp-sy_narg)) == 0) {
+	if (!__predict_false(p-p_trace_enabled || KDTRACE_ENTRY(callp-sy_entry))
+	|| (error = trace_enter(code, callp, args)) == 0) {
 		rval[0] = 0;
 		rval[1] = frame-tf_edx; /* need to keep edx for shared FreeBSD bins */
 		error = sy_call(callp, l, args, rval);
@@ -143,8 +143,8 @@ freebsd_syscall(struct trapframe *frame)
 		break;
 	}
 
-	if (__predict_false(p-p_trace_enabled))
-		trace_exit(code, rval, error);
+	if (__predict_false(p-p_trace_enabled || KDTRACE_ENTRY(callp-sy_return)))
+		trace_exit(code, callp, args, rval, error);
 
 	userret(l);
 }

Index: src/sys/arch/i386/i386/ibcs2_syscall.c
diff -u src/sys/arch/i386/i386/ibcs2_syscall.c:1.48 src/sys/arch/i386/i386/ibcs2_syscall.c:1.49
--- src/sys/arch/i386/i386/ibcs2_syscall.c:1.48	Thu Jul 12 14:13:08 2012
+++ src/sys/arch/i386/i386/ibcs2_syscall.c	Sat Mar  7 13:50:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ibcs2_syscall.c,v 1.48 2012/07/12 18:13:08 dsl Exp $	*/
+/*	$NetBSD: ibcs2_syscall.c,v 1.49 2015/03/07 18:50:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ibcs2_syscall.c,v 1.48 2012/07/12 18:13:08 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: ibcs2_syscall.c,v 1.49 2015/03/07 18:50:01 christos Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_vm86.h
@@ -111,8 +111,8 @@ ibcs2_syscall(struct trapframe *frame)
 			goto bad;
 	}
 
-	if (!__predict_false(p-p_trace_enabled)
-	|| (error = trace_enter(code, args, callp-sy_narg)) == 0) {
+	if (!__predict_false(p-p_trace_enabled || KDTRACE_ENTRY(callp-sy_entry))
+	|| (error = trace_enter(code, callp, args)) == 0) {
 		rval[0] = 0;
 		rval[1] = 0;
 		error = sy_call(callp, l, args, rval);
@@ -143,8 +143,8 @@ ibcs2_syscall(struct trapframe *frame)
 		break;
 	}
 
-	if (__predict_false(p-p_trace_enabled))
-		trace_exit(code, rval, error);
+	if (__predict_false(p-p_trace_enabled || KDTRACE_ENTRY(callp-sy_return)))
+		trace_exit(code, callp, args, rval, error);
 
 	userret(l);
 }

Index: src/sys/arch/i386/i386/linux_syscall.c
diff -u src/sys/arch/i386/i386/linux_syscall.c:1.51 src/sys/arch/i386/i386/linux_syscall.c:1.52
--- src/sys/arch/i386/i386/linux_syscall.c:1.51	Wed Sep 28 13:27:21 2011
+++ src/sys/arch/i386/i386/linux_syscall.c	Sat Mar  7 13:50:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_syscall.c,v 1.51 2011/09/28 17:27:21 christos Exp $	*/
+/*	$NetBSD: linux_syscall.c,v 1.52 2015/03/07 18:50:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.51 2011/09/28 17:27:21 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.52 2015/03/07 18:50:01 christos Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_vm86.h
@@ -99,12 +99,10 @@ linux_syscall(struct trapframe *frame)
 	rval[0] = 0;
 	rval[1] = 0;
 
-	if (__predict_false(l-l_proc-p_trace_enabled)) {
-		error = trace_enter(code, args, callp-sy_narg);
-		if (__predict_true(error == 0)) {
+	if (__predict_false(l-l_proc-p_trace_enabled || KDTRACE_ENTRY(callp-sy_entry))) {
+		error = trace_enter(code, callp, args);
+		if (__predict_true(error == 0))
 			error = sy_call(callp, l, args, rval);
-			trace_exit(code, rval, error);
-		}
 	} else
 		error = sy_call(callp, 

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

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:50:01 UTC 2015

Modified Files:
src/sys/arch/i386/i386: freebsd_syscall.c ibcs2_syscall.c
linux_syscall.c svr4_syscall.c

Log Message:
adjust to new trace_{enter,exit} and dtrace


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/i386/i386/freebsd_syscall.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/i386/i386/ibcs2_syscall.c
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/i386/i386/linux_syscall.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/i386/i386/svr4_syscall.c

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



CVS commit: src/sys/sys

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:34:55 UTC 2015

Modified Files:
src/sys/sys: param.h proc.h systm.h

Log Message:
add dtrace syscall glue:
- adds 2 members to sysent: these are the entry and exit probe ids
  they are non-zero only when dtrace is loaded
- add an emul specific probe for dtrace: this is NULL unless the emulation
  supports dtrace and is loaded
- adjust the syscall stub call trace_enter/exit if needed for systrace
- add more info to trace_enter and exit needed by systrace


To generate a diff of this commit:
cvs rdiff -u -r1.465 -r1.466 src/sys/sys/param.h
cvs rdiff -u -r1.320 -r1.321 src/sys/sys/proc.h
cvs rdiff -u -r1.266 -r1.267 src/sys/sys/systm.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/sys/param.h
diff -u src/sys/sys/param.h:1.465 src/sys/sys/param.h:1.466
--- src/sys/sys/param.h:1.465	Sat Feb 14 07:59:02 2015
+++ src/sys/sys/param.h	Sat Mar  7 11:34:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.465 2015/02/14 12:59:02 he Exp $	*/
+/*	$NetBSD: param.h,v 1.466 2015/03/07 16:34:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	799000500	/* NetBSD 7.99.5 */
+#define	__NetBSD_Version__	799000600	/* NetBSD 7.99.6 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)

Index: src/sys/sys/proc.h
diff -u src/sys/sys/proc.h:1.320 src/sys/sys/proc.h:1.321
--- src/sys/sys/proc.h:1.320	Fri Feb 21 17:06:48 2014
+++ src/sys/sys/proc.h	Sat Mar  7 11:34:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.320 2014/02/21 22:06:48 skrll Exp $	*/
+/*	$NetBSD: proc.h,v 1.321 2015/03/07 16:34:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -177,6 +177,11 @@ struct emul {
 
 	size_t		e_ucsize;	/* size of ucontext_t */
 	void		(*e_startlwp)(void *);
+
+	/* Dtrace syscall probe */
+	void 		(*e_dtrace_syscall)(uint32_t, register_t,
+			const struct sysent *, const void *,
+			const register_t *, int);
 };
 
 /*

Index: src/sys/sys/systm.h
diff -u src/sys/sys/systm.h:1.266 src/sys/sys/systm.h:1.267
--- src/sys/sys/systm.h:1.266	Sun Aug  3 08:49:32 2014
+++ src/sys/sys/systm.h	Sat Mar  7 11:34:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: systm.h,v 1.266 2014/08/03 12:49:32 wiz Exp $	*/
+/*	$NetBSD: systm.h,v 1.267 2015/03/07 16:34:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -57,6 +57,7 @@
 struct clockframe;
 struct lwp;
 struct proc;
+struct sysent;
 struct timeval;
 struct tty;
 struct uio;
@@ -120,6 +121,8 @@ extern struct sysent {		/* system call t
 	short	sy_argsize;	/* total size of arguments */
 	int	sy_flags;	/* flags. see below */
 	sy_call_t *sy_call; /* implementing function */
+	uint32_t sy_entry;	/* DTrace entry ID for systrace. */
+	uint32_t sy_return;	/* DTrace return ID for systrace. */
 } sysent[];
 extern int nsysent;
 #if	BYTE_ORDER == BIG_ENDIAN
@@ -388,8 +391,9 @@ void	doforkhooks(struct proc *, struct p
  */
 #ifdef _KERNEL
 bool	trace_is_enabled(struct proc *);
-int	trace_enter(register_t, const register_t *, int);
-void	trace_exit(register_t, register_t [], int);
+int	trace_enter(register_t, const struct sysent *, const void *);
+void	trace_exit(register_t, const struct sysent *, const void *,
+register_t [], int);
 #endif
 
 int	uiomove(void *, size_t, struct uio *);



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:35:37 UTC 2015

Modified Files:
src/sys/kern: files.kern

Log Message:
syscallnames are needed by dtrace


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/kern/files.kern

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/files.kern
diff -u src/sys/kern/files.kern:1.2 src/sys/kern/files.kern:1.3
--- src/sys/kern/files.kern:1.2	Sun Oct 12 00:38:28 2014
+++ src/sys/kern/files.kern	Sat Mar  7 11:35:37 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.kern,v 1.2 2014/10/12 04:38:28 uebayasi Exp $
+#	$NetBSD: files.kern,v 1.3 2015/03/07 16:35:37 christos Exp $
 
 #
 # kernel sources
@@ -168,7 +168,7 @@ file	kern/sys_select.c		kern
 file	kern/sys_sig.c			kern
 file	kern/sys_sched.c		kern
 file	kern/sys_socket.c		kern
-file	kern/syscalls.c			syscall_debug
+file	kern/syscalls.c			syscall_debug | kdtrace_hooks
 file	kern/sysv_ipc.c			sysvshm | sysvsem | sysvmsg
 file	kern/sysv_msg.c			sysvmsg
 file	kern/sysv_sem.c			sysvsem



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:35:37 UTC 2015

Modified Files:
src/sys/kern: files.kern

Log Message:
syscallnames are needed by dtrace


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/kern/files.kern

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



CVS commit: src/sys/sys

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:34:55 UTC 2015

Modified Files:
src/sys/sys: param.h proc.h systm.h

Log Message:
add dtrace syscall glue:
- adds 2 members to sysent: these are the entry and exit probe ids
  they are non-zero only when dtrace is loaded
- add an emul specific probe for dtrace: this is NULL unless the emulation
  supports dtrace and is loaded
- adjust the syscall stub call trace_enter/exit if needed for systrace
- add more info to trace_enter and exit needed by systrace


To generate a diff of this commit:
cvs rdiff -u -r1.465 -r1.466 src/sys/sys/param.h
cvs rdiff -u -r1.320 -r1.321 src/sys/sys/proc.h
cvs rdiff -u -r1.266 -r1.267 src/sys/sys/systm.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

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:40:05 UTC 2015

Modified Files:
src/sys/rump/include/rump: rump_syscalls.h
src/sys/rump/librump/rumpkern: rump_syscalls.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.105 -r1.106 src/sys/rump/librump/rumpkern/rump_syscalls.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/include/rump/rump_syscalls.h
diff -u src/sys/rump/include/rump/rump_syscalls.h:1.81 src/sys/rump/include/rump/rump_syscalls.h:1.82
--- src/sys/rump/include/rump/rump_syscalls.h:1.81	Sat Feb 21 19:53:28 2015
+++ src/sys/rump/include/rump/rump_syscalls.h	Sat Mar  7 11:40:05 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.h,v 1.81 2015/02/22 00:53:28 christos Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.82 2015/03/07 16:40:05 christos Exp $ */
 
 /*
  * System call protos in rump namespace.

Index: src/sys/rump/librump/rumpkern/rump_syscalls.c
diff -u src/sys/rump/librump/rumpkern/rump_syscalls.c:1.105 src/sys/rump/librump/rumpkern/rump_syscalls.c:1.106
--- src/sys/rump/librump/rumpkern/rump_syscalls.c:1.105	Wed Feb 25 08:20:05 2015
+++ src/sys/rump/librump/rumpkern/rump_syscalls.c	Sat Mar  7 11:40:05 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.c,v 1.105 2015/02/25 13:20:05 christos Exp $ */
+/* $NetBSD: rump_syscalls.c,v 1.106 2015/03/07 16:40:05 christos Exp $ */
 
 /*
  * System call vector and marshalling for rump.
@@ -15,7 +15,7 @@
 
 #ifdef __NetBSD__
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.105 2015/02/25 13:20:05 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.106 2015/03/07 16:40:05 christos Exp $);
 
 #include sys/fstypes.h
 #include sys/proc.h
@@ -6403,1117 +6403,1117 @@ int rumpns_enosys(void);
 
 struct sysent rump_sysent[] = {
 	{ 0, 0, SYCALL_NOSYS,
-	(sy_call_t *)rumpns_enosys }, 	/* 0 = syscall */
+	(sy_call_t *)rumpns_enosys, 0, 0 }, 	/* 0 = syscall */
 	{ 0, 0, SYCALL_NOSYS,
-	(sy_call_t *)rumpns_enosys }, 	/* 1 = exit */
+	(sy_call_t *)rumpns_enosys, 0, 0 }, 	/* 1 = exit */
 	{ 0, 0, SYCALL_NOSYS,
-	(sy_call_t *)rumpns_enosys }, 	/* 2 = fork */
+	(sy_call_t *)rumpns_enosys, 0, 0 }, 	/* 2 = fork */
 	{ ns(struct sys_read_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 3 = read */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 3 = read */
 	{ ns(struct sys_write_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 4 = write */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 4 = write */
 	{ ns(struct sys_open_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 5 = open */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 5 = open */
 	{ ns(struct sys_close_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 6 = close */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 6 = close */
 	{ 0, 0, 0,
-	(sy_call_t *)rumpns_sys_nomodule }, 	/* 7 = wait4 */
+	(sy_call_t *)rumpns_sys_nomodule, 0, 0 }, 	/* 7 = wait4 */
 	{ 0, 0, 0,
-	(sy_call_t *)rumpns_sys_nomodule }, 	/* 8 = ocreat */
+	(sy_call_t *)rumpns_sys_nomodule, 0, 0 }, 	/* 8 = ocreat */
 	{ ns(struct sys_link_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 9 = link */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 9 = link */
 	{ ns(struct sys_unlink_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 10 = unlink */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 10 = unlink */
 	{ 0, 0, SYCALL_NOSYS,
-	(sy_call_t *)rumpns_enosys },		/* 11 = obsolete execv */
+	(sy_call_t *)rumpns_enosys, 0, 0 },		/* 11 = obsolete execv */
 	{ ns(struct sys_chdir_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 12 = chdir */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 12 = chdir */
 	{ ns(struct sys_fchdir_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 13 = fchdir */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 13 = fchdir */
 	{ ns(struct compat_50_sys_mknod_args), 0,
-	   (sy_call_t *)rumpns_sys_nomodule },	/* 14 = compat_50_mknod */
+	   (sy_call_t *)rumpns_sys_nomodule, 0, 0 },	/* 14 = compat_50_mknod */
 	{ ns(struct sys_chmod_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 15 = chmod */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 15 = chmod */
 	{ ns(struct sys_chown_args), 0,
-	   (sy_call_t *)rumpns_enosys },	/* 16 = chown */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 16 = chown */
 	{ 0, 0, SYCALL_NOSYS,
-	(sy_call_t *)rumpns_enosys }, 	/* 17 = break */
+	(sy_call_t *)rumpns_enosys, 0, 0 }, 	/* 17 = break */
 	{ 0, 0, 0,
-	(sy_call_t *)rumpns_sys_nomodule }, 	/* 18 = getfsstat */
+	(sy_call_t *)rumpns_sys_nomodule, 0, 0 }, 	/* 18 = getfsstat */
 	{ 0, 0, 0,
-	(sy_call_t *)rumpns_sys_nomodule }, 	/* 19 = olseek */
+	(sy_call_t *)rumpns_sys_nomodule, 0, 0 }, 	/* 19 = olseek */
 	{ 0, 0, 0,
-	   (sy_call_t *)rumpns_enosys },	/* 20 = getpid */
+	   (sy_call_t *)rumpns_enosys, 0, 0 },	/* 20 = getpid */
 	{ 0, 0, 0,
-	

CVS commit: src/sys/compat

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:41:54 UTC 2015

Modified Files:
src/sys/compat/aoutm68k: aoutm68k_syscall.h aoutm68k_syscallargs.h
aoutm68k_syscalls.c aoutm68k_sysent.c
src/sys/compat/freebsd: freebsd_syscall.h freebsd_syscallargs.h
freebsd_syscalls.c freebsd_sysent.c
src/sys/compat/ibcs2: ibcs2_syscall.h ibcs2_syscallargs.h
ibcs2_syscalls.c ibcs2_sysent.c
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux32/arch/amd64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c syscalls.conf
src/sys/compat/osf1: osf1_syscall.h osf1_syscallargs.h osf1_syscalls.c
osf1_sysent.c
src/sys/compat/sunos: sunos_syscall.h sunos_syscallargs.h
sunos_syscalls.c sunos_sysent.c
src/sys/compat/sunos32: sunos32_syscall.h sunos32_syscallargs.h
sunos32_syscalls.c sunos32_sysent.c
src/sys/compat/svr4: svr4_syscall.h svr4_syscallargs.h svr4_syscalls.c
svr4_sysent.c
src/sys/compat/svr4_32: svr4_32_syscall.h svr4_32_syscallargs.h
svr4_32_syscalls.c svr4_32_sysent.c
src/sys/compat/ultrix: ultrix_syscall.h ultrix_syscallargs.h
ultrix_syscalls.c ultrix_sysent.c
Added Files:
src/sys/compat/linux/arch/amd64: linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_systrace_args.c
src/sys/compat/linux32/arch/amd64: linux32_systrace_args.c
src/sys/compat/netbsd32: netbsd32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/compat/aoutm68k/aoutm68k_syscall.h
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/aoutm68k/aoutm68k_syscallargs.h
cvs rdiff -u -r1.40 -r1.41 src/sys/compat/aoutm68k/aoutm68k_syscalls.c
cvs rdiff -u -r1.45 -r1.46 src/sys/compat/aoutm68k/aoutm68k_sysent.c
cvs rdiff -u -r1.79 -r1.80 src/sys/compat/freebsd/freebsd_syscall.h \
src/sys/compat/freebsd/freebsd_syscalls.c
cvs rdiff -u -r1.82 -r1.83 src/sys/compat/freebsd/freebsd_syscallargs.h
cvs rdiff -u -r1.81 -r1.82 src/sys/compat/freebsd/freebsd_sysent.c
cvs rdiff -u -r1.50 -r1.51 src/sys/compat/ibcs2/ibcs2_syscall.h
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/ibcs2/ibcs2_syscallargs.h \
src/sys/compat/ibcs2/ibcs2_syscalls.c
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/ibcs2/ibcs2_sysent.c
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.94 -r1.95 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.96 -r1.97 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.104 -r1.105 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.105 -r1.106 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.94 -r1.95 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.62 -r1.63 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \

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

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:48:29 UTC 2015

Modified Files:
src/distrib/sets/lists/modules: md.amd64 md.i386

Log Message:
Add dtrace syscalls


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/modules/md.i386

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



CVS commit: src/sys/compat

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:41:54 UTC 2015

Modified Files:
src/sys/compat/aoutm68k: aoutm68k_syscall.h aoutm68k_syscallargs.h
aoutm68k_syscalls.c aoutm68k_sysent.c
src/sys/compat/freebsd: freebsd_syscall.h freebsd_syscallargs.h
freebsd_syscalls.c freebsd_sysent.c
src/sys/compat/ibcs2: ibcs2_syscall.h ibcs2_syscallargs.h
ibcs2_syscalls.c ibcs2_sysent.c
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux32/arch/amd64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c syscalls.conf
src/sys/compat/osf1: osf1_syscall.h osf1_syscallargs.h osf1_syscalls.c
osf1_sysent.c
src/sys/compat/sunos: sunos_syscall.h sunos_syscallargs.h
sunos_syscalls.c sunos_sysent.c
src/sys/compat/sunos32: sunos32_syscall.h sunos32_syscallargs.h
sunos32_syscalls.c sunos32_sysent.c
src/sys/compat/svr4: svr4_syscall.h svr4_syscallargs.h svr4_syscalls.c
svr4_sysent.c
src/sys/compat/svr4_32: svr4_32_syscall.h svr4_32_syscallargs.h
svr4_32_syscalls.c svr4_32_sysent.c
src/sys/compat/ultrix: ultrix_syscall.h ultrix_syscallargs.h
ultrix_syscalls.c ultrix_sysent.c
Added Files:
src/sys/compat/linux/arch/amd64: linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_systrace_args.c
src/sys/compat/linux32/arch/amd64: linux32_systrace_args.c
src/sys/compat/netbsd32: netbsd32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/compat/aoutm68k/aoutm68k_syscall.h
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/aoutm68k/aoutm68k_syscallargs.h
cvs rdiff -u -r1.40 -r1.41 src/sys/compat/aoutm68k/aoutm68k_syscalls.c
cvs rdiff -u -r1.45 -r1.46 src/sys/compat/aoutm68k/aoutm68k_sysent.c
cvs rdiff -u -r1.79 -r1.80 src/sys/compat/freebsd/freebsd_syscall.h \
src/sys/compat/freebsd/freebsd_syscalls.c
cvs rdiff -u -r1.82 -r1.83 src/sys/compat/freebsd/freebsd_syscallargs.h
cvs rdiff -u -r1.81 -r1.82 src/sys/compat/freebsd/freebsd_sysent.c
cvs rdiff -u -r1.50 -r1.51 src/sys/compat/ibcs2/ibcs2_syscall.h
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/ibcs2/ibcs2_syscallargs.h \
src/sys/compat/ibcs2/ibcs2_syscalls.c
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/ibcs2/ibcs2_sysent.c
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.94 -r1.95 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.96 -r1.97 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.104 -r1.105 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.105 -r1.106 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.94 -r1.95 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.62 -r1.63 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \

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

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:48:29 UTC 2015

Modified Files:
src/distrib/sets/lists/modules: md.amd64 md.i386

Log Message:
Add dtrace syscalls


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/modules/md.i386

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/modules/md.amd64
diff -u src/distrib/sets/lists/modules/md.amd64:1.51 src/distrib/sets/lists/modules/md.amd64:1.52
--- src/distrib/sets/lists/modules/md.amd64:1.51	Sat Mar  7 09:16:51 2015
+++ src/distrib/sets/lists/modules/md.amd64	Sat Mar  7 11:48:29 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.51 2015/03/07 14:16:51 jmcneill Exp $
+# $NetBSD: md.amd64,v 1.52 2015/03/07 16:48:29 christos Exp $
 #
 # NOTE that there are two sets of files here:
 # @MODULEDIR@ and amd64-xen
@@ -270,10 +270,16 @@
 ./stand/amd64-xen/@OSRELEASE@/modules/dtrace/dtrace.kmod		base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/dtrace_fbt			base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/dtrace_fbt/dtrace_fbt.kmod	base-kernel-modules	kmod,dtrace,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/dtrace_linux_syscall		base-kernel-modules	kmod,dtrace,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/dtrace_linux_syscall/dtrace_linux_syscall.kmod	base-kernel-modules	kmod,dtrace,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/dtrace_netbsd32_syscall		base-kernel-modules	kmod,dtrace,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/dtrace_netbsd32_syscall/dtrace_netbsd32_syscall.kmod	base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/dtrace_profilebase-kernel-modules	kmod,dtrace,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/dtrace_profile/dtrace_profile.kmod	base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/dtrace_sdt			base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/dtrace_sdt/dtrace_sdt.kmod	base-kernel-modules	kmod,dtrace,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/dtrace_syscall			base-kernel-modules	kmod,dtrace,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/dtrace_syscall/dtrace_syscall.kmod	base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/dtvbase-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/dtv/dtv.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/dtv_mathbase-kernel-modules	kmod,compatmodules

Index: src/distrib/sets/lists/modules/md.i386
diff -u src/distrib/sets/lists/modules/md.i386:1.55 src/distrib/sets/lists/modules/md.i386:1.56
--- src/distrib/sets/lists/modules/md.i386:1.55	Sat Mar  7 09:16:51 2015
+++ src/distrib/sets/lists/modules/md.i386	Sat Mar  7 11:48:29 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.55 2015/03/07 14:16:51 jmcneill Exp $
+# $NetBSD: md.i386,v 1.56 2015/03/07 16:48:29 christos Exp $
 #
 # NOTE that there are three sets of files here:
 # @MODULEDIR@, i386-xen, and i386pae-xen
@@ -300,10 +300,15 @@
 ./stand/i386-xen/@OSRELEASE@/modules/dtrace/dtrace.kmod			base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/dtrace_fbtbase-kernel-modules	kmod,dtrace,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/dtrace_fbt/dtrace_fbt.kmod		base-kernel-modules	kmod,dtrace,compatmodules
+./stand/i386-xen/@OSRELEASE@/modules/dtrace_linux_syscall		base-kernel-modules	kmod,dtrace,compatmodules
+./stand/i386-xen/@OSRELEASE@/modules/dtrace_linux_syscall/dtrace_linux_syscall.kmod	base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/dtrace_profile			base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/dtrace_profile/dtrace_profile.kmod	base-kernel-modules	kmod,dtrace,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/dtrace_sdtbase-kernel-modules	kmod,dtrace,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/dtrace_sdt/dtrace_sdt.kmod		base-kernel-modules	kmod,dtrace,compatmodules
+./stand/i386-xen/@OSRELEASE@/modules/dtrace_syscall			base-kernel-modules	kmod,dtrace,compatmodules
+./stand/i386-xen/@OSRELEASE@/modules/dtrace_syscall/dtrace_syscall.kmod	base-kernel-modules	kmod,dtrace,compatmodules
+./stand/i386-xen/@OSRELEASE@/modules/dtvbase-kernel-modules	kmod,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/dtvbase-kernel-modules	kmod,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/dtv/dtv.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/dtv_mathbase-kernel-modules	kmod,compatmodules



CVS commit: src/doc

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:50:10 UTC 2015

Modified Files:
src/doc: CHANGES

Log Message:
mention dtrace syscall support


To generate a diff of this commit:
cvs rdiff -u -r1.2051 -r1.2052 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.2051 src/doc/CHANGES:1.2052
--- src/doc/CHANGES:1.2051	Thu Mar  5 18:46:54 2015
+++ src/doc/CHANGES	Sat Mar  7 11:50:10 2015
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2051 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2052 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -135,3 +135,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	network: introduce RTF_LOCAL for local address routes. [roy 20150226]
 	evbarm: Add support for RPI2. [skrll 20150304]
 	evbarm: Add support for ODROID-C1. [jmcneill 20150304]
+	dtrace: Add syscall support [christos 20150307]



CVS commit: src/doc

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 16:50:10 UTC 2015

Modified Files:
src/doc: CHANGES

Log Message:
mention dtrace syscall support


To generate a diff of this commit:
cvs rdiff -u -r1.2051 -r1.2052 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/arch/alpha/alpha

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:51:44 UTC 2015

Modified Files:
src/sys/arch/alpha/alpha: linux_syscall.c osf1_syscall.c

Log Message:
Adjust to new trace_{enter,exit} signature.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/alpha/linux_syscall.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/alpha/osf1_syscall.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/alpha/alpha/linux_syscall.c
diff -u src/sys/arch/alpha/alpha/linux_syscall.c:1.32 src/sys/arch/alpha/alpha/linux_syscall.c:1.33
--- src/sys/arch/alpha/alpha/linux_syscall.c:1.32	Sun Feb  5 21:14:11 2012
+++ src/sys/arch/alpha/alpha/linux_syscall.c	Sat Mar  7 13:51:44 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.c,v 1.32 2012/02/06 02:14:11 matt Exp $ */
+/* $NetBSD: linux_syscall.c,v 1.33 2015/03/07 18:51:44 christos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -89,7 +89,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.32 2012/02/06 02:14:11 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.33 2015/03/07 18:51:44 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -282,7 +282,7 @@ linux_syscall_fancy(struct lwp *l, uint6
 	args += hidden;
 
 
-	if ((error = trace_enter(code, args, callp-sy_narg)) != 0)
+	if ((error = trace_enter(code, callp, args)) != 0)
 		goto out;
 
 	rval[0] = 0;
@@ -308,7 +308,7 @@ out:
 		break;
 	}
 
-	trace_exit(code, rval, error);
+	trace_exit(code, callp, args, rval, error);
 
 	userret(l);
 }

Index: src/sys/arch/alpha/alpha/osf1_syscall.c
diff -u src/sys/arch/alpha/alpha/osf1_syscall.c:1.34 src/sys/arch/alpha/alpha/osf1_syscall.c:1.35
--- src/sys/arch/alpha/alpha/osf1_syscall.c:1.34	Sun Feb  5 21:14:12 2012
+++ src/sys/arch/alpha/alpha/osf1_syscall.c	Sat Mar  7 13:51:44 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_syscall.c,v 1.34 2012/02/06 02:14:12 matt Exp $ */
+/* $NetBSD: osf1_syscall.c,v 1.35 2015/03/07 18:51:44 christos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -89,7 +89,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: osf1_syscall.c,v 1.34 2012/02/06 02:14:12 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: osf1_syscall.c,v 1.35 2015/03/07 18:51:44 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -278,7 +278,7 @@ osf1_syscall_fancy(struct lwp *l, uint64
 	}
 	args += hidden;
 
-	if ((error = trace_enter(code, args, callp-sy_narg)) != 0)
+	if ((error = trace_enter(code, callp, args)) != 0)
 		goto out;
 
 	rval[0] = 0;
@@ -304,7 +304,7 @@ out:
 		break;
 	}
 
-	trace_exit(code, rval, error);
+	trace_exit(code, callp, args, rval, error);
 
 	userret(l);
 }



CVS commit: src/sys/arch/alpha/alpha

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 18:51:44 UTC 2015

Modified Files:
src/sys/arch/alpha/alpha: linux_syscall.c osf1_syscall.c

Log Message:
Adjust to new trace_{enter,exit} signature.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/alpha/linux_syscall.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/alpha/osf1_syscall.c

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



Re: CVS commit: src

2015-03-07 Thread Greg Troxel

Manuel Bouyer bou...@antioche.eu.org writes:

 On Sat, Mar 07, 2015 at 07:28:37AM +, matthew green wrote:
 Module Name: src
 Committed By:mrg
 Date:Sat Mar  7 07:28:37 UTC 2015
 
 Modified Files:
  src/distrib/notes/i386: contents
  src/etc/etc.i386: Makefile.inc
  src/sys/arch/i386/conf: GENERIC
 Added Files:
  src/sys/arch/i386/conf: LEGACY
 
 Log Message:
 remove vga@isa and pcdisplay@isa from i386 GENERIC, and create a new
 LEGACY kernel that includes them instead.  now radeon@pci is able to
 properly claim wsdisplay0 on i386 systems, and radeondrmkms has a good
 chance of working.
 
 this fixes PR#49290.

 This should also fix a problem I noticed with an intel device but
 didn't report yet:
 an intelfb0 is attached to i915drmkms0@pci, but a vga@isa is also
 attached, ending up with 2 wsdisplays. The console keyboard is then
 attached to wsdisplay1, leaving the console (wsdisplay0) without
 keyboard ...

Sorry, I missed the discussion on this.

Will LEGACY be built by default?

What's the set of computers that one has to use LEGACY on?
Is it just systems that are so old that vga is not via PCI?  Are there
thought to be any that have a 486 and could have worked?


pgp1UG8z4tTD0.pgp
Description: PGP signature


CVS commit: src/tests/lib/libc/gen

2015-03-07 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Mar  7 09:59:15 UTC 2015

Modified Files:
src/tests/lib/libc/gen: t_randomid.c

Log Message:
Reduce the number of loops.
It avoids timeout on slow machines, and I think that 100,000
times loop also satisfies the evaluation.
PR lib/49664 (no comments)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/t_randomid.c

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



Re: CVS commit: src

2015-03-07 Thread Martin Husemann
On Sat, Mar 07, 2015 at 08:13:17AM -0500, Greg Troxel wrote:
 Will LEGACY be built by default?

I would vote no on that one.

 What's the set of computers that one has to use LEGACY on?

Anything that has no PCI.

 Is it just systems that are so old that vga is not via PCI?  Are there
 thought to be any that have a 486 and could have worked?

I have a working one of those, EISA, 486DX, basically sun-lamp lookalike
(if you remember that). I plan to add it to my regular test schedule, maybe
once a month.

Martin


CVS commit: src/sys/modules/dtrace

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:13:04 UTC 2015

Modified Files:
src/sys/modules/dtrace: Makefile
Added Files:
src/sys/modules/dtrace/linux_syscall: Makefile emultrace.h
src/sys/modules/dtrace/netbsd32_syscall: Makefile emultrace.h
src/sys/modules/dtrace/syscall: Makefile emultrace.h

Log Message:
Add syscall provider build glue, unhooked.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/dtrace/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/dtrace/linux_syscall/Makefile \
src/sys/modules/dtrace/linux_syscall/emultrace.h
cvs rdiff -u -r0 -r1.1 src/sys/modules/dtrace/netbsd32_syscall/Makefile \
src/sys/modules/dtrace/netbsd32_syscall/emultrace.h
cvs rdiff -u -r0 -r1.1 src/sys/modules/dtrace/syscall/Makefile \
src/sys/modules/dtrace/syscall/emultrace.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/modules/dtrace/Makefile
diff -u src/sys/modules/dtrace/Makefile:1.4 src/sys/modules/dtrace/Makefile:1.5
--- src/sys/modules/dtrace/Makefile:1.4	Sat Dec  1 20:05:17 2012
+++ src/sys/modules/dtrace/Makefile	Sat Mar  7 10:13:04 2015
@@ -1,8 +1,14 @@
-#	$NetBSD: Makefile,v 1.4 2012/12/02 01:05:17 chs Exp $
+#	$NetBSD: Makefile,v 1.5 2015/03/07 15:13:04 christos Exp $
 # $FreeBSD: src/sys/modules/dtrace/Makefile,v 1.6.2.1 2009/08/03 08:13:06 kensmith Exp $
 
 .include bsd.own.mk
 
-SUBDIR=		dtrace sdt fbt profile
+SUBDIR=		dtrace sdt fbt profile syscall
+SUBDIR+=	linux_syscall
+
+.if ${MACHINE_ARCH} == x86_64
+SUBDIR+=	netbsd32_syscall
+#SUBDIR+=	linux32_syscall
+.endif
 
 .include bsd.subdir.mk

Added files:

Index: src/sys/modules/dtrace/linux_syscall/Makefile
diff -u /dev/null src/sys/modules/dtrace/linux_syscall/Makefile:1.1
--- /dev/null	Sat Mar  7 10:13:04 2015
+++ src/sys/modules/dtrace/linux_syscall/Makefile	Sat Mar  7 10:13:04 2015
@@ -0,0 +1,15 @@
+# $FreeBSD: src/sys/modules/dtrace/sdt/Makefile,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
+
+.include ../../Makefile.inc
+
+.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/systrace
+
+KMOD=		dtrace_syscall_linux
+SRCS=		systrace.c
+
+CPPFLAGS+=	-I${NETBSDSRCDIR}/external/cddl/osnet/sys \
+		-I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common 
+
+CPPFLAGS+=	-Wno-unknown-pragmas
+
+.include bsd.kmodule.mk
Index: src/sys/modules/dtrace/linux_syscall/emultrace.h
diff -u /dev/null src/sys/modules/dtrace/linux_syscall/emultrace.h:1.1
--- /dev/null	Sat Mar  7 10:13:04 2015
+++ src/sys/modules/dtrace/linux_syscall/emultrace.h	Sat Mar  7 10:13:04 2015
@@ -0,0 +1,13 @@
+/*
+ * The syscall arguments are processed into a DTrace argument array
+ * using a generated function. See sys/kern/makesyscalls.sh.
+ */
+#include compat/linux/common/linux_types.h
+#include compat/linux/common/linux_mmap.h
+#include compat/linux/common/linux_signal.h
+#include compat/linux/linux_syscall.h
+#include compat/linux/linux_syscallargs.h
+#include compat/linux/linux_systrace_args.c
+
+#define emulname	linux
+#define EMULNAME	LINUX

Index: src/sys/modules/dtrace/netbsd32_syscall/Makefile
diff -u /dev/null src/sys/modules/dtrace/netbsd32_syscall/Makefile:1.1
--- /dev/null	Sat Mar  7 10:13:04 2015
+++ src/sys/modules/dtrace/netbsd32_syscall/Makefile	Sat Mar  7 10:13:04 2015
@@ -0,0 +1,15 @@
+# $FreeBSD: src/sys/modules/dtrace/sdt/Makefile,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
+
+.include ../../Makefile.inc
+
+.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/systrace
+
+KMOD=		dtrace_syscall_netbsd32
+SRCS=		systrace.c
+
+CPPFLAGS+=	-I${NETBSDSRCDIR}/external/cddl/osnet/sys \
+		-I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common 
+
+CPPFLAGS+=	-Wno-unknown-pragmas
+
+.include bsd.kmodule.mk
Index: src/sys/modules/dtrace/netbsd32_syscall/emultrace.h
diff -u /dev/null src/sys/modules/dtrace/netbsd32_syscall/emultrace.h:1.1
--- /dev/null	Sat Mar  7 10:13:04 2015
+++ src/sys/modules/dtrace/netbsd32_syscall/emultrace.h	Sat Mar  7 10:13:04 2015
@@ -0,0 +1,13 @@
+/*
+ * The syscall arguments are processed into a DTrace argument array
+ * using a generated function. See sys/kern/makesyscalls.sh.
+ */
+#define COMPAT_NETBSD32
+
+#include compat/netbsd32/netbsd32.h
+#include compat/netbsd32/netbsd32_syscall.h
+#include compat/netbsd32/netbsd32_syscallargs.h
+#include compat/netbsd32/netbsd32_systrace_args.c
+
+#define emulname	netbsd32
+#define EMULNAME	NETBSD32

Index: src/sys/modules/dtrace/syscall/Makefile
diff -u /dev/null src/sys/modules/dtrace/syscall/Makefile:1.1
--- /dev/null	Sat Mar  7 10:13:04 2015
+++ src/sys/modules/dtrace/syscall/Makefile	Sat Mar  7 10:13:04 2015
@@ -0,0 +1,15 @@
+# $FreeBSD: src/sys/modules/dtrace/sdt/Makefile,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
+
+.include ../../Makefile.inc
+
+.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/systrace
+
+KMOD=		dtrace_syscall
+SRCS=		systrace.c
+
+CPPFLAGS+=	-I${NETBSDSRCDIR}/external/cddl/osnet/sys \
+		

CVS commit: src/sys/modules/dtrace

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:13:04 UTC 2015

Modified Files:
src/sys/modules/dtrace: Makefile
Added Files:
src/sys/modules/dtrace/linux_syscall: Makefile emultrace.h
src/sys/modules/dtrace/netbsd32_syscall: Makefile emultrace.h
src/sys/modules/dtrace/syscall: Makefile emultrace.h

Log Message:
Add syscall provider build glue, unhooked.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/dtrace/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/dtrace/linux_syscall/Makefile \
src/sys/modules/dtrace/linux_syscall/emultrace.h
cvs rdiff -u -r0 -r1.1 src/sys/modules/dtrace/netbsd32_syscall/Makefile \
src/sys/modules/dtrace/netbsd32_syscall/emultrace.h
cvs rdiff -u -r0 -r1.1 src/sys/modules/dtrace/syscall/Makefile \
src/sys/modules/dtrace/syscall/emultrace.h

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



CVS commit: src/sys/compat/sunos

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:15:24 UTC 2015

Modified Files:
src/sys/compat/sunos: Makefile

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/sunos/Makefile

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



CVS commit: src/sys/compat

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:16:12 UTC 2015

Added Files:
src/sys/compat/linux: linux_systrace_args.c
src/sys/compat/linux32: linux32_systrace_args.c

Log Message:
centralize arguments functions


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/linux_systrace_args.c
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux32/linux32_systrace_args.c

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



CVS commit: src/sys/compat

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 15:16:12 UTC 2015

Added Files:
src/sys/compat/linux: linux_systrace_args.c
src/sys/compat/linux32: linux32_systrace_args.c

Log Message:
centralize arguments functions


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/linux_systrace_args.c
cvs rdiff -u -r0 -r1.1 src/sys/compat/linux32/linux32_systrace_args.c

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

Added files:

Index: src/sys/compat/linux/linux_systrace_args.c
diff -u /dev/null src/sys/compat/linux/linux_systrace_args.c:1.1
--- /dev/null	Sat Mar  7 10:16:12 2015
+++ src/sys/compat/linux/linux_systrace_args.c	Sat Mar  7 10:16:12 2015
@@ -0,0 +1,53 @@
+/*	$NetBSD: linux_systrace_args.c,v 1.1 2015/03/07 15:16:12 christos Exp $	*/
+
+/*-
+ * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Eric Haszlakiewicz.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* XXX XXX This exists to keep kdump and friends happy. */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(1, $NetBSD: linux_systrace_args.c,v 1.1 2015/03/07 15:16:12 christos Exp $);
+
+#if defined(__i386__)
+#include ../../sys/compat/linux/arch/i386/linux_systrace_args.c
+#elif defined(__m68k__)
+#include ../../sys/compat/linux/arch/m68k/linux_systrace_args.c
+#elif defined(__alpha__)
+#include ../../sys/compat/linux/arch/alpha/linux_systrace_args.c
+#elif defined(__powerpc__)
+#include ../../sys/compat/linux/arch/powerpc/linux_systrace_args.c
+#elif defined(__mips__)
+#include ../../sys/compat/linux/arch/mips/linux_systrace_args.c
+#elif defined(__arm__)
+#include ../../sys/compat/linux/arch/arm/linux_systrace_args.c
+#elif defined(__amd64__)
+#include ../../sys/compat/linux/arch/amd64/linux_systrace_args.c
+#else
+#error fix me
+#endif

Index: src/sys/compat/linux32/linux32_systrace_args.c
diff -u /dev/null src/sys/compat/linux32/linux32_systrace_args.c:1.1
--- /dev/null	Sat Mar  7 10:16:12 2015
+++ src/sys/compat/linux32/linux32_systrace_args.c	Sat Mar  7 10:16:12 2015
@@ -0,0 +1,41 @@
+/*	$NetBSD: linux32_systrace_args.c,v 1.1 2015/03/07 15:16:12 christos Exp $	*/
+
+/*-
+ * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Eric Haszlakiewicz.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * 

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

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:35:33 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_com.c

Log Message:
fix uart parameters, now speed setting actually works


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/ingenic/ingenic_com.c

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

Modified files:

Index: src/sys/arch/mips/ingenic/ingenic_com.c
diff -u src/sys/arch/mips/ingenic/ingenic_com.c:1.3 src/sys/arch/mips/ingenic/ingenic_com.c:1.4
--- src/sys/arch/mips/ingenic/ingenic_com.c:1.3	Tue Dec 23 15:12:23 2014
+++ src/sys/arch/mips/ingenic/ingenic_com.c	Sat Mar  7 15:35:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ingenic_com.c,v 1.3 2014/12/23 15:12:23 macallan Exp $ */
+/*	$NetBSD: ingenic_com.c,v 1.4 2015/03/07 15:35:33 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ingenic_com.c,v 1.3 2014/12/23 15:12:23 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: ingenic_com.c,v 1.4 2015/03/07 15:35:33 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -56,7 +56,7 @@ void	ingenic_puts(const char *);
 void	ingenic_putchar(char);
 
 #ifndef CONMODE
-# define CONMODE ((TTYDEF_CFLAG  ~(CSIZE | PARENB)) | CS8)
+# define CONMODE ((TTYDEF_CFLAG  ~(CSIZE | CSTOPB | PARENB)) | CS8)
 #endif
 
 
@@ -163,7 +163,7 @@ ingenic_com_cnattach(void)
 	 * so we just leave alone whatever u-boot set up
 	 * my uplcom is too tolerant to show any difference
 	 */
-	comcnattach1(regs, -1, 600, COM_TYPE_INGENIC, CONMODE);
+	comcnattach1(regs, 115200, 4800, COM_TYPE_INGENIC, CONMODE);
 }
 
 static int
@@ -184,7 +184,7 @@ ingenic_com_attach(device_t parent, devi
 	struct com_softc *sc = isc-sc_com;
 
 	sc-sc_dev = self;
-	sc-sc_frequency = 1200;
+	sc-sc_frequency = 4800;
 	sc-sc_type = COM_TYPE_INGENIC;
 	memset(sc-sc_regs, 0, sizeof(sc-sc_regs));
 	COM_INIT_REGS(sc-sc_regs, ingenic_com_mbst, regh, 0);



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

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:36:16 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_regs.h

Log Message:
add memory controller registers


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/ingenic/ingenic_regs.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/ingenic/ingenic_regs.h
diff -u src/sys/arch/mips/ingenic/ingenic_regs.h:1.6 src/sys/arch/mips/ingenic/ingenic_regs.h:1.7
--- src/sys/arch/mips/ingenic/ingenic_regs.h:1.6	Thu Dec 25 05:10:00 2014
+++ src/sys/arch/mips/ingenic/ingenic_regs.h	Sat Mar  7 15:36:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ingenic_regs.h,v 1.6 2014/12/25 05:10:00 macallan Exp $ */
+/*	$NetBSD: ingenic_regs.h,v 1.7 2015/03/07 15:36:16 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -249,4 +249,11 @@ MFC0(uint32_t r, uint32_t s)
 #define JZ_DMR1		0x10001044	/* mask for PDMA */
 #define JZ_DPR1		0x10001048	/* pending for PDMA */
 
+/* memory controller */
+#define JZ_DMMAP0	0x13010024
+#define JZ_DMMAP1	0x13010028
+	#define	DMMAP_BASE	0xff00	/* base PADDR of memory chunk */
+	#define DMMAP_MASK	0x00ff	/* mask which bits of PADDR are
+		 * constant */
+
 #endif /* INGENIC_REGS_H */



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

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:35:33 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_com.c

Log Message:
fix uart parameters, now speed setting actually works


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/ingenic/ingenic_com.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/mips/ingenic

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:36:16 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_regs.h

Log Message:
add memory controller registers


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/ingenic/ingenic_regs.h

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



CVS commit: src/sys/dev/pci

2015-03-07 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Mar  7 13:54:57 UTC 2015

Modified Files:
src/sys/dev/pci: if_iwm.c

Log Message:
Fix radiotap and fixed rates.  Radiotap was reporting the wrong rate for
data frames and fixed rates weren't really fixed and were converted into
the wrong hardware rate.

From OpenBSD rev.1.36.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/if_iwm.c

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

Modified files:

Index: src/sys/dev/pci/if_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.27 src/sys/dev/pci/if_iwm.c:1.28
--- src/sys/dev/pci/if_iwm.c:1.27	Sat Mar  7 11:52:53 2015
+++ src/sys/dev/pci/if_iwm.c	Sat Mar  7 13:54:57 2015
@@ -1,5 +1,5 @@
-/*	$NetBSD: if_iwm.c,v 1.27 2015/03/07 11:52:53 khorben Exp $	*/
-/*	OpenBSD: if_iwm.c,v 1.35 2015/03/04 15:18:12 jsg Exp	*/
+/*	$NetBSD: if_iwm.c,v 1.28 2015/03/07 13:54:57 nonaka Exp $	*/
+/*	OpenBSD: if_iwm.c,v 1.36 2015/03/06 18:39:24 kettenis Exp	*/
 
 /*
  * Copyright (c) 2014 genua mbh i...@genua.de
@@ -105,7 +105,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.27 2015/03/07 11:52:53 khorben Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.28 2015/03/07 13:54:57 nonaka Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -3801,31 +3801,31 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, st
 	struct ieee80211_frame *wh, struct iwm_tx_cmd *tx)
 {
 	struct ieee80211com *ic = sc-sc_ic;
+	struct ieee80211_node *ni = in-in_ni;
 	const struct iwm_rate *rinfo;
 	int type = wh-i_fc[0]  IEEE80211_FC0_TYPE_MASK;
 	int ridx, rate_flags;
-	int nrates = in-in_ni.ni_rates.rs_nrates;
+	int nrates = ni-ni_rates.rs_nrates;
 
 	tx-rts_retry_limit = IWM_RTS_DFAULT_RETRY_LIMIT;
 	tx-data_retry_limit = IWM_DEFAULT_TX_RETRY;
 
-	/* for data frames, use RS table */
-	if (type == IEEE80211_FC0_TYPE_DATA) {
-		if (ic-ic_fixed_rate != -1) {
-			tx-initial_rate_index = sc-sc_fixed_ridx;
-		} else {
-			tx-initial_rate_index = (nrates-1) - in-in_ni.ni_txrate;
-		}
+	if (type != IEEE80211_FC0_TYPE_DATA) {
+		/* for non-data, use the lowest supported rate */
+		ridx = (ic-ic_curmode == IEEE80211_MODE_11A) ?
+		IWM_RIDX_OFDM : IWM_RIDX_CCK;
+	} else if (ic-ic_fixed_rate != -1) {
+		ridx = sc-sc_fixed_ridx;
+	} else {
+		/* for data frames, use RS table */
+		tx-initial_rate_index = (nrates - 1) - ni-ni_txrate;
 		tx-tx_flags |= htole32(IWM_TX_CMD_FLG_STA_RATE);
 		DPRINTFN(12, (start with txrate %d\n, tx-initial_rate_index));
-		return iwm_rates[tx-initial_rate_index];
+		ridx = in-in_ridx[ni-ni_txrate];
+		return iwm_rates[ridx];
 	}
 
-	/* for non-data, use the lowest supported rate */
-	ridx = (ic-ic_curmode == IEEE80211_MODE_11A) ?
-	IWM_RIDX_OFDM : IWM_RIDX_CCK;
 	rinfo = iwm_rates[ridx];
-
 	rate_flags = 1  IWM_RATE_MCS_ANT_POS;
 	if (IWM_RIDX_IS_CCK(ridx))
 		rate_flags |= IWM_RATE_MCS_CCK_MSK;



CVS commit: src/sys/dev/pci

2015-03-07 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Mar  7 13:54:57 UTC 2015

Modified Files:
src/sys/dev/pci: if_iwm.c

Log Message:
Fix radiotap and fixed rates.  Radiotap was reporting the wrong rate for
data frames and fixed rates weren't really fixed and were converted into
the wrong hardware rate.

From OpenBSD rev.1.36.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/if_iwm.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/evbmips/ingenic

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:38:32 UTC 2015

Modified Files:
src/sys/arch/evbmips/ingenic: machdep.c

Log Message:
only use the first 256MB for now until I figure out how to properly access
the rest


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/ingenic/machdep.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/evbmips/ingenic

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:37:46 UTC 2015

Modified Files:
src/sys/arch/evbmips/ingenic: intr.c

Log Message:
count all interrupts, not just the ones we have handlers for


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/ingenic/intr.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/evbmips/ingenic

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:38:32 UTC 2015

Modified Files:
src/sys/arch/evbmips/ingenic: machdep.c

Log Message:
only use the first 256MB for now until I figure out how to properly access
the rest


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/ingenic/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/evbmips/ingenic/machdep.c
diff -u src/sys/arch/evbmips/ingenic/machdep.c:1.3 src/sys/arch/evbmips/ingenic/machdep.c:1.4
--- src/sys/arch/evbmips/ingenic/machdep.c:1.3	Tue Dec 23 15:09:13 2014
+++ src/sys/arch/evbmips/ingenic/machdep.c	Sat Mar  7 15:38:32 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.3 2014/12/23 15:09:13 macallan Exp $ */
+/*	$NetBSD: machdep.c,v 1.4 2015/03/07 15:38:32 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.3 2014/12/23 15:09:13 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.4 2015/03/07 15:38:32 macallan Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -149,7 +149,7 @@ mach_init(void)
 	 * Note: Reserve the first page!  That's where the trap
 	 * vectors are located.
 	 */
-	memsize = 0x4000;
+	memsize = 0x1000;
 
 	printf(Memory size: 0x%08x\n, memsize);
 	physmem = btoc(memsize);
@@ -159,7 +159,7 @@ mach_init(void)
 	mem_clusters[0].size = 0x1000 - PAGE_SIZE;
 	mem_clusters[1].start = 0x3000;
 	mem_clusters[1].size = 0x3000;
-	mem_cluster_cnt = 2;
+	mem_cluster_cnt = 1;
 
 	/*
 	 * Load the available pages into the VM system.



CVS commit: src/sys/arch/evbmips/ingenic

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:37:46 UTC 2015

Modified Files:
src/sys/arch/evbmips/ingenic: intr.c

Log Message:
count all interrupts, not just the ones we have handlers for


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/ingenic/intr.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/evbmips/ingenic/intr.c
diff -u src/sys/arch/evbmips/ingenic/intr.c:1.5 src/sys/arch/evbmips/ingenic/intr.c:1.6
--- src/sys/arch/evbmips/ingenic/intr.c:1.5	Thu Mar  5 17:42:29 2015
+++ src/sys/arch/evbmips/ingenic/intr.c	Sat Mar  7 15:37:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.5 2015/03/05 17:42:29 macallan Exp $ */
+/*	$NetBSD: intr.c,v 1.6 2015/03/07 15:37:46 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.5 2015/03/05 17:42:29 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.6 2015/03/07 15:37:46 macallan Exp $);
 
 #define __INTR_PRIVATE
 
@@ -234,13 +234,13 @@ ingenic_irq(int ipl)
 	while (bit != 0) {
 		idx = bit - 1;
 		mask = 1  idx;
+		intrs[idx].ih_count.ev_count++;
 		if (intrs[idx].ih_func != NULL) {
 			if (intrs[idx].ih_ipl == IPL_VM)
 KERNEL_LOCK(1, NULL);
 			intrs[idx].ih_func(intrs[idx].ih_arg);	
 			if (intrs[idx].ih_ipl == IPL_VM)
 KERNEL_UNLOCK_ONE(NULL);
-			intrs[idx].ih_count.ev_count++;
 		} else {
 			/* spurious interrupt, mask it */
 			writereg(JZ_ICMSR0, mask);
@@ -262,13 +262,13 @@ ingenic_irq(int ipl)
 		idx = bit - 1;
 		mask = 1  idx;
 		idx += 32;
+		intrs[idx].ih_count.ev_count++;
 		if (intrs[idx].ih_func != NULL) {
 			if (intrs[idx].ih_ipl == IPL_VM)
 KERNEL_LOCK(1, NULL);
 			intrs[idx].ih_func(intrs[idx].ih_arg);	
 			if (intrs[idx].ih_ipl == IPL_VM)
 KERNEL_UNLOCK_ONE(NULL);
-			intrs[idx].ih_count.ev_count++;
 		} else {
 			/* spurious interrupt, mask it */
 			writereg(JZ_ICMSR1, mask);



Re: CVS commit: src

2015-03-07 Thread Greg Troxel

Martin Husemann mar...@duskware.de writes:

 On Sat, Mar 07, 2015 at 08:13:17AM -0500, Greg Troxel wrote:
 Will LEGACY be built by default?

 I would vote no on that one.

 What's the set of computers that one has to use LEGACY on?

 Anything that has no PCI.

That sounds ok, then.

 Is it just systems that are so old that vga is not via PCI?  Are there
 thought to be any that have a 486 and could have worked?

 I have a working one of those, EISA, 486DX, basically sun-lamp lookalike
 (if you remember that). I plan to add it to my regular test schedule, maybe
 once a month.

I see - that is pretty ancient, and the number of people wanting to run
NetBSD (or anything) on those is probably tiny.

So this all seems fine to me - I just couldn't tell right away and had
wondered for a second if it was going to affect all machines that didn't
have the spiffy drm2-capacble hw.


pgpWRiUnVNExo.pgp
Description: PGP signature


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

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:39:57 UTC 2015

Modified Files:
src/sys/arch/evbmips/conf: CI20

Log Message:
comment out debug spam, add more filesystems


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbmips/conf/CI20

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/evbmips/conf/CI20
diff -u src/sys/arch/evbmips/conf/CI20:1.7 src/sys/arch/evbmips/conf/CI20:1.8
--- src/sys/arch/evbmips/conf/CI20:1.7	Thu Dec 25 05:15:42 2014
+++ src/sys/arch/evbmips/conf/CI20	Sat Mar  7 15:39:57 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: CI20,v 1.7 2014/12/25 05:15:42 macallan Exp $
+#	$NetBSD: CI20,v 1.8 2015/03/07 15:39:57 macallan Exp $
 #
 # MIPS Creator CI20
 #
@@ -7,7 +7,7 @@ include 	arch/evbmips/conf/std.ingenic
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		CI20-$Revision: 1.7 $
+#ident 		CI20-$Revision: 1.8 $
 
 maxusers	32
 
@@ -52,8 +52,8 @@ options 	DDB_HISTORY_SIZE=100 # enable h
 makeoptions 	DEBUG=-g	# compile full symbol table
 makeoptions	COPY_SYMTAB=1	# size for embedded symbol table
 
-options 	INGENIC_DEBUG
-options 	INGENIC_CLOCK_DEBUG
+#options 	INGENIC_DEBUG
+#options 	INGENIC_CLOCK_DEBUG
 #options 	INGENIC_INTR_DEBUG	# *very* spammy
 
 # Compatibility options
@@ -75,21 +75,22 @@ options 	INGENIC_CLOCK_DEBUG
 
 # File systems
 file-system	FFS		# Berkeley Fast Filesystem
-file-system	MFS		# memory-based filesystem
+#file-system	MFS		# memory-based filesystem
 #file-system 	EXT2FS		# second extended file system (linux)
 file-system	NFS		# Sun NFS-compatible filesystem client
-#file-system	KERNFS		# kernel data-structure filesystem
+file-system	KERNFS		# kernel data-structure filesystem
 #file-system	NULLFS		# NULL layered filesystem
 #file-system 	OVERLAY		# overlay file system
 #file-system	FDESC		# user file descriptor filesystem
 #file-system	UMAPFS		# uid/gid remapping filesystem
 #file-system	LFS		# Log-based filesystem (still experimental)
-#file-system	PROCFS		# /proc
+file-system	PROCFS		# /proc
 #file-system	CD9660		# ISO 9660 + Rock Ridge file system
 #file-system	UNION		# union file system
-#file-system	MSDOSFS		# MS-DOS FAT filesystem(s).
+file-system	MSDOSFS		# MS-DOS FAT filesystem(s).
 #file-system 	CODA		# Coda File System; also needs vcoda (below)
-#file-system	PTYFS		# /dev/pts/N support
+file-system	PTYFS		# /dev/pts/N support
+file-system	TMPFS		# Efficient memory file-system
 
 # File system options
 #options 	NFSSERVER	# Sun NFS-compatible filesystem server
@@ -104,7 +105,7 @@ options 	FFS_NO_SNAPSHOT	# No FFS snapsh
 # Networking options
 #options 	GATEWAY		# IP packet forwarding
 options 	INET		# Internet protocols
-#options 	INET6		# IPV6
+options 	INET6		# IPV6
 #options 	IPSEC		# IP security
 #options 	IPSEC_DEBUG	# debug for IP security
 #options 	MROUTING	# packet forwarding of multicast packets
@@ -128,10 +129,11 @@ options 	INET		# Internet protocols
 options 	MIIVERBOSE	# verbose PHY autoconfig messages
 
 options 	NFS_BOOT_BOOTP
-#options 	NFS_BOOT_DHCP
+options 	NFS_BOOT_DHCP
 #options 	NFS_V2_ONLY
 
-config		netbsd	root on ? type ?
+config		netbsd	root on sd0a type ffs
+#config		netbsd	root on axe0 type nfs
 
 mainbus0 	at root
 cpu0 		at mainbus?



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

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:39:57 UTC 2015

Modified Files:
src/sys/arch/evbmips/conf: CI20

Log Message:
comment out debug spam, add more filesystems


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbmips/conf/CI20

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



CVS commit: src/sys/dev/ic

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:49:20 UTC 2015

Modified Files:
src/sys/dev/ic: com.c comreg.h

Log Message:
more Ingenic support:
- make sure we always set FIFO_UART_ON
- deal with the absence of DCD support
- enable the TX FIFO timeout interrupt
- set COM_HW_NOIEN
- pretend the FIFO is only 16 bytes deep ( supposed to be 64 but I get
  overruns with that )
now this works as CI20 console


To generate a diff of this commit:
cvs rdiff -u -r1.329 -r1.330 src/sys/dev/ic/com.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/comreg.h

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



CVS commit: src/sys/dev/ic

2015-03-07 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Mar  7 15:49:20 UTC 2015

Modified Files:
src/sys/dev/ic: com.c comreg.h

Log Message:
more Ingenic support:
- make sure we always set FIFO_UART_ON
- deal with the absence of DCD support
- enable the TX FIFO timeout interrupt
- set COM_HW_NOIEN
- pretend the FIFO is only 16 bytes deep ( supposed to be 64 but I get
  overruns with that )
now this works as CI20 console


To generate a diff of this commit:
cvs rdiff -u -r1.329 -r1.330 src/sys/dev/ic/com.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/comreg.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/ic/com.c
diff -u src/sys/dev/ic/com.c:1.329 src/sys/dev/ic/com.c:1.330
--- src/sys/dev/ic/com.c:1.329	Sat Nov 22 15:14:35 2014
+++ src/sys/dev/ic/com.c	Sat Mar  7 15:49:20 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.329 2014/11/22 15:14:35 macallan Exp $ */
+/* $NetBSD: com.c,v 1.330 2015/03/07 15:49:20 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: com.c,v 1.329 2014/11/22 15:14:35 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: com.c,v 1.330 2015/03/07 15:49:20 macallan Exp $);
 
 #include opt_com.h
 #include opt_ddb.h
@@ -382,6 +382,8 @@ com_enable_debugport(struct com_softc *s
 	sc-sc_ier = IER_ERXRDY;
 	if (sc-sc_type == COM_TYPE_PXA2x0)
 		sc-sc_ier |= IER_EUART | IER_ERXTOUT;
+	if (sc-sc_type == COM_TYPE_INGENIC)
+		sc-sc_ier |= IER_ERXTOUT;
 	CSR_WRITE_1(sc-sc_regs, COM_REG_IER, sc-sc_ier);
 	SET(sc-sc_mcr, MCR_DTR | MCR_RTS);
 	CSR_WRITE_1(sc-sc_regs, COM_REG_MCR, sc-sc_mcr);
@@ -461,16 +463,22 @@ com_attach_subr(struct com_softc *sc)
 		goto fifodelay;
 
 	case COM_TYPE_INGENIC:
-		sc-sc_fifolen = 64;
+		sc-sc_fifolen = 16;
 		fifo_msg = Ingenic UART, working fifo;
 		SET(sc-sc_hwflags, COM_HW_FIFO);
+		SET(sc-sc_hwflags, COM_HW_NOIEN);
 		goto fifodelay;
 	}
 
 	sc-sc_fifolen = 1;
 	/* look for a NS 16550AF UART with FIFOs */
-	CSR_WRITE_1(regsp, COM_REG_FIFO,
-	FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_TRIGGER_14);
+	if(sc-sc_type == COM_TYPE_INGENIC) {
+		CSR_WRITE_1(regsp, COM_REG_FIFO,
+		FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | 
+		FIFO_TRIGGER_14 | FIFO_UART_ON);
+	} else
+		CSR_WRITE_1(regsp, COM_REG_FIFO,
+		FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_TRIGGER_14);
 	delay(100);
 	if (ISSET(CSR_READ_1(regsp, COM_REG_IIR), IIR_FIFO_MASK)
 	== IIR_FIFO_MASK)
@@ -519,6 +527,9 @@ com_attach_subr(struct com_softc *sc)
 			uint8_t iir1, iir2;
 			const uint8_t fcr = FIFO_ENABLE | FIFO_TRIGGER_14;
 
+			if(sc-sc_type == COM_TYPE_INGENIC)
+fcr |= FIFO_UART_ON;
+
 			lcr = CSR_READ_1(regsp, COM_REG_LCR);
 			CSR_WRITE_1(regsp, COM_REG_LCR, lcr  ~LCR_DLAB);
 			CSR_WRITE_1(regsp, COM_REG_FIFO, fcr | FIFO_64B_ENABLE);
@@ -557,7 +568,10 @@ com_attach_subr(struct com_softc *sc)
 			fifo_msg = ns16550, broken fifo;
 	else
 		fifo_msg = ns8250 or ns16450, no fifo;
-	CSR_WRITE_1(regsp, COM_REG_FIFO, 0);
+	if(sc-sc_type == COM_TYPE_INGENIC) {
+		CSR_WRITE_1(regsp, COM_REG_FIFO, FIFO_UART_ON);
+	} else
+		CSR_WRITE_1(regsp, COM_REG_FIFO, 0);
 fifodelay:
 	/*
 	 * Some chips will clear down both Tx and Rx FIFOs when zero is
@@ -800,7 +814,8 @@ com_shutdown(struct com_softc *sc)
 	/* Turn off interrupts. */
 	if (ISSET(sc-sc_hwflags, COM_HW_CONSOLE)) {
 		sc-sc_ier = IER_ERXRDY; /* interrupt on break */
-		if (sc-sc_type == COM_TYPE_PXA2x0)
+		if ((sc-sc_type == COM_TYPE_PXA2x0) ||
+		(sc-sc_type == COM_TYPE_INGENIC))
 			sc-sc_ier |= IER_ERXTOUT;
 	} else
 		sc-sc_ier = 0;
@@ -882,6 +897,8 @@ comopen(dev_t dev, int flag, int mode, s
 
 		if (sc-sc_type == COM_TYPE_PXA2x0)
 			sc-sc_ier |= IER_EUART | IER_ERXTOUT;
+		else if (sc-sc_type == COM_TYPE_INGENIC)
+			sc-sc_ier |= IER_ERXTOUT;
 		CSR_WRITE_1(sc-sc_regs, COM_REG_IER, sc-sc_ier);
 
 		/* Fetch the current modem control status, needed later. */
@@ -1266,8 +1283,12 @@ com_to_tiocm(struct com_softc *sc)
 		SET(ttybits, TIOCM_RTS);
 
 	combits = sc-sc_msr;
-	if (ISSET(combits, MSR_DCD))
+	if (sc-sc_type == COM_TYPE_INGENIC) {
 		SET(ttybits, TIOCM_CD);
+	} else {
+		if (ISSET(combits, MSR_DCD))
+			SET(ttybits, TIOCM_CD);
+	}
 	if (ISSET(combits, MSR_CTS))
 		SET(ttybits, TIOCM_CTS);
 	if (ISSET(combits, MSR_DSR))
@@ -1458,6 +1479,9 @@ comparam(struct tty *tp, struct termios 
 	} else
 		sc-sc_fifo = 0;
 
+	if(sc-sc_type == COM_TYPE_INGENIC)
+		sc-sc_fifo |= FIFO_UART_ON;
+
 	/* And copy to tty. */
 	tp-t_ispeed = t-c_ospeed;
 	tp-t_ospeed = t-c_ospeed;
@@ -1496,7 +1520,11 @@ comparam(struct tty *tp, struct termios 
 	 * CLOCAL or MDMBUF.  We don't hang up here; we only do that by
 	 * explicit request.
 	 */
-	(void) (*tp-t_linesw-l_modem)(tp, ISSET(sc-sc_msr, MSR_DCD));
+	if (sc-sc_type == COM_TYPE_INGENIC) {
+		/* no DCD here */
+		(void) (*tp-t_linesw-l_modem)(tp, 1);
+	} 

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

2015-03-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar  7 08:33:18 UTC 2015

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

Log Message:
Complete converstion to USBHIST


To generate a diff of this commit:
cvs rdiff -u -r1.63.2.5 -r1.63.2.6 src/sys/dev/usb/usbdi_util.c

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

Modified files:

Index: src/sys/dev/usb/usbdi_util.c
diff -u src/sys/dev/usb/usbdi_util.c:1.63.2.5 src/sys/dev/usb/usbdi_util.c:1.63.2.6
--- src/sys/dev/usb/usbdi_util.c:1.63.2.5	Fri Dec  5 09:37:50 2014
+++ src/sys/dev/usb/usbdi_util.c	Sat Mar  7 08:33:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi_util.c,v 1.63.2.5 2014/12/05 09:37:50 skrll Exp $	*/
+/*	$NetBSD: usbdi_util.c,v 1.63.2.6 2015/03/07 08:33:18 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: usbdi_util.c,v 1.63.2.5 2014/12/05 09:37:50 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: usbdi_util.c,v 1.63.2.6 2015/03/07 08:33:18 skrll Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_usb.h
@@ -52,22 +52,16 @@ __KERNEL_RCSID(0, $NetBSD: usbdi_util.c
 #include dev/usb/usbdi_util.h
 #include dev/usb/usbhist.h
 
-#ifdef USB_DEBUG
-#define DPRINTF(x)	if (usbdebug) printf x
-#define DPRINTFN(n,x)	if (usbdebug(n)) printf x
-extern int usbdebug;
-#else
-#define DPRINTF(x)
-#define DPRINTFN(n,x)
-#endif
+#define	DPRINTFN(N,FMT,A,B,C,D)	USBHIST_LOGN(usbdebug,N,FMT,A,B,C,D)
 
 usbd_status
 usbd_get_desc(usbd_device_handle dev, int type, int index, int len, void *desc)
 {
 	usb_device_request_t req;
 
-	DPRINTFN(3,(usbd_get_desc: type=%d, index=%d, len=%d\n,
-		type, index, len));
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+	DPRINTFN(3,type=%d, index=%d, len=%d, type, index, len, 0);
 
 	req.bmRequestType = UT_READ_DEVICE;
 	req.bRequest = UR_GET_DESCRIPTOR;
@@ -82,16 +76,16 @@ usbd_get_config_desc(usbd_device_handle 
 		 usb_config_descriptor_t *d)
 {
 	usbd_status err;
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
 
-	DPRINTFN(3,(usbd_get_config_desc: confidx=%d\n, confidx));
+	DPRINTFN(3, confidx=%d, confidx, 0, 0, 0);
 	err = usbd_get_desc(dev, UDESC_CONFIG, confidx,
 			USB_CONFIG_DESCRIPTOR_SIZE, d);
 	if (err)
 		return err;
 	if (d-bDescriptorType != UDESC_CONFIG) {
-		DPRINTFN(-1,(usbd_get_config_desc: confidx=%d, bad desc 
-			 len=%d type=%d\n,
-			 confidx, d-bLength, d-bDescriptorType));
+		DPRINTFN(1, confidx=%d, bad desc len=%d type=%d,
+		confidx, d-bLength, d-bDescriptorType, 0);
 		return USBD_INVAL;
 	}
 	return USBD_NORMAL_COMPLETION;
@@ -100,14 +94,17 @@ usbd_get_config_desc(usbd_device_handle 
 usbd_status
 usbd_get_config_desc_full(usbd_device_handle dev, int conf, void *d, int size)
 {
-	DPRINTFN(3,(usbd_get_config_desc_full: conf=%d\n, conf));
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+	DPRINTFN(3, conf=%d, conf, 0, 0, 0);
 	return usbd_get_desc(dev, UDESC_CONFIG, conf, size, d);
 }
 
 usbd_status
 usbd_get_device_desc(usbd_device_handle dev, usb_device_descriptor_t *d)
 {
-	DPRINTFN(3,(usbd_get_device_desc:\n));
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
 	return (usbd_get_desc(dev, UDESC_DEVICE,
 			 0, USB_DEVICE_DESCRIPTOR_SIZE, d));
 }
@@ -223,8 +220,9 @@ usbd_get_protocol(usbd_interface_handle 
 	usbd_device_handle dev;
 	usb_device_request_t req;
 
-	DPRINTFN(4, (usbd_get_protocol: iface=%p, endpt=%d\n,
-		 iface, id-bInterfaceNumber));
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+	DPRINTFN(4, iface=%p, endpt=%d, iface, id-bInterfaceNumber, 0, 0);
 	if (id == NULL)
 		return USBD_IOERROR;
 	usbd_interface2device_handle(iface, dev);
@@ -243,8 +241,10 @@ usbd_set_protocol(usbd_interface_handle 
 	usbd_device_handle dev;
 	usb_device_request_t req;
 
-	DPRINTFN(4, (usbd_set_protocol: iface=%p, report=%d, endpt=%d\n,
-		 iface, report, id-bInterfaceNumber));
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+	DPRINTFN(4, iface=%p, report=%d, endpt=%d, iface, report,
+	 id-bInterfaceNumber, 0);
 	if (id == NULL)
 		return USBD_IOERROR;
 	usbd_interface2device_handle(iface, dev);
@@ -264,7 +264,9 @@ usbd_set_report(usbd_interface_handle if
 	usbd_device_handle dev;
 	usb_device_request_t req;
 
-	DPRINTFN(4, (usbd_set_report: len=%d\n, len));
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+	DPRINTFN(4, len=%d, len, 0, 0, 0);
 	if (ifd == NULL)
 		return USBD_IOERROR;
 	usbd_interface2device_handle(iface, dev);
@@ -284,7 +286,9 @@ usbd_get_report(usbd_interface_handle if
 	usbd_device_handle dev;
 	usb_device_request_t req;
 
-	DPRINTFN(4, (usbd_get_report: len=%d\n, len));
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+	DPRINTFN(4, len=%d, len, 0, 0, 0);
 	if (ifd == NULL)
 		return USBD_IOERROR;
 	usbd_interface2device_handle(iface, dev);
@@ -303,7 +307,9 @@ usbd_set_idle(usbd_interface_handle ifac
 	usbd_device_handle dev;
 	usb_device_request_t req;
 
-	DPRINTFN(4, (usbd_set_idle: %d %d\n, 

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

2015-03-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar  7 08:33:18 UTC 2015

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

Log Message:
Complete converstion to USBHIST


To generate a diff of this commit:
cvs rdiff -u -r1.63.2.5 -r1.63.2.6 src/sys/dev/usb/usbdi_util.c

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



CVS commit: src/sys/dev/pci

2015-03-07 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Sat Mar  7 11:52:53 UTC 2015

Modified Files:
src/sys/dev/pci: if_iwm.c

Log Message:
Avoid kmem_free(NULL) in iwm_read_firmware()

This code path can be hit if the firmware failed to load, for instance
if the file is not present on the filesystem. In this case
firmware_open() fails, and fw-fw_rawdata never gets allocated in the
first place.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/if_iwm.c

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



CVS commit: src/tests/lib/libc/gen

2015-03-07 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Mar  7 09:59:15 UTC 2015

Modified Files:
src/tests/lib/libc/gen: t_randomid.c

Log Message:
Reduce the number of loops.
It avoids timeout on slow machines, and I think that 100,000
times loop also satisfies the evaluation.
PR lib/49664 (no comments)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/t_randomid.c

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

Modified files:

Index: src/tests/lib/libc/gen/t_randomid.c
diff -u src/tests/lib/libc/gen/t_randomid.c:1.4 src/tests/lib/libc/gen/t_randomid.c:1.5
--- src/tests/lib/libc/gen/t_randomid.c:1.4	Sat Feb 14 08:46:02 2015
+++ src/tests/lib/libc/gen/t_randomid.c	Sat Mar  7 09:59:15 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: t_randomid.c,v 1.4 2015/02/14 08:46:02 isaki Exp $ */
+/* $NetBSD: t_randomid.c,v 1.5 2015/03/07 09:59:15 isaki Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@ ATF_TC_BODY(randomid_basic, tc)
 
 	lowest = UINT32_MAX;
 
-	for (n = 0; n  100; n++) {
+	for (n = 0; n  10; n++) {
 		id = randomid(ctx);
 
 		if (last[id]  0) {



CVS commit: src/sys/dev/pci

2015-03-07 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Sat Mar  7 11:52:53 UTC 2015

Modified Files:
src/sys/dev/pci: if_iwm.c

Log Message:
Avoid kmem_free(NULL) in iwm_read_firmware()

This code path can be hit if the firmware failed to load, for instance
if the file is not present on the filesystem. In this case
firmware_open() fails, and fw-fw_rawdata never gets allocated in the
first place.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/if_iwm.c

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

Modified files:

Index: src/sys/dev/pci/if_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.26 src/sys/dev/pci/if_iwm.c:1.27
--- src/sys/dev/pci/if_iwm.c:1.26	Wed Mar  4 16:55:11 2015
+++ src/sys/dev/pci/if_iwm.c	Sat Mar  7 11:52:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwm.c,v 1.26 2015/03/04 16:55:11 nonaka Exp $	*/
+/*	$NetBSD: if_iwm.c,v 1.27 2015/03/07 11:52:53 khorben Exp $	*/
 /*	OpenBSD: if_iwm.c,v 1.35 2015/03/04 15:18:12 jsg Exp	*/
 
 /*
@@ -105,7 +105,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.26 2015/03/04 16:55:11 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.27 2015/03/07 11:52:53 khorben Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -804,7 +804,7 @@ iwm_read_firmware(struct iwm_softc *sc)
 		fw-fw_status = IWM_FW_STATUS_DONE;
 	wakeup(sc-sc_fw);
 
-	if (error) {
+	if (error  fw-fw_rawdata != NULL) {
 		kmem_free(fw-fw_rawdata, fw-fw_rawsize);
 		fw-fw_rawdata = NULL;
 	}



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

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 21:32:47 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic: amlogic_board.c amlogic_crureg.h
amlogic_reg.h amlogic_var.h

Log Message:
clk helpers for sdhc and rng


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/amlogic/amlogic_board.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/amlogic/amlogic_crureg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/amlogic/amlogic_reg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/amlogic_var.h

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

Modified files:

Index: src/sys/arch/arm/amlogic/amlogic_board.c
diff -u src/sys/arch/arm/amlogic/amlogic_board.c:1.7 src/sys/arch/arm/amlogic/amlogic_board.c:1.8
--- src/sys/arch/arm/amlogic/amlogic_board.c:1.7	Wed Mar  4 12:36:12 2015
+++ src/sys/arch/arm/amlogic/amlogic_board.c	Sat Mar  7 21:32:47 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_board.c,v 1.7 2015/03/04 12:36:12 jmcneill Exp $ */
+/* $NetBSD: amlogic_board.c,v 1.8 2015/03/07 21:32:47 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_amlogic.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amlogic_board.c,v 1.7 2015/03/04 12:36:12 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: amlogic_board.c,v 1.8 2015/03/07 21:32:47 jmcneill Exp $);
 
 #define	_ARM32_BUS_DMA_PRIVATE
 #include sys/param.h
@@ -61,6 +61,10 @@ struct arm32_bus_dma_tag amlogic_dma_tag
 	bus_space_write_4(amlogic_bs_tag, amlogic_core_bsh, \
 			  AMLOGIC_CBUS_OFFSET + (x), (v))
 
+#define CBUS_SET_CLEAR(x, s, c)	\
+	amlogic_reg_set_clear(amlogic_bs_tag, amlogic_core_bsh, \
+			  AMLOGIC_CBUS_OFFSET + (x), (s), (c))
+
 void
 amlogic_bootstrap(void)
 {
@@ -105,6 +109,26 @@ amlogic_get_rate_sys(void)
 }
 
 uint32_t
+amlogic_get_rate_fixed(void)
+{
+	uint32_t cntl;
+	uint64_t clk;
+	u_int mul, div, od;
+
+	clk = amlogic_get_rate_xtal();
+	cntl = CBUS_READ(HHI_MPLL_CNTL_REG);
+	mul = __SHIFTOUT(cntl, HHI_MPLL_CNTL_MUL);
+	div = __SHIFTOUT(cntl, HHI_MPLL_CNTL_DIV);
+	od = __SHIFTOUT(cntl, HHI_MPLL_CNTL_OD);
+
+	clk *= mul;
+	clk /= div;
+	clk = od;
+
+	return (uint32_t)clk;
+}
+
+uint32_t
 amlogic_get_rate_a9(void)
 {
 	uint32_t cntl0, cntl1;
@@ -164,6 +188,50 @@ amlogic_eth_init(void)
 	CBUS_READ(EE_CLK_GATING1_REG) | EE_CLK_GATING1_ETHERNET);
 }
 
+void
+amlogic_rng_init(void)
+{
+	printf(%s: GATING0 = %#x, GATING3 = %#x\n, __func__,
+	CBUS_READ(EE_CLK_GATING0_REG), CBUS_READ(EE_CLK_GATING3_REG));
+
+	CBUS_WRITE(EE_CLK_GATING0_REG,
+	CBUS_READ(EE_CLK_GATING0_REG) | EE_CLK_GATING0_RNG);
+	CBUS_WRITE(EE_CLK_GATING3_REG,
+	CBUS_READ(EE_CLK_GATING3_REG) | EE_CLK_GATING3_RNG);
+
+	printf(%s: GATING0 = %#x, GATING3 = %#x\n, __func__,
+	CBUS_READ(EE_CLK_GATING0_REG), CBUS_READ(EE_CLK_GATING3_REG));
+}
+
+void
+amlogic_sdhc_init(void)
+{
+	/* CARD - SDHC pin mux settings */
+	CBUS_SET_CLEAR(PERIPHS_PIN_MUX_5_REG, 0, 0x7c00);
+	CBUS_SET_CLEAR(PERIPHS_PIN_MUX_4_REG, 0, 0x7c00);
+	CBUS_SET_CLEAR(PERIPHS_PIN_MUX_2_REG, 0, 0xfc00);
+	CBUS_SET_CLEAR(PERIPHS_PIN_MUX_8_REG, 0, 0x0600);
+	CBUS_SET_CLEAR(PERIPHS_PIN_MUX_2_REG, 0x00f0, 0);
+
+	const uint32_t pupd_mask = __BITS(25,20);	/* CARD_0-CARD_5 */
+	CBUS_SET_CLEAR(CBUS_REG(0x203c), pupd_mask, 0);	/* PU/PD */
+	CBUS_SET_CLEAR(CBUS_REG(0x204a), pupd_mask, 0);	/* PU/PD-EN */
+
+	const uint32_t io_mask = __BITS(27,22);		/* CARD_0-CARD_5 */
+	CBUS_SET_CLEAR(CBUS_REG(0x200c), io_mask, 0);	/* OEN */
+
+	/* XXX ODROID-C1 specific */
+	const uint32_t pwr_mask = __BIT(31);		/* CARD_8 */
+	CBUS_SET_CLEAR(CBUS_REG(0x201c), 0, pwr_mask);	/* O */
+	CBUS_SET_CLEAR(CBUS_REG(0x201b), 0, pwr_mask);	/* OEN */
+	const uint32_t cd_mask = __BIT(29);
+	CBUS_SET_CLEAR(CBUS_REG(0x201b), cd_mask, 0);	/* OEN */
+
+	/* enable SDHC clk */
+	CBUS_WRITE(EE_CLK_GATING0_REG,
+	CBUS_READ(EE_CLK_GATING0_REG) | EE_CLK_GATING0_SDHC);
+}
+
 static void
 amlogic_usbphy_clkgate_enable(int port)
 {

Index: src/sys/arch/arm/amlogic/amlogic_crureg.h
diff -u src/sys/arch/arm/amlogic/amlogic_crureg.h:1.5 src/sys/arch/arm/amlogic/amlogic_crureg.h:1.6
--- src/sys/arch/arm/amlogic/amlogic_crureg.h:1.5	Wed Mar  4 12:36:12 2015
+++ src/sys/arch/arm/amlogic/amlogic_crureg.h	Sat Mar  7 21:32:47 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_crureg.h,v 1.5 2015/03/04 12:36:12 jmcneill Exp $ */
+/* $NetBSD: amlogic_crureg.h,v 1.6 2015/03/07 21:32:47 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -36,6 +36,10 @@
 #define EE_CLK_GATING2_REG		CBUS_REG(0x1052)
 #define EE_CLK_GATING3_REG		CBUS_REG(0x1054)
 
+#define EE_CLK_GATING0_SDIO		__BIT(17)
+#define EE_CLK_GATING0_SDHC		__BIT(14)
+#define EE_CLK_GATING0_RNG		__BIT(12)
+
 #define EE_CLK_GATING1_USB_GENERAL	__BIT(26)
 #define EE_CLK_GATING1_USB1		__BIT(22)
 #define EE_CLK_GATING1_USB0		__BIT(21)
@@ -44,6 +48,7 @@
 #define 

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

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 21:32:47 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic: amlogic_board.c amlogic_crureg.h
amlogic_reg.h amlogic_var.h

Log Message:
clk helpers for sdhc and rng


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/amlogic/amlogic_board.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/amlogic/amlogic_crureg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/amlogic/amlogic_reg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/amlogic_var.h

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



CVS commit: src/sys/dev/ic

2015-03-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar  7 21:53:33 UTC 2015

Modified Files:
src/sys/dev/ic: com.c

Log Message:
Fix build.

Hi mipsallan


To generate a diff of this commit:
cvs rdiff -u -r1.330 -r1.331 src/sys/dev/ic/com.c

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

Modified files:

Index: src/sys/dev/ic/com.c
diff -u src/sys/dev/ic/com.c:1.330 src/sys/dev/ic/com.c:1.331
--- src/sys/dev/ic/com.c:1.330	Sat Mar  7 15:49:20 2015
+++ src/sys/dev/ic/com.c	Sat Mar  7 21:53:33 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.330 2015/03/07 15:49:20 macallan Exp $ */
+/* $NetBSD: com.c,v 1.331 2015/03/07 21:53:33 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: com.c,v 1.330 2015/03/07 15:49:20 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: com.c,v 1.331 2015/03/07 21:53:33 skrll Exp $);
 
 #include opt_com.h
 #include opt_ddb.h
@@ -525,7 +525,7 @@ com_attach_subr(struct com_softc *sc)
 			 * should become effective.
 			 */
 			uint8_t iir1, iir2;
-			const uint8_t fcr = FIFO_ENABLE | FIFO_TRIGGER_14;
+			uint8_t fcr = FIFO_ENABLE | FIFO_TRIGGER_14;
 
 			if(sc-sc_type == COM_TYPE_INGENIC)
 fcr |= FIFO_UART_ON;



CVS commit: src/sys/dev/ic

2015-03-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar  7 21:53:33 UTC 2015

Modified Files:
src/sys/dev/ic: com.c

Log Message:
Fix build.

Hi mipsallan


To generate a diff of this commit:
cvs rdiff -u -r1.330 -r1.331 src/sys/dev/ic/com.c

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



CVS commit: src/sys/rump

2015-03-07 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Sat Mar  7 22:00:07 UTC 2015

Modified Files:
src/sys/rump: listsrcdirs

Log Message:
Add risc-v to checked out rump architectures


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/rump/listsrcdirs

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/listsrcdirs
diff -u src/sys/rump/listsrcdirs:1.28 src/sys/rump/listsrcdirs:1.29
--- src/sys/rump/listsrcdirs:1.28	Fri Feb 13 00:31:42 2015
+++ src/sys/rump/listsrcdirs	Sat Mar  7 22:00:07 2015
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: listsrcdirs,v 1.28 2015/02/13 00:31:42 pooka Exp $
+#	$NetBSD: listsrcdirs,v 1.29 2015/03/07 22:00:07 justin Exp $
 #
 
 #
@@ -63,7 +63,7 @@ lsrc ()
 	iswanted ${what}  for arg in $* ; do echo src${pfx}${arg} ; done
 }
 
-ARCHS=amd64 i386 x86 arm evbarm sparc sparc64 powerpc evbppc mips evbmips aarch64 evbarm64
+ARCHS=amd64 i386 x86 arm evbarm sparc sparc64 powerpc evbppc mips evbmips aarch64 evbarm64 riscv
 ARCHS_EXTRA=arm/arm32 Makefile
 
 # sources necessary for building rump kernel components.  This list



CVS commit: src/sys/rump

2015-03-07 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Sat Mar  7 22:00:07 UTC 2015

Modified Files:
src/sys/rump: listsrcdirs

Log Message:
Add risc-v to checked out rump architectures


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/rump/listsrcdirs

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



CVS commit: src/external/bsd/wpa/dist/src/ap

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 22:31:24 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/ap: ap_drv_ops.c

Log Message:
prevent coredump from the distributed config file.
XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/wpa/dist/src/ap/ap_drv_ops.c

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

2015-03-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Mar  7 20:20:55 UTC 2015

Modified Files:
src/sys/dev/usb: TODO.usbmp uatp.c ucycom.c uhid.c uhidev.c uhidev.h
ukbd.c uyurex.c

Log Message:
properly protect uhid's sc_q member with sc_lock.  should fix PR#49728.
while here, remove D_MPSAFE from uhid* and all uhid users, as it really
needs all the callers to be safe and they're not.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/usb/uatp.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/ucycom.c
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/usb/uhid.c
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/usb/uhidev.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/usb/uhidev.h
cvs rdiff -u -r1.129 -r1.130 src/sys/dev/usb/ukbd.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/uyurex.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/arm/amlogic

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 21:33:12 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic: amlogic_intr.h

Log Message:
add SDIO and SDHC irqs


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/amlogic_intr.h

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



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

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 21:34:26 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic: amlogic_io.c files.amlogic
Added Files:
src/sys/arch/arm/amlogic: amlogic_rng.c

Log Message:
add hardware rng support


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/amlogic_io.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/amlogic/amlogic_rng.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/amlogic/files.amlogic

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

Modified files:

Index: src/sys/arch/arm/amlogic/amlogic_io.c
diff -u src/sys/arch/arm/amlogic/amlogic_io.c:1.4 src/sys/arch/arm/amlogic/amlogic_io.c:1.5
--- src/sys/arch/arm/amlogic/amlogic_io.c:1.4	Wed Mar  4 12:36:12 2015
+++ src/sys/arch/arm/amlogic/amlogic_io.c	Sat Mar  7 21:34:25 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_io.c,v 1.4 2015/03/04 12:36:12 jmcneill Exp $ */
+/* $NetBSD: amlogic_io.c,v 1.5 2015/03/07 21:34:25 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_amlogic.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amlogic_io.c,v 1.4 2015/03/04 12:36:12 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: amlogic_io.c,v 1.5 2015/03/07 21:34:25 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -56,12 +56,19 @@ static int	amlogicio_find(device_t, cfda
 static bool amlogicio_found = false;
 
 #define NOPORT	AMLOGICIOCF_PORT_DEFAULT
+#define NOINTR	AMLOGICIO_INTR_DEFAULT
 
 static const struct amlogic_locators amlogic_locators[] = {
   { amlogiccom,
 AMLOGIC_UART0AO_OFFSET, AMLOGIC_UART_SIZE, 0, AMLOGIC_INTR_UART0AO },
   { amlogiccom,
 AMLOGIC_UART2AO_OFFSET, AMLOGIC_UART_SIZE, 2, AMLOGIC_INTR_UART2AO },
+#if notyet
+  { genfb,
+AMLOGIC_DMC_OFFSET, AMLOGIC_DMC_SIZE, NOPORT, NOINTR },
+#endif
+  { amlogicrng,
+AMLOGIC_RAND_OFFSET, AMLOGIC_RAND_SIZE, NOPORT, NOINTR },
   { dwctwo,
 AMLOGIC_USB0_OFFSET, AMLOGIC_USB_SIZE, 0, AMLOGIC_INTR_USB0 },
   { dwctwo,
@@ -69,8 +76,8 @@ static const struct amlogic_locators aml
   { awge,
 AMLOGIC_GMAC_OFFSET, AMLOGIC_GMAC_SIZE, NOPORT, AMLOGIC_INTR_GMAC },
 #if notyet
-  { amlogicmmc,
-AMLOGIC_MMC_OFFSET, AMLOGIC_MMC_SIZE, 0, AMLOGIC_INTR_MMC },
+  { amlogicsdhc,
+AMLOGIC_SDHC_OFFSET, AMLOGIC_SDHC_SIZE, 0, AMLOGIC_INTR_SDHC },
 #endif
 };
 

Index: src/sys/arch/arm/amlogic/files.amlogic
diff -u src/sys/arch/arm/amlogic/files.amlogic:1.5 src/sys/arch/arm/amlogic/files.amlogic:1.6
--- src/sys/arch/arm/amlogic/files.amlogic:1.5	Thu Mar  5 23:43:53 2015
+++ src/sys/arch/arm/amlogic/files.amlogic	Sat Mar  7 21:34:25 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amlogic,v 1.5 2015/03/05 23:43:53 jmcneill Exp $
+#	$NetBSD: files.amlogic,v 1.6 2015/03/07 21:34:25 jmcneill Exp $
 #
 # Configuration info for Amlogic ARM Peripherals
 #
@@ -21,15 +21,15 @@ device	amlogicio { [port=-1] } : bus_spa
 attach	amlogicio at mainbus with amlogic_io
 file	arch/arm/amlogic/amlogic_io.c		amlogic_io
 
-# serial
+# UART
 device	amlogiccom
 attach	amlogiccom at amlogicio with amlogic_com
 file	arch/arm/amlogic/amlogic_com.c		amlogic_com needs-flag
 
-# mmc/sd/sdio
-device	amlogicmmc: sdmmcbus
-attach	amlogicmmc at amlogicio with amlogic_mmc
-file	arch/arm/amlogic/amlogic_mmc.c		amlogic_mmc
+# SDHC
+device	amlogicsdhc: sdmmcbus
+attach	amlogicsdhc at amlogicio with amlogic_sdhc
+file	arch/arm/amlogic/amlogic_sdhc.c		amlogic_sdhc
 
 # usb otg
 attach	dwctwo at amlogicio with amlogic_dwctwo
@@ -39,6 +39,11 @@ file	arch/arm/amlogic/amlogic_dwctwo.c	a
 attach	awge at amlogicio with amlogic_gmac
 file	arch/arm/amlogic/amlogic_gmac.c		amlogic_gmac
 
+# Hardware random number generator
+device	amlogicrng
+attach	amlogicrng at amlogicio with amlogic_rng
+file	arch/arm/amlogic/amlogic_rng.c		amlogic_rng
+
 # Console parameters
 defparam opt_amlogic.h			CONADDR
 defparam opt_amlogic.h			CONSPEED

Added files:

Index: src/sys/arch/arm/amlogic/amlogic_rng.c
diff -u /dev/null src/sys/arch/arm/amlogic/amlogic_rng.c:1.1
--- /dev/null	Sat Mar  7 21:34:26 2015
+++ src/sys/arch/arm/amlogic/amlogic_rng.c	Sat Mar  7 21:34:25 2015
@@ -0,0 +1,111 @@
+/* $NetBSD: amlogic_rng.c,v 1.1 2015/03/07 21:34:25 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * 

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

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 21:34:26 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic: amlogic_io.c files.amlogic
Added Files:
src/sys/arch/arm/amlogic: amlogic_rng.c

Log Message:
add hardware rng support


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/amlogic_io.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/amlogic/amlogic_rng.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/amlogic/files.amlogic

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



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

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 21:33:12 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic: amlogic_intr.h

Log Message:
add SDIO and SDHC irqs


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/amlogic_intr.h

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

Modified files:

Index: src/sys/arch/arm/amlogic/amlogic_intr.h
diff -u src/sys/arch/arm/amlogic/amlogic_intr.h:1.4 src/sys/arch/arm/amlogic/amlogic_intr.h:1.5
--- src/sys/arch/arm/amlogic/amlogic_intr.h:1.4	Wed Mar  4 12:36:12 2015
+++ src/sys/arch/arm/amlogic/amlogic_intr.h	Sat Mar  7 21:33:12 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_intr.h,v 1.4 2015/03/04 12:36:12 jmcneill Exp $ */
+/* $NetBSD: amlogic_intr.h,v 1.5 2015/03/07 21:33:12 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -36,10 +36,11 @@
 #include arm/cortex/a9tmr_intr.h
 
 #define AMLOGIC_INTR_GMAC	40
-#define AMLOGIC_INTR_MMC	60
+#define AMLOGIC_INTR_SDIO	60
 #define AMLOGIC_INTR_USB0	62
 #define AMLOGIC_INTR_USB1	63
 #define AMLOGIC_INTR_UART2AO	70
+#define AMLOGIC_INTR_SDHC	110
 #define AMLOGIC_INTR_UART0AO	122
 
 #endif /* _ARM_AMLOGIC_INTR_H */



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 21:50:30 UTC 2015

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.291 -r1.292 src/sys/kern/init_sysent.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/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.291 src/sys/kern/init_sysent.c:1.292
--- src/sys/kern/init_sysent.c:1.291	Sat Mar  7 15:40:00 2015
+++ src/sys/kern/init_sysent.c	Sat Mar  7 16:50:30 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysent.c,v 1.291 2015/03/07 20:40:00 christos Exp $ */
+/* $NetBSD: init_sysent.c,v 1.292 2015/03/07 21:50:30 christos Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.291 2015/03/07 20:40:00 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.292 2015/03/07 21:50:30 christos Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h
@@ -169,6 +169,9 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_unlink
 	},		/* 10 = unlink */
 	{
+		.sy_call = sys_nosys,
+	},		/* 11 = filler */
+	{
 		ns(struct sys_chdir_args),
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_chdir
@@ -424,6 +427,12 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_vfork
 	},		/* 66 = vfork */
 	{
+		.sy_call = sys_nosys,
+	},		/* 67 = filler */
+	{
+		.sy_call = sys_nosys,
+	},		/* 68 = filler */
+	{
 		ns(struct sys_sbrk_args),
 		.sy_call = (sy_call_t *)sys_sbrk
 	},		/* 69 = sbrk */
@@ -456,6 +465,12 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_madvise
 	},		/* 75 = madvise */
 	{
+		.sy_call = sys_nosys,
+	},		/* 76 = filler */
+	{
+		.sy_call = sys_nosys,
+	},		/* 77 = filler */
+	{
 		ns(struct sys_mincore_args),
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_mincore
@@ -516,6 +531,9 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_dup2
 	},		/* 90 = dup2 */
 	{
+		.sy_call = sys_nosys,
+	},		/* 91 = filler */
+	{
 		ns(struct sys_fcntl_args),
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_fcntl
@@ -526,6 +544,9 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_nomodule
 	},		/* 93 = compat_50_select */
 	{
+		.sy_call = sys_nosys,
+	},		/* 94 = filler */
+	{
 		ns(struct sys_fsync_args),
 		.sy_call = (sy_call_t *)sys_fsync
 	},		/* 95 = fsync */
@@ -581,6 +602,9 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_listen
 	},		/* 106 = listen */
 	{
+		.sy_call = sys_nosys,
+	},		/* 107 = filler */
+	{
 		ns(struct compat_43_sys_sigvec_args),
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_nomodule
@@ -613,6 +637,9 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_nomodule
 	},		/* 114 = compat_43_osendmsg */
 	{
+		.sy_call = sys_nosys,
+	},		/* 115 = filler */
+	{
 		ns(struct compat_50_sys_gettimeofday_args),
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_nomodule
@@ -628,6 +655,9 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_getsockopt
 	},		/* 118 = getsockopt */
 	{
+		.sy_call = sys_nosys,
+	},		/* 119 = filler */
+	{
 		ns(struct sys_readv_args),
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_readv
@@ -716,6 +746,9 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_nomodule
 	},		/* 138 = compat_50_utimes */
 	{
+		.sy_call = sys_nosys,
+	},		/* 139 = filler */
+	{
 		ns(struct compat_50_sys_adjtime_args),
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_nomodule
@@ -766,6 +799,18 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_nomodule
 	},		/* 150 = compat_43_ogetsockname */
 	{
+		.sy_call = sys_nosys,
+	},		/* 151 = filler */
+	{
+		.sy_call = sys_nosys,
+	},		/* 152 = filler */
+	{
+		.sy_call = sys_nosys,
+	},		/* 153 = filler */
+	{
+		.sy_call = sys_nosys,
+	},		/* 154 = filler */
+	{
 		ns(struct sys_nfssvc_args),
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_nomodule
@@ -786,6 +831,12 @@ struct sysent sysent[] = {
 		.sy_call = (sy_call_t *)sys_nomodule
 	},		/* 158 = compat_20_fstatfs */
 	{
+		.sy_call = sys_nosys,
+	},		/* 159 = filler */
+	{
+		.sy_call = sys_nosys,
+	},		/* 160 = filler */
+	{
 		ns(struct compat_30_sys_getfh_args),
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_nomodule
@@ -810,12 +861,24 @@ struct sysent sysent[] = {
 		.sy_flags = SYCALL_ARG_PTR,
 		.sy_call = (sy_call_t *)sys_sysarch
 	},		/* 165 = sysarch */
+	{
+		.sy_call = sys_nosys,
+	},		/* 166 = filler */
+	{
+		.sy_call = sys_nosys,
+	},		/* 167 = filler */
+	{
+		.sy_call = sys_nosys,
+	},		/* 168 = filler */
 #if (defined(SYSVSEM) || !defined(_KERNEL_OPT))  !defined(_LP64)
 	{
 		ns(struct compat_10_sys_semsys_args),
 		.sy_call = (sy_call_t *)sys_nomodule
 	},		/* 169 = compat_10_osemsys */
 #else
+	{
+		.sy_call = sys_nosys,
+	},		/* 169 = filler */
 

CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 21:50:30 UTC 2015

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.291 -r1.292 src/sys/kern/init_sysent.c

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



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 21:49:56 UTC 2015

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
make sure we print the fillers.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/kern/makesyscalls.sh

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/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.147 src/sys/kern/makesyscalls.sh:1.148
--- src/sys/kern/makesyscalls.sh:1.147	Sat Mar  7 15:39:11 2015
+++ src/sys/kern/makesyscalls.sh	Sat Mar  7 16:49:56 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.147 2015/03/07 20:39:11 christos Exp $
+#	$NetBSD: makesyscalls.sh,v 1.148 2015/03/07 21:49:56 christos Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -425,7 +425,7 @@ function parserr(was, wanted) {
 	exit 1
 }
 function fillerpsysent(syscall, flags, name, comment) {
-	return sprintf(\t{%s\n\t\t.sy_call = %s,\n\t},\t\t/* %d = filler */\n,\
+	return sprintf(\t{%s\n\t\t.sy_call = %s,\n\t},\t\t/* %d = filler */,\
 	flags, name, syscall, comment);
 }
 function parseline() {
@@ -986,8 +986,8 @@ $2 == OBSOL || $2 == UNIMPL || $2 ==
 	else
 		sys_stub = sys_nosys;
 
-	fillerpsysent(syscall, , sys_stub, comment)  sysent
-	fillerpsysent(syscall, rumpnoflags, rumpnosys, comment)  rumpsysent
+	print fillerpsysent(syscall, , sys_stub, comment)  sysent
+	print fillerpsysent(syscall, rumpnoflags, rumpnosys, comment)  rumpsysent
 	printf(\t/* %3d */\t\#%d (%s)\,\n, syscall, syscall, comment) \
 	 sysnamesbottom
 	if ($2 != UNIMPL)
@@ -1051,8 +1051,8 @@ END {
 			exit 1
 		}
 		while (syscall  nsysent) {
-			fillerpsysent(syscall, , sys_nosys, filler)  sysent
-			fillerpsysent(syscall, rumpnoflags, rumpnosys, filler)  rumpsysent
+			print fillerpsysent(syscall, , sys_nosys, filler)  sysent
+			print fillerpsysent(syscall, rumpnoflags, rumpnosys, filler)  rumpsysent
 			printf(\t/* %3d */\t\# filler\,\n, syscall) \
 			 sysnamesbottom
 			syscall++



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 21:49:56 UTC 2015

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
make sure we print the fillers.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/kern/makesyscalls.sh

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



CVS commit: src/sys/dev/ic

2015-03-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar  7 22:13:16 UTC 2015

Modified Files:
src/sys/dev/ic: com.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.331 -r1.332 src/sys/dev/ic/com.c

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

Modified files:

Index: src/sys/dev/ic/com.c
diff -u src/sys/dev/ic/com.c:1.331 src/sys/dev/ic/com.c:1.332
--- src/sys/dev/ic/com.c:1.331	Sat Mar  7 21:53:33 2015
+++ src/sys/dev/ic/com.c	Sat Mar  7 22:13:16 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.331 2015/03/07 21:53:33 skrll Exp $ */
+/* $NetBSD: com.c,v 1.332 2015/03/07 22:13:16 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: com.c,v 1.331 2015/03/07 21:53:33 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: com.c,v 1.332 2015/03/07 22:13:16 skrll Exp $);
 
 #include opt_com.h
 #include opt_ddb.h
@@ -472,7 +472,7 @@ com_attach_subr(struct com_softc *sc)
 
 	sc-sc_fifolen = 1;
 	/* look for a NS 16550AF UART with FIFOs */
-	if(sc-sc_type == COM_TYPE_INGENIC) {
+	if (sc-sc_type == COM_TYPE_INGENIC) {
 		CSR_WRITE_1(regsp, COM_REG_FIFO,
 		FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | 
 		FIFO_TRIGGER_14 | FIFO_UART_ON);
@@ -527,7 +527,7 @@ com_attach_subr(struct com_softc *sc)
 			uint8_t iir1, iir2;
 			uint8_t fcr = FIFO_ENABLE | FIFO_TRIGGER_14;
 
-			if(sc-sc_type == COM_TYPE_INGENIC)
+			if (sc-sc_type == COM_TYPE_INGENIC)
 fcr |= FIFO_UART_ON;
 
 			lcr = CSR_READ_1(regsp, COM_REG_LCR);
@@ -568,7 +568,7 @@ com_attach_subr(struct com_softc *sc)
 			fifo_msg = ns16550, broken fifo;
 	else
 		fifo_msg = ns8250 or ns16450, no fifo;
-	if(sc-sc_type == COM_TYPE_INGENIC) {
+	if (sc-sc_type == COM_TYPE_INGENIC) {
 		CSR_WRITE_1(regsp, COM_REG_FIFO, FIFO_UART_ON);
 	} else
 		CSR_WRITE_1(regsp, COM_REG_FIFO, 0);
@@ -1479,7 +1479,7 @@ comparam(struct tty *tp, struct termios 
 	} else
 		sc-sc_fifo = 0;
 
-	if(sc-sc_type == COM_TYPE_INGENIC)
+	if (sc-sc_type == COM_TYPE_INGENIC)
 		sc-sc_fifo |= FIFO_UART_ON;
 
 	/* And copy to tty. */



CVS commit: src/sys/dev/ic

2015-03-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar  7 22:13:16 UTC 2015

Modified Files:
src/sys/dev/ic: com.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.331 -r1.332 src/sys/dev/ic/com.c

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



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 23:20:19 UTC 2015

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

Log Message:
Fix compilation.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/kern/kern_module.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/kern_module.c
diff -u src/sys/kern/kern_module.c:1.103 src/sys/kern/kern_module.c:1.104
--- src/sys/kern/kern_module.c:1.103	Sat Feb 28 18:04:34 2015
+++ src/sys/kern/kern_module.c	Sat Mar  7 18:20:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.103 2015/02/28 23:04:34 jmcneill Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.104 2015/03/07 23:20:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.103 2015/02/28 23:04:34 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.104 2015/03/07 23:20:19 christos Exp $);
 
 #define _MODULE_INTERNAL
 
@@ -966,8 +966,8 @@ module_do_load(const char *name, bool is
 			 * available for each architecture, so we don't
 			 * print an error if they are missing.
 			 */
-			if ((modclass != MODULE_CLASS_EXEC || error != ENOENT) 
-			root_device != NULL)
+			if ((modclass != MODULE_CLASS_EXEC || error != ENOENT)
+			 root_device != NODEV)
 module_error(vfs load failed for `%s', 
 error %d, name, error);
 #endif



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 23:20:19 UTC 2015

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

Log Message:
Fix compilation.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/kern/kern_module.c

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

2015-03-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Mar  7 20:20:55 UTC 2015

Modified Files:
src/sys/dev/usb: TODO.usbmp uatp.c ucycom.c uhid.c uhidev.c uhidev.h
ukbd.c uyurex.c

Log Message:
properly protect uhid's sc_q member with sc_lock.  should fix PR#49728.
while here, remove D_MPSAFE from uhid* and all uhid users, as it really
needs all the callers to be safe and they're not.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/usb/uatp.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/ucycom.c
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/usb/uhid.c
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/usb/uhidev.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/usb/uhidev.h
cvs rdiff -u -r1.129 -r1.130 src/sys/dev/usb/ukbd.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/uyurex.c

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

Modified files:

Index: src/sys/dev/usb/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.8 src/sys/dev/usb/TODO.usbmp:1.9
--- src/sys/dev/usb/TODO.usbmp:1.8	Sat Aug  2 15:50:16 2014
+++ src/sys/dev/usb/TODO.usbmp	Sat Mar  7 20:20:55 2015
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.8 2014/08/02 15:50:16 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.9 2015/03/07 20:20:55 mrg Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -41,8 +41,8 @@ convert uhidev users to MPSAFE:
   - own cdevsw that isn't D_MPSAFE; need to check intr handlers
 
   uhid(4)
-  - needs some locking here (not completely tested changes)
-  - done
+  - D_MPSAFE not set as all users need it first.
+  - mostly done
 
   ukbd(4)
   ums(4)
@@ -135,7 +135,7 @@ driver testing:		STATUS
   - ral
   - rum
   - run
-  - urtw
+  - urtw		working
   - urtwn
   - upgt
   - zyd

Index: src/sys/dev/usb/uatp.c
diff -u src/sys/dev/usb/uatp.c:1.10 src/sys/dev/usb/uatp.c:1.11
--- src/sys/dev/usb/uatp.c:1.10	Thu Jul 17 17:11:12 2014
+++ src/sys/dev/usb/uatp.c	Sat Mar  7 20:20:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uatp.c,v 1.10 2014/07/17 17:11:12 riastradh Exp $	*/
+/*	$NetBSD: uatp.c,v 1.11 2015/03/07 20:20:55 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 The NetBSD Foundation, Inc.
@@ -146,7 +146,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uatp.c,v 1.10 2014/07/17 17:11:12 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: uatp.c,v 1.11 2015/03/07 20:20:55 mrg Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -1350,8 +1350,7 @@ geyser34_initialize(struct uatp_softc *s
 
 	DPRINTF(sc, UATP_DEBUG_MISC, (initializing\n));
 	geyser34_enable_raw_mode(sc);
-	usb_init_task(sc-sc_reset_task, geyser34_reset_task, sc,
-	USB_TASKQ_MPSAFE);
+	usb_init_task(sc-sc_reset_task, geyser34_reset_task, sc, 0);
 }
 
 static int
@@ -2012,7 +2011,7 @@ tap_debug(struct uatp_softc *sc, const c
 static void
 tap_initialize(struct uatp_softc *sc)
 {
-	callout_init(sc-sc_untap_callout, CALLOUT_MPSAFE);
+	callout_init(sc-sc_untap_callout, 0);
 	callout_setfunc(sc-sc_untap_callout, untap_callout, sc);
 	mutex_init(sc-sc_tap_mutex, MUTEX_DEFAULT, IPL_USB);
 	cv_init(sc-sc_tap_cv, uatptap);

Index: src/sys/dev/usb/ucycom.c
diff -u src/sys/dev/usb/ucycom.c:1.41 src/sys/dev/usb/ucycom.c:1.42
--- src/sys/dev/usb/ucycom.c:1.41	Sat Nov 15 19:26:37 2014
+++ src/sys/dev/usb/ucycom.c	Sat Mar  7 20:20:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucycom.c,v 1.41 2014/11/15 19:26:37 christos Exp $	*/
+/*	$NetBSD: ucycom.c,v 1.42 2015/03/07 20:20:55 mrg Exp $	*/
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ucycom.c,v 1.41 2014/11/15 19:26:37 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ucycom.c,v 1.42 2015/03/07 20:20:55 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1124,9 +1124,14 @@ ucycom_get_cfg(struct ucycom_softc *sc)
 Static void
 ucycom_cleanup(struct ucycom_softc *sc)
 {
+	uint8_t	*obuf;
+
 	DPRINTF((ucycom_cleanup: closing uhidev\n));
 
-	if (sc-sc_obuf !=NULL)
-		free (sc-sc_obuf, M_USBDEV);
+	obuf = sc-sc_obuf;
+	sc-sc_obuf = NULL;
 	uhidev_close(sc-sc_hdev);
+
+	if (obuf != NULL)
+		free (obuf, M_USBDEV);
 }

Index: src/sys/dev/usb/uhid.c
diff -u src/sys/dev/usb/uhid.c:1.92 src/sys/dev/usb/uhid.c:1.93
--- src/sys/dev/usb/uhid.c:1.92	Fri Jul 25 08:10:39 2014
+++ src/sys/dev/usb/uhid.c	Sat Mar  7 20:20:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhid.c,v 1.92 2014/07/25 08:10:39 dholland Exp $	*/
+/*	$NetBSD: uhid.c,v 1.93 2015/03/07 20:20:55 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2008, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhid.c,v 1.92 2014/07/25 08:10:39 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhid.c,v 1.93 2015/03/07 20:20:55 mrg Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -91,7 +91,7 @@ struct uhid_softc {
 
 	u_char *sc_obuf;
 
-	struct clist sc_q;
+	struct clist sc_q;	/* 

CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 20:40:00 UTC 2015

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/sys/kern/init_sysent.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/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.290 src/sys/kern/init_sysent.c:1.291
--- src/sys/kern/init_sysent.c:1.290	Sat Mar  7 11:38:49 2015
+++ src/sys/kern/init_sysent.c	Sat Mar  7 15:40:00 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysent.c,v 1.290 2015/03/07 16:38:49 christos Exp $ */
+/* $NetBSD: init_sysent.c,v 1.291 2015/03/07 20:40:00 christos Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.290 2015/03/07 16:38:49 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.291 2015/03/07 20:40:00 christos Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h
@@ -113,1119 +113,2085 @@ __KERNEL_RCSID(0, $NetBSD: init_sysent.
 
 #define	s(type)	sizeof(type)
 #define	n(type)	(sizeof(type)/sizeof (register_t))
-#define	ns(type)	n(type), s(type)
+#define	ns(type)	.sy_narg = n(type), .sy_argsize = s(type)
 
 struct sysent sysent[] = {
-	{ ns(struct sys_syscall_args), SYCALL_INDIRECT,
-	(sy_call_t *)sys_syscall, 0, 0 },		/* 0 = syscall */
-	{ ns(struct sys_exit_args), 0,
-	(sy_call_t *)sys_exit, 0, 0 },		/* 1 = exit */
-	{ 0, 0, 0,
-	(sy_call_t *)sys_fork, 0, 0 },		/* 2 = fork */
-	{ ns(struct sys_read_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_read, 0, 0 },		/* 3 = read */
-	{ ns(struct sys_write_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_write, 0, 0 },		/* 4 = write */
-	{ ns(struct sys_open_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_open, 0, 0 },		/* 5 = open */
-	{ ns(struct sys_close_args), 0,
-	(sy_call_t *)sys_close, 0, 0 },		/* 6 = close */
-	{ ns(struct compat_50_sys_wait4_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_nomodule, 0, 0 },	/* 7 = compat_50_wait4 */
-	{ ns(struct compat_43_sys_creat_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_nomodule, 0, 0 },	/* 8 = compat_43_ocreat */
-	{ ns(struct sys_link_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_link, 0, 0 },		/* 9 = link */
-	{ ns(struct sys_unlink_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_unlink, 0, 0 },		/* 10 = unlink */
-	{ 0, 0, 0,
-	sys_nosys, 0, 0 },			/* 11 = obsolete execv */
-	{ ns(struct sys_chdir_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_chdir, 0, 0 },		/* 12 = chdir */
-	{ ns(struct sys_fchdir_args), 0,
-	(sy_call_t *)sys_fchdir, 0, 0 },		/* 13 = fchdir */
-	{ ns(struct compat_50_sys_mknod_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_nomodule, 0, 0 },	/* 14 = compat_50_mknod */
-	{ ns(struct sys_chmod_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_chmod, 0, 0 },		/* 15 = chmod */
-	{ ns(struct sys_chown_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_chown, 0, 0 },		/* 16 = chown */
-	{ ns(struct sys_obreak_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_obreak, 0, 0 },		/* 17 = break */
-	{ ns(struct compat_20_sys_getfsstat_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_nomodule, 0, 0 },	/* 18 = compat_20_getfsstat */
-	{ ns(struct compat_43_sys_lseek_args), 0,
-	(sy_call_t *)sys_nomodule, 0, 0 },	/* 19 = compat_43_olseek */
-	{ 0, 0, 0,
-	(sy_call_t *)sys_getpid_with_ppid, 0, 0 },/* 20 = getpid */
-	{ ns(struct compat_40_sys_mount_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_nomodule, 0, 0 },	/* 21 = compat_40_mount */
-	{ ns(struct sys_unmount_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_unmount, 0, 0 },		/* 22 = unmount */
-	{ ns(struct sys_setuid_args), 0,
-	(sy_call_t *)sys_setuid, 0, 0 },		/* 23 = setuid */
-	{ 0, 0, 0,
-	(sy_call_t *)sys_getuid_with_euid, 0, 0 },/* 24 = getuid */
-	{ 0, 0, 0,
-	(sy_call_t *)sys_geteuid, 0, 0 },		/* 25 = geteuid */
-	{ ns(struct sys_ptrace_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_ptrace, 0, 0 },		/* 26 = ptrace */
-	{ ns(struct sys_recvmsg_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_recvmsg, 0, 0 },		/* 27 = recvmsg */
-	{ ns(struct sys_sendmsg_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_sendmsg, 0, 0 },		/* 28 = sendmsg */
-	{ ns(struct sys_recvfrom_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_recvfrom, 0, 0 },	/* 29 = recvfrom */
-	{ ns(struct sys_accept_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_accept, 0, 0 },		/* 30 = accept */
-	{ ns(struct sys_getpeername_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_getpeername, 0, 0 },	/* 31 = getpeername */
-	{ ns(struct sys_getsockname_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_getsockname, 0, 0 },	/* 32 = getsockname */
-	{ ns(struct sys_access_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_access, 0, 0 },		/* 33 = access */
-	{ ns(struct sys_chflags_args), SYCALL_ARG_PTR,
-	(sy_call_t *)sys_chflags, 0, 0 },		/* 34 = chflags */
-	{ ns(struct sys_fchflags_args), 0,
-	

CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 20:39:11 UTC 2015

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
Use modern initializers, so we can skip the 0 ones.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/kern/makesyscalls.sh

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



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 20:39:11 UTC 2015

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
Use modern initializers, so we can skip the 0 ones.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/kern/makesyscalls.sh

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/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.146 src/sys/kern/makesyscalls.sh:1.147
--- src/sys/kern/makesyscalls.sh:1.146	Sat Mar  7 11:38:07 2015
+++ src/sys/kern/makesyscalls.sh	Sat Mar  7 15:39:11 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.146 2015/03/07 16:38:07 christos Exp $
+#	$NetBSD: makesyscalls.sh,v 1.147 2015/03/07 20:39:11 christos Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -66,6 +66,9 @@ rumpcalls=/dev/null
 rumpcallshdr=/dev/null
 rumpsysmap=/dev/null
 rumpsysent=rumpsysent.tmp
+rumpnoflags=\n\t\t.sy_flags = SYCALL_NOSYS,
+rumpnosys=(sy_call_t *)rumpns_enosys
+rumpnomodule=(sy_call_t *)rumpns_sys_nomodule
 . ./$1
 
 # tmp files:
@@ -191,7 +194,7 @@ BEGIN {
 
 	printf \n#define\ts(type)\tsizeof(type)\n  sysent
 	printf #define\tn(type)\t(sizeof(type)/sizeof (%s))\n, registertype  sysent
-	printf #define\tns(type)\tn(type), s(type)\n\n, registertype  sysent
+	printf #define\tns(type)\t.sy_narg = n(type), .sy_argsize = s(type)\n\n, registertype  sysent
 	printf struct sysent %s[] = {\n,switchname  sysent
 
 	printf /* %s */\n\n, tag  sysnames
@@ -421,6 +424,10 @@ function parserr(was, wanted) {
 	print
 	exit 1
 }
+function fillerpsysent(syscall, flags, name, comment) {
+	return sprintf(\t{%s\n\t\t.sy_call = %s,\n\t},\t\t/* %d = filler */\n,\
+	flags, name, syscall, comment);
+}
 function parseline() {
 	f=3			# toss number and type
 	if ($2 == INDIR)
@@ -666,33 +673,26 @@ function printproto(wrap) {
 }
 
 function printrumpsysent(insysent, compatwrap) {
+	if (modular) {
+		fn = rumpnomodule
+		flags = rumpnoflags
+	} else {
+		fn = rumpnosys
+		flags = 
+	}
 	if (!insysent) {
-		eno[0] = rumpns_enosys
-		eno[1] = rumpns_sys_nomodule
-		flags[0] = SYCALL_NOSYS
-		flags[1] = 0
-		printf(\t{ 0, 0, %s,\n\t(sy_call_t *)%s, 0, 0 }, \t	\
-		/* %d = %s */\n,	\
-		flags[modular], eno[modular], syscall, funcalias)	\
-		 rumpsysent
+		printf(\t{%s\n\t\t.sy_call = %s,\n},\t\t/* %d = %s */\n, \
+		flags, fn, syscall, funcalias)  rumpsysent
 		return
 	}
 
-	printf(\t{ )  rumpsysent
-	if (argc == 0) {
-		printf(0, 0, )  rumpsysent
-	} else {
-		printf(ns(struct %ssys_%s_args), , compatwrap_, funcalias)  rumpsysent
+	printf(\t{)  rumpsysent
+	if (argc != 0) {
+		printf(\n\t\tns(struct %ssys_%s_args),, compatwrap_, funcalias)  rumpsysent
 	}
 
-	if (modular)
-		fn=(sy_call_t *)rumpns_sys_nomodule
-	else
-		fn=(sy_call_t *)rumpns_enosys
-	printf(0,\n\t   %s, 0, 0 },, fn)  rumpsysent
-	for (i = 0; i  (33 - length(fn)) / 8; i++)
-		printf(\t)  rumpsysent
-	printf(/* %d = %s%s */\n, syscall, compatwrap_, funcalias)  rumpsysent
+	printf(\n\t\t.sy_call = %s,\n\t},, fn)  rumpsysent
+	printf(\t\t/* %d = %s%s */\n, syscall, compatwrap_, funcalias)  rumpsysent
 }
 
 function iscompattype(type) {
@@ -780,11 +780,9 @@ function putent(type, compatwrap) {
 	}
 
 	# output syscall switch entry
-	printf(\t{ )  sysent
-	if (argc == 0) {
-		printf(0, 0, )  sysent
-	} else {
-		printf(ns(struct %s%s_args), , compatwrap_, funcname)  sysent
+	printf(\t{\n\t\t)  sysent
+	if (argc != 0) {
+		printf(ns(struct %s%s_args),, compatwrap_, funcname)  sysent
 	}
 	if (modular) 
 		wfn = sys_nomodule;
@@ -793,10 +791,12 @@ function putent(type, compatwrap) {
 	else
 		wfn = compatwrap ( funcname );
 	wfn_cast=(sy_call_t *) wfn
-	printf(%s,\n\t%s, 0, 0 },, sycall_flags, wfn_cast)  sysent
-	for (i = 0; i  (33 - length(wfn_cast)) / 8; i++)
-		printf(\t)  sysent
-	printf(/* %d = %s%s */\n, syscall, compatwrap_, funcalias)  sysent
+	if (sycall_flags != 0)
+		flags = \n\t\t.sy_flags =  sycall_flags ,
+	else
+		flags = 
+	printf(%s\n\t\t.sy_call = %s\n\t},, flags, wfn_cast)  sysent
+	printf(\t\t/* %d = %s%s */\n, syscall, compatwrap_, funcalias)  sysent
 
 	# output syscall name for names table
 	printf(\t/* %3d */\t\%s%s\,\n, syscall, compatwrap_, funcalias) \
@@ -986,10 +986,8 @@ $2 == OBSOL || $2 == UNIMPL || $2 ==
 	else
 		sys_stub = sys_nosys;
 
-	printf(\t{ 0, 0, 0,\n\t%s, 0, 0 },\t\t\t/* %d = %s */\n, \
-	sys_stub, syscall, comment)  sysent
-	printf(\t{ 0, 0, SYCALL_NOSYS,\n\t%s, 0, 0 },\t\t/* %d = %s */\n, \
-	(sy_call_t *)rumpns_enosys, syscall, comment)  rumpsysent
+	fillerpsysent(syscall, , sys_stub, comment)  sysent
+	fillerpsysent(syscall, rumpnoflags, rumpnosys, comment)  rumpsysent
 	printf(\t/* %3d */\t\#%d (%s)\,\n, syscall, syscall, comment) \
 	 sysnamesbottom
 	if ($2 != UNIMPL)
@@ -1053,10 +1051,8 @@ END {
 			exit 1
 		}
 		while (syscall  nsysent) {
-		

CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 20:40:00 UTC 2015

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/sys/kern/init_sysent.c

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



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

2015-03-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar  7 22:15:50 UTC 2015

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

Log Message:
Add missing locking in ehci_device_fs_isoc_transfer


To generate a diff of this commit:
cvs rdiff -u -r1.234.2.39 -r1.234.2.40 src/sys/dev/usb/ehci.c

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

Modified files:

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.234.2.39 src/sys/dev/usb/ehci.c:1.234.2.40
--- src/sys/dev/usb/ehci.c:1.234.2.39	Thu Mar  5 20:57:07 2015
+++ src/sys/dev/usb/ehci.c	Sat Mar  7 22:15:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.234.2.39 2015/03/05 20:57:07 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.234.2.40 2015/03/07 22:15:50 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.234.2.39 2015/03/05 20:57:07 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.234.2.40 2015/03/07 22:15:50 skrll Exp $);
 
 #include ohci.h
 #include uhci.h
@@ -4049,9 +4049,13 @@ ehci_device_intr_done(usbd_xfer_handle x
 Static usbd_status
 ehci_device_fs_isoc_transfer(usbd_xfer_handle xfer)
 {
+	ehci_softc_t *sc = xfer-ux_pipe-up_dev-ud_bus-ub_hcpriv;
 	usbd_status err;
 
+	mutex_enter(sc-sc_lock);
 	err = usb_insert_transfer(xfer);
+	mutex_exit(sc-sc_lock);
+
 	if (err  err != USBD_IN_PROGRESS)
 		return err;
 



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

2015-03-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar  7 22:15:50 UTC 2015

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

Log Message:
Add missing locking in ehci_device_fs_isoc_transfer


To generate a diff of this commit:
cvs rdiff -u -r1.234.2.39 -r1.234.2.40 src/sys/dev/usb/ehci.c

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



CVS commit: src/external/bsd/wpa/dist/src/ap

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar  7 22:31:24 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/ap: ap_drv_ops.c

Log Message:
prevent coredump from the distributed config file.
XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/wpa/dist/src/ap/ap_drv_ops.c

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

Modified files:

Index: src/external/bsd/wpa/dist/src/ap/ap_drv_ops.c
diff -u src/external/bsd/wpa/dist/src/ap/ap_drv_ops.c:1.1.1.4 src/external/bsd/wpa/dist/src/ap/ap_drv_ops.c:1.2
--- src/external/bsd/wpa/dist/src/ap/ap_drv_ops.c:1.1.1.4	Thu Oct 16 15:16:05 2014
+++ src/external/bsd/wpa/dist/src/ap/ap_drv_ops.c	Sat Mar  7 17:31:24 2015
@@ -569,7 +569,8 @@ int hostapd_set_freq(struct hostapd_data
 {
 	struct hostapd_freq_params data;
 
-	if (hostapd_set_freq_params(data, mode, freq, channel, ht_enabled,
+	if (hapd-iface-current_mode 
+	hostapd_set_freq_params(data, mode, freq, channel, ht_enabled,
 vht_enabled, sec_channel_offset,
 vht_oper_chwidth,
 center_segment0, center_segment1,
@@ -765,7 +766,8 @@ int hostapd_start_dfs_cac(struct hostapd
 		return -1;
 	}
 
-	if (hostapd_set_freq_params(data, mode, freq, channel, ht_enabled,
+	if (iface-current_mode 
+	hostapd_set_freq_params(data, mode, freq, channel, ht_enabled,
 vht_enabled, sec_channel_offset,
 vht_oper_chwidth, center_segment0,
 center_segment1,



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

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 21:35:10 UTC 2015

Modified Files:
src/sys/arch/evbarm/conf: ODROID-C1

Log Message:
add amlogicrng, add commented-out genfb placeholder


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/ODROID-C1

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

Modified files:

Index: src/sys/arch/evbarm/conf/ODROID-C1
diff -u src/sys/arch/evbarm/conf/ODROID-C1:1.6 src/sys/arch/evbarm/conf/ODROID-C1:1.7
--- src/sys/arch/evbarm/conf/ODROID-C1:1.6	Wed Mar  4 12:36:12 2015
+++ src/sys/arch/evbarm/conf/ODROID-C1	Sat Mar  7 21:35:10 2015
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: ODROID-C1,v 1.6 2015/03/04 12:36:12 jmcneill Exp $
+#	$NetBSD: ODROID-C1,v 1.7 2015/03/07 21:35:10 jmcneill Exp $
 #
 #	Odroid-C1 (Amlogic S805) based SBC (Single Board Computer)
 #
@@ -175,6 +175,24 @@ amlogicio0	at mainbus?
 amlogiccom0	at amlogicio0 port 0
 options 	CONSADDR=0xc81004c0, CONSPEED=115200
 
+# Framebuffer
+#genfb0		at amlogicio0
+#wsdisplay*	at genfb?
+#options 	VCONS_DRAW_INTR
+#options 	WSEMUL_VT100
+#options 	WS_DEFAULT_FG=WSCOL_WHITE
+#options 	WS_DEFAULT_BG=WSCOL_BLACK
+#options 	WS_KERNEL_FG=WSCOL_GREEN
+#options 	WS_KERNEL_BG=WSCOL_BLACK
+#options 	WSDISPLAY_COMPAT_PCVT
+#options 	WSDISPLAY_COMPAT_SYSCONS
+#options 	WSDISPLAY_COMPAT_USL
+#options 	WSDISPLAY_COMPAT_RAWKBD
+#options 	WSDISPLAY_DEFAULTSCREENS=4
+
+# Hardware random number generator
+amlogicrng0	at amlogicio0
+
 # Gigabit ethernet
 awge0		at amlogicio0
 rgephy*		at mii? phy ?



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

2015-03-07 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Mar  7 21:35:10 UTC 2015

Modified Files:
src/sys/arch/evbarm/conf: ODROID-C1

Log Message:
add amlogicrng, add commented-out genfb placeholder


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/ODROID-C1

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



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  8 01:17:42 UTC 2015

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

Log Message:
Fix thinko


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/kern/kern_module.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/kern_module.c
diff -u src/sys/kern/kern_module.c:1.104 src/sys/kern/kern_module.c:1.105
--- src/sys/kern/kern_module.c:1.104	Sat Mar  7 18:20:19 2015
+++ src/sys/kern/kern_module.c	Sat Mar  7 20:17:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.104 2015/03/07 23:20:19 christos Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.105 2015/03/08 01:17:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.104 2015/03/07 23:20:19 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.105 2015/03/08 01:17:42 christos Exp $);
 
 #define _MODULE_INTERNAL
 
@@ -967,7 +967,7 @@ module_do_load(const char *name, bool is
 			 * print an error if they are missing.
 			 */
 			if ((modclass != MODULE_CLASS_EXEC || error != ENOENT)
-			 root_device != NODEV)
+			 root_device != NULL)
 module_error(vfs load failed for `%s', 
 error %d, name, error);
 #endif



CVS commit: src/sys/kern

2015-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  8 01:17:42 UTC 2015

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

Log Message:
Fix thinko


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

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



  1   2   >