re: CVS commit: src/sys

2015-05-21 Thread matthew green

Tyler R. Retzlaff writes:
 Module Name:  src
 Committed By: rtr
 Date: Thu May 21 02:04:22 UTC 2015
 
 Modified Files:
   src/sys/kern: subr_tftproot.c
   src/sys/nfs: krpc_subr.c nfs_boot.c nfs_bootdhcp.c nfsdiskless.h
 
 Log Message:
 change nfs_boot_sendrecv to take sockaddr_in * instead of mbuf *
 
 fixes m_serv (single mbuf leak) leak in kern/subr_tftproot.c

nfs can be a module; does this require a version bump?


.mrg.


CVS commit: src/sys/ddb

2015-05-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu May 21 08:23:22 UTC 2015

Modified Files:
src/sys/ddb: db_command.c

Log Message:
only call the on-enter commands if we're not recursing.
avoids having a fault in the on-enter commands repeating.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/ddb/db_command.c

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



CVS commit: src/sys/ddb

2015-05-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu May 21 08:23:22 UTC 2015

Modified Files:
src/sys/ddb: db_command.c

Log Message:
only call the on-enter commands if we're not recursing.
avoids having a fault in the on-enter commands repeating.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/ddb/db_command.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/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.144 src/sys/ddb/db_command.c:1.145
--- src/sys/ddb/db_command.c:1.144	Sun Feb  8 19:41:39 2015
+++ src/sys/ddb/db_command.c	Thu May 21 08:23:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.144 2015/02/08 19:41:39 christos Exp $	*/
+/*	$NetBSD: db_command.c,v 1.145 2015/05/21 08:23:22 mrg Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_command.c,v 1.144 2015/02/08 19:41:39 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_command.c,v 1.145 2015/05/21 08:23:22 mrg Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_aio.h
@@ -549,8 +549,13 @@ db_command_loop(void)
 	db_recover = db_jmpbuf;
 	(void) setjmp(db_jmpbuf);
 
-	/* Execute default ddb start commands */
-	db_execute_commandlist(db_cmd_on_enter);
+	/*
+	 * Execute default ddb start commands only if this is the
+	 * first entry into DDB, in case the start commands fault
+	 * and we recurse into here.
+	 */
+	if (!savejmp)
+		db_execute_commandlist(db_cmd_on_enter);
 
 	(void) setjmp(db_jmpbuf);
 	while (!db_cmd_loop_done) {



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

2015-05-21 Thread SUENAGA Hiroki
On 2015/05/20 2:30, Matt Thomas wrote:
 
 On May 19, 2015, at 2:20 AM, SUENAGA Hiroki hsuen...@netbsd.org wrote:

 Module Name: src
 Committed By:hsuenaga
 Date:Tue May 19 09:20:19 UTC 2015

 Modified Files:
  src/sys/arch/arm/arm: cpufunc_asm_pj4b.S
  src/sys/arch/arm/marvell: armadaxp.c mvsocreg.h

 Log Message:
 fix Marvell Coherency Barrier register address.
 configure coherency bus maintance broadcast using MPIDR. we need to configure
 this regardless of 'options MULTIPROCESSOR.'
 
 Please move the MPIDR defines to arm/armreg.h and use __BIT or __BITS.

Done for implementation neutral(just rewrite to use __BIT/__BITS),
Cortex A9 implementation, and PJ4B implementation.

-- 
SUENAGA Hiroki hsuen...@netbsd.net
PGP: 66B3 8939 6758 20BA F243  89EC 557A 8CFB ABA9 5E92


CVS commit: src/sys/netinet

2015-05-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu May 21 09:27:10 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
Use NULL instead of 0 for pointers


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/netinet/if_arp.c

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



CVS commit: src/sys/netinet

2015-05-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu May 21 09:26:19 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c if_inarp.h

Log Message:
Make arp_init, in_revarpinput and revarprequest static


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.46 -r1.47 src/sys/netinet/if_inarp.h

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



CVS commit: src/sys/netinet

2015-05-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu May 21 09:26:19 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c if_inarp.h

Log Message:
Make arp_init, in_revarpinput and revarprequest static


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.46 -r1.47 src/sys/netinet/if_inarp.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/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.165 src/sys/netinet/if_arp.c:1.166
--- src/sys/netinet/if_arp.c:1.165	Sat May 16 12:12:46 2015
+++ src/sys/netinet/if_arp.c	Thu May 21 09:26:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.165 2015/05/16 12:12:46 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.166 2015/05/21 09:26:18 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.165 2015/05/16 12:12:46 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.166 2015/05/21 09:26:18 ozaki-r Exp $);
 
 #include opt_ddb.h
 #include opt_inet.h
@@ -152,6 +152,8 @@ static int	arp_debug = 0;
 #endif
 #define arplog(x)	do { if (arp_debug) log x; } while (/*CONSTCOND*/ 0)
 
+static	void arp_init(void);
+
 static	struct sockaddr *arp_setgate(struct rtentry *, struct sockaddr *,
 	const struct sockaddr *);
 static	void arptfree(struct llinfo_arp *);
