CVS commit: src/tools/xz-include

2018-09-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Sep 25 17:57:33 UTC 2018

Modified Files:
src/tools/xz-include: Makefile.inc

Log Message:
Add CPPFLAGS+= -std=c99 so tools can build on systems where the
system compiler doesn't default to C99 (eg, NetBSD 6.1).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tools/xz-include/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/tools/xz-include/Makefile.inc
diff -u src/tools/xz-include/Makefile.inc:1.1 src/tools/xz-include/Makefile.inc:1.2
--- src/tools/xz-include/Makefile.inc:1.1	Tue Sep 25 08:54:58 2018
+++ src/tools/xz-include/Makefile.inc	Tue Sep 25 17:57:33 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.1 2018/09/25 08:54:58 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2018/09/25 17:57:33 riz Exp $
 
 XZ_TOPLEVEL:=	${.PARSEDIR}/../../external/public-domain/xz
 
@@ -6,4 +6,6 @@ NOMAN=  # defined
 MKREPRO=no	# Native toolchain might be unable to do it
 MKNLS=no
 
+CPPFLAGS+=	-std=c99
+
 .include "${XZ_TOPLEVEL}/Makefile.inc"



CVS commit: src/share/mk

2016-02-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Feb  6 16:56:23 UTC 2016

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