@@ -161,6 +163,9 @@ static	struct llinfo_arp *arplookup1(str
 static	struct llinfo_arp *arplookup(struct mbuf *, const struct in_addr *,
 	  int, int);
 static	void in_arpinput(struct mbuf *);
+static	void in_revarpinput(struct mbuf *);
+static	void revarprequest(struct ifnet *);
+
 static	void arp_drainstub(void);
 
 static void arp_dad_timer(struct ifaddr *);

Index: src/sys/netinet/if_inarp.h
diff -u src/sys/netinet/if_inarp.h:1.46 src/sys/netinet/if_inarp.h:1.47
--- src/sys/netinet/if_inarp.h:1.46	Sat May 16 12:12:46 2015
+++ src/sys/netinet/if_inarp.h	Thu May 21 09:26:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_inarp.h,v 1.46 2015/05/16 12:12:46 roy Exp $	*/
+/*	$NetBSD: if_inarp.h,v 1.47 2015/05/21 09:26:18 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -80,14 +80,11 @@ int arpresolve(struct ifnet *, struct rt
 void arpintr(void);
 void arprequest(struct ifnet *, const struct in_addr *, const struct in_addr *,
 const u_int8_t *);
-void arp_init(void);
 void arp_drain(void);
 int arpioctl(u_long, void *);
 void arpwhohas(struct ifnet *, struct in_addr *);
 
 void revarpinput(struct mbuf *);
-void in_revarpinput(struct mbuf *);
-void revarprequest(struct ifnet *);
 int revarpwhoarewe(struct ifnet *, struct in_addr *, struct in_addr *);
 #endif
 



CVS commit: src/sys/netinet

2015-05-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu May 21 09:29:51 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
Use LIST_FOREACH{,_SAFE}

The first loop doesn't remove any items in it, so we can use
LIST_FOREACH instead of LIST_FOREACH_SAFE.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/netinet/if_arp.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/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.167 src/sys/netinet/if_arp.c:1.168
--- src/sys/netinet/if_arp.c:1.167	Thu May 21 09:27:10 2015
+++ src/sys/netinet/if_arp.c	Thu May 21 09:29:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.167 2015/05/21 09:27:10 ozaki-r Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.168 2015/05/21 09:29:51 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.167 2015/05/21 09:27:10 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.168 2015/05/21 09:29:51 ozaki-r Exp $);
 
 #include opt_ddb.h
 #include opt_inet.h
@@ -378,7 +378,7 @@ arp_drainstub(void)
 void
 arp_drain(void)
 {
-	struct llinfo_arp *la, *nla;
+	struct llinfo_arp *la;
 	int count = 0;
 	struct mbuf *mold;
 
@@ -389,9 +389,7 @@ arp_drain(void)
 		return;
 	}
 
-	for (la = LIST_FIRST(llinfo_arp); la != NULL; la = nla) {
-		nla = LIST_NEXT(la, la_list);
-
+	LIST_FOREACH(la, llinfo_arp, la_list) {
 		mold = la-la_hold;
 		la-la_hold = NULL;
 
@@ -426,10 +424,9 @@ arptimer(void *arg)
 	}
 
 	callout_reset(arptimer_ch, arpt_prune * hz, arptimer, NULL);
-	for (la = LIST_FIRST(llinfo_arp); la != NULL; la = nla) {
+	LIST_FOREACH_SAFE(la, llinfo_arp, la_list, nla) {
 		struct rtentry *rt = la-la_rt;
 
-		nla = LIST_NEXT(la, la_list);
 		if (rt-rt_expire == 0)
 			continue;
 		if ((rt-rt_expire - time_second)  arpt_refresh 



CVS commit: src/sys/netinet

2015-05-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu May 21 09:27:10 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
Use NULL instead of 0 for pointers


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/netinet/if_arp.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/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.166 src/sys/netinet/if_arp.c:1.167
--- src/sys/netinet/if_arp.c:1.166	Thu May 21 09:26:18 2015
+++ src/sys/netinet/if_arp.c	Thu May 21 09:27:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.166 2015/05/21 09:26:18 ozaki-r Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.167 2015/05/21 09:27:10 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.166 2015/05/21 09:26:18 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.167 2015/05/21 09:27:10 ozaki-r Exp $);
 
 #include opt_ddb.h
 #include opt_inet.h
@@ -393,7 +393,7 @@ arp_drain(void)
 		nla = LIST_NEXT(la, la_list);
 
 		mold = la-la_hold;
-		la-la_hold = 0;
+		la-la_hold = NULL;
 
 		if (mold) {
 			m_freem(mold);
@@ -742,7 +742,7 @@ arp_rtrequest(int req, struct rtentry *r
 
 		s = splnet();
 		mold = la-la_hold;
-		la-la_hold = 0;
+		la-la_hold = NULL;
 		splx(s);
 
 		if (mold)
@@ -923,7 +923,7 @@ arpintr(void)
 		s = splnet();
 		IF_DEQUEUE(arpintrq, m);
 		splx(s);
-		if (m == 0 || (m-m_flags  M_PKTHDR) == 0)
+		if (m == NULL || (m-m_flags  M_PKTHDR) == 0)
 			panic(arpintr);
 
 		MCLAIM(m, arpdomain.dom_mowner);
@@ -1243,7 +1243,7 @@ in_arpinput(struct mbuf *m)
 
 		s = splnet();
 		mold = la-la_hold;
-		la-la_hold = 0;
+		la-la_hold = NULL;
 		splx(s);
 
 		if (mold) {



CVS commit: src/sys/netinet

2015-05-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu May 21 09:29:51 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
Use LIST_FOREACH{,_SAFE}

The first loop doesn't remove any items in it, so we can use
LIST_FOREACH instead of LIST_FOREACH_SAFE.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/netinet/if_arp.c

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



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

2015-05-21 Thread Hisashi T Fujinaka
Module Name:src
Committed By:   htodd
Date:   Thu May 21 18:03:09 UTC 2015

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

Log Message:
Fix debug build lists.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/xdebug/md.amd64

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

Modified files:

Index: src/distrib/sets/lists/xdebug/md.amd64
diff -u src/distrib/sets/lists/xdebug/md.amd64:1.11 src/distrib/sets/lists/xdebug/md.amd64:1.12
--- src/distrib/sets/lists/xdebug/md.amd64:1.11	Sun Mar  1 07:46:04 2015
+++ src/distrib/sets/lists/xdebug/md.amd64	Thu May 21 18:03:09 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.11 2015/03/01 07:46:04 mrg Exp $
+# $NetBSD: md.amd64,v 1.12 2015/05/21 18:03:09 htodd Exp $
 ./usr/X11R7/lib/libI810XvMC_g.a-unknown-	debuglib,xorg
 ./usr/X11R7/lib/libIntelXvMC_g.a			-unknown-	debuglib,xorg
 ./usr/X11R7/lib/libchromeXvMCPro_g.a			-unknown-	debuglib,xorg
@@ -83,8 +83,8 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ark_drv.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ast_drv.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ati_drv.so.6.debug	-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7017_drv.so.2.debug	-unknown-		xorg,debug,obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2.debug	-unknown-		xorg,debug,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7017_drv.so.2.debug	-unknown-		xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/chips_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/cirrus_alpine.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/cirrus_drv.so.1.debug	-unknown-		xorg,debug
@@ -92,8 +92,9 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/glint_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/i128_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/i740_drv.so.1.debug	-unknown-		xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/intel_drv_old.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/intel_drv.so.2.debug	-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ivch_drv.so.2.debug	-unknown-		xorg,debug,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ivch_drv.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/kbd_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libapm_drv.so.1.debug	obsolete		xorg,obsolete
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libark_drv.so.0.debug	obsolete		xorg,obsolete
@@ -152,11 +153,11 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/s3_drv.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/s3virge_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/savage_drv.so.2.debug	-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sil164_drv.so.2.debug	-unknown-		xorg,debug,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sil164_drv.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/siliconmotion_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sis_drv.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tdfx_drv.so.1.debug	-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tfp410_drv.so.2.debug	-unknown-		xorg,debug,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tfp410_drv.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tga_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/trident_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tseng_drv.so.1.debug	-unknown-		xorg,debug



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

2015-05-21 Thread Hisashi T Fujinaka
Module Name:src
Committed By:   htodd
Date:   Thu May 21 18:03:09 UTC 2015

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

Log Message:
Fix debug build lists.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/xdebug/md.amd64

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



CVS commit: src/sys/dev/filemon

2015-05-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 21 12:00:59 UTC 2015

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

Log Message:
Avoid dereferencing NULL tp crashing the kernel (brad harder)
XXX: pullup 7


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/filemon/filemon.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/filemon/filemon.c
diff -u src/sys/dev/filemon/filemon.c:1.8 src/sys/dev/filemon/filemon.c:1.9
--- src/sys/dev/filemon/filemon.c:1.8	Fri Jul 25 04:10:36 2014
+++ src/sys/dev/filemon/filemon.c	Thu May 21 08:00:59 2015
@@ -24,7 +24,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: filemon.c,v 1.8 2014/07/25 08:10:36 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: filemon.c,v 1.9 2015/05/21 12:00:59 christos Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -307,12 +307,15 @@ filemon_ioctl(struct file * fp, u_long c
 		mutex_enter(proc_lock);
 		tp = proc_find(*((pid_t *) data));
 		mutex_exit(proc_lock);
+		if (tp == NULL) {
+			error = ESRCH;
+			break;
+		}
 		error = kauth_authorize_process(curproc-p_cred,
 		KAUTH_PROCESS_CANSEE, tp,
 		KAUTH_ARG(KAUTH_REQ_PROCESS_CANSEE_ENTRY), NULL, NULL);
 		if (!error) {
 			filemon-fm_pid = tp-p_pid;
-
 		}
 		break;
 



Re: CVS commit: src/sys/sys

2015-05-21 Thread Joerg Sonnenberger
On Tue, May 19, 2015 at 11:35:11PM +, Taylor R Campbell wrote:
 Module Name:  src
 Committed By: riastradh
 Date: Tue May 19 23:35:11 UTC 2015
 
 Modified Files:
   src/sys/sys: time.h
 
 Log Message:
 Avoid C99 initializers outside _KERNEL.

Two comments. First: C99 initializers are not valid C++, which makes it
even more problematic. Second, can't you just write them as plain struct
init? It's unlikely that the structures will grow more entries after
all...

Joerg


CVS commit: src/sys/dev/filemon

2015-05-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 21 12:00:59 UTC 2015

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

Log Message:
Avoid dereferencing NULL tp crashing the kernel (brad harder)
XXX: pullup 7


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/filemon/filemon.c

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



Re: CVS commit: src/sys

2015-05-21 Thread Tyler Retzlaff


On 5/21/2015 4:20 AM, matthew green wrote:

Tyler R. Retzlaff writes:

Module Name:src
Committed By:   rtr
Date:   Thu May 21 02:04:22 UTC 2015

Modified Files:
src/sys/kern: subr_tftproot.c
src/sys/nfs: krpc_subr.c nfs_boot.c nfs_bootdhcp.c nfsdiskless.h

Log Message:
change nfs_boot_sendrecv to take sockaddr_in * instead of mbuf *

fixes m_serv (single mbuf leak) leak in kern/subr_tftproot.c


nfs can be a module; does this require a version bump?


I couldn't see how it could be used from a module sensibly so I opted 
not to bump.


But as you know with everything exported anything is possible.

Would you like me to bump?

rtr


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

2015-05-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 21 20:50:57 UTC 2015

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
Before spinning up the secondary cpus flush the dcache otherwise the
dcache invalidate in cortex_mpstart makes bad things happen.

I have no idea why.

RPI2 boots again


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/evbarm/rpi/rpi_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/evbarm/rpi

2015-05-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 21 20:50:57 UTC 2015

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
Before spinning up the secondary cpus flush the dcache otherwise the
dcache invalidate in cortex_mpstart makes bad things happen.

I have no idea why.

RPI2 boots again


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/evbarm/rpi/rpi_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.63 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.64
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.63	Thu May 21 10:35:08 2015
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Thu May 21 20:50:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.63 2015/05/21 10:35:08 jmcneill Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.64 2015/05/21 20:50:57 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.63 2015/05/21 10:35:08 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.64 2015/05/21 20:50:57 skrll Exp $);
 
 #include opt_arm_debug.h
 #include opt_bcm283x.h
@@ -503,6 +503,8 @@ rpi_bootstrap(void)
 
 	extern void cortex_mpstart(void);
 
+	cpu_dcache_wbinv_all();
+
 	for (size_t i = 1; i  arm_cpu_max; i++) {
 		bus_space_tag_t iot = bcm2835_bs_tag;
 		bus_space_handle_t ioh = BCM2836_ARM_LOCAL_VBASE;



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

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 21 09:53:05 UTC 2015

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

Log Message:
add drvctl


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

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/conf

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 21 09:53:05 UTC 2015

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

Log Message:
add drvctl


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

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/ERLITE
diff -u src/sys/arch/evbmips/conf/ERLITE:1.7 src/sys/arch/evbmips/conf/ERLITE:1.8
--- src/sys/arch/evbmips/conf/ERLITE:1.7	Tue May 19 02:30:57 2015
+++ src/sys/arch/evbmips/conf/ERLITE	Thu May 21 09:53:05 2015
@@ -1,11 +1,11 @@
-#	$NetBSD: ERLITE,v 1.7 2015/05/19 02:30:57 matt Exp $
+#	$NetBSD: ERLITE,v 1.8 2015/05/21 09:53:05 jmcneill Exp $
 
 include 	arch/mips/conf/std.octeon
 include 	arch/evbmips/conf/files.octeon
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		ERLITE-$Revision: 1.7 $
+#ident 		ERLITE-$Revision: 1.8 $
 
 maxusers	32
 
@@ -174,6 +174,7 @@ pseudo-device	loop# network loopback
 pseudo-device	pty# pseudo-terminals
 pseudo-device	clockctl			# user control of clock subsystem
 pseudo-device	ksyms# /dev/ksyms
+pseudo-device	drvctl# driver control
 
 # A pseudo device needed for Coda		# also needs CODA (above)
 #pseudo-device	vcoda# coda minicache - venus comm.



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

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 21 10:35:08 UTC 2015

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
re-enable multiprocessor support now that sdmmc has been fixed


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/evbarm/rpi/rpi_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.62 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.63
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.62	Fri May  1 09:59:11 2015
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Thu May 21 10:35:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.62 2015/05/01 09:59:11 skrll Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.63 2015/05/21 10:35:08 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.62 2015/05/01 09:59:11 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.63 2015/05/21 10:35:08 jmcneill Exp $);
 
 #include opt_arm_debug.h
 #include opt_bcm283x.h
@@ -534,11 +534,6 @@ rpi_bootstrap(void)
 			__func__, i);
 		}
 	}
-
-	/*
-	 * XXXNH: Disable non-boot CPUs for now
-	 */
-	arm_cpu_hatched = 0;
 #endif
 }
 



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

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 21 10:35:08 UTC 2015

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
re-enable multiprocessor support now that sdmmc has been fixed


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/evbarm/rpi/rpi_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/external/bsd/drm2