Log Message:
Don't test dtrace-related variables until after they've been set.


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

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.896 src/share/mk/bsd.own.mk:1.897
--- src/share/mk/bsd.own.mk:1.896	Wed Feb  3 15:28:02 2016
+++ src/share/mk/bsd.own.mk	Sat Feb  6 16:56:23 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.896 2016/02/03 15:28:02 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.897 2016/02/06 16:56:23 riz Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -351,6 +351,7 @@ TOOL_CONFIG=		${TOOLDIR}/bin/${_TOOL_PRE
 TOOL_CRUNCHGEN=		MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
 TOOL_CTAGS=		${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
 TOOL_CTFCONVERT=	${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert
+TOOL_CTFDUMP=		${TOOLDIR}/bin/${_TOOL_PREFIX}ctfdump
 TOOL_CTFMERGE=		${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge
 TOOL_CVSLATEST=		${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest
 TOOL_DB=		${TOOLDIR}/bin/${_TOOL_PREFIX}db
@@ -463,6 +464,7 @@ TOOL_CONFIG=		config
 TOOL_CRUNCHGEN=		crunchgen
 TOOL_CTAGS=		ctags
 TOOL_CTFCONVERT=	ctfconvert
+TOOL_CTFDUMP=		ctfdump
 TOOL_CTFMERGE=		ctfmerge
 TOOL_CVSLATEST=		cvslatest
 TOOL_DB=		db
@@ -567,12 +569,6 @@ CXX=		${TOOL_CXX.${ACTIVE_CXX}}
 FC=		${TOOL_FC.${ACTIVE_FC}}
 OBJC=		${TOOL_OBJC.${ACTIVE_OBJC}}
 
-# Override with tools versions if needed
-.if ${MKCTF:Uno} != "no" && !defined(NOCTF)
-CTFCONVERT=	${TOOL_CTFCONVERT}
-CTFMERGE=	${TOOL_CTFMERGE}
-.endif
-
 # For each ${MACHINE_CPU}, list the ports that use it.
 MACHINES.aarch64=	evbarm64
 MACHINES.alpha=		alpha
@@ -1477,4 +1473,10 @@ TARGETS+=	lintmanpages
 
 TESTSBASE=	/usr/tests${MLIBDIR:D/${MLIBDIR}}
 
+# Override with tools versions if needed
+.if ${MKCTF:Uno} != "no" && !defined(NOCTF)
+CTFCONVERT=	${TOOL_CTFCONVERT}
+CTFMERGE=	${TOOL_CTFMERGE}
+.endif
+
 .endif	# !defined(_BSD_OWN_MK_)



CVS commit: src/share/mk

2016-02-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Feb  6 16:58:31 UTC 2016

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

Log Message:
Back out unintended changes committed with last.


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

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.897 src/share/mk/bsd.own.mk:1.898
--- src/share/mk/bsd.own.mk:1.897	Sat Feb  6 16:56:23 2016
+++ src/share/mk/bsd.own.mk	Sat Feb  6 16:58:31 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.897 2016/02/06 16:56:23 riz Exp $
+#	$NetBSD: bsd.own.mk,v 1.898 2016/02/06 16:58:31 riz Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -351,7 +351,6 @@ TOOL_CONFIG=		${TOOLDIR}/bin/${_TOOL_PRE
 TOOL_CRUNCHGEN=		MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
 TOOL_CTAGS=		${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
 TOOL_CTFCONVERT=	${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert
-TOOL_CTFDUMP=		${TOOLDIR}/bin/${_TOOL_PREFIX}ctfdump
 TOOL_CTFMERGE=		${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge
 TOOL_CVSLATEST=		${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest
 TOOL_DB=		${TOOLDIR}/bin/${_TOOL_PREFIX}db
@@ -464,7 +463,6 @@ TOOL_CONFIG=		config
 TOOL_CRUNCHGEN=		crunchgen
 TOOL_CTAGS=		ctags
 TOOL_CTFCONVERT=	ctfconvert
-TOOL_CTFDUMP=		ctfdump
 TOOL_CTFMERGE=		ctfmerge
 TOOL_CVSLATEST=		cvslatest
 TOOL_DB=		db



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2016-02-03 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Feb  3 17:50:13 UTC 2016

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_open.c

Log Message:
Adapt getmajor and getminor signatures for NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.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/dist/lib/libdtrace/common/dt_open.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.8 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.9
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.8	Wed Oct  7 00:34:37 2015
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c	Wed Feb  3 17:50:12 2016
@@ -277,10 +277,10 @@ static const dt_ident_t _dtrace_globals[
 	DT_VERS_1_2, _idops_func, "_symaddr(uintptr_t)" },
 { "getmajor", DT_IDENT_FUNC, 0, DIF_SUBR_GETMAJOR,
 	DT_ATTR_EVOLCMN, DT_VERS_1_0,
-	_idops_func, "genunix`major_t(genunix`dev_t)" },
+	_idops_func, "netbsd`__devmajor_t(netbsd`dev_t)" },
 { "getminor", DT_IDENT_FUNC, 0, DIF_SUBR_GETMINOR,
 	DT_ATTR_EVOLCMN, DT_VERS_1_0,
-	_idops_func, "genunix`minor_t(genunix`dev_t)" },
+	_idops_func, "netbsd`__devminor_t(netbsd`dev_t)" },
 { "htonl", DT_IDENT_FUNC, 0, DIF_SUBR_HTONL, DT_ATTR_EVOLCMN, DT_VERS_1_3,
 	_idops_func, "uint32_t(uint32_t)" },
 { "htonll", DT_IDENT_FUNC, 0, DIF_SUBR_HTONLL, DT_ATTR_EVOLCMN, DT_VERS_1_3,



CVS commit: src/sys/kern

2016-01-31 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb  1 05:05:44 UTC 2016

Modified Files:
src/sys/kern: subr_devsw.c vfs_bio.c

Log Message:
Implement the 'io' provider for DTrace.  From riastradh@, with
fixes from me.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/kern/subr_devsw.c
cvs rdiff -u -r1.258 -r1.259 src/sys/kern/vfs_bio.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/subr_devsw.c
diff -u src/sys/kern/subr_devsw.c:1.33 src/sys/kern/subr_devsw.c:1.34
--- src/sys/kern/subr_devsw.c:1.33	Fri Sep  5 05:57:21 2014
+++ src/sys/kern/subr_devsw.c	Mon Feb  1 05:05:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_devsw.c,v 1.33 2014/09/05 05:57:21 matt Exp $	*/
+/*	$NetBSD: subr_devsw.c,v 1.34 2016/02/01 05:05:43 riz Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.33 2014/09/05 05:57:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.34 2016/02/01 05:05:43 riz Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_dtrace.h"
+#endif
 
 #include 
 #include 
@@ -80,6 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: subr_devsw.c
 #include 
 #include 
 #include 
+#include 
 
 #ifdef DEVSW_DEBUG
 #define	DPRINTF(x)	printf x
@@ -730,12 +735,17 @@ bdev_close(dev_t dev, int flag, int devt
 	return rv;
 }
 
+SDT_PROVIDER_DECLARE(io);
+SDT_PROBE_DEFINE1(io, kernel, , start, "struct buf *"/*bp*/);
+
 void
 bdev_strategy(struct buf *bp)
 {
 	const struct bdevsw *d;
 	int mpflag;
 
+	SDT_PROBE1(io, kernel, , start, bp);
+
 	if ((d = bdevsw_lookup(bp->b_dev)) == NULL) {
 		bp->b_error = ENXIO;
 		bp->b_resid = bp->b_bcount;

Index: src/sys/kern/vfs_bio.c
diff -u src/sys/kern/vfs_bio.c:1.258 src/sys/kern/vfs_bio.c:1.259
--- src/sys/kern/vfs_bio.c:1.258	Mon Jan 11 01:22:36 2016
+++ src/sys/kern/vfs_bio.c	Mon Feb  1 05:05:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_bio.c,v 1.258 2016/01/11 01:22:36 dholland Exp $	*/
+/*	$NetBSD: vfs_bio.c,v 1.259 2016/02/01 05:05:43 riz Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -123,10 +123,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.258 2016/01/11 01:22:36 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.259 2016/02/01 05:05:43 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bufcache.h"
+#include "opt_dtrace.h"
 #endif
 
 #include 
@@ -146,6 +147,7 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 
 #include 
 #include 
 #include 
+#include 
 
 #include 	/* extern struct uvm uvm */
 
@@ -1474,6 +1476,11 @@ buf_drain(int n)
 	return size;
 }
 
+SDT_PROVIDER_DEFINE(io);
+
+SDT_PROBE_DEFINE1(io, kernel, , wait__start, "struct buf *"/*bp*/);
+SDT_PROBE_DEFINE1(io, kernel, , wait__done, "struct buf *"/*bp*/);
+
 /*
  * Wait for operations on the buffer to complete.
  * When they do, extract and return the I/O's error value.
@@ -1485,11 +1492,15 @@ biowait(buf_t *bp)
 	KASSERT(ISSET(bp->b_cflags, BC_BUSY));
 	KASSERT(bp->b_refcnt > 0);
 
+	SDT_PROBE1(io, kernel, , wait__start, bp);
+
 	mutex_enter(bp->b_objlock);
 	while (!ISSET(bp->b_oflags, BO_DONE | BO_DELWRI))
 		cv_wait(>b_done, bp->b_objlock);
 	mutex_exit(bp->b_objlock);
 
+	SDT_PROBE1(io, kernel, , wait__done, bp);
+
 	return bp->b_error;
 }
 
@@ -1528,11 +1539,15 @@ biodone(buf_t *bp)
 	}
 }
 
+SDT_PROBE_DEFINE1(io, kernel, , done, "struct buf *"/*bp*/);
+
 static void
 biodone2(buf_t *bp)
 {
 	void (*callout)(buf_t *);
 
+	SDT_PROBE1(io, kernel, ,done, bp);
+
 	mutex_enter(bp->b_objlock);
 	/* Note that the transfer is done. */
 	if (ISSET(bp->b_oflags, BO_DONE))



CVS commit: src/etc

2016-01-28 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Jan 28 19:06:39 UTC 2016

Modified Files:
src/etc: MAKEDEV.tmpl

Log Message:
Create dtrace device as part of "all"


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/etc/MAKEDEV.tmpl

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

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.178 src/etc/MAKEDEV.tmpl:1.179
--- src/etc/MAKEDEV.tmpl:1.178	Sun Jan 17 23:18:18 2016
+++ src/etc/MAKEDEV.tmpl	Thu Jan 28 19:06:39 2016
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.178 2016/01/17 23:18:18 christos Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.179 2016/01/28 19:06:39 riz Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -842,6 +842,7 @@ all)
 	makedev zfs
 	makedev lua
 	makedev hdmicec0
+	makedev dtrace
 	makedev local # do this last
 	;;
 



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo

2016-01-27 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 27 19:24:30 UTC 2016

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo [netbsd-7]:
nouveau_engine_fifo_nvc0.c nouveau_engine_fifo_nve0.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1079):

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:
 revision 1.6

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:
 revision 1.5
don't try to wait if (cold), spin waiting for registers to clear.
same as in nouveau_engine_fifo_nve0.c 1.5.  should fix PR#50362.
minor re-format of the previous.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.4.2 -r1.1.1.1.4.3 \

src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c
cvs rdiff -u -r1.1.1.1.4.3 -r1.1.1.1.4.4 \

src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.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/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:1.1.1.1.4.2 src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:1.1.1.1.4.3
--- src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c:1.1.1.1.4.2	Fri Mar  6 21:39:09 2015
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c	Wed Jan 27 19:24:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.1.1.1.4.2 2015/03/06 21:39:09 snj Exp $	*/
+/*	$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.1.1.1.4.3 2016/01/27 19:24:30 riz Exp $	*/
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.1.1.1.4.2 2015/03/06 21:39:09 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.1.1.1.4.3 2016/01/27 19:24:30 riz Exp $");
 
 #include 
 #include 
@@ -115,17 +115,26 @@ nvc0_fifo_runlist_update(struct nvc0_fif
 	nv_wr32(priv, 0x002274, 0x01f0 | (p >> 3));
 
 #ifdef __NetBSD__
-{
-	int ret;
+	if (cold) {
+		uint count = 2000;
+		while (count-- > 0) {
+			if (!(nv_rd32(priv, 0x00227c) & 0x0010))
+break;
+			delay(1000);
+		}
+		if (count == 0)
+			nv_error(priv, "runlist update timeout\n");
+	} else {
+		int ret;
 
-	spin_lock(>runlist.lock);
-	DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, >runlist.wait,
-	>runlist.lock, msecs_to_jiffies(2000),
-	!(nv_rd32(priv, 0x00227c) & 0x0010));
-	if (ret == 0)
-		nv_error(priv, "runlist update timeout\n");
-	spin_unlock(>runlist.lock);
-}
+		spin_lock(>runlist.lock);
+		DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, >runlist.wait,
+		>runlist.lock, msecs_to_jiffies(2000),
+		!(nv_rd32(priv, 0x00227c) & 0x0010));
+		if (ret == 0)
+			nv_error(priv, "runlist update timeout\n");
+		spin_unlock(>runlist.lock);
+	}
 #else
 	if (wait_event_timeout(priv->runlist.wait,
 			   !(nv_rd32(priv, 0x00227c) & 0x0010),

Index: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.1.1.1.4.3 src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.1.1.1.4.4
--- src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.1.1.1.4.3	Fri Nov  6 23:03:20 2015
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c	Wed Jan 27 19:24:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.3 2015/11/06 23:03:20 riz Exp $	*/
+/*	$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.4 2016/01/27 19:24:30 riz Exp $	*/
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.3 2015/11/06 23:03:20 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.4 2016/01/27 19:24:30 riz Exp $");
 
 #include 
 #include 
@@ -139,7 +139,8 @@ nve0_fifo_runlist_update(struct nve0_fif
 	if (cold) {
 		uint count = 2000;
 		while (count-- > 0) {
-			if (!(nv_rd32(priv, 0x002284 + (engine * 0x08)) & 0x0010))
+			if (!(nv_rd32(priv, 0x002284 +
+			(engine * 0x08)) & 0x0010))
 break;
 			delay(1000);
 		}



CVS commit: [netbsd-7] src/doc

2016-01-27 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 27 19:29:25 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
TIcket 1079


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.52 -r1.1.2.53 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.52 src/doc/CHANGES-7.1:1.1.2.53
--- src/doc/CHANGES-7.1:1.1.2.52	Wed Jan 27 00:27:45 2016
+++ src/doc/CHANGES-7.1	Wed Jan 27 19:29:25 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.52 2016/01/27 00:27:45 snj Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.53 2016/01/27 19:29:25 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1868,3 +1868,9 @@ sys/dev/pci/agp_i810.c1.120, 1.121
 	(CID 1328433).
 	[riastradh, ticket #1078]
 
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c 1.5-1.6
+
+	Don't try to wait if (cold), spin waiting for registers to clear.
+	PR#50362.
+	[riastradh, ticket #1079]
+



CVS commit: [netbsd-7] src/sys/kern

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 04:50:22 UTC 2016

Modified Files:
src/sys/kern [netbsd-7]: kern_softint.c

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #1067):
sys/kern/kern_softint.c: revision 1.42
fix the following softint parallel operation problem.
(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
- the softhand_t is set SOFTINT_PENDING flag
- the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
- waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
- the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
so CPU#Y does not wait
- unset the function of "handler A"
(4) CPU#X does softint_execute()
- the function of "handler A" is already clear, so panic


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/kern/kern_softint.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_softint.c
diff -u src/sys/kern/kern_softint.c:1.41 src/sys/kern/kern_softint.c:1.41.2.1
--- src/sys/kern/kern_softint.c:1.41	Sun May 25 15:42:01 2014
+++ src/sys/kern/kern_softint.c	Tue Jan 26 04:50:22 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.41 2014/05/25 15:42:01 rmind Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.41.2.1 2016/01/26 04:50:22 riz Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.41 2014/05/25 15:42:01 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.41.2.1 2016/01/26 04:50:22 riz Exp $");
 
 #include 
 #include 
@@ -442,8 +442,8 @@ softint_disestablish(void *arg)
 			KASSERT(sh->sh_func != NULL);
 			flags |= sh->sh_flags;
 		}
-		/* Inactive on all CPUs? */
-		if ((flags & SOFTINT_ACTIVE) == 0) {
+		/* Neither pending nor active on all CPUs? */
+		if ((flags & (SOFTINT_PENDING | SOFTINT_ACTIVE)) == 0) {
 			break;
 		}
 		/* Oops, still active.  Wait for it to clear. */



CVS commit: [netbsd-7-0] src/sys/kern

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 04:50:37 UTC 2016

Modified Files:
src/sys/kern [netbsd-7-0]: kern_softint.c

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #1067):
sys/kern/kern_softint.c: revision 1.42
fix the following softint parallel operation problem.
(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
- the softhand_t is set SOFTINT_PENDING flag
- the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
- waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
- the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
so CPU#Y does not wait
- unset the function of "handler A"
(4) CPU#X does softint_execute()
- the function of "handler A" is already clear, so panic


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.41.6.1 src/sys/kern/kern_softint.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_softint.c
diff -u src/sys/kern/kern_softint.c:1.41 src/sys/kern/kern_softint.c:1.41.6.1
--- src/sys/kern/kern_softint.c:1.41	Sun May 25 15:42:01 2014
+++ src/sys/kern/kern_softint.c	Tue Jan 26 04:50:37 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.41 2014/05/25 15:42:01 rmind Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.41.6.1 2016/01/26 04:50:37 riz Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.41 2014/05/25 15:42:01 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.41.6.1 2016/01/26 04:50:37 riz Exp $");
 
 #include 
 #include 
@@ -442,8 +442,8 @@ softint_disestablish(void *arg)
 			KASSERT(sh->sh_func != NULL);
 			flags |= sh->sh_flags;
 		}
-		/* Inactive on all CPUs? */
-		if ((flags & SOFTINT_ACTIVE) == 0) {
+		/* Neither pending nor active on all CPUs? */
+		if ((flags & (SOFTINT_PENDING | SOFTINT_ACTIVE)) == 0) {
 			break;
 		}
 		/* Oops, still active.  Wait for it to clear. */



CVS commit: [netbsd-7] src/doc

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 04:57:58 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1067-1069.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.50 src/doc/CHANGES-7.1:1.1.2.51
--- src/doc/CHANGES-7.1:1.1.2.50	Tue Jan 26 01:30:23 2016
+++ src/doc/CHANGES-7.1	Tue Jan 26 04:57:58 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.50 2016/01/26 01:30:23 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.51 2016/01/26 04:57:58 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1815,3 +1815,20 @@ crypto/external/bsd/openssh/dist/sftp.c	
 	Fix sftp filename completion.  PR#50564.
 	[snj, ticket #1066]
 
+sys/kern/kern_softint.c1.42
+
+	Fix parallel operation problem with softint which
+	leads to panic.
+	[knakahara, ticket #1067]
+
+include/protocols/dumprestore.h			1.17
+
+	Bump dump/restore name length to NAME_MAX (511). PR#50434
+	[christos, ticket #1068]
+
+sys/arch/sparc64/sparc64/ofw_machdep.c		1.45
+
+	Restrict the check for fully specified interrupts to machines with psycho
+	controllers only, and adjust comments to note this.
+	[jdc, ticket #1069]
+



CVS commit: [netbsd-7] src/include/protocols

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 04:53:42 UTC 2016

Modified Files:
src/include/protocols [netbsd-7]: dumprestore.h

Log Message:
Pull up following revision(s) (requested by christos in ticket #1068):
include/protocols/dumprestore.h: revision 1.17
PR/50434: Louis Guillaume: Bump the in and out formats to 511 (NAME_MAX)


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.28.1 src/include/protocols/dumprestore.h

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

Modified files:

Index: src/include/protocols/dumprestore.h
diff -u src/include/protocols/dumprestore.h:1.16 src/include/protocols/dumprestore.h:1.16.28.1
--- src/include/protocols/dumprestore.h:1.16	Sun Jan 11 03:04:12 2009
+++ src/include/protocols/dumprestore.h	Tue Jan 26 04:53:42 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: dumprestore.h,v 1.16 2009/01/11 03:04:12 christos Exp $	*/
+/*	$NetBSD: dumprestore.h,v 1.16.28.1 2016/01/26 04:53:42 riz Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -152,8 +152,9 @@ union u_spcl {
 #define DR_NEWINODEFMT	0x0002	/* new format inodes on tape */
 #define DR_EXTATTRIBUTES 0x8000	/* linux: extended attributes */
 
-#define	DUMPOUTFMT	"%-16s %c %s"		/* for printf */
+/* 511 == NAME_MAX */
+#define	DUMPOUTFMT	"%-511s %c %s"		/* for printf */
 		/* name, level, ctime(date) */
-#define	DUMPINFMT	"%16s %c %[^\n]\n"	/* inverse for scanf */
+#define	DUMPINFMT	"%511s %c %[^\n]\n"	/* inverse for scanf */
 
 #endif /* !_PROTOCOLS_DUMPRESTORE_H_ */



CVS commit: [netbsd-7-0] src/sys/arch/sparc64/sparc64

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 04:56:56 UTC 2016

Modified Files:
src/sys/arch/sparc64/sparc64 [netbsd-7-0]: ofw_machdep.c

Log Message:
Pull up following revision(s) (requested by jdc in ticket #1069):
sys/arch/sparc64/sparc64/ofw_machdep.c: revision 1.45
Restrict the check for fully specified interrupts to machines with psycho
controllers only, and adjust comments to note this.
See also the mail thread starting at:
http://mail-index.NetBSD.org/port-sparc64/2015/12/03/msg002488.html


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.42.4.1 src/sys/arch/sparc64/sparc64/ofw_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/sparc64/sparc64/ofw_machdep.c
diff -u src/sys/arch/sparc64/sparc64/ofw_machdep.c:1.42 src/sys/arch/sparc64/sparc64/ofw_machdep.c:1.42.4.1
--- src/sys/arch/sparc64/sparc64/ofw_machdep.c:1.42	Sun May  4 09:05:39 2014
+++ src/sys/arch/sparc64/sparc64/ofw_machdep.c	Tue Jan 26 04:56:56 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_machdep.c,v 1.42 2014/05/04 09:05:39 martin Exp $	*/
+/*	$NetBSD: ofw_machdep.c,v 1.42.4.1 2016/01/26 04:56:56 riz Exp $	*/
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -34,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.42 2014/05/04 09:05:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.42.4.1 2016/01/26 04:56:56 riz Exp $");
 
 #include 
 #include 
@@ -707,22 +707,22 @@ OF_mapintr(int node, int *interrupt, int
 	int phc_node;
 	int rc = -1;
 
+	phc_node = find_pci_host_node(node);
+
 	/* 
-	 * Don't try to map interrupts for onboard devices, or if the
-	 * interrupt is already fully specified.
-	 * XXX This should be done differently (i.e. by matching
-	 * the node name) - but we need access to a machine where
-	 * a change is testable - hence the printf below.
+	 * On machines with psycho PCI controllers, we don't need to map
+	 * interrupts if they are already fully specified (0x20 to 0x3f
+	 * for onboard devices and IGN 0x7c0 for psycho0/psycho1).
 	 */
 	if (*interrupt & 0x20 || *interrupt & 0x7c0) {
-		char name[40];
-
-		OF_getprop(node, "name", , sizeof(name));
-		printf("\nATTENTION: if you see this message, please mail "
-		"the output of \"dmesg\" and \"ofctl -p\" to "
-		"port-spar...@netbsd.org!\n"
-		"Not mapping interrupt for node %s (%x)\n", name, node);
-		return validlen;
+		char model[40];
+		
+		if (OF_getprop(phc_node, "model", , sizeof(model)) > 10
+		&& !strcmp(model, "SUNW,psycho")) {
+			DPRINTF(("OF_mapintr: interrupt %x already mapped\n",
+			*interrupt));
+			return validlen;
+		}
 	}
 
 	/*
@@ -744,8 +744,6 @@ OF_mapintr(int node, int *interrupt, int
 		return (-1);
 	}
 
-	phc_node = find_pci_host_node(node);
-
 	while (node) {
 #ifdef DEBUG
 		char name[40];



CVS commit: [netbsd-7-0] src/doc

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 04:57:20 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Tickets 1067, 1069


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.29 src/doc/CHANGES-7.0.1:1.1.2.30
--- src/doc/CHANGES-7.0.1:1.1.2.29	Tue Jan 26 01:30:56 2016
+++ src/doc/CHANGES-7.0.1	Tue Jan 26 04:57:19 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.29 2016/01/26 01:30:56 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.30 2016/01/26 04:57:19 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -888,3 +888,15 @@ crypto/external/bsd/openssh/dist/sftp.c	
 	Fix sftp filename completion.  PR#50564.
 	[snj, ticket #1066]
 
+sys/kern/kern_softint.c1.42
+
+	Fix parallel operation problem with softint which
+	leads to panic.
+	[knakahara, ticket #1067]
+
+sys/arch/sparc64/sparc64/ofw_machdep.c		1.45
+
+	Restrict the check for fully specified interrupts to machines with psycho
+	controllers only, and adjust comments to note this.
+	[jdc, ticket #1069]
+



CVS commit: [netbsd-7] src/sys/arch/sparc64/sparc64

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 04:56:34 UTC 2016

Modified Files:
src/sys/arch/sparc64/sparc64 [netbsd-7]: ofw_machdep.c

Log Message:
Pull up following revision(s) (requested by jdc in ticket #1069):
sys/arch/sparc64/sparc64/ofw_machdep.c: revision 1.45
Restrict the check for fully specified interrupts to machines with psycho
controllers only, and adjust comments to note this.
See also the mail thread starting at:
http://mail-index.NetBSD.org/port-sparc64/2015/12/03/msg002488.html


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.42.2.1 src/sys/arch/sparc64/sparc64/ofw_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/sparc64/sparc64/ofw_machdep.c
diff -u src/sys/arch/sparc64/sparc64/ofw_machdep.c:1.42 src/sys/arch/sparc64/sparc64/ofw_machdep.c:1.42.2.1
--- src/sys/arch/sparc64/sparc64/ofw_machdep.c:1.42	Sun May  4 09:05:39 2014
+++ src/sys/arch/sparc64/sparc64/ofw_machdep.c	Tue Jan 26 04:56:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_machdep.c,v 1.42 2014/05/04 09:05:39 martin Exp $	*/
+/*	$NetBSD: ofw_machdep.c,v 1.42.2.1 2016/01/26 04:56:34 riz Exp $	*/
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -34,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.42 2014/05/04 09:05:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.42.2.1 2016/01/26 04:56:34 riz Exp $");
 
 #include 
 #include 
@@ -707,22 +707,22 @@ OF_mapintr(int node, int *interrupt, int
 	int phc_node;
 	int rc = -1;
 
+	phc_node = find_pci_host_node(node);
+
 	/* 
-	 * Don't try to map interrupts for onboard devices, or if the
-	 * interrupt is already fully specified.
-	 * XXX This should be done differently (i.e. by matching
-	 * the node name) - but we need access to a machine where
-	 * a change is testable - hence the printf below.
+	 * On machines with psycho PCI controllers, we don't need to map
+	 * interrupts if they are already fully specified (0x20 to 0x3f
+	 * for onboard devices and IGN 0x7c0 for psycho0/psycho1).
 	 */
 	if (*interrupt & 0x20 || *interrupt & 0x7c0) {
-		char name[40];
-
-		OF_getprop(node, "name", , sizeof(name));
-		printf("\nATTENTION: if you see this message, please mail "
-		"the output of \"dmesg\" and \"ofctl -p\" to "
-		"port-spar...@netbsd.org!\n"
-		"Not mapping interrupt for node %s (%x)\n", name, node);
-		return validlen;
+		char model[40];
+		
+		if (OF_getprop(phc_node, "model", , sizeof(model)) > 10
+		&& !strcmp(model, "SUNW,psycho")) {
+			DPRINTF(("OF_mapintr: interrupt %x already mapped\n",
+			*interrupt));
+			return validlen;
+		}
 	}
 
 	/*
@@ -744,8 +744,6 @@ OF_mapintr(int node, int *interrupt, int
 		return (-1);
 	}
 
-	phc_node = find_pci_host_node(node);
-
 	while (node) {
 #ifdef DEBUG
 		char name[40];



CVS commit: [netbsd-7] src/doc

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:21:56 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1037, 1062, 1063


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.48 src/doc/CHANGES-7.1:1.1.2.49
--- src/doc/CHANGES-7.1:1.1.2.48	Sat Jan 16 10:16:24 2016
+++ src/doc/CHANGES-7.1	Tue Jan 26 01:21:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.48 2016/01/16 10:16:24 snj Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.49 2016/01/26 01:21:56 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1783,3 +1783,18 @@ sys/arch/evbarm/conf/OPENRD			1.6
 	Disable mvsdio on OPENRD.
 	[cyber, ticket #1061]
 
+external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c 1.13
+
+	Avoid creation of GNU_STACK segment.
+	[phx, ticket #1037]
+
+sys/kern/exec_elf.c			patch
+
+	Restore binary compatibility on sparc64 for old binaries.
+	[martin, ticket #1062]
+
+usr.sbin/ndp/ndp.c1.46
+
+	Fix ndp to ipv6 link-local addresses.
+	[ozaki-r, ticket #1063]
+



CVS commit: [netbsd-7] src/usr.sbin/ndp

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:21:33 UTC 2016

Modified Files:
src/usr.sbin/ndp [netbsd-7]: ndp.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1063):
usr.sbin/ndp/ndp.c: revision 1.46
Don't forget to set sin_scope. From Ryota Ozaki


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.2.1 src/usr.sbin/ndp/ndp.c

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

Modified files:

Index: src/usr.sbin/ndp/ndp.c
diff -u src/usr.sbin/ndp/ndp.c:1.43 src/usr.sbin/ndp/ndp.c:1.43.2.1
--- src/usr.sbin/ndp/ndp.c:1.43	Thu Jun  5 16:06:49 2014
+++ src/usr.sbin/ndp/ndp.c	Tue Jan 26 01:21:33 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ndp.c,v 1.43 2014/06/05 16:06:49 roy Exp $	*/
+/*	$NetBSD: ndp.c,v 1.43.2.1 2016/01/26 01:21:33 riz Exp $	*/
 /*	$KAME: ndp.c,v 1.121 2005/07/13 11:30:13 keiichi Exp $	*/
 
 /*
@@ -298,6 +298,15 @@ main(int argc, char **argv)
 }
 
 static void
+makeaddr(struct sockaddr_in6 *mysin, const void *resp)
+{
+	const struct sockaddr_in6 *res = resp;
+	mysin->sin6_addr = res->sin6_addr;
+	mysin->sin6_scope_id = res->sin6_scope_id;
+	inet6_putscopeid(mysin, INET6_IS_ADDR_LINKLOCAL);
+}
+
+static void
 getsocket(void)
 {
 	if (my_s < 0) {
@@ -356,8 +365,7 @@ set(int argc, char **argv)
 		warnx("%s: %s\n", host, gai_strerror(gai_error));
 		return 1;
 	}
-	mysin->sin6_addr = ((struct sockaddr_in6 *)(void *)res->ai_addr)->sin6_addr;
-	inet6_putscopeid(mysin, INET6_IS_ADDR_LINKLOCAL);
+	makeaddr(mysin, res->ai_addr);
 	ea = (u_char *)LLADDR(_m);
 	if (ndp_ether_aton(eaddr, ea) == 0)
 		sdl_m.sdl_alen = 6;
@@ -423,8 +431,7 @@ get(char *host)
 		warnx("%s: %s\n", host, gai_strerror(gai_error));
 		return;
 	}
-	mysin->sin6_addr = ((struct sockaddr_in6 *)(void *)res->ai_addr)->sin6_addr;
-	inet6_putscopeid(mysin, INET6_IS_ADDR_LINKLOCAL);
+	makeaddr(mysin, res->ai_addr);
 	dump(>sin6_addr, 0);
 	if (found_entry == 0) {
 		(void)getnameinfo((struct sockaddr *)(void *)mysin,
@@ -457,8 +464,7 @@ delete(char *host)
 		warnx("%s: %s\n", host, gai_strerror(gai_error));
 		return 1;
 	}
-	mysin->sin6_addr = ((struct sockaddr_in6 *)(void *)res->ai_addr)->sin6_addr;
-	inet6_putscopeid(mysin, INET6_IS_ADDR_LINKLOCAL);
+	makeaddr(mysin, res->ai_addr);
 	if (rtmsg(RTM_GET) < 0)
 		errx(1, "RTM_GET(%s) failed", host);
 	mysin = (struct sockaddr_in6 *)(void *)(rtm + 1);



CVS commit: [netbsd-7-0] src/usr.sbin/ndp

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:22:13 UTC 2016

Modified Files:
src/usr.sbin/ndp [netbsd-7-0]: ndp.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1063):
usr.sbin/ndp/ndp.c: revision 1.46
Don't forget to set sin_scope. From Ryota Ozaki


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.4.1 src/usr.sbin/ndp/ndp.c

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

Modified files:

Index: src/usr.sbin/ndp/ndp.c
diff -u src/usr.sbin/ndp/ndp.c:1.43 src/usr.sbin/ndp/ndp.c:1.43.4.1
--- src/usr.sbin/ndp/ndp.c:1.43	Thu Jun  5 16:06:49 2014
+++ src/usr.sbin/ndp/ndp.c	Tue Jan 26 01:22:13 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ndp.c,v 1.43 2014/06/05 16:06:49 roy Exp $	*/
+/*	$NetBSD: ndp.c,v 1.43.4.1 2016/01/26 01:22:13 riz Exp $	*/
 /*	$KAME: ndp.c,v 1.121 2005/07/13 11:30:13 keiichi Exp $	*/
 
 /*
@@ -298,6 +298,15 @@ main(int argc, char **argv)
 }
 
 static void
+makeaddr(struct sockaddr_in6 *mysin, const void *resp)
+{
+	const struct sockaddr_in6 *res = resp;
+	mysin->sin6_addr = res->sin6_addr;
+	mysin->sin6_scope_id = res->sin6_scope_id;
+	inet6_putscopeid(mysin, INET6_IS_ADDR_LINKLOCAL);
+}
+
+static void
 getsocket(void)
 {
 	if (my_s < 0) {
@@ -356,8 +365,7 @@ set(int argc, char **argv)
 		warnx("%s: %s\n", host, gai_strerror(gai_error));
 		return 1;
 	}
-	mysin->sin6_addr = ((struct sockaddr_in6 *)(void *)res->ai_addr)->sin6_addr;
-	inet6_putscopeid(mysin, INET6_IS_ADDR_LINKLOCAL);
+	makeaddr(mysin, res->ai_addr);
 	ea = (u_char *)LLADDR(_m);
 	if (ndp_ether_aton(eaddr, ea) == 0)
 		sdl_m.sdl_alen = 6;
@@ -423,8 +431,7 @@ get(char *host)
 		warnx("%s: %s\n", host, gai_strerror(gai_error));
 		return;
 	}
-	mysin->sin6_addr = ((struct sockaddr_in6 *)(void *)res->ai_addr)->sin6_addr;
-	inet6_putscopeid(mysin, INET6_IS_ADDR_LINKLOCAL);
+	makeaddr(mysin, res->ai_addr);
 	dump(>sin6_addr, 0);
 	if (found_entry == 0) {
 		(void)getnameinfo((struct sockaddr *)(void *)mysin,
@@ -457,8 +464,7 @@ delete(char *host)
 		warnx("%s: %s\n", host, gai_strerror(gai_error));
 		return 1;
 	}
-	mysin->sin6_addr = ((struct sockaddr_in6 *)(void *)res->ai_addr)->sin6_addr;
-	inet6_putscopeid(mysin, INET6_IS_ADDR_LINKLOCAL);
+	makeaddr(mysin, res->ai_addr);
 	if (rtmsg(RTM_GET) < 0)
 		errx(1, "RTM_GET(%s) failed", host);
 	mysin = (struct sockaddr_in6 *)(void *)(rtm + 1);



CVS commit: [netbsd-7-0] src/doc

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:23:50 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Ticket 1063.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.27 src/doc/CHANGES-7.0.1:1.1.2.28
--- src/doc/CHANGES-7.0.1:1.1.2.27	Sat Jan 16 10:11:11 2016
+++ src/doc/CHANGES-7.0.1	Tue Jan 26 01:23:50 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.27 2016/01/16 10:11:11 snj Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.28 2016/01/26 01:23:50 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -878,3 +878,8 @@ sys/arch/evbarm/conf/OPENRD			1.6
 	Disable mvsdio on OPENRD.
 	[cyber, ticket #1061]
 
+usr.sbin/ndp/ndp.c1.46
+
+	Fix ndp to ipv6 link-local addresses.
+	[ozaki-r, ticket #1063]
+



CVS commit: [netbsd-7] src/sys/arch/sparc64/dev

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:25:33 UTC 2016

Modified Files:
src/sys/arch/sparc64/dev [netbsd-7]: schizo.c schizoreg.h schizovar.h

Log Message:
Pull up following revision(s) (requested by jdc in ticket #1064):
sys/arch/sparc64/dev/schizo.c: revision 1.34
sys/arch/sparc64/dev/schizo.c: revision 1.35
sys/arch/sparc64/dev/schizovar.h: revision 1.7
sys/arch/sparc64/dev/schizoreg.h: revision 1.10
sys/arch/sparc64/dev/schizoreg.h: revision 1.11
add some tomatillo specific information to schizo_pbm_regs.
Set the target JPID for all interrupts on Tomatillo.
If the "ino-bitmap" property is available, use it to route error interrupts.
Minor cosmetic changes.
Add register printing when DEBUG is defined.
Use __BIT() for some masks to fix the sparc build.
No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.31.8.1 -r1.31.8.2 src/sys/arch/sparc64/dev/schizo.c
cvs rdiff -u -r1.9 -r1.9.14.1 src/sys/arch/sparc64/dev/schizoreg.h
cvs rdiff -u -r1.6 -r1.6.14.1 src/sys/arch/sparc64/dev/schizovar.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/sparc64/dev/schizo.c
diff -u src/sys/arch/sparc64/dev/schizo.c:1.31.8.1 src/sys/arch/sparc64/dev/schizo.c:1.31.8.2
--- src/sys/arch/sparc64/dev/schizo.c:1.31.8.1	Mon Nov 10 17:59:57 2014
+++ src/sys/arch/sparc64/dev/schizo.c	Tue Jan 26 01:25:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: schizo.c,v 1.31.8.1 2014/11/10 17:59:57 snj Exp $	*/
+/*	$NetBSD: schizo.c,v 1.31.8.2 2016/01/26 01:25:32 riz Exp $	*/
 /*	$OpenBSD: schizo.c,v 1.55 2008/08/18 20:29:37 brad Exp $	*/
 
 /*
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: schizo.c,v 1.31.8.1 2014/11/10 17:59:57 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: schizo.c,v 1.31.8.2 2016/01/26 01:25:32 riz Exp $");
 
 #include 
 #include 
@@ -74,6 +74,10 @@ static	int	schizo_match(device_t, cfdata
 static	void	schizo_attach(device_t, device_t, void *);
 static	int	schizo_print(void *aux, const char *p);
 
+#ifdef DEBUG
+void schizo_print_regs(int unit, int what);
+#endif
+
 CFATTACH_DECL_NEW(schizo, sizeof(struct schizo_softc),
 schizo_match, schizo_attach, NULL, NULL);
 
@@ -143,8 +147,8 @@ schizo_attach(device_t parent, device_t 
 	struct schizo_pbm *pbm;
 	struct iommu_state *is;
 	struct pcibus_attach_args pba;
-	uint64_t reg, eccctrl;
-	int *busranges = NULL, nranges;
+	uint64_t reg, eccctrl, ino_bitmap;
+	int *busranges = NULL, nranges, *ino_bitmaps = NULL, nbitmaps;
 	char *str;
 	bool no_sc;
 
@@ -180,6 +184,9 @@ schizo_attach(device_t parent, device_t 
 	if (pbm == NULL)
 		panic("schizo: can't alloc schizo pbm");
 
+#ifdef DEBUG
+	sc->sc_pbm = pbm;
+#endif
 	pbm->sp_sc = sc;
 	pbm->sp_regt = sc->sc_bustag;
 
@@ -194,11 +201,25 @@ schizo_attach(device_t parent, device_t 
 	if (bus_space_map(sc->sc_bustag, ma->ma_reg[0].ur_paddr,
 			  ma->ma_reg[0].ur_len,
 			  BUS_SPACE_MAP_LINEAR, >sp_intrh)) {
-		aprint_error(": failed to interrupt map registers\n");
+		aprint_error(": failed to map interrupt registers\n");
 		kmem_free(pbm, sizeof(*pbm));
 		return;
 	}
 
+#ifdef DEBUG
+	/*
+	 * Map ichip registers
+	 */
+	if (sc->sc_tomatillo)
+		if (bus_space_map(sc->sc_bustag, ma->ma_reg[3].ur_paddr,
+			  ma->ma_reg[3].ur_len,
+			  BUS_SPACE_MAP_LINEAR, >sp_ichiph)) {
+			aprint_error(": failed to map ichip registers\n");
+			kmem_free(pbm, sizeof(*pbm));
+			return;
+		}
+#endif
+
 	if (prom_getprop(sc->sc_node, "ranges", sizeof(struct schizo_range),
 	>sp_nrange, (void **)>sp_range))
 		panic("schizo: can't get ranges");
@@ -207,7 +228,7 @@ schizo_attach(device_t parent, device_t 
 	(void **)))
 		panic("schizo: can't get bus-range");
 
-	aprint_normal(": \"%s\", version %d, ign %x, bus %c %d to %d\n",
+	aprint_normal(": %s, version %d, ign %x, bus %c %d to %d\n",
 	sc->sc_tomatillo ? "Tomatillo" : "Schizo", sc->sc_ver,
 	sc->sc_ign, pbm->sp_bus_a ? 'A' : 'B', busranges[0], busranges[1]);
 	aprint_naive("\n");
@@ -304,20 +325,34 @@ schizo_attach(device_t parent, device_t 
 	SCZ_PCIDIAG_D_INTSYNC);
 	schizo_pbm_write(pbm, SCZ_PCI_DIAG, reg);
 
-	if (pbm->sp_bus_a)
+	if (prom_getprop(sc->sc_node, "ino-bitmap", sizeof(int), ,
+	(void **)_bitmaps)) {
+		/* No property - set defaults (double map UE, CE, SERR). */
+		if (pbm->sp_bus_a)
+			ino_bitmap = __BIT(SCZ_PCIERR_A_INO);
+		else
+			ino_bitmap = __BIT(SCZ_PCIERR_B_INO);
+		ino_bitmap |= __BIT(SCZ_UE_INO) | __BIT(SCZ_CE_INO) |
+		__BIT(SCZ_SERR_INO);
+	} else
+		ino_bitmap = (uint64_t) ino_bitmaps[1] << 32 | ino_bitmaps[0];
+	DPRINTF(SDB_INTR, ("ino_bitmap=0x%016" PRIx64 "\n", ino_bitmap));
+
+	if (ino_bitmap & __BIT(SCZ_PCIERR_A_INO))
 		schizo_set_intr(sc, pbm, PIL_HIGH, schizo_pci_error,
 		   pbm, SCZ_PCIERR_A_INO, "pci_a");
-	else
+	if (ino_bitmap & __BIT(SCZ_PCIERR_B_INO))
 		schizo_set_intr(sc, pbm, PIL_HIGH, schizo_pci_error,
 		   pbm, 

CVS commit: [netbsd-7] src/sys/net/npf

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:27:21 UTC 2016

Modified Files:
src/sys/net/npf [netbsd-7]: npf_mbuf.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1065):
sys/net/npf/npf_mbuf.c: revision 1.15
handle delayed cksums also for ipv6


To generate a diff of this commit:
cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/sys/net/npf/npf_mbuf.c

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

Modified files:

Index: src/sys/net/npf/npf_mbuf.c
diff -u src/sys/net/npf/npf_mbuf.c:1.13.2.1 src/sys/net/npf/npf_mbuf.c:1.13.2.2
--- src/sys/net/npf/npf_mbuf.c:1.13.2.1	Fri Jul 17 04:37:22 2015
+++ src/sys/net/npf/npf_mbuf.c	Tue Jan 26 01:27:21 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_mbuf.c,v 1.13.2.1 2015/07/17 04:37:22 snj Exp $	*/
+/*	$NetBSD: npf_mbuf.c,v 1.13.2.2 2016/01/26 01:27:21 riz Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.13.2.1 2015/07/17 04:37:22 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.13.2.2 2016/01/26 01:27:21 riz Exp $");
 
 #include 
 #include 
@@ -258,6 +258,11 @@ nbuf_cksum_barrier(nbuf_t *nbuf, int di)
 		m->m_pkthdr.csum_flags &= ~(M_CSUM_TCPv4 | M_CSUM_UDPv4);
 		return true;
 	}
+	if (m->m_pkthdr.csum_flags & (M_CSUM_TCPv6 | M_CSUM_UDPv6)) {
+		in6_delayed_cksum(m);
+		m->m_pkthdr.csum_flags &= ~(M_CSUM_TCPv6 | M_CSUM_UDPv6);
+		return true;
+	}
 	return false;
 }
 



CVS commit: [netbsd-7] src/crypto/external/bsd/openssh/dist

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:29:35 UTC 2016

Modified Files:
src/crypto/external/bsd/openssh/dist [netbsd-7]: sftp.c

Log Message:
Pull up following revision(s) (requested by snj in ticket #1066):
crypto/external/bsd/openssh/dist/sftp.c: revision 1.17
PR/50564: Rin Okuyama: sftp: filename completion is broken


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.1 -r1.12.4.2 \
src/crypto/external/bsd/openssh/dist/sftp.c

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/sftp.c
diff -u src/crypto/external/bsd/openssh/dist/sftp.c:1.12.4.1 src/crypto/external/bsd/openssh/dist/sftp.c:1.12.4.2
--- src/crypto/external/bsd/openssh/dist/sftp.c:1.12.4.1	Thu Apr 30 06:07:30 2015
+++ src/crypto/external/bsd/openssh/dist/sftp.c	Tue Jan 26 01:29:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sftp.c,v 1.12.4.1 2015/04/30 06:07:30 riz Exp $	*/
+/*	$NetBSD: sftp.c,v 1.12.4.2 2016/01/26 01:29:35 riz Exp $	*/
 /* $OpenBSD: sftp.c,v 1.170 2015/01/20 23:14:00 deraadt Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller 
@@ -17,7 +17,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: sftp.c,v 1.12.4.1 2015/04/30 06:07:30 riz Exp $");
+__RCSID("$NetBSD: sftp.c,v 1.12.4.2 2016/01/26 01:29:35 riz Exp $");
 #include 	/* MIN MAX */
 #include 
 #include 
@@ -1845,8 +1845,8 @@ complete_match(EditLine *el, struct sftp
 	if (remote != LOCAL) {
 		tmp = make_absolute(tmp, remote_path);
 		remote_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, );
+	} else
 		glob(tmp, GLOB_LIMIT|GLOB_DOOFFS|GLOB_MARK, NULL, );
-	}
 	
 	/* Determine length of pwd so we can trim completion display */
 	for (hadglob = tmplen = pwdlen = 0; tmp[tmplen] != 0; tmplen++) {



CVS commit: [netbsd-7-0] src/crypto/external/bsd/openssh/dist

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:30:41 UTC 2016

Modified Files:
src/crypto/external/bsd/openssh/dist [netbsd-7-0]: sftp.c

Log Message:
Pull up following revision(s) (requested by snj in ticket #1066):
crypto/external/bsd/openssh/dist/sftp.c: revision 1.17
PR/50564: Rin Okuyama: sftp: filename completion is broken


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.1 -r1.12.4.1.2.1 \
src/crypto/external/bsd/openssh/dist/sftp.c

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/sftp.c
diff -u src/crypto/external/bsd/openssh/dist/sftp.c:1.12.4.1 src/crypto/external/bsd/openssh/dist/sftp.c:1.12.4.1.2.1
--- src/crypto/external/bsd/openssh/dist/sftp.c:1.12.4.1	Thu Apr 30 06:07:30 2015
+++ src/crypto/external/bsd/openssh/dist/sftp.c	Tue Jan 26 01:30:40 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sftp.c,v 1.12.4.1 2015/04/30 06:07:30 riz Exp $	*/
+/*	$NetBSD: sftp.c,v 1.12.4.1.2.1 2016/01/26 01:30:40 riz Exp $	*/
 /* $OpenBSD: sftp.c,v 1.170 2015/01/20 23:14:00 deraadt Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller 
@@ -17,7 +17,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: sftp.c,v 1.12.4.1 2015/04/30 06:07:30 riz Exp $");
+__RCSID("$NetBSD: sftp.c,v 1.12.4.1.2.1 2016/01/26 01:30:40 riz Exp $");
 #include 	/* MIN MAX */
 #include 
 #include 
@@ -1845,8 +1845,8 @@ complete_match(EditLine *el, struct sftp
 	if (remote != LOCAL) {
 		tmp = make_absolute(tmp, remote_path);
 		remote_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, );
+	} else
 		glob(tmp, GLOB_LIMIT|GLOB_DOOFFS|GLOB_MARK, NULL, );
-	}
 	
 	/* Determine length of pwd so we can trim completion display */
 	for (hadglob = tmplen = pwdlen = 0; tmp[tmplen] != 0; tmplen++) {



CVS commit: [netbsd-7] src/doc

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:30:23 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1064-1066


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.49 src/doc/CHANGES-7.1:1.1.2.50
--- src/doc/CHANGES-7.1:1.1.2.49	Tue Jan 26 01:21:56 2016
+++ src/doc/CHANGES-7.1	Tue Jan 26 01:30:23 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.49 2016/01/26 01:21:56 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.50 2016/01/26 01:30:23 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1798,3 +1798,20 @@ usr.sbin/ndp/ndp.c1.46
 	Fix ndp to ipv6 link-local addresses.
 	[ozaki-r, ticket #1063]
 
+sys/arch/sparc64/dev/schizo.c			1.34-1.35
+sys/arch/sparc64/dev/schizoreg.h		1.7,1.10-1.11
+
+	Fix interrupt routing on sparc64 machines with Tomatillo
+	PCI controllers.
+	[jdc, ticket #1064]
+
+sys/net/npf/npf_mbuf.c1.15
+
+	Handle delayed checksums for IPv6.
+	[mlelstv, ticket #1065]
+
+crypto/external/bsd/openssh/dist/sftp.c		1.17
+
+	Fix sftp filename completion.  PR#50564.
+	[snj, ticket #1066]
+



CVS commit: [netbsd-7-0] src/doc

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:30:56 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Ticket 1066.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.28 src/doc/CHANGES-7.0.1:1.1.2.29
--- src/doc/CHANGES-7.0.1:1.1.2.28	Tue Jan 26 01:23:50 2016
+++ src/doc/CHANGES-7.0.1	Tue Jan 26 01:30:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.28 2016/01/26 01:23:50 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.29 2016/01/26 01:30:56 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -883,3 +883,8 @@ usr.sbin/ndp/ndp.c1.46
 	Fix ndp to ipv6 link-local addresses.
 	[ozaki-r, ticket #1063]
 
+crypto/external/bsd/openssh/dist/sftp.c		1.17
+
+	Fix sftp filename completion.  PR#50564.
+	[snj, ticket #1066]
+



CVS commit: [netbsd-7] src/external/gpl3/gcc/dist/gcc/config/rs6000

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:11:13 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/rs6000 [netbsd-7]: rs6000.c

Log Message:
Pull up following revision(s) (requested by phx in ticket #1037):
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c: revision 1.13
We've never supported the executable stack note, and none of the other
archs have it.


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.3 -r1.6.2.4 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.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/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.6.2.3 src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.6.2.4
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.6.2.3	Sat Oct 31 21:35:17 2015
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c	Tue Jan 26 01:11:13 2016
@@ -29474,8 +29474,7 @@ rs6000_elf_file_end (void)
 		 aix_struct_return ? 2 : 1);
 }
 #endif
-#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD) \
-|| defined (POWERPC_NETBSD)
+#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD)
   if (TARGET_32BIT || DEFAULT_ABI == ABI_ELFv2)
 file_end_indicate_exec_stack ();
 #endif



CVS commit: [netbsd-7] src/sys/kern

2016-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jan 26 01:18:37 UTC 2016

Modified Files:
src/sys/kern [netbsd-7]: exec_elf.c

Log Message:
Apply patch (requested by martin in ticket #1062):

sys/kern/exec_elf.c patch

Restore binary compatibility on sparc64 for old binaries.
[martin, ticket #1062]


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

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

Modified files:

Index: src/sys/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.69.2.3 src/sys/kern/exec_elf.c:1.69.2.4
--- src/sys/kern/exec_elf.c:1.69.2.3	Sun Nov  8 00:57:09 2015
+++ src/sys/kern/exec_elf.c	Tue Jan 26 01:18:37 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.69.2.3 2015/11/08 00:57:09 riz Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.69.2.4 2016/01/26 01:18:37 riz Exp $	*/
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.69.2.3 2015/11/08 00:57:09 riz Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.69.2.4 2016/01/26 01:18:37 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -77,6 +77,7 @@ __KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -409,20 +410,18 @@ elf_load_interp(struct lwp *l, struct ex
 	u_long phsize;
 	Elf_Addr addr = *last;
 	struct proc *p;
-	bool use_topdown;
+	bool use_topdown, restore_topdown;
 
 	p = l->l_proc;
 
 	KASSERT(p->p_vmspace);
-	if (__predict_true(p->p_vmspace != proc0.p_vmspace)) {
-		use_topdown = p->p_vmspace->vm_map.flags & VM_MAP_TOPDOWN;
-	} else {
+	KASSERT(p->p_vmspace != proc0.p_vmspace);
+	restore_topdown = false;
 #ifdef __USE_TOPDOWN_VM
-		use_topdown = epp->ep_flags & EXEC_TOPDOWN_VM;
+	use_topdown = epp->ep_flags & EXEC_TOPDOWN_VM;
 #else
-		use_topdown = false;
+	use_topdown = false;
 #endif
-	}
 
 	/*
 	 * 1. open file
@@ -537,9 +536,36 @@ elf_load_interp(struct lwp *l, struct ex
 		/*
 		 * Now compute the size and load address.
 		 */
+		if (__predict_false(
+		/* vmspace is marked as topdown */
+		(((p->p_vmspace->vm_map.flags & VM_MAP_TOPDOWN) != 0)
+			!=
+		 /* but this differs from the topdown usage we need */
+		 use_topdown))) {
+			/*
+			 * The vmmap might be shared, but this flag is
+			 * considered r/o and we will restore it immediately
+			 * after calculating the load address.
+			 */
+			int flags = p->p_vmspace->vm_map.flags;
+			int n = use_topdown
+? (flags | VM_MAP_TOPDOWN)
+: (flags & ~VM_MAP_TOPDOWN);
+
+			restore_topdown = true;
+			atomic_swap_32(>p_vmspace->vm_map.flags, n);
+		}
 		addr = (*epp->ep_esch->es_emul->e_vm_default_addr)(p,
 		epp->ep_daddr,
 		round_page(limit) - trunc_page(base_ph->p_vaddr));
+		if (__predict_false(restore_topdown)) {
+			int flags = p->p_vmspace->vm_map.flags;
+			int n = !use_topdown
+? (flags | VM_MAP_TOPDOWN)
+: (flags & ~VM_MAP_TOPDOWN);
+
+			atomic_swap_32(>p_vmspace->vm_map.flags, n);
+		}
 	} else
 		addr = *last; /* may be ELF_LINK_ADDR */
 



CVS commit: src/sys/arch

2016-01-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan 22 21:56:57 UTC 2016

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

Log Message:
Enable KDTRACE_HOOKS on i386 and amd64 GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.421 -r1.422 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.1129 -r1.1130 src/sys/arch/i386/conf/GENERIC

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

Modified files:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.421 src/sys/arch/amd64/conf/GENERIC:1.422
--- src/sys/arch/amd64/conf/GENERIC:1.421	Sun Jan 10 04:09:28 2016
+++ src/sys/arch/amd64/conf/GENERIC	Fri Jan 22 21:56:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.421 2016/01/10 04:09:28 christos Exp $
+# $NetBSD: GENERIC,v 1.422 2016/01/22 21:56:56 riz Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.421 $"
+#ident 		"GENERIC-$Revision: 1.422 $"
 
 maxusers	64		# estimated number of users
 
@@ -107,7 +107,7 @@ options 	DDB_HISTORY_SIZE=512	# enable h
 #options 	SYSCALL_STATS	# per syscall counts
 #options 	SYSCALL_TIMES	# per syscall times
 #options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
-#options 	KDTRACE_HOOKS	# kernel DTrace hooks
+options 	KDTRACE_HOOKS	# kernel DTrace hooks
 
 # Compatibility options
 options 	COMPAT_15	# NetBSD 1.5,

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1129 src/sys/arch/i386/conf/GENERIC:1.1130
--- src/sys/arch/i386/conf/GENERIC:1.1129	Tue Jan  5 11:33:18 2016
+++ src/sys/arch/i386/conf/GENERIC	Fri Jan 22 21:56:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1129 2016/01/05 11:33:18 msaitoh Exp $
+# $NetBSD: GENERIC,v 1.1130 2016/01/22 21:56:56 riz Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/i386/conf/std.i386"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.1129 $"
+#ident 		"GENERIC-$Revision: 1.1130 $"
 
 maxusers	64		# estimated number of users
 
@@ -122,7 +122,7 @@ options 	DDB_HISTORY_SIZE=512	# enable h
 #options 	SYSCALL_STATS	# per syscall counts
 #options 	SYSCALL_TIMES	# per syscall times
 #options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
-#options 	KDTRACE_HOOKS	# kernel DTrace hooks
+options 	KDTRACE_HOOKS	# kernel DTrace hooks
 
 # Compatibility options
 options 	COMPAT_NOMID	# NetBSD 0.8, 386BSD, and BSDI



CVS commit: src/share/mk

2016-01-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jan 22 21:55:51 UTC 2016

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

Log Message:
Build DTrace userland by default on i386, amd64 and earm*


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

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.883 src/share/mk/bsd.own.mk:1.884
--- src/share/mk/bsd.own.mk:1.883	Sat Dec 19 00:25:50 2015
+++ src/share/mk/bsd.own.mk	Fri Jan 22 21:55:51 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.883 2015/12/19 00:25:50 wiz Exp $
+#	$NetBSD: bsd.own.mk,v 1.884 2016/01/22 21:55:51 riz Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -976,6 +976,16 @@ MKZFS?=		yes
 .endif
 
 #
+# DTrace works on amd64, i386 and earm*
+#
+
+.if ${MACHINE_ARCH} == "i386" || \
+${MACHINE_ARCH} == "x86_64" || \
+!empty(MACHINE_ARCH:Mearm*)
+MKDTRACE?=	yes
+MKCTF?=		yes
+.endif
+#
 # MK* options which default to "yes".
 #
 _MKVARS.yes= \



CVS commit: [netbsd-7] src/doc

2016-01-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jan  2 14:40:39 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Fix changelog entry for ticket 1038 per kre.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.40 src/doc/CHANGES-7.1:1.1.2.41
--- src/doc/CHANGES-7.1:1.1.2.40	Sat Dec 26 22:26:28 2015
+++ src/doc/CHANGES-7.1	Sat Jan  2 14:40:39 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.40 2015/12/26 22:26:28 snj Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.41 2016/01/02 14:40:39 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1617,7 +1617,7 @@ sys/dev/vnd.c	1.249-1.254
 sys/sys/disk.h	1.66
 
 	Avoid netbsd-6 (and prior) vnconfig -l infinite loop with a newer
-	kernel.
+	kernel, and limit the vnd sector size choices to rational values.
 	[manu, ticket #1038]
 
 sys/external/bsd/drm2/include/linux/hdmi.h	1.6



CVS commit: [netbsd-7] src/doc

2016-01-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jan  2 14:46:09 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Ticket 1054


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.41 src/doc/CHANGES-7.1:1.1.2.42
--- src/doc/CHANGES-7.1:1.1.2.41	Sat Jan  2 14:40:39 2016
+++ src/doc/CHANGES-7.1	Sat Jan  2 14:46:09 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.41 2016/01/02 14:40:39 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.42 2016/01/02 14:46:09 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1707,3 +1707,8 @@ sys/dev/ic/dwc_gmac_reg.h			1.15
 	the cable wasn't plugged in at boot.
 	[jmcneill, ticket #1053]
 
+sys/dev/usb/ohci.c1.257
+
+	Fix missing-parentheses bug affecting ohci IN transfers.
+	[skrll, ticket #1054]
+



CVS commit: [netbsd-7-0] src/doc

2016-01-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jan  2 14:39:25 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
ticket 1038 to netbsd-7-0 as well.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.21 src/doc/CHANGES-7.0.1:1.1.2.22
--- src/doc/CHANGES-7.0.1:1.1.2.21	Sat Dec 26 22:26:58 2015
+++ src/doc/CHANGES-7.0.1	Sat Jan  2 14:39:25 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.21 2015/12/26 22:26:58 snj Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.22 2016/01/02 14:39:25 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -831,3 +831,10 @@ sys/dev/ic/dwc_gmac_reg.h			1.15
 	the cable wasn't plugged in at boot.
 	[jmcneill, ticket #1053]
 
+sys/dev/vnd.c   1.249-1.254
+sys/sys/disk.h  1.66
+
+	Avoid netbsd-6 (and prior) vnconfig -l infinite loop with a newer
+	kernel, and limit the vnd sector size choices to rational values.
+	[manu, ticket #1038]
+



CVS commit: [netbsd-7-0] src/sys

2016-01-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jan  2 14:38:45 UTC 2016

Modified Files:
src/sys/dev [netbsd-7-0]: vnd.c
src/sys/sys [netbsd-7-0]: disk.h

Log Message:
Pull up following revision(s) (requested by manu in ticket #1038):
sys/dev/vnd.c: revision 1.252
sys/dev/vnd.c: revision 1.253
sys/dev/vnd.c: revision 1.254
sys/dev/vnd.c: revision 1.249
sys/sys/disk.h: revision 1.66
sys/dev/vnd.c: revision 1.250
sys/dev/vnd.c: revision 1.251
- Add DK_DEV_BSIZE_OK()
- Simplify ioctl handling a little.
- disable debugging
- Return ENXIO if the get ioctl exceeds the number of configured devices.
  XXX: pullup-7
- explain why the int cast works (suggested by kre)
- fix incorrect memset.
- Use the new DK_DEV_BSIZE_OK() macro.


To generate a diff of this commit:
cvs rdiff -u -r1.232.2.3 -r1.232.2.3.2.1 src/sys/dev/vnd.c
cvs rdiff -u -r1.60 -r1.60.6.1 src/sys/sys/disk.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/vnd.c
diff -u src/sys/dev/vnd.c:1.232.2.3 src/sys/dev/vnd.c:1.232.2.3.2.1
--- src/sys/dev/vnd.c:1.232.2.3	Wed Jan 28 19:16:21 2015
+++ src/sys/dev/vnd.c	Sat Jan  2 14:38:45 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnd.c,v 1.232.2.3 2015/01/28 19:16:21 martin Exp $	*/
+/*	$NetBSD: vnd.c,v 1.232.2.3.2.1 2016/01/02 14:38:45 riz Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.232.2.3 2015/01/28 19:16:21 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.232.2.3.2.1 2016/01/02 14:38:45 riz Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
@@ -137,7 +137,7 @@ int dovndcluster = 1;
 #define VDB_INIT	0x02
 #define VDB_IO		0x04
 #define VDB_LABEL	0x08
-int vnddebug = 0x00;
+int vnddebug = 0;
 #endif
 
 #define vndunit(x)	DISKUNIT(x)
@@ -1030,7 +1030,7 @@ vnddoclear(struct vnd_softc *vnd, int pm
 	vndclear(vnd, minor);
 #ifdef DEBUG
 	if (vnddebug & VDB_INIT)
-		printf("vndioctl: CLRed\n");
+		printf("%s: CLRed\n", __func__);
 #endif
 
 	/* Destroy the xfer and buffer pools. */
@@ -1042,6 +1042,29 @@ vnddoclear(struct vnd_softc *vnd, int pm
 	return 0;
 }
 
+static int
+vndioctl_get(struct lwp *l, void *data, int unit, struct vattr *va)
+{
+	int error;
+
+	KASSERT(l);
+
+	/* the first member is always int vnd_unit in all the versions */
+	if (*(int *)data >= vnd_cd.cd_ndevs)
+		return ENXIO;
+
+	switch (error = vnd_cget(l, unit, (int *)data, va)) {
+	case -1:
+		/* unused is not an error */
+		memset(va, 0, sizeof(*va));
+		/*FALLTHROUGH*/
+	case 0:
+		return 0;
+	default:
+		return error;
+	}
+}
+
 /* ARGSUSED */
 static int
 vndioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
@@ -1067,15 +1090,46 @@ vndioctl(dev_t dev, u_long cmd, void *da
 		printf("vndioctl(0x%"PRIx64", 0x%lx, %p, 0x%x, %p): unit %d\n",
 		dev, cmd, data, flag, l->l_proc, unit);
 #endif
-	vnd = device_lookup_private(_cd, unit);
-	if (vnd == NULL &&
+	/* Do the get's first; they don't need initialization or verification */
+	switch (cmd) {
 #ifdef COMPAT_30
-	cmd != VNDIOCGET30 &&
+	case VNDIOCGET30: {
+		if ((error = vndioctl_get(l, data, unit, )) != 0)
+			return error;
+
+		struct vnd_user30 *vnu = data;
+		vnu->vnu_dev = vattr.va_fsid;
+		vnu->vnu_ino = vattr.va_fileid;
+		return 0;
+	}
 #endif
 #ifdef COMPAT_50
-	cmd != VNDIOCGET50 &&
+	case VNDIOCGET50: {
+		if ((error = vndioctl_get(l, data, unit, )) != 0)
+			return error;
+
+		struct vnd_user50 *vnu = data;
+		vnu->vnu_dev = vattr.va_fsid;
+		vnu->vnu_ino = vattr.va_fileid;
+		return 0;
+	}
 #endif
-	cmd != VNDIOCGET)
+
+	case VNDIOCGET: {
+		if ((error = vndioctl_get(l, data, unit, )) != 0)
+			return error;
+
+		struct vnd_user *vnu = data;
+		vnu->vnu_dev = vattr.va_fsid;
+		vnu->vnu_ino = vattr.va_fileid;
+		return 0;
+	}
+	default:
+		break;
+	}
+
+	vnd = device_lookup_private(_cd, unit);
+	if (vnd == NULL)
 		return ENXIO;
 	vio = (struct vnd_ioctl *)data;
 
@@ -1190,8 +1244,7 @@ vndioctl(dev_t dev, u_long cmd, void *da
 			/* note last offset is the file byte size */
 			vnd->sc_comp_numoffs = ntohl(ch->num_blocks)+1;
 			free(ch, M_TEMP);
-			if (vnd->sc_comp_blksz == 0 ||
-			vnd->sc_comp_blksz % DEV_BSIZE !=0) {
+			if (!DK_DEV_BSIZE_OK(vnd->sc_comp_blksz)) {
 VOP_UNLOCK(nd.ni_vp);
 error = EINVAL;
 goto close_and_exit;
@@ -1286,14 +1339,11 @@ vndioctl(dev_t dev, u_long cmd, void *da
 
 			/*
 			 * Sanity-check the sector size.
-			 * XXX Don't allow secsize < DEV_BSIZE.	 Should
-			 * XXX we?
 			 */
-			if (vnd->sc_geom.vng_secsize < DEV_BSIZE ||
-			(vnd->sc_geom.vng_secsize % DEV_BSIZE) != 0 ||
+			if (!DK_DEV_BSIZE_OK(vnd->sc_geom.vng_secsize) ||
 			vnd->sc_geom.vng_ncylinders == 0 ||
-			(vnd->sc_geom.vng_ntracks *
-			 vnd->sc_geom.vng_nsectors) == 0) {
+			vnd->sc_geom.vng_ntracks == 0 ||
+			   

CVS commit: [netbsd-7] src/sys/dev/usb

2016-01-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jan  2 14:43:48 UTC 2016

Modified Files:
src/sys/dev/usb [netbsd-7]: ohci.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1054):
sys/dev/usb/ohci.c: revision 1.257
Fix 10year old bug of mine affecting interrupt IN transfers.


To generate a diff of this commit:
cvs rdiff -u -r1.253.2.1 -r1.253.2.2 src/sys/dev/usb/ohci.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/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.253.2.1 src/sys/dev/usb/ohci.c:1.253.2.2
--- src/sys/dev/usb/ohci.c:1.253.2.1	Mon Dec  1 11:38:43 2014
+++ src/sys/dev/usb/ohci.c	Sat Jan  2 14:43:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.253.2.1 2014/12/01 11:38:43 martin Exp $	*/
+/*	$NetBSD: ohci.c,v 1.253.2.2 2016/01/02 14:43:48 riz Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.253.2.1 2014/12/01 11:38:43 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.253.2.2 2016/01/02 14:43:48 riz Exp $");
 
 #include 
 #include 
@@ -3191,7 +3191,7 @@ ohci_device_intr_start(usbd_xfer_handle 
 	tail->xfer = NULL;
 
 	data->td.td_flags = HTOO32(
-		isread ? OHCI_TD_IN : OHCI_TD_OUT |
+		(isread ? OHCI_TD_IN : OHCI_TD_OUT) |
 		OHCI_TD_NOCC |
 		OHCI_TD_SET_DI(1) | OHCI_TD_TOGGLE_CARRY);
 	if (xfer->flags & USBD_SHORT_XFER_OK)



CVS commit: othersrc/share/examples/ec2/files

2015-11-21 Thread Jeff Rizzo
Module Name:othersrc
Committed By:   riz
Date:   Sat Nov 21 20:02:36 UTC 2015

Modified Files:
othersrc/share/examples/ec2/files: ec2_init

Log Message:
Can't be both BEFORE: LOGIN and REQUIRE: sshd, so drop the former.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/share/examples/ec2/files/ec2_init

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

Modified files:

Index: othersrc/share/examples/ec2/files/ec2_init
diff -u othersrc/share/examples/ec2/files/ec2_init:1.1 othersrc/share/examples/ec2/files/ec2_init:1.2
--- othersrc/share/examples/ec2/files/ec2_init:1.1	Fri Apr 20 21:01:03 2012
+++ othersrc/share/examples/ec2/files/ec2_init	Sat Nov 21 20:02:36 2015
@@ -2,7 +2,6 @@
 #
 # PROVIDE: ec2_init
 # REQUIRE: NETWORKING sshd
-# BEFORE:  LOGIN
 
 #
 # DO NOT modify the output of this file without understanding the



CVS commit: othersrc/share/examples/ec2/files

2015-11-21 Thread Jeff Rizzo
Module Name:othersrc
Committed By:   riz
Date:   Sat Nov 21 20:03:53 UTC 2015

Modified Files:
othersrc/share/examples/ec2/files: ec2_firstboot

Log Message:
Remove "resize_root" lines from rc.conf if they exist.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/share/examples/ec2/files/ec2_firstboot

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

Modified files:

Index: othersrc/share/examples/ec2/files/ec2_firstboot
diff -u othersrc/share/examples/ec2/files/ec2_firstboot:1.1 othersrc/share/examples/ec2/files/ec2_firstboot:1.2
--- othersrc/share/examples/ec2/files/ec2_firstboot:1.1	Fri Apr 20 21:01:03 2012
+++ othersrc/share/examples/ec2/files/ec2_firstboot	Sat Nov 21 20:03:53 2015
@@ -19,6 +19,8 @@ ec2_firstboot_run()
 	# The first boot has finished.
 	if [ -f /root/firstboot ]; then
 		rm /root/firstboot
+		# remove resize_root from rc.conf
+		sed -i -e ',s^resize_root.*$,,' /etc/rc.conf
 	fi
 }
 



CVS commit: [netbsd-7] src/external/bsd/ntp/scripts

2015-11-17 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Nov 17 19:09:08 UTC 2015

Modified Files:
src/external/bsd/ntp/scripts [netbsd-7]: mkver

Log Message:
Pull up following revision(s) (requested by christos in ticket #1036):
external/bsd/ntp/scripts/mkver: revision 1.8
PR/50426: Dave Tyson: Fix ntp reported version.


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.3 -r1.4.4.4 src/external/bsd/ntp/scripts/mkver

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/ntp/scripts/mkver
diff -u src/external/bsd/ntp/scripts/mkver:1.4.4.3 src/external/bsd/ntp/scripts/mkver:1.4.4.4
--- src/external/bsd/ntp/scripts/mkver:1.4.4.3	Sun Nov  8 01:51:18 2015
+++ src/external/bsd/ntp/scripts/mkver	Tue Nov 17 19:09:08 2015
@@ -3,7 +3,7 @@ PROG=${1-UNKNOWN}
 
 ConfStr="$PROG"
 
-ConfStr="$ConfStr 4.2.8p3"
+ConfStr="$ConfStr 4.2.8p4"
 
 case "$CSET" in
  '') ;;



CVS commit: [netbsd-7] src/sys/arch/arm/omap

2015-11-17 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Nov 17 19:21:14 UTC 2015

Modified Files:
src/sys/arch/arm/omap [netbsd-7]: omap3_sdhc.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1017):
sys/arch/arm/omap/omap3_sdhc.c: revision 1.18
AM335x EDMA3 has an alignment restriction for both SAM and DAM in constant
addressing mode. In these cases, the physical address must be aligned to
256-bits. To handle this, pre-allocate a MAXPHYS sized bounce buffer and
use it for unaligned transfers.
Fixes edma errint! problem mentioned in port-arm/50288.


To generate a diff of this commit:
cvs rdiff -u -r1.14.4.2 -r1.14.4.3 src/sys/arch/arm/omap/omap3_sdhc.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/omap/omap3_sdhc.c
diff -u src/sys/arch/arm/omap/omap3_sdhc.c:1.14.4.2 src/sys/arch/arm/omap/omap3_sdhc.c:1.14.4.3
--- src/sys/arch/arm/omap/omap3_sdhc.c:1.14.4.2	Sun Nov  8 01:22:54 2015
+++ src/sys/arch/arm/omap/omap3_sdhc.c	Tue Nov 17 19:21:14 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdhc.c,v 1.14.4.2 2015/11/08 01:22:54 riz Exp $	*/
+/*	$NetBSD: omap3_sdhc.c,v 1.14.4.3 2015/11/17 19:21:14 riz Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.14.4.2 2015/11/08 01:22:54 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.14.4.3 2015/11/17 19:21:14 riz Exp $");
 
 #include "opt_omap.h"
 #include "edma.h"
@@ -109,13 +109,17 @@ struct obiosdhc_softc {
 	kcondvar_t		sc_edma_cv;
 	bus_addr_t		sc_edma_fifo;
 	bool			sc_edma_pending;
+	bus_dmamap_t		sc_edma_dmamap;
+	bus_dma_segment_t	sc_edma_segs[1];
+	void			*sc_edma_bbuf;
 #endif
 };
 
 #if NEDMA > 0
-static void obiosdhc_edma_init(struct obiosdhc_softc *, unsigned int);
+static int obiosdhc_edma_init(struct obiosdhc_softc *, unsigned int);
 static int obiosdhc_edma_xfer_data(struct sdhc_softc *, struct sdmmc_command *);
 static void obiosdhc_edma_done(void *);
+static int obiosdhc_edma_transfer(struct sdhc_softc *, struct sdmmc_command *);
 #endif
 
 #ifdef TI_AM335X
@@ -252,11 +256,13 @@ obiosdhc_attach(device_t parent, device_
 
 #if NEDMA > 0
 	if (oa->obio_edmabase != -1) {
+		if (obiosdhc_edma_init(sc, oa->obio_edmabase) != 0)
+			goto no_dma;
+
 		mutex_init(>sc_edma_lock, MUTEX_DEFAULT, IPL_SCHED);
 		cv_init(>sc_edma_cv, "sdhcedma");
 		sc->sc_edma_fifo = oa->obio_addr +
 		OMAP3_SDMMC_SDHC_OFFSET + SDHC_DATA;
-		obiosdhc_edma_init(sc, oa->obio_edmabase);
 		sc->sc.sc_flags |= SDHC_FLAG_USE_DMA;
 		sc->sc.sc_flags |= SDHC_FLAG_EXTERNAL_DMA;
 		sc->sc.sc_flags |= SDHC_FLAG_EXTDMA_DMAEN;
@@ -264,6 +270,7 @@ obiosdhc_attach(device_t parent, device_
 		sc->sc.sc_vendor_transfer_data_dma = obiosdhc_edma_xfer_data;
 		transfer_mode = "EDMA";
 	}
+no_dma:
 #endif
 
 	aprint_naive("\n");
@@ -494,10 +501,10 @@ obiosdhc_bus_clock(struct sdhc_softc *sc
 }
 
 #if NEDMA > 0
-static void
+static int
 obiosdhc_edma_init(struct obiosdhc_softc *sc, unsigned int edmabase)
 {
-	int i;
+	int i, error, rseg;
 
 	/* Request tx and rx DMA channels */
 	sc->sc_edma_tx = edma_channel_alloc(EDMA_TYPE_DMA, edmabase + 0,
@@ -521,18 +528,98 @@ obiosdhc_edma_init(struct obiosdhc_softc
 		KASSERT(sc->sc_edma_param_rx[i] != 0x);
 	}
 
-	return;
+	/* Setup bounce buffer */
+	error = bus_dmamem_alloc(sc->sc.sc_dmat, MAXPHYS, 32, MAXPHYS,
+	sc->sc_edma_segs, 1, , BUS_DMA_WAITOK);
+	if (error) {
+		aprint_error_dev(sc->sc.sc_dev,
+		"couldn't allocate dmamem: %d\n", error);
+		return error;
+	}
+	KASSERT(rseg == 1);
+	error = bus_dmamem_map(sc->sc.sc_dmat, sc->sc_edma_segs, rseg, MAXPHYS,
+	>sc_edma_bbuf, BUS_DMA_WAITOK);
+	if (error) {
+		aprint_error_dev(sc->sc.sc_dev, "couldn't map dmamem: %d\n",
+		error);
+		return error;
+	}
+	error = bus_dmamap_create(sc->sc.sc_dmat, MAXPHYS, 1, MAXPHYS, 0,
+	BUS_DMA_WAITOK, >sc_edma_dmamap);
+	if (error) {
+		aprint_error_dev(sc->sc.sc_dev, "couldn't create dmamap: %d\n",
+		error);
+		return error;
+	}
+
+	return error;
 }
 
 static int
 obiosdhc_edma_xfer_data(struct sdhc_softc *sdhc_sc, struct sdmmc_command *cmd)
 {
 	struct obiosdhc_softc *sc = device_private(sdhc_sc->sc_dev);
+	const bus_dmamap_t map = cmd->c_dmamap;
+	int seg, error;
+	bool bounce;
+
+	for (bounce = false, seg = 0; seg < cmd->c_dmamap->dm_nsegs; seg++) {
+		if ((cmd->c_dmamap->dm_segs[seg].ds_addr & 0x1f) != 0) {
+			bounce = true;
+			break;
+		}
+	}
+
+	if (bounce) {
+		error = bus_dmamap_load(sc->sc.sc_dmat, sc->sc_edma_dmamap,
+		sc->sc_edma_bbuf, MAXPHYS, NULL, BUS_DMA_WAITOK);
+		if (error) {
+			device_printf(sc->sc.sc_dev,
+			"[bounce] bus_dmamap_load failed: %d\n", error);
+			return error;
+		}
+		if (ISSET(cmd->c_flags, SCF_CMD_READ)) {
+			bus_dmamap_sync(sc->sc.sc_dmat, sc->sc_edma_dmamap, 0,
+			MAXPHYS, BUS_DMASYNC_PREREAD);
+		} else {

CVS commit: [netbsd-7] src/doc

2015-11-17 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Nov 17 19:22:10 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
ticket 1017.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.33 src/doc/CHANGES-7.1:1.1.2.34
--- src/doc/CHANGES-7.1:1.1.2.33	Tue Nov 17 19:18:19 2015
+++ src/doc/CHANGES-7.1	Tue Nov 17 19:22:10 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.33 2015/11/17 19:18:19 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.34 2015/11/17 19:22:10 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1585,3 +1585,9 @@ external/bsd/ntp/scripts/mkver			1.8
 	PR/50426: Dave Tyson: Fix ntp reported version.
 	[christos, ticket #1036]
 
+sys/arch/arm/omap/omap3_sdhc.c			1.18 via patch
+
+	Fix edma_errint problems with resize_ffs on beaglebone.
+	PR#50288.
+	[jmcneill, ticket #1017]
+



CVS commit: [netbsd-7] src

2015-11-17 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Nov 17 19:18:19 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1
src/sys/compat/linux/common [netbsd-7]: linux_mod.c
src/sys/compat/netbsd32 [netbsd-7]: netbsd32_mod.c

Log Message:
Revert ticket #1020, per pgoyette in ticket #1041.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-7.1
cvs rdiff -u -r1.4.4.1 -r1.4.4.2 src/sys/compat/linux/common/linux_mod.c
cvs rdiff -u -r1.5.2.1 -r1.5.2.2 src/sys/compat/netbsd32/netbsd32_mod.c

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.32 src/doc/CHANGES-7.1:1.1.2.33
--- src/doc/CHANGES-7.1:1.1.2.32	Mon Nov 16 14:46:54 2015
+++ src/doc/CHANGES-7.1	Tue Nov 17 19:18:19 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.32 2015/11/16 14:46:54 msaitoh Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.33 2015/11/17 19:18:19 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1473,12 +1473,6 @@ external/bsd/ntp/scripts/mkver  
 	Update ntp to 4.2.8p4.
 	[christos, ticket #1024]
 
-sys/compat/linux/common/linux_mod.c		1.5
-sys/compat/netbsd32/netbsd32_mod.c		1.6-1.9
-
-	Fixes for compat modules.
-	[pgoyette, ticket #1020]
-
 usr.sbin/vnconfig/vnconfig.8			1.40
 
 	In NetBSD 7, the vnconfig command was renamed.
@@ -1585,3 +1579,9 @@ sys/dev/usb/usb_subr.c1.204
 
 	Attach serial number as property to all USB devices having one.
 	[joerg, ticket #1032]
+
+external/bsd/ntp/scripts/mkver			1.8
+
+	PR/50426: Dave Tyson: Fix ntp reported version.
+	[christos, ticket #1036]
+

Index: src/sys/compat/linux/common/linux_mod.c
diff -u src/sys/compat/linux/common/linux_mod.c:1.4.4.1 src/sys/compat/linux/common/linux_mod.c:1.4.4.2
--- src/sys/compat/linux/common/linux_mod.c:1.4.4.1	Sun Nov  8 02:02:37 2015
+++ src/sys/compat/linux/common/linux_mod.c	Tue Nov 17 19:18:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mod.c,v 1.4.4.1 2015/11/08 02:02:37 riz Exp $	*/
+/*	$NetBSD: linux_mod.c,v 1.4.4.2 2015/11/17 19:18:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.4.4.1 2015/11/08 02:02:37 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.4.4.2 2015/11/17 19:18:19 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -65,8 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mod.c,
 # define	MD3	""
 #endif
 
-MODULE(MODULE_CLASS_EXEC, compat_linux, "compat,compat_ossaudio,compat_sysv"
-	MD1 MD2 MD3);
+MODULE(MODULE_CLASS_EXEC, compat_linux, "compat,compat_ossaudio" MD1 MD2 MD3);
 
 static struct execsw linux_execsw[] = {
 #if defined(EXEC_ELF32) && ELFSIZE == 32

Index: src/sys/compat/netbsd32/netbsd32_mod.c
diff -u src/sys/compat/netbsd32/netbsd32_mod.c:1.5.2.1 src/sys/compat/netbsd32/netbsd32_mod.c:1.5.2.2
--- src/sys/compat/netbsd32/netbsd32_mod.c:1.5.2.1	Sun Nov  8 02:02:36 2015
+++ src/sys/compat/netbsd32/netbsd32_mod.c	Tue Nov 17 19:18:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_mod.c,v 1.5.2.1 2015/11/08 02:02:36 riz Exp $	*/
+/*	$NetBSD: netbsd32_mod.c,v 1.5.2.2 2015/11/17 19:18:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,13 +30,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.5.2.1 2015/11/08 02:02:36 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.5.2.2 2015/11/17 19:18:19 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
-# define	DEPS1	"compat,compat_sysv,nfsserver,mqueue"
+# define	DEPS1	"compat"
 #else
-# define	DEPS1	"compat,compat_sysv,nfsserver,mqueue,ksem"
+# define	DEPS1	"compat,ksem"
 #endif
 
 #ifndef ELFSIZE



CVS commit: [netbsd-7-0] src/external/bsd/ntp/scripts

2015-11-17 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Nov 17 19:09:22 UTC 2015

Modified Files:
src/external/bsd/ntp/scripts [netbsd-7-0]: mkver

Log Message:
Pull up following revision(s) (requested by christos in ticket #1036):
external/bsd/ntp/scripts/mkver: revision 1.8
PR/50426: Dave Tyson: Fix ntp reported version.


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.2.2.1 -r1.4.4.2.2.2 src/external/bsd/ntp/scripts/mkver

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/ntp/scripts/mkver
diff -u src/external/bsd/ntp/scripts/mkver:1.4.4.2.2.1 src/external/bsd/ntp/scripts/mkver:1.4.4.2.2.2
--- src/external/bsd/ntp/scripts/mkver:1.4.4.2.2.1	Sun Nov  8 01:55:39 2015
+++ src/external/bsd/ntp/scripts/mkver	Tue Nov 17 19:09:22 2015
@@ -3,7 +3,7 @@ PROG=${1-UNKNOWN}
 
 ConfStr="$PROG"
 
-ConfStr="$ConfStr 4.2.8p3"
+ConfStr="$ConfStr 4.2.8p4"
 
 case "$CSET" in
  '') ;;



CVS commit: [netbsd-7-0] src/doc

2015-11-17 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Nov 17 19:18:56 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Ticket 1036.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.15 src/doc/CHANGES-7.0.1:1.1.2.16
--- src/doc/CHANGES-7.0.1:1.1.2.15	Mon Nov 16 14:47:16 2015
+++ src/doc/CHANGES-7.0.1	Tue Nov 17 19:18:56 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.15 2015/11/16 14:47:16 msaitoh Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.16 2015/11/17 19:18:56 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -761,3 +761,9 @@ sys/arch/sparc64/sparc64/vm_machdep.c		1
 
 	Fix various sparc64 compat_netbsd32 issues.
 	[martin, ticket #1028]
+
+external/bsd/ntp/scripts/mkver			1.8
+
+	PR/50426: Dave Tyson: Fix ntp reported version.
+	[christos, ticket #1036]
+



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2015-11-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Nov 12 22:10:48 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_lex.l

Log Message:
Declare variables under the same conditions as their use.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_lex.l

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/lib/libdtrace/common/dt_lex.l
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_lex.l:1.4 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_lex.l:1.5
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_lex.l:1.4	Thu Sep 24 14:25:29 2015
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_lex.l	Thu Nov 12 22:10:48 2015
@@ -430,7 +430,10 @@ if (yypcb->pcb_token != 0) {
 '{RGX_CHR}$	xyerror(D_CHR_NL, "newline encountered in character constant");
 
 '{RGX_CHR}'	{
-			char *s, *p, *q;
+			char *s;
+#if BYTE_ORDER == _LITTLE_ENDIAN
+			char  *p, *q;
+#endif
 			size_t nbytes;
 
 			/*



CVS commit: [netbsd-7] src/external/bsd/ntp

2015-11-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 23:28:05 UTC 2015

Modified Files:
src/external/bsd/ntp [netbsd-7]: Makefile.inc

Log Message:
Apply additional patch (requested by christos in ticket #1024):
-D__syslog__=__printf__


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/external/bsd/ntp/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/external/bsd/ntp/Makefile.inc
diff -u src/external/bsd/ntp/Makefile.inc:1.14.2.1 src/external/bsd/ntp/Makefile.inc:1.14.2.2
--- src/external/bsd/ntp/Makefile.inc:1.14.2.1	Wed Dec 24 00:05:04 2014
+++ src/external/bsd/ntp/Makefile.inc	Sun Nov  8 23:28:05 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.14.2.1 2014/12/24 00:05:04 riz Exp $
+#	$NetBSD: Makefile.inc,v 1.14.2.2 2015/11/08 23:28:05 riz Exp $
 
 .if !defined(NTP_MAKEFILE_INC)
 NTP_MAKEFILE_INC=yes
@@ -22,6 +22,7 @@ NTP_HTMLDIR=	/usr/share/doc/reference/re
 SYSCONFDIR=/etc
 LOCALSTATEDIR=/var
 
+CPPFLAGS+=-D__syslog__=__printf__
 CPPFLAGS+=-DHAVE_CONFIG_H
 CPPFLAGS+=-I${NTP_SRCDIR}/include \
 	  -I${IDIST}/include \



CVS commit: [netbsd-7-0] src/doc

2015-11-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 23:29:53 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Adjust ticket #1024


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.12 src/doc/CHANGES-7.0.1:1.1.2.13
--- src/doc/CHANGES-7.0.1:1.1.2.12	Sun Nov  8 02:05:16 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 23:29:53 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.12 2015/11/08 02:05:16 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.13 2015/11/08 23:29:53 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -134,6 +134,7 @@ sys/fs/tmpfs/tmpfs_subr.c			1.101
 	[leot, ticket #1023]
 
 doc/3RDPARTY	patch
+external/bsd/ntp/Makefile.inc			patch
 external/bsd/ntp/dist/tests/libntp/atoint.c up to 1.1.1.3
 external/bsd/ntp/dist/tests/libntp/atouint.cup to 1.1.1.3
 external/bsd/ntp/dist/tests/libntp/authkeys.c   up to 1.1.1.3



CVS commit: [netbsd-7] src/doc

2015-11-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 23:30:08 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Adjust ticket 1024


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.28 src/doc/CHANGES-7.1:1.1.2.29
--- src/doc/CHANGES-7.1:1.1.2.28	Sun Nov  8 05:18:34 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 23:30:08 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.28 2015/11/08 05:18:34 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.29 2015/11/08 23:30:08 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -865,6 +865,7 @@ sys/fs/tmpfs/tmpfs_subr.c			1.101
 	[leot, ticket #1023]
 
 doc/3RDPARTY	patch
+external/bsd/ntp/Makefile.inc			patch
 external/bsd/ntp/dist/tests/libntp/atoint.c up to 1.1.1.3
 external/bsd/ntp/dist/tests/libntp/atouint.cup to 1.1.1.3
 external/bsd/ntp/dist/tests/libntp/authkeys.c   up to 1.1.1.3



CVS commit: [netbsd-7-0] src/external/bsd/ntp

2015-11-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 23:26:45 UTC 2015

Modified Files:
src/external/bsd/ntp [netbsd-7-0]: Makefile.inc

Log Message:
Apply additional patch (requested by christos in ticket #1024):
-D__syslog__=__printf__


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.1 -r1.14.2.1.2.1 src/external/bsd/ntp/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/external/bsd/ntp/Makefile.inc
diff -u src/external/bsd/ntp/Makefile.inc:1.14.2.1 src/external/bsd/ntp/Makefile.inc:1.14.2.1.2.1
--- src/external/bsd/ntp/Makefile.inc:1.14.2.1	Wed Dec 24 00:05:04 2014
+++ src/external/bsd/ntp/Makefile.inc	Sun Nov  8 23:26:45 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.14.2.1 2014/12/24 00:05:04 riz Exp $
+#	$NetBSD: Makefile.inc,v 1.14.2.1.2.1 2015/11/08 23:26:45 riz Exp $
 
 .if !defined(NTP_MAKEFILE_INC)
 NTP_MAKEFILE_INC=yes
@@ -22,6 +22,7 @@ NTP_HTMLDIR=	/usr/share/doc/reference/re
 SYSCONFDIR=/etc
 LOCALSTATEDIR=/var
 
+CPPFLAGS+=-D__syslog__=__printf__
 CPPFLAGS+=-DHAVE_CONFIG_H
 CPPFLAGS+=-I${NTP_SRCDIR}/include \
 	  -I${IDIST}/include \



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:37:03 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Ticket 1006.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.5 src/doc/CHANGES-7.0.1:1.1.2.6
--- src/doc/CHANGES-7.0.1:1.1.2.5	Thu Nov  5 09:35:43 2015
+++ src/doc/CHANGES-7.0.1	Sat Nov  7 16:37:03 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.5 2015/11/05 09:35:43 snj Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.6 2015/11/07 16:37:03 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -92,3 +92,8 @@ sys/kern/kern_exit.c1.248
 	Update value of p_stat before we release the proc_lock.
 	[pgoyette, ticket #999]
 
+sys/arch/arm/allwinner/awin_mmc.c		1.22
+
+	Avoid a divide by 0 when unplugging a sd card.
+	[bouyer, ticket #1006]
+



CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:43:39 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1006, 1007


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.21 src/doc/CHANGES-7.1:1.1.2.22
--- src/doc/CHANGES-7.1:1.1.2.21	Sat Nov  7 01:56:08 2015
+++ src/doc/CHANGES-7.1	Sat Nov  7 16:43:38 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.21 2015/11/07 01:56:08 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.22 2015/11/07 16:43:38 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -769,3 +769,13 @@ sys/arch/arm/allwinner/awin_gpio.c		1.19
 	to find which port is connected to which gpio instance.
 	[bouyer, ticket #1004]
 
+sys/arch/arm/allwinner/awin_mmc.c		1.22
+
+	Avoid a divide by 0 when unplugging a sd card.
+	[bouyer, ticket #1006]
+
+lib/libcurses/toucholap.c			1.16
+
+	Fix x/y editing error.
+	[uwe, ticket #1007]
+



CVS commit: [netbsd-7-0] src/sys/arch/arm/allwinner

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:14:37 UTC 2015

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7-0]: awin_mmc.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1006):
sys/arch/arm/allwinner/awin_mmc.c: revision 1.22
Avoid a divide by 0 when unplugging a sd card.


To generate a diff of this commit:
cvs rdiff -u -r1.3.10.3 -r1.3.10.3.2.1 src/sys/arch/arm/allwinner/awin_mmc.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/allwinner/awin_mmc.c
diff -u src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3 src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3.2.1
--- src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3	Thu Dec  4 11:08:38 2014
+++ src/sys/arch/arm/allwinner/awin_mmc.c	Sat Nov  7 16:14:37 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $ */
+/* $NetBSD: awin_mmc.c,v 1.3.10.3.2.1 2015/11/07 16:14:37 riz Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.3.2.1 2015/11/07 16:14:37 riz Exp $");
 
 #include 
 #include 
@@ -510,7 +510,10 @@ awin_mmc_bus_clock(sdmmc_chipset_handle_
 		sdly = awin_chip_id() == AWIN_CHIP_ID_A31 ? 0 : 7;
 		clksrc = AWIN_SD_CLK_SRC_SEL_OSC24M;
 		n = 2;
-		m = ((osc24m_freq / (1 << n)) / freq) - 1;
+		if (freq > 0)
+			m = ((osc24m_freq / (1 << n)) / freq) - 1;
+		else
+			m = 15;
 	} else if (freq <= 25000) {
 		odly = 0;
 		sdly = 5;



CVS commit: [netbsd-7] src/sys/arch/arm/allwinner

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:15:03 UTC 2015

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_mmc.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1006):
sys/arch/arm/allwinner/awin_mmc.c: revision 1.22
Avoid a divide by 0 when unplugging a sd card.


To generate a diff of this commit:
cvs rdiff -u -r1.3.10.3 -r1.3.10.4 src/sys/arch/arm/allwinner/awin_mmc.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/allwinner/awin_mmc.c
diff -u src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3 src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.4
--- src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3	Thu Dec  4 11:08:38 2014
+++ src/sys/arch/arm/allwinner/awin_mmc.c	Sat Nov  7 16:15:03 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $ */
+/* $NetBSD: awin_mmc.c,v 1.3.10.4 2015/11/07 16:15:03 riz Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.4 2015/11/07 16:15:03 riz Exp $");
 
 #include 
 #include 
@@ -510,7 +510,10 @@ awin_mmc_bus_clock(sdmmc_chipset_handle_
 		sdly = awin_chip_id() == AWIN_CHIP_ID_A31 ? 0 : 7;
 		clksrc = AWIN_SD_CLK_SRC_SEL_OSC24M;
 		n = 2;
-		m = ((osc24m_freq / (1 << n)) / freq) - 1;
+		if (freq > 0)
+			m = ((osc24m_freq / (1 << n)) / freq) - 1;
+		else
+			m = 15;
 	} else if (freq <= 25000) {
 		odly = 0;
 		sdly = 5;



CVS commit: [netbsd-7] src/lib/libcurses

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:38:22 UTC 2015

Modified Files:
src/lib/libcurses [netbsd-7]: toucholap.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1007):
lib/libcurses/toucholap.c: revision 1.16
Fix x/y edito.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.54.1 src/lib/libcurses/toucholap.c

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

Modified files:

Index: src/lib/libcurses/toucholap.c
diff -u src/lib/libcurses/toucholap.c:1.15 src/lib/libcurses/toucholap.c:1.15.54.1
--- src/lib/libcurses/toucholap.c:1.15	Sun Jan 21 13:25:36 2007
+++ src/lib/libcurses/toucholap.c	Sat Nov  7 16:38:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: toucholap.c,v 1.15 2007/01/21 13:25:36 jdc Exp $	*/
+/*	$NetBSD: toucholap.c,v 1.15.54.1 2015/11/07 16:38:22 riz Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)toucholap.c	8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: toucholap.c,v 1.15 2007/01/21 13:25:36 jdc Exp $");
+__RCSID("$NetBSD: toucholap.c,v 1.15.54.1 2015/11/07 16:38:22 riz Exp $");
 #endif
 #endif/* not lint */
 
@@ -55,7 +55,7 @@ touchoverlap(WINDOW *win1, WINDOW *win2)
 #endif
 	starty = max(win1->begy, win2->begy);
 	startx = max(win1->begx, win2->begx);
-	endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
+	endy = min(win1->maxy + win1->begy, win2->maxy + win2->begy);
 	endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
 #ifdef DEBUG
 	__CTRACE(__CTRACE_WINDOW, "touchoverlap: from (%d,%d) to (%d,%d)\n",



CVS commit: [netbsd-7] src/usr.sbin/sysinst

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:21:35 UTC 2015

Modified Files:
src/usr.sbin/sysinst [netbsd-7]: target.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1008):
usr.sbin/sysinst/target.c: revision 1.3
PR 50342: if there is no current partition manage, assume we are running
from an already installed system.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.4.1 src/usr.sbin/sysinst/target.c

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

Modified files:

Index: src/usr.sbin/sysinst/target.c
diff -u src/usr.sbin/sysinst/target.c:1.2 src/usr.sbin/sysinst/target.c:1.2.4.1
--- src/usr.sbin/sysinst/target.c:1.2	Sun Aug  3 16:09:38 2014
+++ src/usr.sbin/sysinst/target.c	Sun Nov  8 00:21:34 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: target.c,v 1.2 2014/08/03 16:09:38 martin Exp $	*/
+/*	$NetBSD: target.c,v 1.2.4.1 2015/11/08 00:21:34 riz Exp $	*/
 
 /*
  * Copyright 1997 Jonathan Stone
@@ -71,7 +71,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: target.c,v 1.2 2014/08/03 16:09:38 martin Exp $");
+__RCSID("$NetBSD: target.c,v 1.2.4.1 2015/11/08 00:21:34 riz Exp $");
 #endif
 
 /*
@@ -153,6 +153,9 @@ int
 target_already_root(void)
 {
 
+	if (pm == NULL)
+		return TRUE;
+
 	if (strcmp(pm->diskdev, "") == 0)
 		/* No root partition was ever selected.
 		 * Assume that the currently mounted one should be used



CVS commit: [netbsd-7] src

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:24:26 UTC 2015

Modified Files:
src/distrib/sets/lists/comp [netbsd-7]: mi
src/lib/libm [netbsd-7]: Makefile
src/lib/libm/man [netbsd-7]: erf.3

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1009):
lib/libm/man/erf.3: revision 1.13
distrib/sets/lists/comp/mi: revision 1.1921
lib/libm/Makefile: revision 1.167
PR/49399: Henning Petersen: Add man pages for erfl and erfcl
fix sets for new erf{c,}l man pages.


To generate a diff of this commit:
cvs rdiff -u -r1.1906.2.8 -r1.1906.2.9 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.164.2.2 -r1.164.2.3 src/lib/libm/Makefile
cvs rdiff -u -r1.12 -r1.12.74.1 src/lib/libm/man/erf.3

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1906.2.8 src/distrib/sets/lists/comp/mi:1.1906.2.9
--- src/distrib/sets/lists/comp/mi:1.1906.2.8	Thu Jun  4 20:29:49 2015
+++ src/distrib/sets/lists/comp/mi	Sun Nov  8 00:24:25 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1906.2.8 2015/06/04 20:29:49 snj Exp $
+#	$NetBSD: mi,v 1.1906.2.9 2015/11/08 00:24:25 riz Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6382,7 +6382,9 @@
 ./usr/share/man/cat3/erf.0			comp-c-catman		.cat
 ./usr/share/man/cat3/erfc.0			comp-c-catman		.cat
 ./usr/share/man/cat3/erfcf.0			comp-c-catman		.cat
+./usr/share/man/cat3/erfcl.0			comp-c-catman		.cat
 ./usr/share/man/cat3/erff.0			comp-c-catman		.cat
+./usr/share/man/cat3/erfl.0			comp-c-catman		.cat
 ./usr/share/man/cat3/err.0			comp-c-catman		.cat
 ./usr/share/man/cat3/errc.0			comp-c-catman		.cat
 ./usr/share/man/cat3/error_message.0		comp-krb5-catman	kerberos,.cat
@@ -13245,7 +13247,9 @@
 ./usr/share/man/html3/erf.html			comp-c-htmlman		html
 ./usr/share/man/html3/erfc.html			comp-c-htmlman		html
 ./usr/share/man/html3/erfcf.html		comp-c-htmlman		html
+./usr/share/man/html3/erfcl.html		comp-c-htmlman		html
 ./usr/share/man/html3/erff.html			comp-c-htmlman		html
+./usr/share/man/html3/erfl.html			comp-c-htmlman		html
 ./usr/share/man/html3/err.html			comp-c-htmlman		html
 ./usr/share/man/html3/errc.html			comp-c-htmlman		html
 ./usr/share/man/html3/error_message.html	comp-krb5-htmlman	kerberos,html
@@ -20021,7 +20025,9 @@
 ./usr/share/man/man3/erf.3			comp-c-man		.man
 ./usr/share/man/man3/erfc.3			comp-c-man		.man
 ./usr/share/man/man3/erfcf.3			comp-c-man		.man
+./usr/share/man/man3/erfcl.3			comp-c-man		.man
 ./usr/share/man/man3/erff.3			comp-c-man		.man
+./usr/share/man/man3/erfl.3			comp-c-man		.man
 ./usr/share/man/man3/err.3			comp-c-man		.man
 ./usr/share/man/man3/errc.3			comp-c-man		.man
 ./usr/share/man/man3/error_message.3		comp-krb5-man		kerberos,.man

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.164.2.2 src/lib/libm/Makefile:1.164.2.3
--- src/lib/libm/Makefile:1.164.2.2	Tue Jan 20 20:57:24 2015
+++ src/lib/libm/Makefile	Sun Nov  8 00:24:25 2015
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.164.2.2 2015/01/20 20:57:24 snj Exp $
+#  $NetBSD: Makefile,v 1.164.2.3 2015/11/08 00:24:25 riz Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -313,7 +313,11 @@ MLINKS+=copysign.3 copysignf.3 \
 	copysign.3 copysignl.3
 MLINKS+=cos.3 cosf.3
 MLINKS+=cosh.3 coshf.3
-MLINKS+=erf.3 erff.3 erf.3 erfc.3 erf.3 erfcf.3
+MLINKS+=erf.3 erff.3 \
+	erf.3 erfl.3 \
+	erf.3 erfc.3 \
+	erf.3 erfcf.3 \
+	erf.3 erfcl.3
 MLINKS+=exp.3 expf.3 exp.3 expm1.3 exp.3 expm1f.3 			\
 	exp.3 exp2.3 exp.3 exp2f.3
 MLINKS+=log.3 logf.3 \

Index: src/lib/libm/man/erf.3
diff -u src/lib/libm/man/erf.3:1.12 src/lib/libm/man/erf.3:1.12.74.1
--- src/lib/libm/man/erf.3:1.12	Thu Aug  7 16:44:47 2003
+++ src/lib/libm/man/erf.3	Sun Nov  8 00:24:25 2015
@@ -26,16 +26,18 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)erf.3	6.4 (Berkeley) 4/20/91
-.\"	$NetBSD: erf.3,v 1.12 2003/08/07 16:44:47 agc Exp $
+.\"	$NetBSD: erf.3,v 1.12.74.1 2015/11/08 00:24:25 riz Exp $
 .\"
-.Dd April 20, 1991
+.Dd November 17, 2014
 .Dt ERF 3
 .Os
 .Sh NAME
 .Nm erf ,
 .Nm erff ,
+.Nm erfl ,
 .Nm erfc ,
-.Nm erfcf
+.Nm erfcf ,
+.Nm erfcl
 .Nd error function operators
 .Sh LIBRARY
 .Lb libm
@@ -45,10 +47,14 @@
 .Fn erf "double x"
 .Ft float
 .Fn erff "float x"
+.Ft long double
+.Fn erff "long double x"
 .Ft double
 .Fn erfc "double x"
 .Ft float
 .Fn erfcf "float x"
+.Ft long double
+.Fn erfcl "long double x"
 .Sh DESCRIPTION
 These functions calculate the error function of
 .Fa x .



CVS commit: [netbsd-7] src

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:35:45 UTC 2015

Modified Files:
src/external/gpl3/binutils/dist/binutils [netbsd-7]: arsup.c
src/lib/libc/net [netbsd-7]: getnetnamadr.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1012):
lib/libc/net/getnetnamadr.c: revision 1.43
lib/libc/net/getnetnamadr.c: revision 1.44
external/gpl3/binutils/dist/binutils/arsup.c: revision 1.2
put the state back after it is used.
PR/50367: Stefan Schaeckeler: Apply fix to obey RES_CHECKNAME to getnetbyaddr
and getnetbyname.
use asprintf(3)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.20.1 \
src/external/gpl3/binutils/dist/binutils/arsup.c
cvs rdiff -u -r1.42 -r1.42.10.1 src/lib/libc/net/getnetnamadr.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/gpl3/binutils/dist/binutils/arsup.c
diff -u src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2 src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2.20.1
--- src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2	Sat Sep 24 22:39:13 2011
+++ src/external/gpl3/binutils/dist/binutils/arsup.c	Sun Nov  8 00:35:45 2015
@@ -149,13 +149,20 @@ maybequit (void)
 void
 ar_open (char *name, int t)
 {
-  char *tname = (char *) xmalloc (strlen (name) + 10);
+  char *tname;
   const char *bname = lbasename (name);
   real_name = name;
 
   /* Prepend tmp- to the beginning, to avoid file-name clashes after
  truncation on filesystems with limited namespaces (DOS).  */
-  sprintf (tname, "%.*stmp-%s", (int) (bname - name), name, bname);
+  if (asprintf (, "%.*stmp-%s", (int) (bname - name), name, bname) == -1)
+{
+  fprintf (stderr, _("%s: Can't allocate memory for temp name (%s)\n"),
+	program_name, strerror(errno));
+  maybequit ();
+  return;
+}
+
   obfd = bfd_openw (tname, NULL);
 
   if (!obfd)

Index: src/lib/libc/net/getnetnamadr.c
diff -u src/lib/libc/net/getnetnamadr.c:1.42 src/lib/libc/net/getnetnamadr.c:1.42.10.1
--- src/lib/libc/net/getnetnamadr.c:1.42	Tue Mar 13 21:13:41 2012
+++ src/lib/libc/net/getnetnamadr.c	Sun Nov  8 00:35:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: getnetnamadr.c,v 1.42 2012/03/13 21:13:41 christos Exp $	*/
+/*	$NetBSD: getnetnamadr.c,v 1.42.10.1 2015/11/08 00:35:45 riz Exp $	*/
 
 /* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
  *	Dep. Matematica Universidade de Coimbra, Portugal, Europe
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)getnetbyaddr
 static char sccsid_[] = "from getnetnamadr.c	1.4 (Coimbra) 93/06/03";
 static char rcsid[] = "Id: getnetnamadr.c,v 8.8 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: getnetnamadr.c,v 1.42 2012/03/13 21:13:41 christos Exp $");
+__RCSID("$NetBSD: getnetnamadr.c,v 1.42.10.1 2015/11/08 00:35:45 riz Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -77,6 +77,12 @@ __weak_alias(getnetbyaddr,_getnetbyaddr)
 __weak_alias(getnetbyname,_getnetbyname)
 #endif
 
+#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0U || \
+   (ok)(nm) != 0)
+#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
+#define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
+
+
 extern int _net_stayopen;
 
 #define BYADDR 0
@@ -105,7 +111,7 @@ static	struct netent net_entry;
 static	char *net_aliases[MAXALIASES];
 
 static int		parse_reversed_addr(const char *, in_addr_t *);
-static struct netent	*getnetanswer(querybuf *, int, int);
+static struct netent	*getnetanswer(res_state, querybuf *, int, int);
 static int		_files_getnetbyaddr(void *, void *, va_list);
 static int		_files_getnetbyname(void *, void *, va_list);
 static int		_dns_getnetbyaddr(void *, void *, va_list);
@@ -159,7 +165,7 @@ parse_reversed_addr(const char *str, in_
 }
 
 static struct netent *
-getnetanswer(querybuf *answer, int anslen, int net_i)
+getnetanswer(res_state res, querybuf *answer, int anslen, int net_i)
 {
 	static char	n_name[MAXDNAME];
 	static char	netbuf[PACKETSZ];
@@ -172,6 +178,7 @@ getnetanswer(querybuf *answer, int ansle
 	char		*in, *bp, **ap, *ep;
 
 	_DIAGASSERT(answer != NULL);
+	_DIAGASSERT(res != NULL);
 
 	/*
 	 * find first satisfactory answer
@@ -216,7 +223,7 @@ getnetanswer(querybuf *answer, int ansle
 	n_name[0] = '\0';
 	while (--ancount >= 0 && cp < eom) {
 		n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp));
-		if ((n < 0) || !res_dnok(bp))
+		if ((n < 0) || !maybe_dnok(res, bp))
 			break;
 		cp += n;
 		(void)strlcpy(n_name, bp, sizeof(n_name));
@@ -226,7 +233,7 @@ getnetanswer(querybuf *answer, int ansle
 		GETSHORT(n, cp);
 		if (class == C_IN && type == T_PTR) {
 			n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp));
-			if ((n < 0) || !res_hnok(bp)) {
+			if ((n < 0) || !maybe_hnok(res, bp)) {
 cp += n;
 return NULL;
 			}
@@ -358,8 +365,8 @@ _dns_getnetbyaddr(void *cbrv, void *cbda
 		

CVS commit: [netbsd-7-0] src

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:35:21 UTC 2015

Modified Files:
src/external/gpl3/binutils/dist/binutils [netbsd-7-0]: arsup.c
src/lib/libc/net [netbsd-7-0]: getnetnamadr.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1012):
lib/libc/net/getnetnamadr.c: revision 1.43
lib/libc/net/getnetnamadr.c: revision 1.44
external/gpl3/binutils/dist/binutils/arsup.c: revision 1.2
put the state back after it is used.
PR/50367: Stefan Schaeckeler: Apply fix to obey RES_CHECKNAME to getnetbyaddr
and getnetbyname.
use asprintf(3)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.22.1 \
src/external/gpl3/binutils/dist/binutils/arsup.c
cvs rdiff -u -r1.42 -r1.42.12.1 src/lib/libc/net/getnetnamadr.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/gpl3/binutils/dist/binutils/arsup.c
diff -u src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2 src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2.22.1
--- src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2	Sat Sep 24 22:39:13 2011
+++ src/external/gpl3/binutils/dist/binutils/arsup.c	Sun Nov  8 00:35:21 2015
@@ -149,13 +149,20 @@ maybequit (void)
 void
 ar_open (char *name, int t)
 {
-  char *tname = (char *) xmalloc (strlen (name) + 10);
+  char *tname;
   const char *bname = lbasename (name);
   real_name = name;
 
   /* Prepend tmp- to the beginning, to avoid file-name clashes after
  truncation on filesystems with limited namespaces (DOS).  */
-  sprintf (tname, "%.*stmp-%s", (int) (bname - name), name, bname);
+  if (asprintf (, "%.*stmp-%s", (int) (bname - name), name, bname) == -1)
+{
+  fprintf (stderr, _("%s: Can't allocate memory for temp name (%s)\n"),
+	program_name, strerror(errno));
+  maybequit ();
+  return;
+}
+
   obfd = bfd_openw (tname, NULL);
 
   if (!obfd)

Index: src/lib/libc/net/getnetnamadr.c
diff -u src/lib/libc/net/getnetnamadr.c:1.42 src/lib/libc/net/getnetnamadr.c:1.42.12.1
--- src/lib/libc/net/getnetnamadr.c:1.42	Tue Mar 13 21:13:41 2012
+++ src/lib/libc/net/getnetnamadr.c	Sun Nov  8 00:35:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: getnetnamadr.c,v 1.42 2012/03/13 21:13:41 christos Exp $	*/
+/*	$NetBSD: getnetnamadr.c,v 1.42.12.1 2015/11/08 00:35:21 riz Exp $	*/
 
 /* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
  *	Dep. Matematica Universidade de Coimbra, Portugal, Europe
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)getnetbyaddr
 static char sccsid_[] = "from getnetnamadr.c	1.4 (Coimbra) 93/06/03";
 static char rcsid[] = "Id: getnetnamadr.c,v 8.8 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: getnetnamadr.c,v 1.42 2012/03/13 21:13:41 christos Exp $");
+__RCSID("$NetBSD: getnetnamadr.c,v 1.42.12.1 2015/11/08 00:35:21 riz Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -77,6 +77,12 @@ __weak_alias(getnetbyaddr,_getnetbyaddr)
 __weak_alias(getnetbyname,_getnetbyname)
 #endif
 
+#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0U || \
+   (ok)(nm) != 0)
+#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
+#define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
+
+
 extern int _net_stayopen;
 
 #define BYADDR 0
@@ -105,7 +111,7 @@ static	struct netent net_entry;
 static	char *net_aliases[MAXALIASES];
 
 static int		parse_reversed_addr(const char *, in_addr_t *);
-static struct netent	*getnetanswer(querybuf *, int, int);
+static struct netent	*getnetanswer(res_state, querybuf *, int, int);
 static int		_files_getnetbyaddr(void *, void *, va_list);
 static int		_files_getnetbyname(void *, void *, va_list);
 static int		_dns_getnetbyaddr(void *, void *, va_list);
@@ -159,7 +165,7 @@ parse_reversed_addr(const char *str, in_
 }
 
 static struct netent *
-getnetanswer(querybuf *answer, int anslen, int net_i)
+getnetanswer(res_state res, querybuf *answer, int anslen, int net_i)
 {
 	static char	n_name[MAXDNAME];
 	static char	netbuf[PACKETSZ];
@@ -172,6 +178,7 @@ getnetanswer(querybuf *answer, int ansle
 	char		*in, *bp, **ap, *ep;
 
 	_DIAGASSERT(answer != NULL);
+	_DIAGASSERT(res != NULL);
 
 	/*
 	 * find first satisfactory answer
@@ -216,7 +223,7 @@ getnetanswer(querybuf *answer, int ansle
 	n_name[0] = '\0';
 	while (--ancount >= 0 && cp < eom) {
 		n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp));
-		if ((n < 0) || !res_dnok(bp))
+		if ((n < 0) || !maybe_dnok(res, bp))
 			break;
 		cp += n;
 		(void)strlcpy(n_name, bp, sizeof(n_name));
@@ -226,7 +233,7 @@ getnetanswer(querybuf *answer, int ansle
 		GETSHORT(n, cp);
 		if (class == C_IN && type == T_PTR) {
 			n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp));
-			if ((n < 0) || !res_hnok(bp)) {
+			if ((n < 0) || !maybe_hnok(res, bp)) {
 cp += n;
 return NULL;
 			}
@@ -358,8 +365,8 @@ _dns_getnetbyaddr(void *cbrv, void *cbda
 		

CVS commit: [netbsd-7] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:38:45 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7]: sys_machdep.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1013):
sys/arch/x86/x86/sys_machdep.c: revision 1.29
fix broken error handling; error was used uninitialized. Changing the
compilation flags broke all threaded programs for me.
XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.28.2.1 src/sys/arch/x86/x86/sys_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/x86/x86/sys_machdep.c
diff -u src/sys/arch/x86/x86/sys_machdep.c:1.28 src/sys/arch/x86/x86/sys_machdep.c:1.28.2.1
--- src/sys/arch/x86/x86/sys_machdep.c:1.28	Sat Jun 28 21:13:12 2014
+++ src/sys/arch/x86/x86/sys_machdep.c	Sun Nov  8 00:38:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $	*/
+/*	$NetBSD: sys_machdep.c,v 1.28.2.1 2015/11/08 00:38:45 riz Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28.2.1 2015/11/08 00:38:45 riz Exp $");
 
 #include "opt_mtrr.h"
 #include "opt_perfctrs.h"
@@ -659,7 +659,6 @@ x86_set_sdbase(void *arg, char which, lw
 #else
 	struct pcb *pcb;
 	vaddr_t base;
-	int error;
 
 	if (l->l_proc->p_flag & PK_32) {
 		return x86_set_sdbase32(arg, which, l, direct);
@@ -668,7 +667,7 @@ x86_set_sdbase(void *arg, char which, lw
 	if (direct) {
 		base = (vaddr_t)arg;
 	} else {
-		error = copyin(arg, , sizeof(base));
+		int error = copyin(arg, , sizeof(base));
 		if (error != 0)
 			return error;
 	}
@@ -676,10 +675,6 @@ x86_set_sdbase(void *arg, char which, lw
 	if (base >= VM_MAXUSER_ADDRESS)
 		return EINVAL;
 
-	if (error) {
-		return error;
-	}
-
 	pcb = lwp_getpcb(l);
 
 	kpreempt_disable();
@@ -699,7 +694,7 @@ x86_set_sdbase(void *arg, char which, lw
 	}
 	kpreempt_enable();
 
-	return error;
+	return 0;
 #endif
 }
 



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:38:34 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Tickets 1012,1013.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.8 src/doc/CHANGES-7.0.1:1.1.2.9
--- src/doc/CHANGES-7.0.1:1.1.2.8	Sun Nov  8 00:31:15 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 00:38:34 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.8 2015/11/08 00:31:15 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.9 2015/11/08 00:38:34 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -115,3 +115,15 @@ sys/arch/x86/x86/bus_dma.c			1.72-1.74
 	  check addr + len < limit, not addr < limit.
 	[christos, ticket #1011]
 
+external/gpl3/binutils/dist/binutils/arsup.c	1.2
+lib/libc/net/getnetnamadr.c			1.43-1.44
+
+	Resolve hostnames with "_".  PR#50367.
+	[christos, ticket #1012]
+
+sys/arch/x86/x86/sys_machdep.c			1.29
+
+	Fix broken error handling leading to random crashes in 
+	threaded programs.
+	[christos, ticket #1013]
+



CVS commit: [netbsd-7-0] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:38:18 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7-0]: sys_machdep.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1013):
sys/arch/x86/x86/sys_machdep.c: revision 1.29
fix broken error handling; error was used uninitialized. Changing the
compilation flags broke all threaded programs for me.
XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.28.6.1 src/sys/arch/x86/x86/sys_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/x86/x86/sys_machdep.c
diff -u src/sys/arch/x86/x86/sys_machdep.c:1.28 src/sys/arch/x86/x86/sys_machdep.c:1.28.6.1
--- src/sys/arch/x86/x86/sys_machdep.c:1.28	Sat Jun 28 21:13:12 2014
+++ src/sys/arch/x86/x86/sys_machdep.c	Sun Nov  8 00:38:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $	*/
+/*	$NetBSD: sys_machdep.c,v 1.28.6.1 2015/11/08 00:38:18 riz Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28.6.1 2015/11/08 00:38:18 riz Exp $");
 
 #include "opt_mtrr.h"
 #include "opt_perfctrs.h"
@@ -659,7 +659,6 @@ x86_set_sdbase(void *arg, char which, lw
 #else
 	struct pcb *pcb;
 	vaddr_t base;
-	int error;
 
 	if (l->l_proc->p_flag & PK_32) {
 		return x86_set_sdbase32(arg, which, l, direct);
@@ -668,7 +667,7 @@ x86_set_sdbase(void *arg, char which, lw
 	if (direct) {
 		base = (vaddr_t)arg;
 	} else {
-		error = copyin(arg, , sizeof(base));
+		int error = copyin(arg, , sizeof(base));
 		if (error != 0)
 			return error;
 	}
@@ -676,10 +675,6 @@ x86_set_sdbase(void *arg, char which, lw
 	if (base >= VM_MAXUSER_ADDRESS)
 		return EINVAL;
 
-	if (error) {
-		return error;
-	}
-
 	pcb = lwp_getpcb(l);
 
 	kpreempt_disable();
@@ -699,7 +694,7 @@ x86_set_sdbase(void *arg, char which, lw
 	}
 	kpreempt_enable();
 
-	return error;
+	return 0;
 #endif
 }
 



CVS commit: [netbsd-7] src/etc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:45:22 UTC 2015

Modified Files:
src/etc [netbsd-7]: rc.subr

Log Message:
Pull up following revision(s) (requested by phx in ticket #1015):
etc/rc.subr: revision 1.97
PR misc/50046
Remove the expensive tests in _have_rc_postprocessor(), as proposed by apb@.
It more than halves the multiuser boot time on slow machines and brings
it back near to the previous level.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.94.2.1 src/etc/rc.subr

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

Modified files:

Index: src/etc/rc.subr
diff -u src/etc/rc.subr:1.94 src/etc/rc.subr:1.94.2.1
--- src/etc/rc.subr:1.94	Sun Jul 27 07:46:46 2014
+++ src/etc/rc.subr	Sun Nov  8 00:45:22 2015
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.94 2014/07/27 07:46:46 apb Exp $
+# $NetBSD: rc.subr,v 1.94.2.1 2015/11/08 00:45:22 riz Exp $
 #
 # Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -796,19 +796,9 @@ $command $rc_flags $command_args"
 _have_rc_postprocessor()
 {
 	# Cheap tests that fd and pid are set, fd is writable.
-	[ -n "${_rc_postprocessor_fd}" ] || return 1
-	[ -n "${_rc_pid}" ] || return 1
-	eval ": >&${_rc_postprocessor_fd}" 2>/dev/null || return 1
-
-	# More expensive test that pid is running.
-	# Unset _rc_pid if this fails.
-	kill -0 "${_rc_pid}" 2>/dev/null \
-	|| { unset _rc_pid; return 1; }
-
-	# More expensive test that pid appears to be
-	# a shell running an rc script.
-	# Unset _rc_pid if this fails.
-	expr "$(ps -p "${_rc_pid}" -o command=)" : ".*sh .*/rc.*" >/dev/null \
+	[ -n "${_rc_pid}" ] || { unset _rc_pid; return 1; }
+	[ -n "${_rc_postprocessor_fd}" ] || { unset _rc_pid; return 1; }
+	eval ": >&${_rc_postprocessor_fd}" 2>/dev/null \
 	|| { unset _rc_pid; return 1; }
 
 	return 0



CVS commit: [netbsd-7-0] src

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:55:39 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: 3RDPARTY
src/external/bsd/ntp [netbsd-7-0]: importdate
src/external/bsd/ntp/bin/ntpd [netbsd-7-0]: Makefile
src/external/bsd/ntp/dist [netbsd-7-0]: ChangeLog CommitLog Makefile.am
Makefile.in NEWS aclocal.m4 bootstrap config.h.in configure
configure.ac packageinfo.sh
src/external/bsd/ntp/dist/adjtimed [netbsd-7-0]: Makefile.in adjtimed.c
src/external/bsd/ntp/dist/clockstuff [netbsd-7-0]: Makefile.in
chutest.c propdelay.c
src/external/bsd/ntp/dist/html [netbsd-7-0]: decode.html miscopt.html
refclock.html stats.html
src/external/bsd/ntp/dist/html/drivers [netbsd-7-0]: driver22.html
driver40.html driver46.html
src/external/bsd/ntp/dist/include [netbsd-7-0]: Makefile.am Makefile.in
ntp_assert.h ntp_calendar.h ntp_config.h ntp_control.h ntp_io.h
ntp_lists.h ntp_stdlib.h ntp_syslog.h ntp_types.h ntpd.h parse.h
src/external/bsd/ntp/dist/include/isc [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/kernel [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/kernel/sys [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/lib/isc/unix [netbsd-7-0]:
ifiter_getifaddrs.c
src/external/bsd/ntp/dist/libjsmn [netbsd-7-0]: Makefile README.md
jsmn.c jsmn.h jsmn_test.c
src/external/bsd/ntp/dist/libntp [netbsd-7-0]: Makefile.am Makefile.in
atolfp.c audio.c authkeys.c authreadkeys.c caljulian.c caltontp.c
decodenetnum.c emalloc.c icom.c machines.c msyslog.c ntp_calendar.c
ntp_intres.c ntp_lineedit.c ntp_rfc2553.c ntp_worker.c prettydate.c
recvbuff.c socket.c socktohost.c statestr.c strdup.c work_fork.c
src/external/bsd/ntp/dist/libparse [netbsd-7-0]: Makefile.in
clk_meinberg.c clk_rawdcf.c clk_schmid.c parse.c
src/external/bsd/ntp/dist/ntpd [netbsd-7-0]: Makefile.am Makefile.in
complete.conf.in invoke-ntp.conf.texi invoke-ntp.keys.texi
invoke-ntpd.texi keyword-gen-utd keyword-gen.c ntp.conf.5man
ntp.conf.5mdoc ntp.conf.def ntp.conf.html ntp.conf.man.in
ntp.conf.mdoc.in ntp.keys.5man ntp.keys.5mdoc ntp.keys.html
ntp.keys.man.in ntp.keys.mdoc.in ntp_config.c ntp_control.c
ntp_crypto.c ntp_io.c ntp_keyword.h ntp_leapsec.c ntp_leapsec.h
ntp_loopfilter.c ntp_monitor.c ntp_parser.y ntp_peer.c ntp_proto.c
ntp_refclock.c ntp_request.c ntp_restrict.c ntp_scanner.c
ntp_scanner.h ntp_timer.c ntpd-opts.c ntpd-opts.def ntpd-opts.h
ntpd.1ntpdman ntpd.1ntpdmdoc ntpd.c ntpd.html ntpd.man.in
ntpd.mdoc.in refclock_arc.c refclock_chu.c refclock_gpsdjson.c
refclock_jjy.c refclock_jupiter.c refclock_local.c refclock_nmea.c
refclock_oncore.c refclock_palisade.c refclock_parse.c
refclock_shm.c refclock_true.c refclock_wwv.c
src/external/bsd/ntp/dist/ntpdate [netbsd-7-0]: Makefile.in ntpdate.c
src/external/bsd/ntp/dist/ntpdc [netbsd-7-0]: Makefile.in
invoke-ntpdc.texi ntpdc-opts.c ntpdc-opts.h ntpdc.1ntpdcman
ntpdc.1ntpdcmdoc ntpdc.c ntpdc.html ntpdc.man.in ntpdc.mdoc.in
src/external/bsd/ntp/dist/ntpq [netbsd-7-0]: Makefile.in
invoke-ntpq.texi libntpq.h ntpq-opts.c ntpq-opts.def ntpq-opts.h
ntpq-subs.c ntpq.1ntpqman ntpq.1ntpqmdoc ntpq.c ntpq.html
ntpq.man.in ntpq.mdoc.in
src/external/bsd/ntp/dist/ntpsnmpd [netbsd-7-0]: Makefile.in
invoke-ntpsnmpd.texi ntpsnmpd-opts.c ntpsnmpd-opts.h
ntpsnmpd.1ntpsnmpdman ntpsnmpd.1ntpsnmpdmdoc ntpsnmpd.html
ntpsnmpd.man.in ntpsnmpd.mdoc.in
src/external/bsd/ntp/dist/parseutil [netbsd-7-0]: Makefile.in dcfd.c
testdcf.c
src/external/bsd/ntp/dist/scripts [netbsd-7-0]: Makefile.in
invoke-plot_summary.texi invoke-summary.texi plot_summary-opts
plot_summary.1plot_summaryman plot_summary.1plot_summarymdoc
plot_summary.html plot_summary.man.in plot_summary.mdoc.in
summary-opts summary.1summaryman summary.1summarymdoc summary.html
summary.man.in summary.mdoc.in
src/external/bsd/ntp/dist/scripts/build [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/scripts/calc_tickadj [netbsd-7-0]:
Makefile.in calc_tickadj.1calc_tickadjman
calc_tickadj.1calc_tickadjmdoc calc_tickadj.html
calc_tickadj.man.in calc_tickadj.mdoc.in invoke-calc_tickadj.texi
src/external/bsd/ntp/dist/scripts/lib [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/scripts/lib/NTP [netbsd-7-0]: Util.pm
src/external/bsd/ntp/dist/scripts/ntp-wait [netbsd-7-0]: Makefile.in

CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:56:46 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Ticket 1024.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.25 src/doc/CHANGES-7.1:1.1.2.26
--- src/doc/CHANGES-7.1:1.1.2.25	Sun Nov  8 01:29:28 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 01:56:46 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.25 2015/11/08 01:29:28 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.26 2015/11/08 01:56:46 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -864,3 +864,611 @@ sys/fs/tmpfs/tmpfs_subr.c			1.101
 	Fixes PR kern/50381.
 	[leot, ticket #1023]
 
+doc/3RDPARTY	patch
+external/bsd/ntp/dist/tests/libntp/atoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/atouint.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/authkeys.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/buftvtots.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/calendar.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/caljulian.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/caltontp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/calyearstart.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/clocktime.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/decodenetnum.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfptest.cup to 1.1.1.1
+external/bsd/ntp/dist/tests/libntp/sockaddrtest.c up to 1.1.1.1
+external/bsd/ntp/dist/tests/libntp/hextolfp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/humandate.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfpfunc.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfptostr.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/modetoa.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/msyslog.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/netof.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/numtoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/numtohost.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/octtoint.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/prettydate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/recvbuff.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/refidsmear.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/refnumtoa.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-a_md5encrypt.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-atoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/socktoa.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/ssl_init.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/statestr.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/strtolfp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/test-libntp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/timevalops.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/tstotv.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/tvtots.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/uglydate.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/vi64ops.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/ymd2yd.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-netof.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/a_md5encrypt.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-msyslog.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/hextoint.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-atouint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-authkeys.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-buftvtots.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-calendar.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-caljulian.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-caltontp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-calyearstart.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-clocktime.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-decodenetnum.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-hextoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-hextolfp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-humandate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-lfpfunc.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-lfptostr.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-modetoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-numtoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-numtohost.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-octtoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-prettydate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-recvbuff.c up to 1.1.1.3

CVS commit: [netbsd-7] src/sys/compat

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:02:37 UTC 2015

Modified Files:
src/sys/compat/linux/common [netbsd-7]: linux_mod.c
src/sys/compat/netbsd32 [netbsd-7]: netbsd32_mod.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1020):
sys/compat/netbsd32/netbsd32_mod.c: revision 1.6
sys/compat/netbsd32/netbsd32_mod.c: revision 1.7
sys/compat/netbsd32/netbsd32_mod.c: revision 1.8
sys/compat/netbsd32/netbsd32_mod.c: revision 1.9
sys/compat/linux/common/linux_mod.c: revision 1.5
Add an additional dependency on compat_sysv
Add another dependency for nfsserver
And yet another dependency, this time on mq
Ooops, spell the module name in full. "mqueue" vs "mq"
we need compat_sysv now.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/compat/linux/common/linux_mod.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/compat/netbsd32/netbsd32_mod.c

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

Modified files:

Index: src/sys/compat/linux/common/linux_mod.c
diff -u src/sys/compat/linux/common/linux_mod.c:1.4 src/sys/compat/linux/common/linux_mod.c:1.4.4.1
--- src/sys/compat/linux/common/linux_mod.c:1.4	Fri Mar  7 01:33:43 2014
+++ src/sys/compat/linux/common/linux_mod.c	Sun Nov  8 02:02:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mod.c,v 1.4 2014/03/07 01:33:43 christos Exp $	*/
+/*	$NetBSD: linux_mod.c,v 1.4.4.1 2015/11/08 02:02:37 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.4 2014/03/07 01:33:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.4.4.1 2015/11/08 02:02:37 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -65,7 +65,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mod.c,
 # define	MD3	""
 #endif
 
-MODULE(MODULE_CLASS_EXEC, compat_linux, "compat,compat_ossaudio" MD1 MD2 MD3);
+MODULE(MODULE_CLASS_EXEC, compat_linux, "compat,compat_ossaudio,compat_sysv"
+	MD1 MD2 MD3);
 
 static struct execsw linux_execsw[] = {
 #if defined(EXEC_ELF32) && ELFSIZE == 32

Index: src/sys/compat/netbsd32/netbsd32_mod.c
diff -u src/sys/compat/netbsd32/netbsd32_mod.c:1.5 src/sys/compat/netbsd32/netbsd32_mod.c:1.5.2.1
--- src/sys/compat/netbsd32/netbsd32_mod.c:1.5	Tue Jul 22 08:18:33 2014
+++ src/sys/compat/netbsd32/netbsd32_mod.c	Sun Nov  8 02:02:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_mod.c,v 1.5 2014/07/22 08:18:33 maxv Exp $	*/
+/*	$NetBSD: netbsd32_mod.c,v 1.5.2.1 2015/11/08 02:02:36 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,13 +30,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.5 2014/07/22 08:18:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.5.2.1 2015/11/08 02:02:36 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
-# define	DEPS1	"compat"
+# define	DEPS1	"compat,compat_sysv,nfsserver,mqueue"
 #else
-# define	DEPS1	"compat,ksem"
+# define	DEPS1	"compat,compat_sysv,nfsserver,mqueue,ksem"
 #endif
 
 #ifndef ELFSIZE



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:05:16 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
ticket 1025


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.11 src/doc/CHANGES-7.0.1:1.1.2.12
--- src/doc/CHANGES-7.0.1:1.1.2.11	Sun Nov  8 01:56:58 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 02:05:16 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.11 2015/11/08 01:56:58 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.12 2015/11/08 02:05:16 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -741,3 +741,8 @@ external/bsd/ntp/scripts/mkver  
 	Update ntp to 4.2.8p4.
 	[christos, ticket #1024]
 
+usr.sbin/vnconfig/vnconfig.8			1.40
+
+	In NetBSD 7, the vnconfig command was renamed.
+	[pgoyette, ticket #1025]
+



CVS commit: [netbsd-7-0] src/usr.sbin/vnconfig

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:04:46 UTC 2015

Modified Files:
src/usr.sbin/vnconfig [netbsd-7-0]: vnconfig.8

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1025):
usr.sbin/vnconfig/vnconfig.8: revision 1.40
Update to keep up with reality.  In NetBSD 7, the vnconfig command was
renamed.  So add this fact to the HISTORY section and remove BUGS.
XXX Pull-up to NetBSD-7 !


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.8.1 src/usr.sbin/vnconfig/vnconfig.8

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

Modified files:

Index: src/usr.sbin/vnconfig/vnconfig.8
diff -u src/usr.sbin/vnconfig/vnconfig.8:1.39 src/usr.sbin/vnconfig/vnconfig.8:1.39.8.1
--- src/usr.sbin/vnconfig/vnconfig.8:1.39	Sun Jun  9 18:39:31 2013
+++ src/usr.sbin/vnconfig/vnconfig.8	Sun Nov  8 02:04:46 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vnconfig.8,v 1.39 2013/06/09 18:39:31 christos Exp $
+.\"	$NetBSD: vnconfig.8,v 1.39.8.1 2015/11/08 02:04:46 riz Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -61,7 +61,7 @@
 .\"
 .\"	@(#)vnconfig.8	8.1 (Berkeley) 6/5/93
 .\"
-.Dd June 9, 2013
+.Dd November 6, 2015
 .Dt VNDCONFIG 8
 .Os
 .Sh NAME
@@ -221,9 +221,12 @@ device.
 .Xr umount 8
 .Sh HISTORY
 The
-.Nm
+.Nm vnconfig
 command appeared in
 .Nx 1.0 .
-.Sh BUGS
-This command should really be named
-.Nm vndconfig .
+It was renamed to
+.Nm
+in
+.Nx 7.0
+for consistency with other similar commands.
+(The original name was also retained for backwards compatability.)



CVS commit: [netbsd-7] src/usr.sbin/vnconfig

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:05:25 UTC 2015

Modified Files:
src/usr.sbin/vnconfig [netbsd-7]: vnconfig.8

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1025):
usr.sbin/vnconfig/vnconfig.8: revision 1.40
Update to keep up with reality.  In NetBSD 7, the vnconfig command was
renamed.  So add this fact to the HISTORY section and remove BUGS.
XXX Pull-up to NetBSD-7 !


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.6.1 src/usr.sbin/vnconfig/vnconfig.8

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

Modified files:

Index: src/usr.sbin/vnconfig/vnconfig.8
diff -u src/usr.sbin/vnconfig/vnconfig.8:1.39 src/usr.sbin/vnconfig/vnconfig.8:1.39.6.1
--- src/usr.sbin/vnconfig/vnconfig.8:1.39	Sun Jun  9 18:39:31 2013
+++ src/usr.sbin/vnconfig/vnconfig.8	Sun Nov  8 02:05:25 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vnconfig.8,v 1.39 2013/06/09 18:39:31 christos Exp $
+.\"	$NetBSD: vnconfig.8,v 1.39.6.1 2015/11/08 02:05:25 riz Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -61,7 +61,7 @@
 .\"
 .\"	@(#)vnconfig.8	8.1 (Berkeley) 6/5/93
 .\"
-.Dd June 9, 2013
+.Dd November 6, 2015
 .Dt VNDCONFIG 8
 .Os
 .Sh NAME
@@ -221,9 +221,12 @@ device.
 .Xr umount 8
 .Sh HISTORY
 The
-.Nm
+.Nm vnconfig
 command appeared in
 .Nx 1.0 .
-.Sh BUGS
-This command should really be named
-.Nm vndconfig .
+It was renamed to
+.Nm
+in
+.Nx 7.0
+for consistency with other similar commands.
+(The original name was also retained for backwards compatability.)



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:16:39 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Ticket 984.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.6 src/doc/CHANGES-7.0.1:1.1.2.7
--- src/doc/CHANGES-7.0.1:1.1.2.6	Sat Nov  7 16:37:03 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 00:16:39 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.6 2015/11/07 16:37:03 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.7 2015/11/08 00:16:39 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -97,3 +97,9 @@ sys/arch/arm/allwinner/awin_mmc.c		1.22
 	Avoid a divide by 0 when unplugging a sd card.
 	[bouyer, ticket #1006]
 
+sys/arch/x86/x86/cpu.c1.116
+
+	Don't disable/re-enable interrupts if they are already disabled.
+	Fixes i386 PAE kernels. PR#48196.
+	[nat, ticket #984]
+



CVS commit: [netbsd-7-0] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:15:47 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7-0]: cpu.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #984):
sys/arch/x86/x86/cpu.c: revision 1.116
Don't disable/re-enable interrupts if they are already disabled.
Addresses PR 48196.
This commit was improved and approved by christos@


To generate a diff of this commit:
cvs rdiff -u -r1.111.2.1 -r1.111.2.1.2.1 src/sys/arch/x86/x86/cpu.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.111.2.1 src/sys/arch/x86/x86/cpu.c:1.111.2.1.2.1
--- src/sys/arch/x86/x86/cpu.c:1.111.2.1	Mon Jan 12 21:06:41 2015
+++ src/sys/arch/x86/x86/cpu.c	Sun Nov  8 00:15:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.111.2.1 2015/01/12 21:06:41 snj Exp $	*/
+/*	$NetBSD: cpu.c,v 1.111.2.1.2.1 2015/11/08 00:15:47 riz Exp $	*/
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111.2.1 2015/01/12 21:06:41 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111.2.1.2.1 2015/11/08 00:15:47 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -1278,6 +1278,7 @@ cpu_load_pmap(struct pmap *pmap, struct 
 {
 #ifdef PAE
 	struct cpu_info *ci = curcpu();
+	bool interrupts_enabled;
 	pd_entry_t *l3_pd = ci->ci_pae_l3_pdir;
 	int i;
 
@@ -1286,11 +1287,16 @@ cpu_load_pmap(struct pmap *pmap, struct 
 	 * while this doesn't block NMIs, it's probably ok as NMIs unlikely
 	 * reload cr3.
 	 */
-	x86_disable_intr();
+	interrupts_enabled = (x86_read_flags() & PSL_I) != 0;
+	if (interrupts_enabled)
+		x86_disable_intr();
+
 	for (i = 0 ; i < PDP_SIZE; i++) {
 		l3_pd[i] = pmap->pm_pdirpa[i] | PG_V;
 	}
-	x86_enable_intr();
+	
+	if (interrupts_enabled)
+		x86_enable_intr();
 	tlbflush();
 #else /* PAE */
 	lcr3(pmap_pdirpa(pmap, 0));



CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:42:27 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1008-1009,1011-1013.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.22 src/doc/CHANGES-7.1:1.1.2.23
--- src/doc/CHANGES-7.1:1.1.2.22	Sat Nov  7 16:43:38 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 00:42:27 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.22 2015/11/07 16:43:38 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.23 2015/11/08 00:42:27 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -779,3 +779,40 @@ lib/libcurses/toucholap.c			1.16
 	Fix x/y editing error.
 	[uwe, ticket #1007]
 
+usr.sbin/sysinst/target.c			1.3
+
+	PR 50342: if there is no current partition manage, assume we are
+	running from an already installed system.
+	[martin, ticket #1008]
+
+distrib/sets/lists/comp/mi			1.1921
+lib/libm/Makefile1.167
+lib/libm/man/erf.31.13
+
+	PR/49399: Henning Petersen: Add man pages for erfl(3) and erfcl(3).
+	[dholland, ticket #1009]
+
+sys/arch/x86/x86/bus_dma.c			1.72-1.74
+
+	- If we succeeded allocating a buffer that did not need bouncing
+	before, but the buffer in the previous mapping did, clear the
+	bounce bit. Fixes the ld_virtio.c bug with machines 8GB and
+	dd if=/dev/zero of=crash bs=1g count=4.
+	- Allocate with M_ZERO instead of doing memset
+	- The panic string can take a format, use it.
+	- When checking for the bounce buffer boundary,
+	  check addr + len < limit, not addr < limit.
+	[christos, ticket #1011]
+
+external/gpl3/binutils/dist/binutils/arsup.c	1.2
+lib/libc/net/getnetnamadr.c			1.43-1.44
+
+	Resolve hostnames with "_".  PR#50367.
+	[christos, ticket #1012]
+
+sys/arch/x86/x86/sys_machdep.c			1.29
+
+	Fix broken error handling leading to random crashes in 
+	threaded programs.
+	[christos, ticket #1013]
+



CVS commit: [netbsd-7] src/sys

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:57:09 UTC 2015

Modified Files:
src/sys/kern [netbsd-7]: exec_elf.c
src/sys/sys [netbsd-7]: exec_elf.h

Log Message:
Pull up following revision(s) (requested by christos in ticket #1019):
sys/kern/exec_elf.c: revision 1.79
sys/sys/exec_elf.h: revision 1.150
sys/sys/exec_elf.h: revision 1.151
sys/kern/exec_elf.c: revision 1.80
Ignore the ancient 01.01 tag that gnuc used to put in old NetBSD binaries.
Add buildid Go note


To generate a diff of this commit:
cvs rdiff -u -r1.69.2.2 -r1.69.2.3 src/sys/kern/exec_elf.c
cvs rdiff -u -r1.141 -r1.141.2.1 src/sys/sys/exec_elf.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/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.69.2.2 src/sys/kern/exec_elf.c:1.69.2.3
--- src/sys/kern/exec_elf.c:1.69.2.2	Sun Mar 29 09:07:55 2015
+++ src/sys/kern/exec_elf.c	Sun Nov  8 00:57:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.69.2.2 2015/03/29 09:07:55 martin Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.69.2.3 2015/11/08 00:57:09 riz Exp $	*/
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.69.2.2 2015/03/29 09:07:55 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.69.2.3 2015/11/08 00:57:09 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -939,13 +939,20 @@ netbsd_elf_signature(struct lwp *l, stru
 			}
 
 			/*
-			 * Ignore SuSE tags; SuSE's n_type is the same as NetBSD's
-			 * one.
+			 * Ignore SuSE tags; SuSE's n_type is the same the
+			 * NetBSD one.
 			 */
 			if (np->n_namesz == ELF_NOTE_SUSE_NAMESZ &&
 			memcmp(ndata, ELF_NOTE_SUSE_NAME,
 			ELF_NOTE_SUSE_NAMESZ) == 0)
 break;
+			/*
+			 * Ignore old GCC
+			 */
+			if (np->n_namesz == ELF_NOTE_OGCC_NAMESZ &&
+			memcmp(ndata, ELF_NOTE_OGCC_NAME,
+			ELF_NOTE_OGCC_NAMESZ) == 0)
+break;
 			BADNOTE("NetBSD tag");
 			goto bad;
 
@@ -1004,6 +1011,9 @@ netbsd_elf_signature(struct lwp *l, stru
 		case ELF_NOTE_TYPE_SUSE_VERSION_TAG:
 			break;
 
+		case ELF_NOTE_TYPE_GO_BUILDID_TAG:
+			break;
+
 		default:
 			BADNOTE("unknown tag");
 bad:

Index: src/sys/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.141 src/sys/sys/exec_elf.h:1.141.2.1
--- src/sys/sys/exec_elf.h:1.141	Tue Jul  8 17:16:25 2014
+++ src/sys/sys/exec_elf.h	Sun Nov  8 00:57:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.141 2014/07/08 17:16:25 maxv Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.141.2.1 2015/11/08 00:57:09 riz Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -822,6 +822,11 @@ typedef struct {
 #define ELF_NOTE_ABI_OS_KFREEBSD	3
 #define ELF_NOTE_ABI_OS_KNETBSD		4
 
+/* Old gcc style, under the ABI tag */
+#define ELF_NOTE_OGCC_NAMESZ		8
+#define ELF_NOTE_OGCC_NAME		"01.01\0\0\0\0"
+#define ELF_NOTE_OGCC_DESCSZ		0
+
 /*
  * GNU-specific note type: Hardware capabilities
  * name: GNU\0
@@ -881,6 +886,18 @@ typedef struct {
 /* SuSE-specific note name */
 #define ELF_NOTE_SUSE_VERSION_NAME		"SuSE\0\0\0\0"
 
+/* Go-specific note type: buildid
+ * name: Go\0\0
+ * namesz: 4
+ * desc: 
+ *	words[10]
+ * descsz: 40
+ */
+#define ELF_NOTE_TYPE_GO_BUILDID_TAG	4
+#define ELF_NOTE_GO_BUILDID_NAMESZ	4
+#define ELF_NOTE_GO_BUILDID_DESCSZ	40
+#define ELF_NOTE_GO_BUILDID_NAME	"Go\0\0"
+
 /* NetBSD-specific note type: Emulation name.
  * name: NetBSD\0\0
  * namesz: 8



CVS commit: [netbsd-7] src/sys/nfs

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:14:20 UTC 2015

Modified Files:
src/sys/nfs [netbsd-7]: nfs_vfsops.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1021):
sys/nfs/nfs_vfsops.c: revision 1.231
Don't forget to call nfs_fini() when we're finished.  Without this,
we leave a dangling pool nfsrvdescpl around.


To generate a diff of this commit:
cvs rdiff -u -r1.229.2.1 -r1.229.2.2 src/sys/nfs/nfs_vfsops.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/nfs/nfs_vfsops.c
diff -u src/sys/nfs/nfs_vfsops.c:1.229.2.1 src/sys/nfs/nfs_vfsops.c:1.229.2.2
--- src/sys/nfs/nfs_vfsops.c:1.229.2.1	Wed Nov  4 17:32:00 2015
+++ src/sys/nfs/nfs_vfsops.c	Sun Nov  8 01:14:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vfsops.c,v 1.229.2.1 2015/11/04 17:32:00 riz Exp $	*/
+/*	$NetBSD: nfs_vfsops.c,v 1.229.2.2 2015/11/08 01:14:20 riz Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.229.2.1 2015/11/04 17:32:00 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.229.2.2 2015/11/08 01:14:20 riz Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_nfs.h"
@@ -1169,4 +1169,5 @@ nfs_vfs_done(void)
 	nfs_node_done();
 	nfs_kqfini();
 	nfs_iodfini();
+	nfs_fini();
 }



CVS commit: [netbsd-7] src/sys

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:22:54 UTC 2015

Modified Files:
src/sys/arch/arm/omap [netbsd-7]: omap3_sdhc.c
src/sys/arch/evbarm/beagle [netbsd-7]: beagle_machdep.c
src/sys/dev/sdmmc [netbsd-7]: sdhc.c sdhcvar.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1022):
sys/dev/sdmmc/sdhc.c: revision 1.89
sys/arch/arm/omap/omap3_sdhc.c: revision 1.19
sys/dev/sdmmc/sdhcvar.h: revision 1.25
sys/arch/evbarm/beagle/beagle_machdep.c: revision 1.62
allow vendor specific code to hook into bus width changes
Support 8-bit eMMC for TI AM335x. On my BeagleBone Black,
Before: 134217728 bytes transferred in 9.410 secs (14263307 bytes/sec)
After:  134217728 bytes transferred in 7.518 secs (17852850 bytes/sec)
enable 8-bit mode on AM335X SDMMC2


To generate a diff of this commit:
cvs rdiff -u -r1.14.4.1 -r1.14.4.2 src/sys/arch/arm/omap/omap3_sdhc.c
cvs rdiff -u -r1.60 -r1.60.2.1 src/sys/arch/evbarm/beagle/beagle_machdep.c
cvs rdiff -u -r1.44.2.8 -r1.44.2.9 src/sys/dev/sdmmc/sdhc.c
cvs rdiff -u -r1.13.12.3 -r1.13.12.4 src/sys/dev/sdmmc/sdhcvar.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/omap/omap3_sdhc.c
diff -u src/sys/arch/arm/omap/omap3_sdhc.c:1.14.4.1 src/sys/arch/arm/omap/omap3_sdhc.c:1.14.4.2
--- src/sys/arch/arm/omap/omap3_sdhc.c:1.14.4.1	Sun Apr 19 04:37:17 2015
+++ src/sys/arch/arm/omap/omap3_sdhc.c	Sun Nov  8 01:22:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdhc.c,v 1.14.4.1 2015/04/19 04:37:17 msaitoh Exp $	*/
+/*	$NetBSD: omap3_sdhc.c,v 1.14.4.2 2015/11/08 01:22:54 riz Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.14.4.1 2015/04/19 04:37:17 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.14.4.2 2015/11/08 01:22:54 riz Exp $");
 
 #include "opt_omap.h"
 #include "edma.h"
@@ -51,6 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c
 #ifdef TI_AM335X
 #  include 
 #  include 
+#  include 
+#  include 
 #endif
 
 #if NEDMA > 0
@@ -84,6 +86,7 @@ static int obiosdhc_match(device_t, cfda
 static void obiosdhc_attach(device_t, device_t, void *);
 static int obiosdhc_detach(device_t, int);
 
+static int obiosdhc_bus_width(struct sdhc_softc *, int);
 static int obiosdhc_bus_clock(struct sdhc_softc *, int);
 static int obiosdhc_rod(struct sdhc_softc *, int);
 static int obiosdhc_write_protect(struct sdhc_softc *);
@@ -129,6 +132,24 @@ static const struct am335x_sdhc am335x_s
 	{ "MMC1",   SDMMC2_BASE_TIAM335X, 28, { AM335X_PRCM_CM_PER, 0xf4 } },
 	{ "MMCHS2", SDMMC3_BASE_TIAM335X, 29, { AM335X_PRCM_CM_WKUP, 0xf8 } },
 };
+
+struct am335x_padconf {
+	const char *padname;
+	const char *padmode;
+};
+const struct am335x_padconf am335x_padconf_mmc1[] = {
+	{ "GPMC_CSn1", "mmc1_clk" },
+	{ "GPMC_CSn2", "mmc1_cmd" },
+	{ "GPMC_AD0", "mmc1_dat0" },
+	{ "GPMC_AD1", "mmc1_dat1" },
+	{ "GPMC_AD2", "mmc1_dat2" },
+	{ "GPMC_AD3", "mmc1_dat3" },
+	{ "GPMC_AD4", "mmc1_dat4" },
+	{ "GPMC_AD5", "mmc1_dat5" },
+	{ "GPMC_AD6", "mmc1_dat6" },
+	{ "GPMC_AD7", "mmc1_dat7" },
+	{ NULL, NULL }
+};
 #endif
 
 CFATTACH_DECL_NEW(obiosdhc, sizeof(struct obiosdhc_softc),
@@ -213,6 +234,7 @@ obiosdhc_attach(device_t parent, device_
 	sc->sc.sc_vendor_write_protect = obiosdhc_write_protect;
 	sc->sc.sc_vendor_card_detect = obiosdhc_card_detect;
 	sc->sc.sc_vendor_bus_clock = obiosdhc_bus_clock;
+	sc->sc.sc_vendor_bus_width = obiosdhc_bus_width;
 	sc->sc_bst = oa->obio_iot;
 
 	clksft = ffs(sc->sc.sc_clkmsk) - 1;
@@ -256,6 +278,27 @@ obiosdhc_attach(device_t parent, device_
 			break;
 		}
 	KASSERT(i < __arraycount(am335x_sdhc));
+
+	if (oa->obio_addr == SDMMC2_BASE_TIAM335X) {
+		const char *mode;
+		u_int state;
+		
+		const struct am335x_padconf *padconf = am335x_padconf_mmc1;
+		for (i = 0; padconf[i].padname; i++) {
+			const char *padname = padconf[i].padname;
+			const char *padmode = padconf[i].padmode;
+			if (sitara_cm_padconf_get(padname, , ) == 0) {
+aprint_debug_dev(self, "%s mode %s state %d\n",
+padname, mode, state);
+			}
+			if (sitara_cm_padconf_set(padname, padmode,
+			(1 << 4) | (1 << 5)) != 0) {
+aprint_error_dev(self, "can't switch %s pad from %s to %s\n",
+padname, mode, padmode);
+return;
+			}
+		}
+	}
 #endif
 
 	/* XX: Turn-on regurator via I2C. */
@@ -417,6 +460,23 @@ obiosdhc_card_detect(struct sdhc_softc *
 }
 
 static int
+obiosdhc_bus_width(struct sdhc_softc *sc, int width)
+{
+	struct obiosdhc_softc *osc = (struct obiosdhc_softc *)sc;
+	uint32_t con;
+
+	con = bus_space_read_4(osc->sc_bst, osc->sc_bsh, MMCHS_CON);
+	if (width == 8) {
+		con |= CON_DW8;
+	} else {
+		con &= ~CON_DW8;
+	}
+	bus_space_write_4(osc->sc_bst, osc->sc_bsh, MMCHS_CON, con);
+
+	return 0;
+}
+
+static int
 obiosdhc_bus_clock(struct 

CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:24:53 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1015-1016,1018-1019,1021-1022


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.23 src/doc/CHANGES-7.1:1.1.2.24
--- src/doc/CHANGES-7.1:1.1.2.23	Sun Nov  8 00:42:27 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 01:24:53 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.23 2015/11/08 00:42:27 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.24 2015/11/08 01:24:53 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -816,3 +816,45 @@ sys/arch/x86/x86/sys_machdep.c			1.29
 	threaded programs.
 	[christos, ticket #1013]
 
+etc/rc.subr	1.97
+
+	Speed up multiuser boot time on slow machines.  PR#50046.
+	[phx, ticket #1015]
+
+usr.sbin/iostat/iostat.8			1.24
+usr.sbin/iostat/iostat.c			1.62-1.63
+
+	Support fnmatch(3) patterns for disknames.  eg, "iostat wd*" works
+	now. Update the default disk number selection to note that it uses
+	the current terminal size to fit disks, not hard coded 4.
+	Extend the "tout" column to 5 characters, it's really common on a
+	modern machine to have eg, build output way more than  chars/sec.
+	This doesn't affect the default disk list on an 80-char wide screen.
+	[mrg, ticket #1016]
+
+sys/kern/uipc_syscalls.c			1.181
+
+	Don't overwrite the user iov pointer in sendmmsg. Make the send
+	and receive code look the same.
+	[christos, ticket #1018]
+
+sys/kern/exec_elf.c1.79-1.80
+sys/sys/exec_elf.h1.150-1.151
+
+	Recognize additional ELF notes.
+	[christos, ticket #1019]
+
+sys/nfs/nfs_vfsops.c1.231
+
+	Don't forget to call nfs_fini() when we're finished.  Without this,
+	we leave a dangling pool nfsrvdescpl around.
+	[pgoyette, ticket #1021]
+
+sys/arch/arm/omap/omap3_sdhc.c			1.19
+sys/arch/evbarm/beagle/beagle_machdep.c		1.62
+sys/dev/sdmmc/sdhc.c1.89 via patch
+sys/dev/sdmmc/sdhcvar.h1.25
+
+	Support 8-bit eMMC for TI AM335x. 
+	[jmcneill, ticket #1022]
+



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:56:58 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
ticket 1024


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.10 src/doc/CHANGES-7.0.1:1.1.2.11
--- src/doc/CHANGES-7.0.1:1.1.2.10	Sun Nov  8 01:27:24 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 01:56:58 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.10 2015/11/08 01:27:24 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.11 2015/11/08 01:56:58 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -133,3 +133,611 @@ sys/fs/tmpfs/tmpfs_subr.c			1.101
 	Fixes PR kern/50381.
 	[leot, ticket #1023]
 
+doc/3RDPARTY	patch
+external/bsd/ntp/dist/tests/libntp/atoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/atouint.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/authkeys.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/buftvtots.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/calendar.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/caljulian.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/caltontp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/calyearstart.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/clocktime.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/decodenetnum.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfptest.cup to 1.1.1.1
+external/bsd/ntp/dist/tests/libntp/sockaddrtest.c up to 1.1.1.1
+external/bsd/ntp/dist/tests/libntp/hextolfp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/humandate.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfpfunc.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfptostr.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/modetoa.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/msyslog.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/netof.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/numtoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/numtohost.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/octtoint.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/prettydate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/recvbuff.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/refidsmear.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/refnumtoa.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-a_md5encrypt.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-atoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/socktoa.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/ssl_init.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/statestr.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/strtolfp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/test-libntp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/timevalops.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/tstotv.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/tvtots.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/uglydate.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/vi64ops.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/ymd2yd.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-netof.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/a_md5encrypt.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-msyslog.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/hextoint.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-atouint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-authkeys.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-buftvtots.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-calendar.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-caljulian.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-caltontp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-calyearstart.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-clocktime.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-decodenetnum.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-hextoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-hextolfp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-humandate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-lfpfunc.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-lfptostr.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-modetoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-numtoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-numtohost.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-octtoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-prettydate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-recvbuff.c up to 

CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:31:16 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
ticket 1011.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.7 src/doc/CHANGES-7.0.1:1.1.2.8
--- src/doc/CHANGES-7.0.1:1.1.2.7	Sun Nov  8 00:16:39 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 00:31:15 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.7 2015/11/08 00:16:39 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.8 2015/11/08 00:31:15 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -103,3 +103,15 @@ sys/arch/x86/x86/cpu.c1.116
 	Fixes i386 PAE kernels. PR#48196.
 	[nat, ticket #984]
 
+sys/arch/x86/x86/bus_dma.c			1.72-1.74
+
+	- If we succeeded allocating a buffer that did not need bouncing
+	before, but the buffer in the previous mapping did, clear the
+	bounce bit. Fixes the ld_virtio.c bug with machines 8GB and
+	dd if=/dev/zero of=crash bs=1g count=4.
+	- Allocate with M_ZERO instead of doing memset
+	- The panic string can take a format, use it.
+	- When checking for the bounce buffer boundary,
+	  check addr + len < limit, not addr < limit.
+	[christos, ticket #1011]
+



CVS commit: [netbsd-7] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:31:00 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7]: bus_dma.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1011):
sys/arch/x86/x86/bus_dma.c: revision 1.72
sys/arch/x86/x86/bus_dma.c: revision 1.73
sys/arch/x86/x86/bus_dma.c: revision 1.74
- If we succeeded allocating a buffer that did not need bouncing before, but
  the buffer in the previous mapping did, clear the bounce bit. Fixes the
  ld_virtio.c bug with machines 8GB and dd if=/dev/zero of=crash bs=1g count=4.
- Allocate with M_ZERO instead of doing memset
- The panic string can take a format, use it.
- When checking for the bounce buffer boundary check addr + len < limit, not
  addr < limit.
make sure we have a cookie before we try to clear it.
fix operator precedence.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.71.4.1 src/sys/arch/x86/x86/bus_dma.c

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

Modified files:

Index: src/sys/arch/x86/x86/bus_dma.c
diff -u src/sys/arch/x86/x86/bus_dma.c:1.71 src/sys/arch/x86/x86/bus_dma.c:1.71.4.1
--- src/sys/arch/x86/x86/bus_dma.c:1.71	Tue Dec 24 15:42:56 2013
+++ src/sys/arch/x86/x86/bus_dma.c	Sun Nov  8 00:31:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.71 2013/12/24 15:42:56 christos Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.71.4.1 2015/11/08 00:31:00 riz Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71 2013/12/24 15:42:56 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71.4.1 2015/11/08 00:31:00 riz Exp $");
 
 /*
  * The following is included because _bus_dma_uiomove is derived from
@@ -291,11 +291,10 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_
 	error = 0;
 	mapsize = sizeof(struct x86_bus_dmamap) +
 	(sizeof(bus_dma_segment_t) * (nsegments - 1));
-	if ((mapstore = malloc(mapsize, M_DMAMAP,
-	(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
+	if ((mapstore = malloc(mapsize, M_DMAMAP, M_ZERO |
+	((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL)
 		return (ENOMEM);
 
-	memset(mapstore, 0, mapsize);
 	map = (struct x86_bus_dmamap *)mapstore;
 	map->_dm_size = size;
 	map->_dm_segcnt = nsegments;
@@ -331,12 +330,11 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_
 	/*
 	 * Allocate our cookie.
 	 */
-	if ((cookiestore = malloc(cookiesize, M_DMAMAP,
-	(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) {
+	if ((cookiestore = malloc(cookiesize, M_DMAMAP, M_ZERO |
+	((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) {
 		error = ENOMEM;
 		goto out;
 	}
-	memset(cookiestore, 0, cookiesize);
 	cookie = (struct x86_bus_dma_cookie *)cookiestore;
 	cookie->id_flags = cookieflags;
 	map->_dm_cookie = cookie;
@@ -399,6 +397,8 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm
 	}
 	error = _bus_dmamap_load_buffer(t, map, buf, buflen, vm, flags);
 	if (error == 0) {
+		if (cookie != NULL)
+			cookie->id_flags &= ~X86_DMA_IS_BOUNCING;
 		map->dm_mapsize = buflen;
 		return 0;
 	}
@@ -797,7 +797,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 	 */
 	if ((ops & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)) != 0 &&
 	(ops & (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)) != 0)
-		panic("_bus_dmamap_sync: mix PRE and POST");
+		panic("%s: mix PRE and POST", __func__);
 
 #ifdef DIAGNOSTIC
 	if ((ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0) {
@@ -927,16 +927,17 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 	}
 
 	case X86_DMA_BUFTYPE_RAW:
-		panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_RAW");
+		panic("%s: X86_DMA_BUFTYPE_RAW", __func__);
 		break;
 
 	case X86_DMA_BUFTYPE_INVALID:
-		panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_INVALID");
+		panic("%s: X86_DMA_BUFTYPE_INVALID", __func__);
 		break;
 
 	default:
-		printf("unknown buffer type %d\n", cookie->id_buftype);
-		panic("_bus_dmamap_sync");
+		panic("%s: unknown buffer type %d", __func__,
+		cookie->id_buftype);
+		break;
 	}
 end:
 	if (ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTWRITE)) {
@@ -1244,19 +1245,20 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t,
 		curaddr = _BUS_VIRT_TO_BUS(pmap, vaddr);
 
 		/*
+		 * Compute the segment size, and adjust counts.
+		 */
+		sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET);
+		if (buflen < sgsize)
+			sgsize = buflen;
+
+		/*
 		 * If we're beyond the bounce threshold, notify
 		 * the caller.
 		 */
 		if (map->_dm_bounce_thresh != 0 &&
-		curaddr >= map->_dm_bounce_thresh)
+		curaddr + sgsize >= map->_dm_bounce_thresh)
 			return (EINVAL);
 
-		/*
-		 * Compute the segment size, and adjust counts.
-		 */
-		sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET);
-		if (buflen < sgsize)
-			sgsize = buflen;
 
 		error = _bus_dmamap_load_busaddr(t, map, curaddr, sgsize);
 		if (error)



CVS commit: [netbsd-7-0] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:30:48 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7-0]: bus_dma.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1011):
sys/arch/x86/x86/bus_dma.c: revision 1.72
sys/arch/x86/x86/bus_dma.c: revision 1.73
sys/arch/x86/x86/bus_dma.c: revision 1.74
- If we succeeded allocating a buffer that did not need bouncing before, but
  the buffer in the previous mapping did, clear the bounce bit. Fixes the
  ld_virtio.c bug with machines 8GB and dd if=/dev/zero of=crash bs=1g count=4.
- Allocate with M_ZERO instead of doing memset
- The panic string can take a format, use it.
- When checking for the bounce buffer boundary check addr + len < limit, not
  addr < limit.
make sure we have a cookie before we try to clear it.
fix operator precedence.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.71.8.1 src/sys/arch/x86/x86/bus_dma.c

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

Modified files:

Index: src/sys/arch/x86/x86/bus_dma.c
diff -u src/sys/arch/x86/x86/bus_dma.c:1.71 src/sys/arch/x86/x86/bus_dma.c:1.71.8.1
--- src/sys/arch/x86/x86/bus_dma.c:1.71	Tue Dec 24 15:42:56 2013
+++ src/sys/arch/x86/x86/bus_dma.c	Sun Nov  8 00:30:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.71 2013/12/24 15:42:56 christos Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.71.8.1 2015/11/08 00:30:48 riz Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71 2013/12/24 15:42:56 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71.8.1 2015/11/08 00:30:48 riz Exp $");
 
 /*
  * The following is included because _bus_dma_uiomove is derived from
@@ -291,11 +291,10 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_
 	error = 0;
 	mapsize = sizeof(struct x86_bus_dmamap) +
 	(sizeof(bus_dma_segment_t) * (nsegments - 1));
-	if ((mapstore = malloc(mapsize, M_DMAMAP,
-	(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
+	if ((mapstore = malloc(mapsize, M_DMAMAP, M_ZERO |
+	((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL)
 		return (ENOMEM);
 
-	memset(mapstore, 0, mapsize);
 	map = (struct x86_bus_dmamap *)mapstore;
 	map->_dm_size = size;
 	map->_dm_segcnt = nsegments;
@@ -331,12 +330,11 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_
 	/*
 	 * Allocate our cookie.
 	 */
-	if ((cookiestore = malloc(cookiesize, M_DMAMAP,
-	(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) {
+	if ((cookiestore = malloc(cookiesize, M_DMAMAP, M_ZERO |
+	((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) {
 		error = ENOMEM;
 		goto out;
 	}
-	memset(cookiestore, 0, cookiesize);
 	cookie = (struct x86_bus_dma_cookie *)cookiestore;
 	cookie->id_flags = cookieflags;
 	map->_dm_cookie = cookie;
@@ -399,6 +397,8 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm
 	}
 	error = _bus_dmamap_load_buffer(t, map, buf, buflen, vm, flags);
 	if (error == 0) {
+		if (cookie != NULL)
+			cookie->id_flags &= ~X86_DMA_IS_BOUNCING;
 		map->dm_mapsize = buflen;
 		return 0;
 	}
@@ -797,7 +797,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 	 */
 	if ((ops & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)) != 0 &&
 	(ops & (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)) != 0)
-		panic("_bus_dmamap_sync: mix PRE and POST");
+		panic("%s: mix PRE and POST", __func__);
 
 #ifdef DIAGNOSTIC
 	if ((ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0) {
@@ -927,16 +927,17 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 	}
 
 	case X86_DMA_BUFTYPE_RAW:
-		panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_RAW");
+		panic("%s: X86_DMA_BUFTYPE_RAW", __func__);
 		break;
 
 	case X86_DMA_BUFTYPE_INVALID:
-		panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_INVALID");
+		panic("%s: X86_DMA_BUFTYPE_INVALID", __func__);
 		break;
 
 	default:
-		printf("unknown buffer type %d\n", cookie->id_buftype);
-		panic("_bus_dmamap_sync");
+		panic("%s: unknown buffer type %d", __func__,
+		cookie->id_buftype);
+		break;
 	}
 end:
 	if (ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTWRITE)) {
@@ -1244,19 +1245,20 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t,
 		curaddr = _BUS_VIRT_TO_BUS(pmap, vaddr);
 
 		/*
+		 * Compute the segment size, and adjust counts.
+		 */
+		sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET);
+		if (buflen < sgsize)
+			sgsize = buflen;
+
+		/*
 		 * If we're beyond the bounce threshold, notify
 		 * the caller.
 		 */
 		if (map->_dm_bounce_thresh != 0 &&
-		curaddr >= map->_dm_bounce_thresh)
+		curaddr + sgsize >= map->_dm_bounce_thresh)
 			return (EINVAL);
 
-		/*
-		 * Compute the segment size, and adjust counts.
-		 */
-		sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET);
-		if (buflen < sgsize)
-			sgsize = buflen;
 
 		error = _bus_dmamap_load_busaddr(t, map, curaddr, sgsize);
 		if (error)



CVS commit: [netbsd-7] src/usr.sbin/iostat

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:49:06 UTC 2015

Modified Files:
src/usr.sbin/iostat [netbsd-7]: iostat.8 iostat.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1016):
usr.sbin/iostat/iostat.c: revision 1.62
usr.sbin/iostat/iostat.c: revision 1.63
usr.sbin/iostat/iostat.8: revision 1.24
support fnmatch(3) patterns for disknames.  eg, "iostat wd*" works now.
update the default disk number selection to note that it uses the current
terminal size to fit disks, not hard coded 4.
extend the "tout" column to 5 characters, it's really common on a modern
machine to have eg, build output way more than  chars/sec.
this doesn't affect the default disk list on an 80-char wide screen.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.23.2.1 src/usr.sbin/iostat/iostat.8
cvs rdiff -u -r1.61 -r1.61.2.1 src/usr.sbin/iostat/iostat.c

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

Modified files:

Index: src/usr.sbin/iostat/iostat.8
diff -u src/usr.sbin/iostat/iostat.8:1.23 src/usr.sbin/iostat/iostat.8:1.23.2.1
--- src/usr.sbin/iostat/iostat.8:1.23	Wed Jun 11 17:01:04 2014
+++ src/usr.sbin/iostat/iostat.8	Sun Nov  8 00:49:06 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: iostat.8,v 1.23 2014/06/11 17:01:04 joerg Exp $
+.\"	$NetBSD: iostat.8,v 1.23.2.1 2015/11/08 00:49:06 riz Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)iostat.8	8.1 (Berkeley) 6/6/93
 .\"
-.Dd June 11, 2014
+.Dd July 9, 2015
 .Dt IOSTAT 8
 .Os
 .Sh NAME
@@ -142,13 +142,16 @@ characters written to terminals
 .It disks
 Disk operations.
 The header of the field is the disk name and unit number.
-If more than four disk drives are configured in the system,
+If more drives are configured in the system that fit across the
+current display,
 .Nm
-displays only the first four drives.
+displays only those drives that fit on the display.
 To force
 .Nm
-to display specific drives, their names may be supplied on the command
-line.
+to display specific drives, they may be supplied on the command
+line, either as names or
+.Fn fnmatch
+patterns.
 .Pp
 .Bl -tag -width indent -compact
 .It KB/t
@@ -189,6 +192,7 @@ Seconds spent in disk activity
 .Xr \ 1 ,
 .Xr systat 1 ,
 .Xr vmstat 1 ,
+.Xr fnmatch 3 ,
 .Xr pstat 8
 .Pp
 The sections starting with ``Interpreting system activity'' in

Index: src/usr.sbin/iostat/iostat.c
diff -u src/usr.sbin/iostat/iostat.c:1.61 src/usr.sbin/iostat/iostat.c:1.61.2.1
--- src/usr.sbin/iostat/iostat.c:1.61	Wed Jun 11 17:01:04 2014
+++ src/usr.sbin/iostat/iostat.c	Sun Nov  8 00:49:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: iostat.c,v 1.61 2014/06/11 17:01:04 joerg Exp $	*/
+/*	$NetBSD: iostat.c,v 1.61.2.1 2015/11/08 00:49:05 riz Exp $	*/
 
 /*
  * Copyright (c) 1996 John M. Vinopal
@@ -71,7 +71,7 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 19
 #if 0
 static char sccsid[] = "@(#)iostat.c	8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: iostat.c,v 1.61 2014/06/11 17:01:04 joerg Exp $");
+__RCSID("$NetBSD: iostat.c,v 1.61.2.1 2015/11/08 00:49:05 riz Exp $");
 #endif
 #endif /* not lint */
 
@@ -88,6 +88,7 @@ __RCSID("$NetBSD: iostat.c,v 1.61 2014/0
 #include 
 #include 
 #include 
+#include 
 
 #include "drvstats.h"
 
@@ -183,7 +184,7 @@ main(int argc, char *argv[])
 	if (ISSET(todo, SHOW_CPU))
 		defdrives -= 16;	/* XXX magic number */
 	if (ISSET(todo, SHOW_TTY))
-		defdrives -= 9;		/* XXX magic number */
+		defdrives -= 10;	/* XXX magic number */
 	defdrives /= 18;		/* XXX magic number */
 
 	drvinit(0);
@@ -278,7 +279,7 @@ header(void)
 
 	/* Sub-Headers. */
 	if (ISSET(todo, SHOW_TTY))
-		printf(" tin tout");
+		printf(" tin  tout");
 
 	if (ISSET(todo, SHOW_STATS_1)) {
 		for (i = 0; i < ndrive; i++)
@@ -467,7 +468,7 @@ display(void)
 	}
 
 	if (ISSET(todo, SHOW_TTY))
-		printf("%4.0f %4.0f", cur.tk_nin / etime, cur.tk_nout / etime);
+		printf("%4.0f %5.0f", cur.tk_nin / etime, cur.tk_nout / etime);
 
 	if (ISSET(todo, SHOW_STATS_1)) {
 		drive_stats(etime);
@@ -511,7 +512,7 @@ selectdrives(int argc, char *argv[])
 #endif
 		tried++;
 		for (i = 0; i < (int)ndrive; i++) {
-			if (strcmp(cur.name[i], *argv))
+			if (fnmatch(*argv, cur.name[i], 0))
 continue;
 			cur.select[i] = 1;
 			++ndrives;



CVS commit: [netbsd-7] src/sys/kern

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:55:11 UTC 2015

Modified Files:
src/sys/kern [netbsd-7]: uipc_syscalls.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1018):
sys/kern/uipc_syscalls.c: revision 1.181
Don't overwrite the user iov pointer in sendmmsg. Make the send and receive
code look the same.


To generate a diff of this commit:
cvs rdiff -u -r1.172.2.1 -r1.172.2.2 src/sys/kern/uipc_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/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.172.2.1 src/sys/kern/uipc_syscalls.c:1.172.2.2
--- src/sys/kern/uipc_syscalls.c:1.172.2.1	Sat Aug  8 15:45:47 2015
+++ src/sys/kern/uipc_syscalls.c	Sun Nov  8 00:55:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.172.2.1 2015/08/08 15:45:47 martin Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.172.2.2 2015/11/08 00:55:11 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.172.2.1 2015/08/08 15:45:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.172.2.2 2015/11/08 00:55:11 riz Exp $");
 
 #include "opt_pipe.h"
 
@@ -568,10 +568,10 @@ do_sys_sendmsg_so(struct lwp *l, int s, 
 			if (error)
 goto bad;
 		}
-		mp->msg_iov = iov;
-	}
+		auio.uio_iov = iov;
+	} else
+		auio.uio_iov = mp->msg_iov;
 
-	auio.uio_iov = mp->msg_iov;
 	auio.uio_iovcnt = mp->msg_iovlen;
 	auio.uio_rw = UIO_WRITE;
 	auio.uio_offset = 0;			/* XXX */
@@ -579,7 +579,8 @@ do_sys_sendmsg_so(struct lwp *l, int s, 
 	KASSERT(l == curlwp);
 	auio.uio_vmspace = l->l_proc->p_vmspace;
 
-	for (i = 0, tiov = mp->msg_iov; i < mp->msg_iovlen; i++, tiov++) {
+	tiov = auio.uio_iov;
+	for (i = 0; i < auio.uio_iovcnt; i++, tiov++) {
 		/*
 		 * Writes return ssize_t because -1 is returned on error.
 		 * Therefore, we must restrict the length to SSIZE_MAX to
@@ -955,7 +956,7 @@ do_sys_recvmsg_so(struct lwp *l, int s, 
 	auio.uio_vmspace = l->l_proc->p_vmspace;
 
 	tiov = auio.uio_iov;
-	for (i = 0; i < mp->msg_iovlen; i++, tiov++) {
+	for (i = 0; i < auio.uio_iovcnt; i++, tiov++) {
 		/*
 		 * Reads return ssize_t because -1 is returned on error.
 		 * Therefore we must restrict the length to SSIZE_MAX to



CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:29:28 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Ticket 1023


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.24 src/doc/CHANGES-7.1:1.1.2.25
--- src/doc/CHANGES-7.1:1.1.2.24	Sun Nov  8 01:24:53 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 01:29:28 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.24 2015/11/08 01:24:53 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.25 2015/11/08 01:29:28 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -858,3 +858,9 @@ sys/dev/sdmmc/sdhcvar.h1.25
 	Support 8-bit eMMC for TI AM335x. 
 	[jmcneill, ticket #1022]
 
+sys/fs/tmpfs/tmpfs_subr.c			1.101
+
+	Fix crash when tmpfs fills up.  PR#50381.
+	Fixes PR kern/50381.
+	[leot, ticket #1023]
+



CVS commit: [netbsd-7] src/sys/fs/tmpfs

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:26:56 UTC 2015

Modified Files:
src/sys/fs/tmpfs [netbsd-7]: tmpfs_subr.c

Log Message:
Pull up following revision(s) (requested by leot in ticket #1023):
sys/fs/tmpfs/tmpfs_subr.c: revision 1.101
Make sure that nde->td_node is NULL for asserts.
Thanks and from Mindaugas Rasiukevicius.
Fixes PR kern/50381.


To generate a diff of this commit:
cvs rdiff -u -r1.96.4.1 -r1.96.4.2 src/sys/fs/tmpfs/tmpfs_subr.c

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

Modified files:

Index: src/sys/fs/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1 src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.2
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1	Mon Dec 22 02:05:08 2014
+++ src/sys/fs/tmpfs/tmpfs_subr.c	Sun Nov  8 01:26:56 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $	*/
+/*	$NetBSD: tmpfs_subr.c,v 1.96.4.2 2015/11/08 01:26:56 riz Exp $	*/
 
 /*
  * Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.96.4.2 2015/11/08 01:26:56 riz Exp $");
 
 #include 
 #include 
@@ -451,6 +451,7 @@ tmpfs_alloc_dirent(tmpfs_mount_t *tmp, c
 	nde->td_namelen = len;
 	memcpy(nde->td_name, name, len);
 	nde->td_seq = TMPFS_DIRSEQ_NONE;
+	nde->td_node = NULL; /* for asserts */
 
 	*de = nde;
 	return 0;



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:27:24 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Ticket 1023


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-7.0.1

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-7.0.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.9 src/doc/CHANGES-7.0.1:1.1.2.10
--- src/doc/CHANGES-7.0.1:1.1.2.9	Sun Nov  8 00:38:34 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 01:27:24 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.9 2015/11/08 00:38:34 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.10 2015/11/08 01:27:24 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -127,3 +127,9 @@ sys/arch/x86/x86/sys_machdep.c			1.29
 	threaded programs.
 	[christos, ticket #1013]
 
+sys/fs/tmpfs/tmpfs_subr.c			1.101
+
+	Fix crash when tmpfs fills up.  PR#50381.
+	Fixes PR kern/50381.
+	[leot, ticket #1023]
+



CVS commit: [netbsd-7-0] src/sys/fs/tmpfs

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:27:10 UTC 2015

Modified Files:
src/sys/fs/tmpfs [netbsd-7-0]: tmpfs_subr.c

Log Message:
Pull up following revision(s) (requested by leot in ticket #1023):
sys/fs/tmpfs/tmpfs_subr.c: revision 1.101
Make sure that nde->td_node is NULL for asserts.
Thanks and from Mindaugas Rasiukevicius.
Fixes PR kern/50381.


To generate a diff of this commit:
cvs rdiff -u -r1.96.4.1 -r1.96.4.1.2.1 src/sys/fs/tmpfs/tmpfs_subr.c

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

Modified files:

Index: src/sys/fs/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1 src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1.2.1
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1	Mon Dec 22 02:05:08 2014
+++ src/sys/fs/tmpfs/tmpfs_subr.c	Sun Nov  8 01:27:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $	*/
+/*	$NetBSD: tmpfs_subr.c,v 1.96.4.1.2.1 2015/11/08 01:27:10 riz Exp $	*/
 
 /*
  * Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.96.4.1.2.1 2015/11/08 01:27:10 riz Exp $");
 
 #include 
 #include 
@@ -451,6 +451,7 @@ tmpfs_alloc_dirent(tmpfs_mount_t *tmp, c
 	nde->td_namelen = len;
 	memcpy(nde->td_name, name, len);
 	nde->td_seq = TMPFS_DIRSEQ_NONE;
+	nde->td_node = NULL; /* for asserts */
 
 	*de = nde;
 	return 0;



CVS commit: [netbsd-7] src/external/bsd/ntp

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:51:18 UTC 2015

Modified Files:
src/external/bsd/ntp/dist [netbsd-7]: Makefile.am Makefile.in NEWS
aclocal.m4 bootstrap config.h.in configure configure.ac
packageinfo.sh
src/external/bsd/ntp/dist/adjtimed [netbsd-7]: Makefile.in adjtimed.c
src/external/bsd/ntp/dist/clockstuff [netbsd-7]: Makefile.in chutest.c
propdelay.c
src/external/bsd/ntp/dist/html [netbsd-7]: decode.html miscopt.html
refclock.html stats.html
src/external/bsd/ntp/dist/html/drivers [netbsd-7]: driver22.html
driver40.html driver46.html
src/external/bsd/ntp/dist/include [netbsd-7]: Makefile.am Makefile.in
ntp_assert.h ntp_calendar.h ntp_config.h ntp_control.h ntp_io.h
ntp_lists.h ntp_stdlib.h ntp_syslog.h ntp_types.h ntpd.h parse.h
src/external/bsd/ntp/dist/include/isc [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/kernel [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/kernel/sys [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/lib/isc/unix [netbsd-7]: ifiter_getifaddrs.c
src/external/bsd/ntp/dist/libjsmn [netbsd-7]: Makefile README.md jsmn.c
jsmn.h jsmn_test.c
src/external/bsd/ntp/dist/libntp [netbsd-7]: Makefile.am Makefile.in
atolfp.c audio.c authkeys.c authreadkeys.c caljulian.c caltontp.c
decodenetnum.c emalloc.c icom.c machines.c msyslog.c ntp_calendar.c
ntp_intres.c ntp_lineedit.c ntp_rfc2553.c ntp_worker.c prettydate.c
recvbuff.c socket.c socktohost.c statestr.c strdup.c work_fork.c
src/external/bsd/ntp/dist/libparse [netbsd-7]: Makefile.in
clk_meinberg.c clk_rawdcf.c clk_schmid.c parse.c
src/external/bsd/ntp/dist/ntpd [netbsd-7]: Makefile.am Makefile.in
complete.conf.in invoke-ntp.conf.texi invoke-ntp.keys.texi
invoke-ntpd.texi keyword-gen-utd keyword-gen.c ntp.conf.5man
ntp.conf.5mdoc ntp.conf.def ntp.conf.html ntp.conf.man.in
ntp.conf.mdoc.in ntp.keys.5man ntp.keys.5mdoc ntp.keys.html
ntp.keys.man.in ntp.keys.mdoc.in ntp_config.c ntp_control.c
ntp_crypto.c ntp_io.c ntp_keyword.h ntp_leapsec.c ntp_leapsec.h
ntp_loopfilter.c ntp_monitor.c ntp_parser.y ntp_peer.c ntp_proto.c
ntp_refclock.c ntp_request.c ntp_restrict.c ntp_scanner.c
ntp_scanner.h ntp_timer.c ntpd-opts.c ntpd-opts.def ntpd-opts.h
ntpd.1ntpdman ntpd.1ntpdmdoc ntpd.c ntpd.html ntpd.man.in
ntpd.mdoc.in refclock_arc.c refclock_chu.c refclock_gpsdjson.c
refclock_jjy.c refclock_jupiter.c refclock_local.c refclock_nmea.c
refclock_oncore.c refclock_palisade.c refclock_parse.c
refclock_shm.c refclock_true.c refclock_wwv.c
src/external/bsd/ntp/dist/ntpdate [netbsd-7]: Makefile.in ntpdate.c
src/external/bsd/ntp/dist/ntpdc [netbsd-7]: Makefile.in
invoke-ntpdc.texi ntpdc-opts.c ntpdc-opts.h ntpdc.1ntpdcman
ntpdc.1ntpdcmdoc ntpdc.c ntpdc.html ntpdc.man.in ntpdc.mdoc.in
src/external/bsd/ntp/dist/ntpq [netbsd-7]: Makefile.in invoke-ntpq.texi
libntpq.h ntpq-opts.c ntpq-opts.def ntpq-opts.h ntpq-subs.c
ntpq.1ntpqman ntpq.1ntpqmdoc ntpq.c ntpq.html ntpq.man.in
ntpq.mdoc.in
src/external/bsd/ntp/dist/ntpsnmpd [netbsd-7]: Makefile.in
invoke-ntpsnmpd.texi ntpsnmpd-opts.c ntpsnmpd-opts.h
ntpsnmpd.1ntpsnmpdman ntpsnmpd.1ntpsnmpdmdoc ntpsnmpd.html
ntpsnmpd.man.in ntpsnmpd.mdoc.in
src/external/bsd/ntp/dist/parseutil [netbsd-7]: Makefile.in dcfd.c
testdcf.c
src/external/bsd/ntp/dist/scripts [netbsd-7]: Makefile.in
invoke-plot_summary.texi invoke-summary.texi plot_summary-opts
plot_summary.1plot_summaryman plot_summary.1plot_summarymdoc
plot_summary.html plot_summary.man.in plot_summary.mdoc.in
summary-opts summary.1summaryman summary.1summarymdoc summary.html
summary.man.in summary.mdoc.in
src/external/bsd/ntp/dist/scripts/build [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/scripts/calc_tickadj [netbsd-7]: Makefile.in
calc_tickadj.1calc_tickadjman calc_tickadj.1calc_tickadjmdoc
calc_tickadj.html calc_tickadj.man.in calc_tickadj.mdoc.in
invoke-calc_tickadj.texi
src/external/bsd/ntp/dist/scripts/lib [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/scripts/lib/NTP [netbsd-7]: Util.pm
src/external/bsd/ntp/dist/scripts/ntp-wait [netbsd-7]: Makefile.in
invoke-ntp-wait.texi ntp-wait-opts ntp-wait.1ntp-waitman
ntp-wait.1ntp-waitmdoc ntp-wait.html ntp-wait.man.in
ntp-wait.mdoc.in
src/external/bsd/ntp/dist/scripts/ntpsweep [netbsd-7]: Makefile.in

CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:08:18 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1020, 1025


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.26 src/doc/CHANGES-7.1:1.1.2.27
--- src/doc/CHANGES-7.1:1.1.2.26	Sun Nov  8 01:56:46 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 02:08:18 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.26 2015/11/08 01:56:46 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.27 2015/11/08 02:08:18 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1472,3 +1472,14 @@ external/bsd/ntp/scripts/mkver  
 	Update ntp to 4.2.8p4.
 	[christos, ticket #1024]
 
+sys/compat/linux/common/linux_mod.c		1.5
+sys/compat/netbsd32/netbsd32_mod.c		1.6-1.9
+
+	Fixes for compat modules.
+	[pgoyette, ticket #1020]
+
+usr.sbin/vnconfig/vnconfig.8			1.40
+
+	In NetBSD 7, the vnconfig command was renamed.
+	[pgoyette, ticket #1025]
+



CVS commit: [netbsd-7] src/sys/dev/usb

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 05:17:40 UTC 2015

Modified Files:
src/sys/dev/usb [netbsd-7]: uplcom.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1027):
sys/dev/usb/uplcom.c: revision 1.76
Don't pretend to do zero length IN control transfers as dwctwo(4)
(correctly according to usb 2.0 specification 8.5.3) uses IN status stage
when no (zero length) data stage.  Instead read into a 1 byte array.
My uplcom(4) now works on RPI.


To generate a diff of this commit:
cvs rdiff -u -r1.74.2.1 -r1.74.2.2 src/sys/dev/usb/uplcom.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/uplcom.c
diff -u src/sys/dev/usb/uplcom.c:1.74.2.1 src/sys/dev/usb/uplcom.c:1.74.2.2
--- src/sys/dev/usb/uplcom.c:1.74.2.1	Thu Jul 30 15:51:58 2015
+++ src/sys/dev/usb/uplcom.c	Sun Nov  8 05:17:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uplcom.c,v 1.74.2.1 2015/07/30 15:51:58 snj Exp $	*/
+/*	$NetBSD: uplcom.c,v 1.74.2.2 2015/11/08 05:17:40 riz Exp $	*/
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.74.2.1 2015/07/30 15:51:58 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.74.2.2 2015/11/08 05:17:40 riz Exp $");
 
 #include 
 #include 
@@ -499,21 +499,20 @@ struct pl2303x_init {
 	uint8_t		request;
 	uint16_t	value;
 	uint16_t	index;
-	uint16_t	length;
 };
 
 static const struct pl2303x_init pl2303x[] = {
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x0404,0, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8383,0, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x0404,1, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8383,0, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  0,1, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  1,0, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  2, 0x44, 0 }
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x0404,0 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8383,0 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x0404,1 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8383,0 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  0,1 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  1,0 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  2, 0x44 }
 };
 #define N_PL2302X_INIT  (sizeof(pl2303x)/sizeof(pl2303x[0]))
 
@@ -525,13 +524,22 @@ uplcom_pl2303x_init(struct uplcom_softc 
 	int i;
 
 	for (i = 0; i < N_PL2302X_INIT; i++) {
+		char buf[1];
+		void *b;
+
 		req.bmRequestType = pl2303x[i].req_type;
 		req.bRequest = pl2303x[i].request;
 		USETW(req.wValue, pl2303x[i].value);
 		USETW(req.wIndex, pl2303x[i].index);
-		USETW(req.wLength, pl2303x[i].length);
+		if (UT_GET_DIR(req.bmRequestType) == UT_READ) {
+			b = buf;
+			USETW(req.wLength, sizeof(buf));
+		} else {
+			b = NULL;
+			USETW(req.wLength, 0);
+		}
 
-		err = usbd_do_request(sc->sc_udev, , 0);
+		err = usbd_do_request(sc->sc_udev, , b);
 		if (err) {
 			aprint_error_dev(sc->sc_dev,
 			"uplcom_pl2303x_init failed: %s\n",



CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 05:18:34 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Ticket 1027.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.27 src/doc/CHANGES-7.1:1.1.2.28
--- src/doc/CHANGES-7.1:1.1.2.27	Sun Nov  8 02:08:18 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 05:18:34 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.27 2015/11/08 02:08:18 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.28 2015/11/08 05:18:34 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1483,3 +1483,12 @@ usr.sbin/vnconfig/vnconfig.8			1.40
 	In NetBSD 7, the vnconfig command was renamed.
 	[pgoyette, ticket #1025]
 
+sys/dev/usb/uplcom.c1.76
+
+	Don't pretend to do zero length IN control transfers as dwctwo(4)
+	(correctly according to usb 2.0 specification 8.5.3) uses IN
+	status stage when no (zero length) data stage.  Instead read
+	into a 1 byte array.
+	My uplcom(4) now works on RPI.
+	[skrll, ticket #1027]
+



CVS commit: [netbsd-7] src/sys/arch/arm/allwinner

2015-11-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 01:53:43 UTC 2015

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_gpio.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1004):
sys/arch/arm/allwinner/awin_gpio.c: revision 1.19
sys/arch/arm/allwinner/awin_gpio.c: revision 1.20
Print the port name when gpio(4) attaches, makes it much easier to find
what port is connected to what gpio instance:
gpio0 at awingpio0: 18 pins
gpio0: port B
gpio1 at awingpio0: 25 pins
gpio1: port C
gpio2 at awingpio0: 28 pins
gpio2: port D
gpio3 at awingpio0: 12 pins
gpio3: port E
gpio4 at awingpio0: 12 pins
gpio4: port G
gpio5 at awingpio0: 28 pins
gpio5: port H
gpio6 at awingpio0: 22 pins
gpio6: port I
Based on suggestion from jared, redo previous using a specific print callback
to avoid the extra line. Now output looks like:
gpio0 at awingpio0 port B: 18 pins
gpio1 at awingpio0 port C: 25 pins
gpio2 at awingpio0 port D: 28 pins
gpio3 at awingpio0 port E: 12 pins
gpio4 at awingpio0 port G: 12 pins
gpio5 at awingpio0 port H: 28 pins
gpio6 at awingpio0 port I: 22 pins


To generate a diff of this commit:
cvs rdiff -u -r1.8.10.5 -r1.8.10.6 src/sys/arch/arm/allwinner/awin_gpio.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/allwinner/awin_gpio.c
diff -u src/sys/arch/arm/allwinner/awin_gpio.c:1.8.10.5 src/sys/arch/arm/allwinner/awin_gpio.c:1.8.10.6
--- src/sys/arch/arm/allwinner/awin_gpio.c:1.8.10.5	Sun Mar 15 22:59:39 2015
+++ src/sys/arch/arm/allwinner/awin_gpio.c	Sat Nov  7 01:53:43 2015
@@ -35,7 +35,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: awin_gpio.c,v 1.8.10.5 2015/03/15 22:59:39 snj Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_gpio.c,v 1.8.10.6 2015/11/07 01:53:43 riz Exp $");
 
 #include 
 #include 
@@ -81,6 +81,7 @@ static struct awin_gpio_pin_group {
 	bus_space_handle_t grp_bsh;
 	struct awin_gpio_pin_cfg grp_cfg;
 	struct gpio_chipset_tag grp_gc_tag;
+	const int grp_index;
 	const char grp_nc_name[6];
 } pin_groups[] = {
 	[0] = {
@@ -92,6 +93,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_write = awin_gpio_pin_write,
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
+		.grp_index = 0,
 		.grp_nc_name = "nc-pa",
 	},
 	[1] = {
@@ -103,6 +105,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_write = awin_gpio_pin_write,
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
+		.grp_index = 1,
 		.grp_nc_name = "nc-pb",
 	},
 	[2] = {
@@ -114,6 +117,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_write = awin_gpio_pin_write,
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
+		.grp_index = 2,
 		.grp_nc_name = "nc-pc",
 	},
 	[3] = {
@@ -125,6 +129,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_write = awin_gpio_pin_write,
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
+		.grp_index = 3,
 		.grp_nc_name = "nc-pd",
 	},
 	[4] = {
@@ -136,6 +141,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_write = awin_gpio_pin_write,
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
+		.grp_index = 4,
 		.grp_nc_name = "nc-pe",
 	},
 	[5] = {
@@ -147,6 +153,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_write = awin_gpio_pin_write,
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
+		.grp_index = 5,
 		.grp_nc_name = "nc-pf",
 	},
 	[6] = {
@@ -158,6 +165,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_write = awin_gpio_pin_write,
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
+		.grp_index = 6,
 		.grp_nc_name = "nc-pg",
 	},
 	[7] = {
@@ -169,6 +177,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_write = awin_gpio_pin_write,
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
+		.grp_index = 7,
 		.grp_nc_name = "nc-ph",
 	},
 	[8] = {
@@ -180,6 +189,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_write = awin_gpio_pin_write,
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
+		.grp_index = 8,
 		.grp_nc_name = "nc-pi",
 	},
 	[9] = {
@@ -191,6 +201,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
 		.grp_pin_mask = 0,
+		.grp_index = 9,
 		.grp_nc_name = "nc-pj",
 	},
 	[10] = {
@@ -202,6 +213,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
 		.grp_pin_mask = 0,
+		.grp_index = 10,
 		.grp_nc_name = "nc-pk",
 	},
 	[11] = {
@@ -213,6 +225,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
 		.grp_pin_mask = 0,
+		.grp_index = 11,
 		.grp_nc_name = "nc-pl",
 	},
 	[12] = {
@@ -224,6 +237,7 @@ static struct awin_gpio_pin_group {
 			.gp_pin_ctl = awin_gpio_pin_ctl,
 		},
 		.grp_pin_mask = 0,
+		.grp_index = 12,
 		.grp_nc_name = "nc-pm",
 	},
 };
@@ -257,6 +271,20 @@ awin_gpio_match(device_t parent, cfdata_
 }
 
 #if NGPIO > 0
+static int
+awin_gpio_cfprint(void *priv, const char *pnp)
+{
+	struct gpiobus_attach_args *gba = priv;
+	struct awin_gpio_pin_group *grp = gba->gba_gc->gp_cookie;
+
+	if (pnp)
+		aprint_normal("gpiobus at %s", pnp);
+
+	

CVS commit: [netbsd-7] src/sys/arch/x86/x86

2015-11-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Nov  6 22:50:56 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7]: cpu_ucode_intel.c

Log Message:
Pull up following revision(s) (requested by jym in ticket #994):
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.10
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.9
kmem_free() the address returned by kmem_alloc().  found by Brainy.
use the newly aligned location if we needed it.  found by kre.
Cache CPU index in the non-preemptible part otherwise it can be
unreliable (and report a CPU as patched while it was not).


To generate a diff of this commit:
cvs rdiff -u -r1.5.4.2 -r1.5.4.3 src/sys/arch/x86/x86/cpu_ucode_intel.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu_ucode_intel.c
diff -u src/sys/arch/x86/x86/cpu_ucode_intel.c:1.5.4.2 src/sys/arch/x86/x86/cpu_ucode_intel.c:1.5.4.3
--- src/sys/arch/x86/x86/cpu_ucode_intel.c:1.5.4.2	Tue Aug 11 05:13:44 2015
+++ src/sys/arch/x86/x86/cpu_ucode_intel.c	Fri Nov  6 22:50:56 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_ucode_intel.c,v 1.5.4.2 2015/08/11 05:13:44 snj Exp $ */
+/* $NetBSD: cpu_ucode_intel.c,v 1.5.4.3 2015/11/06 22:50:56 riz Exp $ */
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.5.4.2 2015/08/11 05:13:44 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.5.4.3 2015/11/06 22:50:56 riz Exp $");
 
 #include "opt_xen.h"
 #include "opt_cpu_ucode.h"
@@ -109,8 +109,9 @@ int
 cpu_ucode_intel_apply(struct cpu_ucode_softc *sc, int cpuno)
 {
 	uint32_t ucodetarget, oucodeversion, nucodeversion;
-	int platformid;
+	int platformid, cpuid;
 	struct intel1_ucode_header *uh;
+	void *uha;
 	size_t newbufsize = 0;
 	int rv = 0;
 
@@ -126,12 +127,12 @@ cpu_ucode_intel_apply(struct cpu_ucode_s
 	if ((uintptr_t)(sc->sc_blob) & 15) {
 		/* Make the buffer 16 byte aligned */
 		newbufsize = sc->sc_blobsize + 15;
-		uh = kmem_alloc(newbufsize, KM_SLEEP);
-		if (uh == NULL) {
+		uha = kmem_alloc(newbufsize, KM_SLEEP);
+		if (uha == NULL) {
 			printf("%s: memory allocation failed\n", __func__);
 			return EINVAL;
 		}
-		uh = (struct intel1_ucode_header *)roundup2((uintptr_t)uh, 16);
+		uh = (struct intel1_ucode_header *)roundup2((uintptr_t)uha, 16);
 		/* Copy to the new area */
 		memcpy(uh, sc->sc_blob, sc->sc_blobsize);
 	}
@@ -144,8 +145,9 @@ cpu_ucode_intel_apply(struct cpu_ucode_s
 		rv = EEXIST; /* ??? */
 		goto out;
 	}
-	wrmsr(MSR_BIOS_UPDT_TRIG, (uintptr_t)(sc->sc_blob) + 48);
+	wrmsr(MSR_BIOS_UPDT_TRIG, (uintptr_t)uh + 48);
 	intel_getcurrentucode(, );
+	cpuid = curcpu()->ci_index;
 
 	kpreempt_enable();
 
@@ -154,11 +156,11 @@ cpu_ucode_intel_apply(struct cpu_ucode_s
 		goto out;
 	}
 
-	printf("cpu %d: ucode 0x%x->0x%x\n", curcpu()->ci_index,
+	printf("cpu %d: ucode 0x%x->0x%x\n", cpuid,
 	   oucodeversion, nucodeversion);
 out:
 	if (newbufsize != 0)
-		kmem_free(uh, newbufsize);
+		kmem_free(uha, newbufsize);
 	return rv;
 }
 #endif /* ! XEN */



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/include/linux

2015-11-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Nov  6 22:58:20 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/include/linux [netbsd-7]: bitops.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1001):
sys/external/bsd/drm2/include/linux/bitops.h: revision 1.10
sys/external/bsd/drm2/include/linux/bitops.h: revision 1.11
Fix indexing convention of Linux __ffs/__ffs64 shims.
They reject zero input, and yield zero-based indexing, unlike our
ffs/ffs64, which return zero for zero and yield one-based indexing.
May let nouveau make a little more progress toward booting!
Found by mrg@.
Fix comment in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.7.2.2 -r1.7.2.3 \
src/sys/external/bsd/drm2/include/linux/bitops.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/external/bsd/drm2/include/linux/bitops.h
diff -u src/sys/external/bsd/drm2/include/linux/bitops.h:1.7.2.2 src/sys/external/bsd/drm2/include/linux/bitops.h:1.7.2.3
--- src/sys/external/bsd/drm2/include/linux/bitops.h:1.7.2.2	Fri Mar  6 21:39:10 2015
+++ src/sys/external/bsd/drm2/include/linux/bitops.h	Fri Nov  6 22:58:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bitops.h,v 1.7.2.2 2015/03/06 21:39:10 snj Exp $	*/
+/*	$NetBSD: bitops.h,v 1.7.2.3 2015/11/06 22:58:20 riz Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -42,16 +42,24 @@
 
 #include 
 
+/*
+ * Linux __ffs/__ffs64 is zero-based; zero input is undefined.  Our
+ * ffs/ffs64 is one-based; zero input yields zero.
+ */
 static inline unsigned long
 __ffs(unsigned long x)
 {
-	return ffs64(x);
+
+	KASSERT(x != 0);
+	return ffs64(x) - 1;
 }
 
 static inline unsigned long
 __ffs64(uint64_t x)
 {
-	return ffs64(x);
+
+	KASSERT(x != 0);
+	return ffs64(x) - 1;
 }
 
 static inline unsigned int



CVS commit: [netbsd-7] src/external/cddl/osnet/dev/dtrace

2015-11-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 01:50:44 UTC 2015

Modified Files:
src/external/cddl/osnet/dev/dtrace [netbsd-7]: dtrace_ioctl.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1003):
external/cddl/osnet/dev/dtrace/dtrace_ioctl.c: revision 1.5
Fix dtrace module autoload.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.8.1 \
src/external/cddl/osnet/dev/dtrace/dtrace_ioctl.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/dtrace/dtrace_ioctl.c
diff -u src/external/cddl/osnet/dev/dtrace/dtrace_ioctl.c:1.4 src/external/cddl/osnet/dev/dtrace/dtrace_ioctl.c:1.4.8.1
--- src/external/cddl/osnet/dev/dtrace/dtrace_ioctl.c:1.4	Sun Mar  3 18:16:35 2013
+++ src/external/cddl/osnet/dev/dtrace/dtrace_ioctl.c	Sat Nov  7 01:50:44 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtrace_ioctl.c,v 1.4 2013/03/03 18:16:35 christos Exp $	*/
+/*	$NetBSD: dtrace_ioctl.c,v 1.4.8.1 2015/11/07 01:50:44 riz Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -659,10 +659,15 @@ again:
 		mutex_exit(_provider_lock);
 
 		if (pvp == NULL && error == 0) {
-			error = module_autoload(pvd->dtvd_name,
-			MODULE_CLASS_MISC);
-			if (error == 0)
-goto again;
+			char name[NAME_MAX];
+
+			if (snprintf(name, sizeof name, "dtrace_%s",
+			pvd->dtvd_name) < sizeof name) {
+error = module_autoload(name,
+MODULE_CLASS_MISC);
+if (error == 0)
+	goto again;
+			}
 		}
 
 		if (pvp == NULL)



CVS commit: [netbsd-7] src/sys/dev/pci

2015-11-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Nov  6 22:52:55 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-7]: viornd.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #995):
sys/dev/pci/viornd.c: revision 1.3
disable debug print by default


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/dev/pci/viornd.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/viornd.c
diff -u src/sys/dev/pci/viornd.c:1.1.2.2 src/sys/dev/pci/viornd.c:1.1.2.3
--- src/sys/dev/pci/viornd.c:1.1.2.2	Sun Nov  2 10:09:44 2014
+++ src/sys/dev/pci/viornd.c	Fri Nov  6 22:52:55 2015
@@ -1,4 +1,4 @@
-/* 	$NetBSD: viornd.c,v 1.1.2.2 2014/11/02 10:09:44 martin Exp $ */
+/* 	$NetBSD: viornd.c,v 1.1.2.3 2015/11/06 22:52:55 riz Exp $ */
 /*	$OpenBSD: viornd.c,v 1.1 2014/01/21 21:14:58 sf Exp $	*/
 
 /*
@@ -61,7 +61,7 @@
 
 #define	VIORND_BUFSIZE			32
 
-#define VIORND_DEBUG 1
+#define VIORND_DEBUG 0
 
 struct viornd_softc {
 	device_t		sc_dev;



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/dist/drm/nouveau

2015-11-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Nov  6 23:03:20 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau [netbsd-7]: nouveau_drm.c
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo [netbsd-7]:
nouveau_engine_fifo_nve0.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1002):
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c: revision 1.6

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:
 revision 1.5
nouveau_drm.c:
- hook up an empty uvm_pagerops like radeon does.
- hook up nouveau_ttm_mmap_object().
nouveau_engine_fifo_nve0.c:
- if (cold), don't try to wait, but hard-spin until the timeout period.
with these in place, i am able to get working text-console with nouveau!
ok riastradh.


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.2 -r1.2.4.3 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c
cvs rdiff -u -r1.1.1.1.4.2 -r1.1.1.1.4.3 \

src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.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/dist/drm/nouveau/nouveau_drm.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c:1.2.4.2 src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c:1.2.4.3
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c:1.2.4.2	Fri Mar  6 21:39:08 2015
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c	Fri Nov  6 23:03:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_drm.c,v 1.2.4.2 2015/03/06 21:39:08 snj Exp $	*/
+/*	$NetBSD: nouveau_drm.c,v 1.2.4.3 2015/11/06 23:03:20 riz Exp $	*/
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_drm.c,v 1.2.4.2 2015/03/06 21:39:08 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_drm.c,v 1.2.4.3 2015/11/06 23:03:20 riz Exp $");
 
 #include 
 #include 
@@ -62,6 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_drm.
 #include "nouveau_fbcon.h"
 #include "nouveau_fence.h"
 #include "nouveau_debugfs.h"
+#include "nouveau_ttm.h"
 
 MODULE_PARM_DESC(config, "option string to pass to driver core");
 char *nouveau_config;
@@ -87,6 +88,10 @@ module_param_named(runpm, nouveau_runtim
 static struct drm_driver driver;
 #ifdef __NetBSD__
 struct drm_driver *const nouveau_drm_driver = 
+
+/* XXX Kludge for the non-GEM GEM that nouveau uses.  */
+static const struct uvm_pagerops nouveau_gem_uvm_ops;
+
 #endif
 
 static u64
@@ -880,7 +885,11 @@ driver = {
 
 	.ioctls = nouveau_ioctls,
 	.num_ioctls = ARRAY_SIZE(nouveau_ioctls),
-#ifndef __NetBSD__
+#ifdef __NetBSD__
+	.fops = NULL,
+	.mmap_object = _ttm_mmap_object,
+	.gem_uvm_ops = _gem_uvm_ops,
+#else
 	.fops = _driver_fops,
 #endif
 

Index: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.1.1.1.4.2 src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.1.1.1.4.3
--- src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:1.1.1.1.4.2	Fri Mar  6 21:39:09 2015
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c	Fri Nov  6 23:03:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.2 2015/03/06 21:39:09 snj Exp $	*/
+/*	$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.3 2015/11/06 23:03:20 riz Exp $	*/
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.2 2015/03/06 21:39:09 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.3 2015/11/06 23:03:20 riz Exp $");
 
 #include 
 #include 
@@ -136,18 +136,27 @@ nve0_fifo_runlist_update(struct nve0_fif
 	nv_wr32(priv, 0x002274, (engine << 20) | (p >> 3));
 
 #ifdef __NetBSD__
-{
-	int ret;
+	if (cold) {
+		uint count = 2000;
+		while (count-- > 0) {
+			if (!(nv_rd32(priv, 0x002284 + (engine * 0x08)) & 0x0010))
+break;
+			delay(1000);
+		}
+		if (count == 0)
+			nv_error(priv, "runlist %d update timeout\n", engine);
+	} else {
+		int ret;
 
-	spin_lock(>lock);
-	DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, >wait, >lock,
-	msecs_to_jiffies(2000),
-	!(nv_rd32(priv, 0x002284 +
-		(engine * 0x08)) & 0x0010));
-	if (ret == 0)
-		nv_error(priv, "runlist %d update timeout\n", engine);
-	spin_unlock(>lock);
-}
+		spin_lock(>lock);
+		DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, >wait, >lock,
+		msecs_to_jiffies(2000),
+		!(nv_rd32(priv, 0x002284 +
+			(engine * 0x08)) & 0x0010));
+		if (ret == 0)
+			nv_error(priv, "runlist %d update timeout\n", engine);
+		spin_unlock(>lock);
+	}
 #else
 	if (wait_event_timeout(engn->wait, !(nv_rd32(priv, 0x002284 +
 			   

CVS commit: [netbsd-7] src/doc

2015-11-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 01:56:08 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1003, 1004


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.20 src/doc/CHANGES-7.1:1.1.2.21
--- src/doc/CHANGES-7.1:1.1.2.20	Fri Nov  6 23:04:30 2015
+++ src/doc/CHANGES-7.1	Sat Nov  7 01:56:08 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.20 2015/11/06 23:04:30 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.21 2015/11/07 01:56:08 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -758,3 +758,14 @@ sys/external/bsd/drm2/dist/drm/nouveau/n
 	Get nouveaudrm text console working.
 	[riastradh, ticket #1002]
 
+external/cddl/osnet/dev/dtrace/dtrace_ioctl.c	1.5
+
+	Fix dtrace module autoload.
+	[riastradh, ticket #1003]
+
+sys/arch/arm/allwinner/awin_gpio.c		1.19-1.20
+
+	Print the port name when gpio(4) attaches, making it easier
+	to find which port is connected to which gpio instance.
+	[bouyer, ticket #1004]
+



CVS commit: [netbsd-7] src/sys/dev/pci

2015-11-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Nov  6 22:55:10 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-7]: agp_i810.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1000):
sys/dev/pci/agp_i810.c: revision 1.119
Fix mapping Intel graphics device registers.
- Accept either 32-bit or 64-bit mappings for all devices.
- Let the device always dictate size of the mapping.
- Explain why we don't have a statically fixed mapping size.
Fixes the main part of PR kern/50060.  Still a display mode issue
from one submitter, but it is almost certainly an unrelated issue.


To generate a diff of this commit:
cvs rdiff -u -r1.112.2.3 -r1.112.2.4 src/sys/dev/pci/agp_i810.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/agp_i810.c
diff -u src/sys/dev/pci/agp_i810.c:1.112.2.3 src/sys/dev/pci/agp_i810.c:1.112.2.4
--- src/sys/dev/pci/agp_i810.c:1.112.2.3	Thu Apr 23 07:31:16 2015
+++ src/sys/dev/pci/agp_i810.c	Fri Nov  6 22:55:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp_i810.c,v 1.112.2.3 2015/04/23 07:31:16 snj Exp $	*/
+/*	$NetBSD: agp_i810.c,v 1.112.2.4 2015/11/06 22:55:10 riz Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.112.2.3 2015/04/23 07:31:16 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.112.2.4 2015/11/06 22:55:10 riz Exp $");
 
 #include 
 #include 
@@ -407,47 +407,91 @@ agp_i810_attach(device_t parent, device_
 	}
 	aprint_naive("\n");
 
-	mmadr_type = PCI_MAPREG_TYPE_MEM;
+	/* Discriminate on the chipset to choose the relevant BARs.  */
 	switch (isc->chiptype) {
 	case CHIP_I915:
 	case CHIP_G33:
 		apbase = AGP_I915_GMADR;
 		mmadr_bar = AGP_I915_MMADR;
-		isc->size = 512*1024;
 		gtt_bar = AGP_I915_GTTADR;
 		gtt_off = ~(bus_size_t)0; /* XXXGCC */
 		break;
 	case CHIP_I965:
 		apbase = AGP_I965_GMADR;
 		mmadr_bar = AGP_I965_MMADR;
-		mmadr_type |= PCI_MAPREG_MEM_TYPE_64BIT;
-		if (pci_mapreg_info(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag,
-			AGP_I965_MMADR, mmadr_type, NULL, >size, NULL))
-			isc->size = 512*1024; /* XXX */
 		gtt_bar = 0;
 		gtt_off = AGP_I965_GTT;
 		break;
 	case CHIP_G4X:
 		apbase = AGP_I965_GMADR;
 		mmadr_bar = AGP_I965_MMADR;
-		mmadr_type |= PCI_MAPREG_MEM_TYPE_64BIT;
-		if (pci_mapreg_info(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag,
-			AGP_I965_MMADR, mmadr_type, NULL, >size, NULL))
-			isc->size = 512*1024; /* XXX */
 		gtt_bar = 0;
 		gtt_off = AGP_G4X_GTT;
 		break;
 	default:
 		apbase = AGP_I810_GMADR;
 		mmadr_bar = AGP_I810_MMADR;
-		if (pci_mapreg_info(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag,
-			AGP_I810_MMADR, mmadr_type, NULL, >size, NULL))
-			isc->size = 512*1024; /* XXX */
 		gtt_bar = 0;
 		gtt_off = AGP_I810_GTT;
 		break;
 	}
 
+	/*
+	 * Ensure the MMIO BAR is, in fact, a memory BAR.
+	 *
+	 * XXX This is required because we use pa_memt below.  It is
+	 * not a priori clear to me there is any other reason to
+	 * require this.
+	 */
+	mmadr_type = pci_mapreg_type(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag,
+	mmadr_bar);
+	if ((mmadr_type & PCI_MAPREG_TYPE_MEM) != PCI_MAPREG_TYPE_MEM) {
+		aprint_error_dev(self, "non-memory device MMIO registers\n");
+		error = ENXIO;
+		goto fail1;
+	}
+
+	/*
+	 * Determine the size of the MMIO registers.
+	 *
+	 * XXX The size of the MMIO registers we use is statically
+	 * determined, as a function of the chipset, by the driver's
+	 * implementation.
+	 *
+	 * On some chipsets, the GTT is part of the MMIO register BAR.
+	 * We would like to map the GTT separately, so that we can map
+	 * it prefetchable, which we can't do with the MMIO registers.
+	 * Consequently, we would especially like to map a fixed size
+	 * of MMIO registers, not just whatever size the BAR says.
+	 *
+	 * However, old drm assumes that the combined GTT/MMIO register
+	 * space is a single bus space mapping, so mapping them
+	 * separately breaks that.  Once we rip out old drm, we can
+	 * replace the pci_mapreg_info call by the chipset switch.
+	 */
+#if notyet
+	switch (isc->chiptype) {
+	case CHIP_I810:
+	case CHIP_I830:
+	case CHIP_I855:
+	case CHIP_I915:
+	case CHIP_G33:
+	case CHIP_I965:
+	case CHIP_G4X:
+		isc->size = 512*1024;
+		break;
+	case CHIP_SANDYBRIDGE:
+	case CHIP_IVYBRIDGE:
+	case CHIP_HASWELL:
+		isc->size = 2*1024*1024;
+		break;
+	}
+#else
+	if (pci_mapreg_info(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag,
+		mmadr_bar, mmadr_type, NULL, >size, NULL))
+		isc->size = 512*1024;
+#endif	/* notyet */
+
 	/* Map (or, rather, find the address and size of) the aperture.  */
 	if (isc->chiptype == CHIP_I965 || isc->chiptype == CHIP_G4X)
 		error = agp_i965_map_aperture(>vga_pa, sc, apbase);



CVS commit: [netbsd-7] src/doc

2015-11-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Nov  6 23:04:30 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 994-995, 1000-1002.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/doc/CHANGES-7.1

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-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.19 src/doc/CHANGES-7.1:1.1.2.20
--- src/doc/CHANGES-7.1:1.1.2.19	Fri Nov  6 20:29:03 2015
+++ src/doc/CHANGES-7.1	Fri Nov  6 23:04:30 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.19 2015/11/06 20:29:03 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.20 2015/11/06 23:04:30 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -730,3 +730,31 @@ sbin/dump/tape.c1.54
 	Fix tape usage report for large filesystems.
 	[bouyer, ticket #991]
 
+sys/arch/x86/x86/cpu_ucode_intel.c		1.9-1.10
+
+	Fixes to cpu microcode updater.
+	[jym, ticket #994]
+
+sys/dev/pci/viornd.c1.3
+
+	Disable viornd(4) debug print by default.
+	[riastradh, ticket #995]
+
+sys/dev/pci/agp_i810.c1.119
+
+	Fix mapping Intel graphics device registers. Fixes main part
+	of PR#50060.
+	[riastradh, ticket #1000]
+
+sys/external/bsd/drm2/include/linux/bitops.h	1.10-1.11
+
+	Fix indexing convention of Linux __ffs/__ffs64 shims,
+	fixing infinite loop on boot with nouveau(4).
+	[riastradh, ticket #1001]
+
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c 1.5
+sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c 1.6
+
+	Get nouveaudrm text console working.
+	[riastradh, ticket #1002]
+



CVS commit: [netbsd-7] src/sys/arch/mips/atheros/dev

2015-11-05 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Nov  5 20:25:30 UTC 2015

Modified Files:
src/sys/arch/mips/atheros/dev [netbsd-7]: athflash.c if_ae.c

Log Message:
Pull up revisions (requested by nisimura in ticket #978):
sys/arch/mips/atheros/dev/athflash.c: 1.9
sys/arch/mips/atheros/dev/if_ae.c: 1.25

remove unused variables which break AP30 and MERAKI kernel builds.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.2.1 src/sys/arch/mips/atheros/dev/athflash.c
cvs rdiff -u -r1.25 -r1.25.2.1 src/sys/arch/mips/atheros/dev/if_ae.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/atheros/dev/athflash.c
diff -u src/sys/arch/mips/atheros/dev/athflash.c:1.8 src/sys/arch/mips/atheros/dev/athflash.c:1.8.2.1
--- src/sys/arch/mips/atheros/dev/athflash.c:1.8	Fri Jul 25 08:10:34 2014
+++ src/sys/arch/mips/atheros/dev/athflash.c	Thu Nov  5 20:25:30 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: athflash.c,v 1.8 2014/07/25 08:10:34 dholland Exp $ */
+/* $NetBSD: athflash.c,v 1.8.2.1 2015/11/05 20:25:30 riz Exp $ */
 
 /*
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: athflash.c,v 1.8 2014/07/25 08:10:34 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: athflash.c,v 1.8.2.1 2015/11/05 20:25:30 riz Exp $");
 
 #include 
 #include 
@@ -318,8 +318,6 @@ int
 flashwrite(dev_t dev, struct uio *uio, int flag)
 {
 	struct flash_softc	*sc;
-	bus_space_tag_t		iot;
-	bus_space_handle_t	ioh;
 	bus_size_t		off;
 	int			stat;
 	int			error;
@@ -333,9 +331,6 @@ flashwrite(dev_t dev, struct uio *uio, i
 	if (uio->uio_resid % sc->sc_sector_size)
 		return EINVAL;
 
-	iot = sc->sc_iot;
-	ioh = sc->sc_ioh;
-	
 	for (off = uio->uio_offset;
 	 uio->uio_resid > 0;
 	 off += sc->sc_sector_size) {

Index: src/sys/arch/mips/atheros/dev/if_ae.c
diff -u src/sys/arch/mips/atheros/dev/if_ae.c:1.25 src/sys/arch/mips/atheros/dev/if_ae.c:1.25.2.1
--- src/sys/arch/mips/atheros/dev/if_ae.c:1.25	Sun Aug 10 16:44:34 2014
+++ src/sys/arch/mips/atheros/dev/if_ae.c	Thu Nov  5 20:25:30 2015
@@ -1,4 +1,4 @@
-/* $Id: if_ae.c,v 1.25 2014/08/10 16:44:34 tls Exp $ */
+/* $Id: if_ae.c,v 1.25.2.1 2015/11/05 20:25:30 riz Exp $ */
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
  * Copyright (c) 2006 Garrett D'Amore.
@@ -98,7 +98,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.25 2014/08/10 16:44:34 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.25.2.1 2015/11/05 20:25:30 riz Exp $");
 
 
 #include 
@@ -547,7 +547,7 @@ ae_start(struct ifnet *ifp)
 {
 	struct ae_softc *sc = ifp->if_softc;
 	struct mbuf *m0, *m;
-	struct ae_txsoft *txs, *last_txs = NULL;
+	struct ae_txsoft *txs;
 	bus_dmamap_t dmamap;
 	int error, firsttx, nexttx, lasttx = 1, ofree, seg;
 
@@ -728,8 +728,6 @@ ae_start(struct ifnet *ifp)
 		SIMPLEQ_REMOVE_HEAD(>sc_txfreeq, txs_q);
 		SIMPLEQ_INSERT_TAIL(>sc_txdirtyq, txs, txs_q);
 
-		last_txs = txs;
-
 		/*
 		 * Pass the packet to any BPF listeners.
 		 */
@@ -1011,7 +1009,6 @@ static void
 ae_rxintr(struct ae_softc *sc)
 {
 	struct ifnet *ifp = >sc_ethercom.ec_if;
-	struct ether_header *eh;
 	struct ae_rxsoft *rxs;
 	struct mbuf *m;
 	u_int32_t rxstat;
@@ -1132,7 +1129,6 @@ ae_rxintr(struct ae_softc *sc)
 #endif /* __NO_STRICT_ALIGNMENT */
 
 		ifp->if_ipackets++;
-		eh = mtod(m, struct ether_header *);
 		m->m_pkthdr.rcvif = ifp;
 		m->m_pkthdr.len = m->m_len = len;
 



CVS commit: [netbsd-7] src/sys/arch/x86/x86

2015-11-05 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Nov  6 00:40:02 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7]: cpu.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #984):
sys/arch/x86/x86/cpu.c: revision 1.116
Don't disable/re-enable interrupts if they are already disabled.
Addresses PR 48196.
This commit was improved and approved by christos@


To generate a diff of this commit:
cvs rdiff -u -r1.111.2.1 -r1.111.2.2 src/sys/arch/x86/x86/cpu.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.111.2.1 src/sys/arch/x86/x86/cpu.c:1.111.2.2
--- src/sys/arch/x86/x86/cpu.c:1.111.2.1	Mon Jan 12 21:06:41 2015
+++ src/sys/arch/x86/x86/cpu.c	Fri Nov  6 00:40:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.111.2.1 2015/01/12 21:06:41 snj Exp $	*/
+/*	$NetBSD: cpu.c,v 1.111.2.2 2015/11/06 00:40:02 riz Exp $	*/
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111.2.1 2015/01/12 21:06:41 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111.2.2 2015/11/06 00:40:02 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -1278,6 +1278,7 @@ cpu_load_pmap(struct pmap *pmap, struct 
 {
 #ifdef PAE
 	struct cpu_info *ci = curcpu();
+	bool interrupts_enabled;
 	pd_entry_t *l3_pd = ci->ci_pae_l3_pdir;
 	int i;
 
@@ -1286,11 +1287,16 @@ cpu_load_pmap(struct pmap *pmap, struct 
 	 * while this doesn't block NMIs, it's probably ok as NMIs unlikely
 	 * reload cr3.
 	 */
-	x86_disable_intr();
+	interrupts_enabled = (x86_read_flags() & PSL_I) != 0;
+	if (interrupts_enabled)
+		x86_disable_intr();
+
 	for (i = 0 ; i < PDP_SIZE; i++) {
 		l3_pd[i] = pmap->pm_pdirpa[i] | PG_V;
 	}
-	x86_enable_intr();
+	
+	if (interrupts_enabled)
+		x86_enable_intr();
 	tlbflush();
 #else /* PAE */
 	lcr3(pmap_pdirpa(pmap, 0));



CVS commit: [netbsd-7] src/sys/arch/x68k/x68k

2015-11-05 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Nov  5 20:40:22 UTC 2015

Modified Files:
src/sys/arch/x68k/x68k [netbsd-7]: machdep.c

Log Message:
Pull up following revision(s) (requested by isaki in ticket #983):
sys/arch/x68k/x68k/machdep.c: revision 1.192
To turn off the power, it's necessary to turn off the alarm signal
of RTC before writing the system port.  This is a fix for rev 1.191.
Thanks to Y.Sugahara.
Should be pulled up to netbsd-7.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.191.4.1 src/sys/arch/x68k/x68k/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/x68k/x68k/machdep.c
diff -u src/sys/arch/x68k/x68k/machdep.c:1.191 src/sys/arch/x68k/x68k/machdep.c:1.191.4.1
--- src/sys/arch/x68k/x68k/machdep.c:1.191	Wed Mar 26 16:21:39 2014
+++ src/sys/arch/x68k/x68k/machdep.c	Thu Nov  5 20:40:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.191 2014/03/26 16:21:39 isaki Exp $	*/
+/*	$NetBSD: machdep.c,v 1.191.4.1 2015/11/05 20:40:22 riz Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.191 2014/03/26 16:21:39 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.191.4.1 2015/11/05 20:40:22 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -106,6 +106,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include 
 #include 
 #include 
+#include 
 
 extern void doboot(void) __attribute__((__noreturn__));
 
@@ -522,6 +523,10 @@ cpu_reboot(int howto, char *bootstr)
 	if (((howto & RB_POWERDOWN) == RB_POWERDOWN) && power_switch_is_off) {
 		printf("powering off...\n");
 		delay(100);
+
+		/* Turn off the alarm signal of RTC */
+		IODEVbase->io_rtc.bank0.reset = 0x0c;
+
 		intio_set_sysport_powoff(0x00);
 		intio_set_sysport_powoff(0x0f);
 		intio_set_sysport_powoff(0x0f);



CVS commit: [netbsd-7] src/sys/netinet

2015-11-05 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Nov  6 00:46:50 UTC 2015

Modified Files:
src/sys/netinet [netbsd-7]: if_arp.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #985):
sys/netinet/if_arp.c: revision 1.160
Add sysctl to selectively log arp packets from unknown network. (Adrien URBAN).


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.158.2.1 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.158 src/sys/netinet/if_arp.c:1.158.2.1
--- src/sys/netinet/if_arp.c:1.158	Tue Jun  3 01:24:32 2014
+++ src/sys/netinet/if_arp.c	Fri Nov  6 00:46:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.158 2014/06/03 01:24:32 ozaki-r Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.158.2.1 2015/11/06 00:46:50 riz Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.158 2014/06/03 01:24:32 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.158.2.1 2015/11/06 00:46:50 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_inet.h"
@@ -194,6 +194,7 @@ static int arp_drainwanted;
 static int log_movements = 1;
 static int log_permanent_modify = 1;
 static int log_wrong_iface = 1;
+static int log_unknown_network = 1;
 
 /*
  * this should be elsewhere.
@@ -1305,17 +1306,20 @@ arplookup1(struct mbuf *m, const struct 
 		return (struct llinfo_arp *)rt->rt_llinfo;
 
 	if (create) {
-		if (rt->rt_flags & RTF_GATEWAY)
-			why = "host is not on local network";
-		else if ((rt->rt_flags & RTF_LLINFO) == 0) {
+		if (rt->rt_flags & RTF_GATEWAY) {
+			if (log_unknown_network)
+why = "host is not on local network";
+		} else if ((rt->rt_flags & RTF_LLINFO) == 0) {
 			ARP_STATINC(ARP_STAT_ALLOCFAIL);
 			why = "could not allocate llinfo";
 		} else
 			why = "gateway route is not ours";
-		log(LOG_DEBUG, "arplookup: unable to enter address"
-		" for %s@%s on %s (%s)\n",
-		in_fmtaddr(*addr), lla_snprintf(ar_sha(ah), ah->ar_hln),
-		(ifp) ? ifp->if_xname : "null", why);
+		if (why) {
+			log(LOG_DEBUG, "arplookup: unable to enter address"
+			" for %s@%s on %s (%s)\n", in_fmtaddr(*addr),
+			lla_snprintf(ar_sha(ah), ah->ar_hln),
+			(ifp) ? ifp->if_xname : "null", why);
+		}
 		if (rt->rt_refcnt <= 0 && (rt->rt_flags & RTF_CLONED) != 0) {
 			rtrequest(RTM_DELETE, rt_getkey(rt),
 			rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL);
@@ -1704,6 +1708,13 @@ sysctl_net_inet_arp_setup(struct sysctll
 			" interface"),
 			NULL, 0, _wrong_iface, 0,
 			CTL_NET,PF_INET, node->sysctl_num, CTL_CREATE, CTL_EOL);
+
+	sysctl_createv(clog, 0, NULL, NULL,
+			CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+			CTLTYPE_INT, "log_unknown_network",
+			SYSCTL_DESCR("log ARP packets from non-local network"),
+			NULL, 0, _unknown_network, 0,
+			CTL_NET,PF_INET, node->sysctl_num, CTL_CREATE, CTL_EOL);
 }
 
 #endif /* INET */



  1   2   3   4   5   6   7   8   9   10   >