2015-05-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 21 21:55:55 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/include/linux: ww_mutex.h
src/sys/external/bsd/drm2/linux: linux_ww_mutex.c

Log Message:
Adapt ww_mutex to use LOCKDEBUG.

Should help track down PR 49862.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/drm2/include/linux/ww_mutex.h
cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/linux/linux_ww_mutex.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/external/bsd/drm2/include/linux/ww_mutex.h
diff -u src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.10 src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.11
--- src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.10	Thu Jan  8 23:35:47 2015
+++ src/sys/external/bsd/drm2/include/linux/ww_mutex.h	Thu May 21 21:55:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ww_mutex.h,v 1.10 2015/01/08 23:35:47 riastradh Exp $	*/
+/*	$NetBSD: ww_mutex.h,v 1.11 2015/05/21 21:55:55 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -56,7 +56,6 @@ struct ww_acquire_ctx {
 };
 
 struct ww_mutex {
-	kmutex_t		wwm_lock;
 	enum ww_mutex_state {
 		WW_UNLOCKED,	/* nobody owns it */
 		WW_OWNED,	/* owned by a lwp without a context */
@@ -67,9 +66,17 @@ struct ww_mutex {
 		struct lwp		*owner;
 		struct ww_acquire_ctx	*ctx;
 	}			wwm_u;
+	/*
+	 * XXX wwm_lock must *not* be first, so that the ww_mutex has a
+	 * different address from the kmutex for LOCKDEBUG purposes.
+	 */
+	kmutex_t		wwm_lock;
 	struct ww_class		*wwm_class;
 	struct rb_tree		wwm_waiters;
 	kcondvar_t		wwm_cv;
+#ifdef LOCKDEBUG
+	bool			wwm_debug;
+#endif
 };
 
 /* XXX Make the nm output a little more greppable...  */

Index: src/sys/external/bsd/drm2/linux/linux_ww_mutex.c
diff -u src/sys/external/bsd/drm2/linux/linux_ww_mutex.c:1.1 src/sys/external/bsd/drm2/linux/linux_ww_mutex.c:1.2
--- src/sys/external/bsd/drm2/linux/linux_ww_mutex.c:1.1	Thu Jan  8 23:35:47 2015
+++ src/sys/external/bsd/drm2/linux/linux_ww_mutex.c	Thu May 21 21:55:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_ww_mutex.c,v 1.1 2015/01/08 23:35:47 riastradh Exp $	*/
+/*	$NetBSD: linux_ww_mutex.c,v 1.2 2015/05/21 21:55:55 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,17 +30,28 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_ww_mutex.c,v 1.1 2015/01/08 23:35:47 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_ww_mutex.c,v 1.2 2015/05/21 21:55:55 riastradh Exp $);
 
 #include sys/types.h
 #include sys/atomic.h
 #include sys/condvar.h
+#include sys/lockdebug.h
 #include sys/lwp.h
 #include sys/mutex.h
 #include sys/rbtree.h
 
 #include linux/ww_mutex.h
 
+#define	WW_WANTLOCK(WW)			  \
+	LOCKDEBUG_WANTLOCK((WW)-wwm_debug, (WW),			  \
+	(uintptr_t)__builtin_return_address(0), 0)
+#define	WW_LOCKED(WW)			  \
+	LOCKDEBUG_LOCKED((WW)-wwm_debug, (WW), NULL,			  \
+	(uintptr_t)__builtin_return_address(0), 0)
+#define	WW_UNLOCKED(WW)			  \
+	LOCKDEBUG_UNLOCKED((WW)-wwm_debug, (WW),			  \
+	(uintptr_t)__builtin_return_address(0), 0)
+
 static int
 ww_acquire_ctx_compare(void *cookie __unused, const void *va, const void *vb)
 {
@@ -109,6 +120,53 @@ ww_acquire_fini(struct ww_acquire_ctx *c
 	ctx-wwx_owner = NULL;
 }
 
+#ifdef LOCKDEBUG
+static void
+ww_dump(volatile void *cookie)
+{
+	volatile struct ww_mutex *mutex = cookie;
+
+	printf_nolog(%-13s: , state);
+	switch (mutex-wwm_state) {
+	case WW_UNLOCKED:
+		printf_nolog(unlocked\n);
+		break;
+	case WW_OWNED:
+		printf_nolog(owned by lwp\n);
+		printf_nolog(%-13s: %p\n, owner, mutex-wwm_u.owner);
+		printf_nolog(%-13s: %s\n, waiters,
+		cv_has_waiters(__UNVOLATILE(mutex-wwm_cv))
+			? yes : no);
+		break;
+	case WW_CTX:
+		printf_nolog(owned via ctx\n);
+		printf_nolog(%-13s: %p\n, context, mutex-wwm_u.ctx);
+		printf_nolog(%-13s: %p\n, lwp,
+		mutex-wwm_u.ctx-wwx_owner);
+		printf_nolog(%-13s: %s\n, waiters,
+		cv_has_waiters(__UNVOLATILE(mutex-wwm_cv))
+			? yes : no);
+		break;
+	case WW_WANTOWN:
+		printf_nolog(owned via ctx\n);
+		printf_nolog(%-13s: %p\n, context, mutex-wwm_u.ctx);
+		printf_nolog(%-13s: %p\n, lwp,
+		mutex-wwm_u.ctx-wwx_owner);
+		printf_nolog(%-13s: %s\n, waiters, yes (noctx));
+		break;
+	default:
+		printf_nolog(unknown\n);
+		break;
+	}
+}
+
+static lockops_t ww_lockops = {
+	.lo_name = Wait/wound mutex,
+	.lo_type = LOCKOPS_SLEEP,
+	.lo_dump = ww_dump,
+};
+#endif
+
 void
 ww_mutex_init(struct ww_mutex *mutex, struct ww_class *class)
 {
@@ -122,12 +180,21 @@ ww_mutex_init(struct ww_mutex *mutex, st
 	mutex-wwm_class = class;
 	rb_tree_init(mutex-wwm_waiters, ww_acquire_ctx_rb_ops);
 	cv_init(mutex-wwm_cv, linuxwwm);
+#ifdef LOCKDEBUG
+	mutex-wwm_debug = LOCKDEBUG_ALLOC(mutex, ww_lockops,
+	(uintptr_t)__builtin_return_address(0));
+#endif
 }
 
 void
 

CVS commit: src/sys/external/bsd/drm2

2015-05-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 21 21:55:55 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/include/linux: ww_mutex.h
src/sys/external/bsd/drm2/linux: linux_ww_mutex.c

Log Message:
Adapt ww_mutex to use LOCKDEBUG.

Should help track down PR 49862.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/drm2/include/linux/ww_mutex.h
cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/linux/linux_ww_mutex.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-05-21 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Thu May 21 22:24:24 UTC 2015

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

Log Message:
bump to 7.99.18 for change to nfs_boot_sendrecv


To generate a diff of this commit:
cvs rdiff -u -r1.479 -r1.480 src/sys/sys/param.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.479 src/sys/sys/param.h:1.480
--- src/sys/sys/param.h:1.479	Mon May 18 06:42:34 2015
+++ src/sys/sys/param.h	Thu May 21 22:24:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.479 2015/05/18 06:42:34 martin Exp $	*/
+/*	$NetBSD: param.h,v 1.480 2015/05/21 22:24:24 rtr Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	799001700	/* NetBSD 7.99.17 */
+#define	__NetBSD_Version__	799001800	/* NetBSD 7.99.18 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)



CVS commit: src/sys/sys

2015-05-21 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Thu May 21 22:24:24 UTC 2015

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

Log Message:
bump to 7.99.18 for change to nfs_boot_sendrecv


To generate a diff of this commit:
cvs rdiff -u -r1.479 -r1.480 src/sys/sys/param.h

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



Re: CVS commit: src/sys

2015-05-21 Thread Tyler Retzlaff



On 5/21/2015 6:08 PM, matthew green wrote:

Tyler Retzlaff writes:


On 5/21/2015 4:20 AM, matthew green wrote:




Would you like me to bump?


pxeboot can load nfs module -- infact, it does it by default.

so yeah, this is actually a real problem :-)


bumped!

rtr


CVS commit: src/sys/dev/sdmmc

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 21 23:40:02 UTC 2015

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

Log Message:
sdmmc_task_thread isn't MPSAFE so instead of just wrapping the callback
in KERNEL_LOCK/KERNEL_UNLOCK_ONE, remove KTHREAD_MPSAFE. While here, use
PRI_BIO instead of PRI_NONE for the task thread priority. Since this is
how all transfers are queued, and we have a 1 second timeout on the task
being picked up off the queue (!), better not to rely on a PRI_NONE thread.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/sdmmc/sdmmc.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/sdmmc/sdmmc.c
diff -u src/sys/dev/sdmmc/sdmmc.c:1.25 src/sys/dev/sdmmc/sdmmc.c:1.26
--- src/sys/dev/sdmmc/sdmmc.c:1.25	Wed May 20 13:09:34 2015
+++ src/sys/dev/sdmmc/sdmmc.c	Thu May 21 23:40:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc.c,v 1.25 2015/05/20 13:09:34 jmcneill Exp $	*/
+/*	$NetBSD: sdmmc.c,v 1.26 2015/05/21 23:40:02 jmcneill Exp $	*/
 /*	$OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $	*/
 
 /*
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdmmc.c,v 1.25 2015/05/20 13:09:34 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdmmc.c,v 1.26 2015/05/21 23:40:02 jmcneill Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_sdmmc.h
@@ -217,7 +217,7 @@ sdmmc_doattach(device_t dev)
 {
 	struct sdmmc_softc *sc = device_private(dev);
 
-	if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL,
+	if (kthread_create(PRI_BIO, 0, NULL,
 	sdmmc_task_thread, sc, sc-sc_tskq_lwp, %s, device_xname(dev))) {
 		aprint_error_dev(dev, couldn't create task thread\n);
 	}
@@ -271,9 +271,7 @@ sdmmc_task_thread(void *arg)
 		if (task != NULL) {
 			sdmmc_del_task1(sc, task);
 			mutex_exit(sc-sc_tskq_mtx);
-			KERNEL_LOCK(1, curlwp);
 			(*task-func)(task-arg);
-			KERNEL_UNLOCK_ONE(curlwp);
 			mutex_enter(sc-sc_tskq_mtx);
 		} else {
 			/* Check for the exit condition. */



CVS commit: src/sys/dev/sdmmc

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 21 23:40:02 UTC 2015

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

Log Message:
sdmmc_task_thread isn't MPSAFE so instead of just wrapping the callback
in KERNEL_LOCK/KERNEL_UNLOCK_ONE, remove KTHREAD_MPSAFE. While here, use
PRI_BIO instead of PRI_NONE for the task thread priority. Since this is
how all transfers are queued, and we have a 1 second timeout on the task
being picked up off the queue (!), better not to rely on a PRI_NONE thread.


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

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



CVS commit: src/distrib/utils/embedded/conf

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri May 22 01:18:22 UTC 2015

Modified Files:
src/distrib/utils/embedded/conf: armv7.conf

Log Message:
add JETSONTK1 to armv7.img


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/utils/embedded/conf/armv7.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/armv7.conf
diff -u src/distrib/utils/embedded/conf/armv7.conf:1.2 src/distrib/utils/embedded/conf/armv7.conf:1.3
--- src/distrib/utils/embedded/conf/armv7.conf:1.2	Sun Apr 19 18:28:31 2015
+++ src/distrib/utils/embedded/conf/armv7.conf	Fri May 22 01:18:22 2015
@@ -1,4 +1,4 @@
-# $NetBSD: armv7.conf,v 1.2 2015/04/19 18:28:31 hubertf Exp $
+# $NetBSD: armv7.conf,v 1.3 2015/05/22 01:18:22 jmcneill Exp $
 # ARMv7 customization script used by mkimage
 #
 board=armv7
@@ -10,6 +10,7 @@ kernels_beagle=BEAGLEBOARD BEAGLEBONE
 kernels_awin=BPI CUBIEBOARD CUBIETRUCK HUMMINGBIRD_A31
 kernels_rpi=RPI2
 kernels_amlogic=ODROID-C1
+kernels_tegra=JETSONTK1
 
 make_label() {
 	make_label_evbarm
@@ -86,11 +87,23 @@ run bootcmd
 EOF
 }
 
+populate_tegra() {
+	jetsontk1_kernelimg=netbsd-JETSONTK1.ub
+
+	# Create a boot.scr for Jetson TK1 U-Boot
+	cat  ${mnt}/boot/boot-JETSONTK1.txt  EOF
+setenv bootargs root=ld1a
+fatload mmc 1:1 0x9000 ${jetsontk1_kernelimg}
+bootm 0x9000
+EOF
+	${MKUBOOTIMAGE} -A arm -C none -O netbsd -T script -a 0 -n NetBSD/tegra boot ${mnt}/boot/boot-JETSONTK1.txt ${mnt}/boot/boot-JETSONTK1.scr
+}
+
 populate() {
 	echo ${bar} looking for kernels in ${kernel} ${bar}
 	kernels=
 	# .ub kernels
-	for k in $kernels_beagle $kernels_awin $kernels_amlogic; do
+	for k in $kernels_beagle $kernels_awin $kernels_amlogic $kernels_tegra; do
 		f=${kernel}/netbsd-${k}.ub.gz
 		test -f ${f}  kernels=${kernels} ${f}
 	done
@@ -119,4 +132,5 @@ populate() {
 	populate_awin
 	populate_rpi
 	populate_amlogic
+	populate_tegra
 }



CVS commit: src/distrib/utils/embedded/conf

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri May 22 01:18:22 UTC 2015

Modified Files:
src/distrib/utils/embedded/conf: armv7.conf

Log Message:
add JETSONTK1 to armv7.img


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/utils/embedded/conf/armv7.conf

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



CVS commit: src/etc/etc.evbarm

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri May 22 01:18:05 UTC 2015

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
define TOOL_MKUBOOTIMAGE for mkimage


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/etc/etc.evbarm/Makefile.inc

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



CVS commit: src/etc/etc.evbarm

2015-05-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri May 22 01:18:05 UTC 2015

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
define TOOL_MKUBOOTIMAGE for mkimage


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/etc/etc.evbarm/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.75 src/etc/etc.evbarm/Makefile.inc:1.76
--- src/etc/etc.evbarm/Makefile.inc:1.75	Fri May 15 06:51:24 2015
+++ src/etc/etc.evbarm/Makefile.inc	Fri May 22 01:18:05 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.75 2015/05/15 06:51:24 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.76 2015/05/22 01:18:05 jmcneill Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -132,6 +132,7 @@ __mkimage: .USE
 	TOOL_GZIP=${TOOL_GZIP} \
 	TOOL_MKNOD=${TOOL_MKNOD} \
 	TOOL_PAX=${TOOL_PAX} \
+	TOOL_MKUBOOTIMAGE=${TOOL_MKUBOOTIMAGE} \
 	TOOL_MTREE=${TOOL_MTREE} \
 	HOST_SH=${HOST_SH} \
 	${HOST_SH} ${MKIMAGE} -x -h ${.TARGET:S/smp_//} -D ${DESTDIR} \



CVS commit: src/sys/dev/pci

2015-05-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 22 03:15:43 UTC 2015

Modified Files:
src/sys/dev/pci: if_wm.c if_wmreg.h

Log Message:
- Currently, WM_F_EEE bit is not set on all chips. it's intened to not
  to use all of EEE fuction but wm_set_eee_i350() leaves IPCNFG_10BASE_TE
  bit and it causes link negotiation problem on some old switches. Disable
  10BASE-Te function, too.
- Call wm_set_eee_i350() on some chips, too.


To generate a diff of this commit:
cvs rdiff -u -r1.321 -r1.322 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/if_wmreg.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/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.321 src/sys/dev/pci/if_wm.c:1.322
--- src/sys/dev/pci/if_wm.c:1.321	Sat May 16 22:41:59 2015
+++ src/sys/dev/pci/if_wm.c	Fri May 22 03:15:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.321 2015/05/16 22:41:59 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.322 2015/05/22 03:15:43 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.321 2015/05/16 22:41:59 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.322 2015/05/22 03:15:43 msaitoh Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_net_mpsafe.h
@@ -3807,7 +3807,7 @@ wm_reset(struct wm_softc *sc)
 	/* reload sc_ctrl */
 	sc-sc_ctrl = CSR_READ(sc, WMREG_CTRL);
 
-	if (sc-sc_type == WM_T_I350)
+	if ((sc-sc_type = WM_T_I350)  (sc-sc_type = WM_T_I211))
 		wm_set_eee_i350(sc);
 
 	/* dummy read from WUC */
@@ -9592,6 +9592,7 @@ wm_set_eee_i350(struct wm_softc *sc)
 		| EEER_LPI_FC);
 	} else {
 		ipcnfg = ~(IPCNFG_EEE_1G_AN | IPCNFG_EEE_100M_AN);
+		ipcnfg = ~IPCNFG_10BASE_TE;
 		eeer = ~(EEER_TX_LPI_EN | EEER_RX_LPI_EN
 		| EEER_LPI_FC);
 	}

Index: src/sys/dev/pci/if_wmreg.h
diff -u src/sys/dev/pci/if_wmreg.h:1.71 src/sys/dev/pci/if_wmreg.h:1.72
--- src/sys/dev/pci/if_wmreg.h:1.71	Sat May 16 22:41:59 2015
+++ src/sys/dev/pci/if_wmreg.h	Fri May 22 03:15:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmreg.h,v 1.71 2015/05/16 22:41:59 msaitoh Exp $	*/
+/*	$NetBSD: if_wmreg.h,v 1.72 2015/05/22 03:15:43 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -639,6 +639,7 @@ struct livengood_tcpip_ctxdesc {
 #define EEER_EEER_TX_LPI_STATUS	0x8000 /* EEER Tx in LPI state */
 #define WMREG_EEE_SU	0x0e34	/* EEE Setup */
 #define WMREG_IPCNFG	0x0e38	/* Internal PHY Configuration */
+#define IPCNFG_10BASE_TE	0x0002 /* IPCNFG 10BASE-Te low power op. */
 #define IPCNFG_EEE_100M_AN	0x0004 /* IPCNFG EEE Ena 100M AN */
 #define IPCNFG_EEE_1G_AN	0x0008 /* IPCNFG EEE Ena 1G AN */
 



CVS commit: src/sys/dev/pci

2015-05-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 22 03:15:43 UTC 2015

Modified Files:
src/sys/dev/pci: if_wm.c if_wmreg.h

Log Message:
- Currently, WM_F_EEE bit is not set on all chips. it's intened to not
  to use all of EEE fuction but wm_set_eee_i350() leaves IPCNFG_10BASE_TE
  bit and it causes link negotiation problem on some old switches. Disable
  10BASE-Te function, too.
- Call wm_set_eee_i350() on some chips, too.


To generate a diff of this commit:
cvs rdiff -u -r1.321 -r1.322 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/if_wmreg.h

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



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

2015-05-21 Thread Hisashi T Fujinaka
Module Name:src
Committed By:   htodd
Date:   Thu May 21 19:53:11 UTC 2015

Modified Files:
src/distrib/sets/lists/xdebug: md.i386

Log Message:
Fix debug build lists.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/xdebug/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/xdebug/md.i386
diff -u src/distrib/sets/lists/xdebug/md.i386:1.12 src/distrib/sets/lists/xdebug/md.i386:1.13
--- src/distrib/sets/lists/xdebug/md.i386:1.12	Sun Mar  1 07:46:04 2015
+++ src/distrib/sets/lists/xdebug/md.i386	Thu May 21 19:53:11 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.12 2015/03/01 07:46:04 mrg Exp $
+# $NetBSD: md.i386,v 1.13 2015/05/21 19:53:11 htodd Exp $
 ./usr/X11R6/lib/modules/extensions/libGLcore_g.a	-unknown-	debuglib,x11
 ./usr/X11R6/lib/modules/extensions/libdbe_g.a		-unknown-	debuglib,x11
 ./usr/X11R6/lib/modules/extensions/libextmod_g.a	-unknown-	debuglib,x11
@@ -129,8 +129,8 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ark_drv.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ast_drv.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ati_drv.so.6.debug	-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7017_drv.so.2.debug	-unknown-		xorg,debug,obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2.debug	-unknown-		xorg,debug,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7017_drv.so.2.debug	-unknown-		xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/chips_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/cirrus_alpine.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/cirrus_drv.so.1.debug	-unknown-		xorg,debug
@@ -140,8 +140,9 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/glint_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/i128_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/i740_drv.so.1.debug	-unknown-		xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/intel_drv_old.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/intel_drv.so.2.debug	-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ivch_drv.so.2.debug	-unknown-		xorg,debug,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ivch_drv.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/kbd_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libapm_drv.so.1.debug	obsolete		xorg,obsolete
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libark_drv.so.0.debug	obsolete		xorg,obsolete
@@ -202,11 +203,11 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/s3_drv.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/s3virge_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/savage_drv.so.2.debug	-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sil164_drv.so.2.debug	-unknown-		xorg,debug,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sil164_drv.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/siliconmotion_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sis_drv.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tdfx_drv.so.1.debug	-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tfp410_drv.so.2.debug	-unknown-		xorg,debug,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tfp410_drv.so.2.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tga_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/trident_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tseng_drv.so.1.debug	-unknown-		xorg,debug



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

2015-05-21 Thread Hisashi T Fujinaka
Module Name:src
Committed By:   htodd
Date:   Thu May 21 19:53:11 UTC 2015

Modified Files:
src/distrib/sets/lists/xdebug: md.i386

Log Message:
Fix debug build lists.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/xdebug/md.i386

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