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

2015-12-19 Thread Marty Fouts
Module Name:src
Committed By:   marty
Date:   Sun Dec 20 05:25:01 UTC 2015

Modified Files:
src/sys/arch/evbarm/exynos: exynos_machdep.c

Log Message:
XU4 debug cleanup

get rid of some unneeded debug chatter in machdep


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/exynos/exynos_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/exynos/exynos_machdep.c
diff -u src/sys/arch/evbarm/exynos/exynos_machdep.c:1.5 src/sys/arch/evbarm/exynos/exynos_machdep.c:1.6
--- src/sys/arch/evbarm/exynos/exynos_machdep.c:1.5	Wed Dec 16 12:18:34 2015
+++ src/sys/arch/evbarm/exynos/exynos_machdep.c	Sun Dec 20 05:25:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_machdep.c,v 1.5 2015/12/16 12:18:34 jmcneill Exp $ */
+/*	$NetBSD: exynos_machdep.c,v 1.6 2015/12/20 05:25:01 marty Exp $ */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_machdep.c,v 1.5 2015/12/16 12:18:34 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_machdep.c,v 1.6 2015/12/20 05:25:01 marty Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_exynos.h"
@@ -330,21 +330,17 @@ initarm(void *arg)
 		panic("Unknown product family %llx",
 		   EXYNOS_PRODUCT_FAMILY(exynos_soc_id));
 	}
-	DPRINT(" devmap");
 	pmap_devmap_register(devmap);
 
 	/* bootstrap soc. uart_address is determined in exynos_start */
 	paddr_t uart_address = armreg_tpidruro_read();
-	DPRINT(" bootstrap");
 	exynos_bootstrap(EXYNOS_CORE_VBASE, EXYNOS_IOPHYSTOVIRT(uart_address));
 
 	/* set up CPU / MMU / TLB functions */
-	DPRINT(" cpufunc");
 	if (set_cpufuncs())
 		panic("cpu not recognized!");
 
 	/* get normal console working */
-	DPRINT(" consinit");
  	consinit();
 
 #ifdef KGDB



CVS commit: src/sys/modules/raidframe

2015-12-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Dec 20 05:04:23 UTC 2015

Removed Files:
src/sys/modules/raidframe: Makefile

Log Message:
Remove this initial pass, since nothing further has been done with it for
six years.  It will soon be replaced with a working raid module.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/modules/raidframe/Makefile

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



CVS commit: src/sys/kern

2015-12-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Dec 20 04:21:03 UTC 2015

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

Log Message:
If we process the callback immediately, don't bother adding it to the
list of future callbacks.  We've already processed the list (and removed
all the entries), and there's nothing in the future that will process
the list again.

This avoids the possibility of leaving an entry in the list that points
to an unloaded module's former address space.


To generate a diff of this commit:
cvs rdiff -u -r1.237 -r1.238 src/sys/kern/subr_autoconf.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_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.237 src/sys/kern/subr_autoconf.c:1.238
--- src/sys/kern/subr_autoconf.c:1.237	Mon Dec  7 11:38:46 2015
+++ src/sys/kern/subr_autoconf.c	Sun Dec 20 04:21:03 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.237 2015/12/07 11:38:46 pgoyette Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.238 2015/12/20 04:21:03 pgoyette Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.237 2015/12/07 11:38:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.238 2015/12/20 04:21:03 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -2108,6 +2108,7 @@ config_finalize_register(device_t dev, i
 	if (config_finalize_done) {
 		while ((*fn)(dev) != 0)
 			/* loop */ ;
+		return 0;
 	}
 
 	/* Ensure this isn't already on the list. */



CVS commit: src/etc

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 20 02:35:34 UTC 2015

Modified Files:
src/etc: Makefile

Log Message:
give the kernel pax invocating the MKREPRO_TIMESTAMP treatment.


To generate a diff of this commit:
cvs rdiff -u -r1.425 -r1.426 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.425 src/etc/Makefile:1.426
--- src/etc/Makefile:1.425	Sat Dec 19 18:37:43 2015
+++ src/etc/Makefile	Sat Dec 19 21:35:34 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.425 2015/12/19 23:37:43 christos Exp $
+#	$NetBSD: Makefile,v 1.426 2015/12/20 02:35:34 christos Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -67,6 +67,19 @@ MKISOFS_FLAGS+= -J -l -hide-joliet-trans
 MKISOFS_FLAGS+=	-quiet
 .endif
  
+# Reproducible build parameters
+.if ${MKREPRO:Uno} == "no"
+BUILDER!=	echo $${USER-root}@$$(hostname)
+.else
+BUILDER=	buil...@localhost.netbsd.org
+.endif
+.if ${MKREPRO_TIMESTAMP:Uno} == "no"
+PAX_TIMESTAMP=
+BUILD_DATE!=	date -u
+.else
+PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
+BUILD_DATE!=	date -u -r "${MKREPRO_TIMESTAMP}"
+.endif
 
 # MD Makefile.inc may append MD targets to BIN[123].  Make sure all
 # are empty, to preserve the old semantics of setting them below with "+=".
@@ -185,16 +198,6 @@ MAKEDEV: ${.CURDIR}/MAKEDEV.awk ${.CURDI
 	> ${.TARGET}
 
 .include "${NETBSDSRCDIR}/etc/Makefile.params"
-.if ${MKREPRO:Uno} == "no"
-BUILDER!=	echo $${USER-root}@$$(hostname)
-.else
-BUILDER=	buil...@localhost.netbsd.org
-.endif
-.if ${MKREPRO_TIMESTAMP:Uno} == "no"
-BUILD_DATE!=	date -u
-.else
-BUILD_DATE!=	date -u -r "${MKREPRO_TIMESTAMP}"
-.endif
 
 CLEANFILES+=	etc-release
 etc-release: .EXEC .MAKE
@@ -608,7 +611,7 @@ kernset-${configfile}: .PHONY build_kern
 	kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
 	kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
 	kern_tgz=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets/kern-${configfile}.tgz; \
-	pax_cmd="GZIP=${GZIP_FLAGS:Q} ${TOOL_PAX} --use-compress-program ${TOOL_GZIP:Q} -O -w -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \
+	pax_cmd="GZIP=${GZIP_FLAGS:Q} ${TOOL_PAX} ${PAX_TIMESTAMP} --use-compress-program ${TOOL_GZIP:Q} -O -w -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \
 	cd $${kerndir} && { \
 		kernels=; newest=; \
 		for kernel in $${kernlist}; do \



CVS commit: src/sys/fs/puffs

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 20 01:34:00 UTC 2015

Modified Files:
src/sys/fs/puffs: puffs_vfsops.c

Log Message:
PR/50573: Andreas Gustafsson: puffs can crash kernel for lack of argument
checking


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/fs/puffs/puffs_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/fs/puffs/puffs_vfsops.c
diff -u src/sys/fs/puffs/puffs_vfsops.c:1.117 src/sys/fs/puffs/puffs_vfsops.c:1.118
--- src/sys/fs/puffs/puffs_vfsops.c:1.117	Mon Feb 16 05:49:39 2015
+++ src/sys/fs/puffs/puffs_vfsops.c	Sat Dec 19 20:34:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vfsops.c,v 1.117 2015/02/16 10:49:39 martin Exp $	*/
+/*	$NetBSD: puffs_vfsops.c,v 1.118 2015/12/20 01:34:00 christos Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.117 2015/02/16 10:49:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.118 2015/12/20 01:34:00 christos Exp $");
 
 #include 
 #include 
@@ -269,8 +269,22 @@ puffs_vfsop_mount(struct mount *mp, cons
 
 	/* XXX: check parameters */
 	pmp->pmp_root_cookie = args->pa_root_cookie;
+	switch (args->pa_root_vtype) {
+	case VNON: case VREG: case VDIR: case VBLK:
+	case VCHR: case VLNK: case VSOCK: case VFIFO:
+		break;
+	default:
+		error = EINVAL;
+		goto out;
+	}
 	pmp->pmp_root_vtype = args->pa_root_vtype;
+
+	if (args->pa_root_vsize < 0) {
+		error = EINVAL;
+		goto out;
+	}
 	pmp->pmp_root_vsize = args->pa_root_vsize;
+
 	pmp->pmp_root_rdev = args->pa_root_rdev;
 	pmp->pmp_docompat = args->pa_time32;
 



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

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 20 01:11:22 UTC 2015

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

Log Message:
dd intel_old man page


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/xserver/md.amd64
cvs rdiff -u -r1.105 -r1.106 src/distrib/sets/lists/xserver/md.i386

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

Modified files:

Index: src/distrib/sets/lists/xserver/md.amd64
diff -u src/distrib/sets/lists/xserver/md.amd64:1.87 src/distrib/sets/lists/xserver/md.amd64:1.88
--- src/distrib/sets/lists/xserver/md.amd64:1.87	Mon Oct 26 03:15:36 2015
+++ src/distrib/sets/lists/xserver/md.amd64	Sat Dec 19 20:11:22 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.87 2015/10/26 07:15:36 mrg Exp $
+# $NetBSD: md.amd64,v 1.88 2015/12/20 01:11:22 christos Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -628,6 +628,7 @@
 ./usr/X11R7/man/cat4/i740.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/imstt.0-unknown-	obsolete
 ./usr/X11R7/man/cat4/intel.0-unknown-	.cat,xorg
+./usr/X11R7/man/cat4/intel_old.0			-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/kbd.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/mga.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/mousedrv.0-unknown-	.cat,xorg
@@ -675,6 +676,7 @@
 ./usr/X11R7/man/html4/i740.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/imstt.html			-unknown-	obsolete
 ./usr/X11R7/man/html4/intel.html			-unknown-	html,xorg
+./usr/X11R7/man/html4/intel_old.html			-unknown-	html,xorg
 ./usr/X11R7/man/html4/kbd.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/mga.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/mousedrv.html			-unknown-	html,xorg
@@ -722,6 +724,7 @@
 ./usr/X11R7/man/man4/i740.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/imstt.4-unknown-	obsolete
 ./usr/X11R7/man/man4/intel.4-unknown-	.man,xorg
+./usr/X11R7/man/man4/intel_old.4			-unknown-	.man,xorg
 ./usr/X11R7/man/man4/kbd.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/mga.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/mousedrv.4-unknown-	.man,xorg

Index: src/distrib/sets/lists/xserver/md.i386
diff -u src/distrib/sets/lists/xserver/md.i386:1.105 src/distrib/sets/lists/xserver/md.i386:1.106
--- src/distrib/sets/lists/xserver/md.i386:1.105	Mon Oct 26 03:15:36 2015
+++ src/distrib/sets/lists/xserver/md.i386	Sat Dec 19 20:11:22 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.105 2015/10/26 07:15:36 mrg Exp $
+# $NetBSD: md.i386,v 1.106 2015/12/20 01:11:22 christos Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -669,6 +669,7 @@
 ./usr/X11R7/man/cat4/i740.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/imstt.0-unknown-	obsolete
 ./usr/X11R7/man/cat4/intel.0-unknown-	.cat,xorg
+./usr/X11R7/man/cat4/intel_old.0			-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/kbd.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/mga.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/mousedrv.0-unknown-	.cat,xorg
@@ -717,6 +718,7 @@
 ./usr/X11R7/man/html4/i740.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/imstt.html			-unknown-	obsolete
 ./usr/X11R7/man/html4/intel.html			-unknown-	html,xorg
+./usr/X11R7/man/html4/intel_old.html			-unknown-	html,xorg
 ./usr/X11R7/man/html4/kbd.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/mga.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/mousedrv.html			-unknown-	html,xorg
@@ -765,6 +767,7 @@
 ./usr/X11R7/man/man4/i740.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/imstt.4-unknown-	obsolete
 ./usr/X11R7/man/man4/intel.4-unknown-	.man,xorg
+./usr/X11R7/man/man4/intel_old.4			-unknown-	.man,xorg
 ./usr/X11R7/man/man4/kbd.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/mga.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/mousedrv.4-unknown-	.man,xorg



CVS commit: src/external/mit/xorg/server/drivers/xf86-video-intel-old

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 20 01:07:58 UTC 2015

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-intel-old: Makefile

Log Message:
name the man page intel_old, so that we don't install it over the new
one depending on the build order.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/mit/xorg/server/drivers/xf86-video-intel-old/Makefile

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

Modified files:

Index: src/external/mit/xorg/server/drivers/xf86-video-intel-old/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-intel-old/Makefile:1.1 src/external/mit/xorg/server/drivers/xf86-video-intel-old/Makefile:1.2
--- src/external/mit/xorg/server/drivers/xf86-video-intel-old/Makefile:1.1	Wed May 20 20:12:10 2015
+++ src/external/mit/xorg/server/drivers/xf86-video-intel-old/Makefile	Sat Dec 19 20:07:58 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2015/05/21 00:12:10 rjs Exp $
+#	$NetBSD: Makefile,v 1.2 2015/12/20 01:07:58 christos Exp $
 
 .include 
 
@@ -21,7 +21,8 @@ SRCS+=		i830_dri.c
 .PATH:	${X11SRCDIR.${DRIVER}}/uxa
 SRCS+=		uxa-accel.c uxa-unaccel.c uxa-glyphs.c uxa-render.c uxa.c
 
-MAN=		intel.4
+MAN=		intel_old.4
+CLEANFILES+=	intel_old.man
 
 CPPFLAGS+=  -I${DESTDIR}${X11INCDIR}/X11
 CPPFLAGS+=  -I${DESTDIR}${X11INCDIR}/X11/dri
@@ -41,3 +42,7 @@ CWARNFLAGS.clang+=	-Wno-parentheses -Wno
 			-Wno-empty-body -Wno-error
 
 .include 
+
+intel_old.man:	intel.man
+	${_MKTARGET_CREATE}
+	${TOOL_SED} -e 's/[[:<:]]intel[[:>:]]/intel_old/g' ${.ALLSRC} > ${.TARGET}



CVS commit: src/usr.bin/sortinfo

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 20 00:48:36 UTC 2015

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

Log Message:
sort properly.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/sortinfo/sortinfo.c

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

Modified files:

Index: src/usr.bin/sortinfo/sortinfo.c
diff -u src/usr.bin/sortinfo/sortinfo.c:1.3 src/usr.bin/sortinfo/sortinfo.c:1.4
--- src/usr.bin/sortinfo/sortinfo.c:1.3	Sat Dec 19 19:40:44 2015
+++ src/usr.bin/sortinfo/sortinfo.c	Sat Dec 19 19:48:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sortinfo.c,v 1.3 2015/12/20 00:40:44 christos Exp $	*/
+/*	$NetBSD: sortinfo.c,v 1.4 2015/12/20 00:48:36 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: sortinfo.c,v 1.3 2015/12/20 00:40:44 christos Exp $");
+__RCSID("$NetBSD: sortinfo.c,v 1.4 2015/12/20 00:48:36 christos Exp $");
 
 /*
  * Sort a texinfo(1) directory file.
@@ -89,6 +89,14 @@ compsection(const void *a, const void *b
 	return strcmp(sa->name, sb->name);
 }
 
+static int
+strptrcmp(const void *a, const void *b)
+{
+	const char *sa = *(const char * const *)a;
+	const char *sb = *(const char * const *)b;
+	return strcmp(sa, sb);
+}
+
 static void
 printsection(const struct section *s)
 {
@@ -138,8 +146,8 @@ main(int argc, char *argv[])
 
 	qsort(slist, nsections, sizeof(*slist), compsection);
 	for (i = 0; i < nsections; i++) {
-		qsort(s->lines, s->nlines, sizeof(*s->lines),
-		(int(*)(const void *, const void *))strcmp);
+		s = &slist[i];
+		qsort(s->lines, s->nlines, sizeof(*s->lines), strptrcmp);
 		printsection(&slist[i]);
 	}
 



CVS commit: src/usr.bin/sortinfo

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 20 00:40:44 UTC 2015

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

Log Message:
Sort the subsections too... Hi Matt, you were right.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/sortinfo/sortinfo.c

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

Modified files:

Index: src/usr.bin/sortinfo/sortinfo.c
diff -u src/usr.bin/sortinfo/sortinfo.c:1.2 src/usr.bin/sortinfo/sortinfo.c:1.3
--- src/usr.bin/sortinfo/sortinfo.c:1.2	Sat Dec 19 12:30:00 2015
+++ src/usr.bin/sortinfo/sortinfo.c	Sat Dec 19 19:40:44 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sortinfo.c,v 1.2 2015/12/19 17:30:00 joerg Exp $	*/
+/*	$NetBSD: sortinfo.c,v 1.3 2015/12/20 00:40:44 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: sortinfo.c,v 1.2 2015/12/19 17:30:00 joerg Exp $");
+__RCSID("$NetBSD: sortinfo.c,v 1.3 2015/12/20 00:40:44 christos Exp $");
 
 /*
  * Sort a texinfo(1) directory file.
@@ -47,14 +47,11 @@ __RCSID("$NetBSD: sortinfo.c,v 1.2 2015/
 #include 
 #include 
 
-struct line {
-	char *data;
-	struct line *next;
-};
-
 struct section {
 	const char *name;
-	struct line *line;
+	char **lines;
+	size_t nlines;
+	size_t maxlines;
 };
 
 static struct section *slist;
@@ -68,22 +65,21 @@ addsection(const char *line)
 		slist = erealloc(slist, maxsections * sizeof(*slist));
 	}
 	slist[nsections].name = estrdup(line);
-	slist[nsections].line = NULL;
+	slist[nsections].nlines = 0;
+	slist[nsections].maxlines = 20;
+	slist[nsections].lines = ecalloc(slist[nsections].maxlines,
+	sizeof(*slist[nsections].lines));
 	return &slist[nsections++];
 }
 
-static struct line *
-addline(struct section *s, struct line *l, const char *line)
+static void
+addline(struct section *s, const char *line)
 {
-	if (l == NULL)
-		s->line = l = emalloc(sizeof(*l));
-	else {
-		l->next = emalloc(sizeof(*l));
-		l = l->next;
+	if (s->nlines == s->maxlines) {
+		s->maxlines += 20;
+		s->lines = erealloc(s->lines, s->maxlines * sizeof(*s->lines));
 	}
-	l->next = NULL;
-	l->data = estrdup(line);
-	return l;
+	s->lines[s->nlines++] = estrdup(line);
 }
 
 static int
@@ -96,11 +92,12 @@ compsection(const void *a, const void *b
 static void
 printsection(const struct section *s)
 {
-	struct line *l;
+	size_t i;
+
 	fputc('\n', stdout);
 	printf("%s", s->name);
-	for (l = s->line; l; l = l->next)
-		printf("%s", l->data);
+	for (i = 0; i < s->nlines; i++)
+		printf("%s", s->lines[i]);
 }
 	
 int
@@ -110,7 +107,6 @@ main(int argc, char *argv[])
 	char *line;
 	int needsection;
 	struct section *s = NULL;
-	struct line *l = NULL;
 
 	while ((line = fgetln(stdin, &i)) != NULL) {
 		fputs(line, stdout);
@@ -130,20 +126,22 @@ main(int argc, char *argv[])
 		case '*':
 			if (s == NULL)
 errx(EXIT_FAILURE, "No current section");
-			l = addline(s, l, line);
+			addline(s, line);
 			continue;
 		default:
 			if (needsection == 0)
 errx(EXIT_FAILURE, "Already in section");
 			s = addsection(line);
-			l = NULL;
 			needsection = 0;
 			continue;
 		}
 
 	qsort(slist, nsections, sizeof(*slist), compsection);
-	for (i = 0; i < nsections; i++)
+	for (i = 0; i < nsections; i++) {
+		qsort(s->lines, s->nlines, sizeof(*s->lines),
+		(int(*)(const void *, const void *))strcmp);
 		printsection(&slist[i]);
+	}
 
 	return EXIT_SUCCESS;
 }



CVS commit: src/etc

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 19 23:37:43 UTC 2015

Modified Files:
src/etc: Makefile

Log Message:
Freeze the BUILDER and the BUILD_DATE for repeatable builds


To generate a diff of this commit:
cvs rdiff -u -r1.424 -r1.425 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.424 src/etc/Makefile:1.425
--- src/etc/Makefile:1.424	Mon Aug 31 02:08:07 2015
+++ src/etc/Makefile	Sat Dec 19 18:37:43 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.424 2015/08/31 06:08:07 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.425 2015/12/19 23:37:43 christos Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -185,6 +185,17 @@ MAKEDEV: ${.CURDIR}/MAKEDEV.awk ${.CURDI
 	> ${.TARGET}
 
 .include "${NETBSDSRCDIR}/etc/Makefile.params"
+.if ${MKREPRO:Uno} == "no"
+BUILDER!=	echo $${USER-root}@$$(hostname)
+.else
+BUILDER=	buil...@localhost.netbsd.org
+.endif
+.if ${MKREPRO_TIMESTAMP:Uno} == "no"
+BUILD_DATE!=	date -u
+.else
+BUILD_DATE!=	date -u -r "${MKREPRO_TIMESTAMP}"
+.endif
+
 CLEANFILES+=	etc-release
 etc-release: .EXEC .MAKE
 	${_MKTARGET_CREATE}
@@ -193,8 +204,8 @@ etc-release: .EXEC .MAKE
 		cat ${NETBSDSRCDIR}/sys/conf/copyright; \
 		echo ; \
 		echo "Build information:"; \
-		printf "%20s   %s\n" "Build date" "$$(date -u)"; \
-		printf "%20s   %s\n"  "Built by" "$${USER-root}@$$(hostname)"; \
+		printf "%20s   %s\n" "Build date" "${BUILD_DATE}"; \
+		printf "%20s   %s\n"  "Built by" "${BUILDER}"; \
 		if [ -n "${BUILDID}" ]; then \
 		printf "%20s   %s\n"  "Build ID" "${BUILDID}" ; \
 		fi ; \



CVS commit: src/distrib/sets

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 19 22:29:24 UTC 2015

Modified Files:
src/distrib/sets: Makefile maketars

Log Message:
Obey MKREPRO_TIMESTAMP when creating sets (create all the files in the
sets with that date).


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/distrib/sets/Makefile
cvs rdiff -u -r1.84 -r1.85 src/distrib/sets/maketars

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/Makefile
diff -u src/distrib/sets/Makefile:1.99 src/distrib/sets/Makefile:1.100
--- src/distrib/sets/Makefile:1.99	Thu Nov 26 10:41:58 2015
+++ src/distrib/sets/Makefile	Sat Dec 19 17:29:23 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.99 2015/11/26 15:41:58 joerg Exp $
+#	$NetBSD: Makefile,v 1.100 2015/12/19 22:29:23 christos Exp $
 
 # Experimental RCS METALOG versioning
 # (Needs host's rcs(1) commands)
@@ -40,6 +40,9 @@ SETSCMD=	cd ${.CURDIR} && \
 		${HOST_SH}
 
 MAKETARS_FLAGS=
+.if ${MKREPRO_TIMESTAMP:Uno} != "no"
+MAKETARS_FLAGS+= -T "${MKREPRO_TIMESTAMP}"
+.endif
 .if ${MKX11} != "no"
 MAKESRCTARS_X11_FLAGS=	-x ${X11SRCDIR}
 .endif

Index: src/distrib/sets/maketars
diff -u src/distrib/sets/maketars:1.84 src/distrib/sets/maketars:1.85
--- src/distrib/sets/maketars:1.84	Wed May 27 11:18:29 2015
+++ src/distrib/sets/maketars	Sat Dec 19 17:29:23 2015
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: maketars,v 1.84 2015/05/27 15:18:29 martin Exp $
+# $NetBSD: maketars,v 1.85 2015/12/19 22:29:23 christos Exp $
 #
 # Make release tar files for some or all lists.  Usage:
 # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir]
@@ -28,6 +28,7 @@ metalog=
 installdir=
 etcdir=
 setlistdir=
+timestamp=
 setfilesonly=false
 quiet=false
 skipkeys=time,md5,sha1,sha384,sha512,rmd160,cksum
@@ -57,6 +58,7 @@ Usage: ${prog} [-L base,x,ext] [-b] [-x]
 	-U		do not preserve file permissions (with -i ..)
 	-d dest		\${DESTDIR}	[${dest}]
 	-t targetdir	\${RELEASEDIR}	[${tars}]
+	-T timestamp	Timestamp to set for all the files in the tar.
 	[setname ...]	Sets to build 	[${lists}]
 USAGE
 	exit 1
@@ -68,7 +70,7 @@ msg()
 }
 
 # handle args
-while getopts L:bxyi:a:m:qs:F:SM:N:Ud:t: ch; do
+while getopts L:bxyi:a:m:qs:F:SM:N:Ud:t:T: ch; do
 	case ${ch} in
 	L)
 		save_IFS="${IFS}"
@@ -129,6 +131,9 @@ while getopts L:bxyi:a:m:qs:F:SM:N:Ud:t:
 	t)
 		tars="${OPTARG}"
 		;;
+	T)
+		timestamp="--timestamp $OPTARG"
+		;;
 	*)
 		usage
 		;;
@@ -208,7 +213,7 @@ runpax() {
 	local s="$1"
 	shift
 	(cd "${dest}" && 
-	${PAX} -dOw -N"${etcdir}" -M "$@" < "${setlistdir}/set.${s}")
+	${PAX} -dOw ${timestamp} -N"${etcdir}" -M "$@" < "${setlistdir}/set.${s}")
 }
 
 #



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

2015-12-19 Thread Marty Fouts
Module Name:src
Committed By:   marty
Date:   Sat Dec 19 21:43:36 UTC 2015

Added Files:
src/sys/arch/arm/samsung: exynos_pinctrl.h

Log Message:
XU4 GPIO FDT  missing file.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/samsung/exynos_pinctrl.h

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

Added files:

Index: src/sys/arch/arm/samsung/exynos_pinctrl.h
diff -u /dev/null src/sys/arch/arm/samsung/exynos_pinctrl.h:1.1
--- /dev/null	Sat Dec 19 21:43:36 2015
+++ src/sys/arch/arm/samsung/exynos_pinctrl.h	Sat Dec 19 21:43:36 2015
@@ -0,0 +1,6 @@
+struct exynos_pinctrl_softc {
+	device_t		sc_dev;
+	bus_space_tag_t		sc_bst;
+	bus_space_handle_t	sc_bsh;
+
+};



CVS commit: src/sys/arch

2015-12-19 Thread Marty Fouts
Module Name:src
Committed By:   marty
Date:   Sat Dec 19 21:42:31 UTC 2015

Modified Files:
src/sys/arch/arm/samsung: exynos_gpio.c exynos_var.h files.exynos
src/sys/arch/evbarm/conf: EXYNOS
Added Files:
src/sys/arch/arm/samsung: exynos_pinctrl.c

Log Message:
XU4 GPIO FDT broken snapshot

This is broken. exynos_gpio_bank_config and the call to it are wrong, and
the acquire function doesn't work.

But I'm in over my head and I need to discuss this:

There is a problem with the dtd: it doesn't have addresses for the individual
gpios.  Do I add the addresses to it, or go back to the old version where I
have them hard coded in the driver.

There is a problem with creating the gpio device entries:  I suspect I really
need to treat the pinctrl devices as busses and create the gpios as attached
to those busses, but I'm not familiar with how to do that in NetBSD. At the
minimum, a pointer to a similar situation would give me code to follow.
This is different than the usual bus attachment in that the gpios aren't
devices in the dtd (they don't have "compatible" properties) so they don't
get an attach routine called.  An alternative to generating the bus
attachments might be to add "compatible" properties to the GPIO entries
in the dtd. so that they do get attached in the normal way.

If I'm going to modify the DTD, then it should be checked in, so a decision
on where to check them in would be nice, even if it does mean spreading them
all over because of license issues.  (This DTD is GPL v2)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/samsung/exynos_gpio.c \
src/sys/arch/arm/samsung/files.exynos
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/samsung/exynos_pinctrl.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/samsung/exynos_var.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/EXYNOS

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/samsung/exynos_gpio.c
diff -u src/sys/arch/arm/samsung/exynos_gpio.c:1.13 src/sys/arch/arm/samsung/exynos_gpio.c:1.14
--- src/sys/arch/arm/samsung/exynos_gpio.c:1.13	Fri Dec 11 04:03:44 2015
+++ src/sys/arch/arm/samsung/exynos_gpio.c	Sat Dec 19 21:42:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_gpio.c,v 1.13 2015/12/11 04:03:44 marty Exp $ */
+/*	$NetBSD: exynos_gpio.c,v 1.14 2015/12/19 21:42:31 marty Exp $ */
 
 /*-
 * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "gpio.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.13 2015/12/11 04:03:44 marty Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.14 2015/12/19 21:42:31 marty Exp $");
 
 #include 
 #include 
@@ -49,6 +49,9 @@ __KERNEL_RCSID(1, "$NetBSD: exynos_gpio.
 #include 
 #include 
 #include 
+#include 
+
+#include 
 
 struct exynos_gpio_pin_cfg {
 	uint32_t cfg;
@@ -62,9 +65,9 @@ struct exynos_gpio_softc;
 
 struct exynos_gpio_bank {
 	const char		bank_name[6];
-	struct exynos_gpio_softc *bank_sc;
 	device_t		bank_dev;
 	struct gpio_chipset_tag	bank_gc;
+	struct exynos_gpio_softc *bank_softc;
 	gpio_pin_t		bank_pins[8];
 
 	const bus_addr_t	bank_core_offset;
@@ -74,172 +77,42 @@ struct exynos_gpio_bank {
 	uint8_t			bank_pin_inuse_mask;
 	bus_space_handle_t	bank_bsh;
 	struct exynos_gpio_pin_cfg bank_cfg;
+	struct exynos_gpio_bank * bank_next;
 };
 
 struct exynos_gpio_softc {
 	device_t		sc_dev;
 	bus_space_tag_t		sc_bst;
 	bus_space_handle_t	sc_bsh;
-
-	struct exynos_gpio_bank *sc_banks;
 };
 
 struct exynos_gpio_pin {
 	struct exynos_gpio_softc *pin_sc;
-	const struct exynos_gpio_bank  *pin_bank;
 	int			  pin_no;
 	u_int			  pin_flags;
+	int			  pin_actlo;
+	const struct exynos_gpio_bank   *pin_bank;
 };
 
-#define GPIO_REG(v,s,o) (EXYNOS##v##_GPIO_##s##_OFFSET + (o))
-#define GPIO_GRP(v, s, o, n, b)	\
-	{ \
-		.bank_name = #n, \
-		.bank_core_offset = GPIO_REG(v,s,o), \
-		.bank_bits = b, \
-	}
-
-static struct exynos_gpio_bank exynos5_banks[] = {
-	GPIO_GRP(5, MUXA, 0x, gpy7, 8),
-	GPIO_GRP(5, MUXA, 0x0C00, gpx0, 8),
-	GPIO_GRP(5, MUXA, 0x0C20, gpx1, 8),
-	GPIO_GRP(5, MUXA, 0x0C40, gpx2, 8),
-	GPIO_GRP(5, MUXA, 0x0C60, gpx3, 8),
-
-	GPIO_GRP(5, MUXB, 0x, gpc0, 8),
-	GPIO_GRP(5, MUXB, 0x0020, gpc1, 8),
-	GPIO_GRP(5, MUXB, 0x0040, gpc2, 7),
-	GPIO_GRP(5, MUXB, 0x0060, gpc3, 4),
-	GPIO_GRP(5, MUXB, 0x0080, gpc4, 2),
-	GPIO_GRP(5, MUXB, 0x00A0, gpd1, 8),
-	GPIO_GRP(5, MUXB, 0x00C0, gpy0, 6),
-	GPIO_GRP(5, MUXB, 0x00E0, gpy1, 4),
-	GPIO_GRP(5, MUXB, 0x0100, gpy2, 6),
-	GPIO_GRP(5, MUXB, 0x0120, gpy3, 8),
-	GPIO_GRP(5, MUXB, 0x0140, gpy4, 8),
-	GPIO_GRP(5, MUXB, 0x0160, gpy5, 8),
-	GPIO_GRP(5, MUXB, 0x0180, gpy6, 8),
-
-	GPIO_GRP(5, MUXC, 0x, gpe0, 8),
-	GPIO_GRP(5, MUXC, 0x0020, gpe1, 2),
-	GPIO_GRP(5, MUXC, 0x0040, gpf0, 6),
-	GPIO_GRP(5, MUXC, 0x0060, gpf1, 8),
-	GPIO_GRP(5, MUXC, 0x0080, gpg0, 8),
-	GPIO_GRP(5, MUXC, 0x00A0, gpg1, 8),
-	GPIO_GRP(5, MUXC, 0x00C0, gpg2, 2),
-	GPIO_GRP(5, MUXC, 0x0

CVS commit: src/sys/dev

2015-12-19 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Dec 19 20:01:35 UTC 2015

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
Add adm1026hm (MI).


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/sys/dev/DEVNAMES

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/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.295 src/sys/dev/DEVNAMES:1.296
--- src/sys/dev/DEVNAMES:1.295	Sat Dec 19 19:59:52 2015
+++ src/sys/dev/DEVNAMES	Sat Dec 19 20:01:35 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.295 2015/12/19 19:59:52 jdc Exp $
+#	$NetBSD: DEVNAMES,v 1.296 2015/12/19 20:01:35 jdc Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -39,6 +39,7 @@ adb			mac68k
 adb			macppc
 adc			hpcsh
 ade			alpha
+adm1026hm		MI
 adv			MI
 adw			MI
 ae			evbmips



CVS commit: src/sys/dev

2015-12-19 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Dec 19 19:59:53 UTC 2015

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
Remove references to drivers (adt7463c, adt7467c, adm1030c) that were
superceded by dbcool.


To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 src/sys/dev/DEVNAMES

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/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.294 src/sys/dev/DEVNAMES:1.295
--- src/sys/dev/DEVNAMES:1.294	Thu Aug 27 14:04:07 2015
+++ src/sys/dev/DEVNAMES	Sat Dec 19 19:59:52 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.294 2015/08/27 14:04:07 nonaka Exp $
+#	$NetBSD: DEVNAMES,v 1.295 2015/12/19 19:59:52 jdc Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -39,9 +39,6 @@ adb			mac68k
 adb			macppc
 adc			hpcsh
 ade			alpha
-adt7463c		MI
-adt7467c		MI
-adm1030c		MI
 adv			MI
 adw			MI
 ae			evbmips



CVS commit: src/external/bsd/mdocml/dist

2015-12-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Dec 19 19:28:06 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
strsep must be undefined first, certain glibc magic breaks a prototype
otherwise.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/mdocml/dist/configure

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/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.2 src/external/bsd/mdocml/dist/configure:1.3
--- src/external/bsd/mdocml/dist/configure:1.2	Thu Dec 17 22:31:12 2015
+++ src/external/bsd/mdocml/dist/configure	Sat Dec 19 19:28:06 2015
@@ -343,6 +343,7 @@ __HEREDOC__
 	echo "extern	size_t	  strlcpy(char *, const char *, size_t);"
 
 [ ${HAVE_STRSEP} -eq 0 ] && \
+	echo "#undef strsep"
 	echo "extern	char	 *strsep(char **, const char *);"
 
 [ ${HAVE_STRTONUM} -eq 0 ] && \



CVS commit: src/bin/pax

2015-12-19 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Dec 19 18:48:41 UTC 2015

Modified Files:
src/bin/pax: pax.1

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/bin/pax/pax.1

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

Modified files:

Index: src/bin/pax/pax.1
diff -u src/bin/pax/pax.1:1.66 src/bin/pax/pax.1:1.67
--- src/bin/pax/pax.1:1.66	Sat Dec 19 18:45:52 2015
+++ src/bin/pax/pax.1	Sat Dec 19 18:48:41 2015
@@ -1,4 +1,4 @@
-.\"$NetBSD: pax.1,v 1.66 2015/12/19 18:45:52 christos Exp $
+.\"$NetBSD: pax.1,v 1.67 2015/12/19 18:48:41 wiz Exp $
 .\"
 .\" Copyright (c) 1992 Keith Muller.
 .\" Copyright (c) 1992, 1993
@@ -747,7 +747,7 @@ Store all modification times in the arch
 .Ar timestamp
 given instead of the actual modification time of the individual archive member
 so that repeatable builds are possible.
-The 
+The
 .Ar timestamp
 can be a
 .Pa pathname ,



CVS commit: src/bin/pax

2015-12-19 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Dec 19 18:48:33 UTC 2015

Modified Files:
src/bin/pax: cpio.1

Log Message:
Use An in AUTHORS section.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/bin/pax/cpio.1

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

Modified files:

Index: src/bin/pax/cpio.1
diff -u src/bin/pax/cpio.1:1.13 src/bin/pax/cpio.1:1.14
--- src/bin/pax/cpio.1:1.13	Sun Jun 19 07:34:24 2011
+++ src/bin/pax/cpio.1	Sat Dec 19 18:48:33 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: cpio.1,v 1.13 2011/06/19 07:34:24 wiz Exp $
+.\" $NetBSD: cpio.1,v 1.14 2015/12/19 18:48:33 wiz Exp $
 .\"
 .\" Copyright (c) 1997 SigmaSoft, Th. Lockert
 .\" All rights reserved.
@@ -297,7 +297,8 @@ specific archive format specification.
 .Xr pax 1 ,
 .Xr tar 1
 .Sh AUTHORS
-Keith Muller at the University of California, San Diego.
+.An Keith Muller
+at the University of California, San Diego.
 .Sh BUGS
 The
 .Fl s



CVS commit: src/bin/pax

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 19 18:45:53 UTC 2015

Modified Files:
src/bin/pax: options.c pax.1

Log Message:
Add the timestamp option to the pax front end.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/bin/pax/options.c
cvs rdiff -u -r1.65 -r1.66 src/bin/pax/pax.1

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

Modified files:

Index: src/bin/pax/options.c
diff -u src/bin/pax/options.c:1.117 src/bin/pax/options.c:1.118
--- src/bin/pax/options.c:1.117	Sat Dec 19 13:28:54 2015
+++ src/bin/pax/options.c	Sat Dec 19 13:45:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: options.c,v 1.117 2015/12/19 18:28:54 christos Exp $	*/
+/*	$NetBSD: options.c,v 1.118 2015/12/19 18:45:52 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)options.c	8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: options.c,v 1.117 2015/12/19 18:28:54 christos Exp $");
+__RCSID("$NetBSD: options.c,v 1.118 2015/12/19 18:45:52 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -257,6 +257,8 @@ struct option pax_longopts[] = {
 		OPT_XZ },
 	{ "gnu",		no_argument,		0,
 		OPT_GNU },
+	{ "timestamp",		required_argument,	0,
+		OPT_TIMESTAMP },
 	{ 0,			0,			0,
 		0 },
 };
@@ -667,6 +669,14 @@ pax_options(int argc, char **argv)
 		case OPT_GNU:
 			is_gnutar = 1;
 			break;
+#ifndef SMALL
+		case OPT_TIMESTAMP:
+			if (set_tstamp(optarg, &tst) == -1) {
+tty_warn(1, "Invalid timestamp `%s'", optarg);
+tar_usage();
+			}
+			break;
+#endif
 		case '?':
 		default:
 			pax_usage();

Index: src/bin/pax/pax.1
diff -u src/bin/pax/pax.1:1.65 src/bin/pax/pax.1:1.66
--- src/bin/pax/pax.1:1.65	Wed Nov  4 04:24:14 2015
+++ src/bin/pax/pax.1	Sat Dec 19 13:45:52 2015
@@ -1,4 +1,4 @@
-.\"$NetBSD: pax.1,v 1.65 2015/11/04 09:24:14 wiz Exp $
+.\"$NetBSD: pax.1,v 1.66 2015/12/19 18:45:52 christos Exp $
 .\"
 .\" Copyright (c) 1992 Keith Muller.
 .\" Copyright (c) 1992, 1993
@@ -33,7 +33,7 @@
 .\"
 .\"	@(#)pax.1	8.4 (Berkeley) 4/18/94
 .\"
-.Dd November 3, 2015
+.Dd December 19, 2015
 .Dt PAX 1
 .Os
 .Sh NAME
@@ -742,6 +742,19 @@ Typical archive format restrictions incl
 file pathname length, file size, link pathname length and the type of the file.
 .It Fl Fl gnu
 Recognize GNU tar extensions.
+.It Fl Fl timestamp Ar timestamp
+Store all modification times in the archive with the
+.Ar timestamp
+given instead of the actual modification time of the individual archive member
+so that repeatable builds are possible.
+The 
+.Ar timestamp
+can be a
+.Pa pathname ,
+where the timestamps are derived from that file, a parseable date for
+.Xr parsedate 3
+(this option is not yet available in the tools build), or an integer value
+interpreted as the number of seconds from the Epoch.
 .It Fl Fl xz
 Use
 .Xr xz 1



CVS commit: src/bin/pax

2015-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 19 18:28:54 UTC 2015

Modified Files:
src/bin/pax: options.c tar.1 tar.c

Log Message:
PR/50119: Thomas Klausner: Add --timestamp option to tar.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/bin/pax/options.c
cvs rdiff -u -r1.35 -r1.36 src/bin/pax/tar.1
cvs rdiff -u -r1.72 -r1.73 src/bin/pax/tar.c

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

Modified files:

Index: src/bin/pax/options.c
diff -u src/bin/pax/options.c:1.116 src/bin/pax/options.c:1.117
--- src/bin/pax/options.c:1.116	Sat Apr 11 11:41:33 2015
+++ src/bin/pax/options.c	Sat Dec 19 13:28:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: options.c,v 1.116 2015/04/11 15:41:33 christos Exp $	*/
+/*	$NetBSD: options.c,v 1.117 2015/12/19 18:28:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)options.c	8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: options.c,v 1.116 2015/04/11 15:41:33 christos Exp $");
+__RCSID("$NetBSD: options.c,v 1.117 2015/12/19 18:28:54 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -64,6 +64,7 @@ __RCSID("$NetBSD: options.c,v 1.116 2015
 #include 
 #include 
 #include 
+#include 
 #include "pax.h"
 #include "options.h"
 #include "cpio.h"
@@ -76,6 +77,7 @@ __RCSID("$NetBSD: options.c,v 1.116 2015
 /*
  * Routines which handle command line options
  */
+struct stat tst;		/* Timestamp to set if non-0 */
 
 static int nopids;		/* tar mode: suppress "pids" for -p option */
 static char flgch[] = FLGCH;	/* list of all possible flags (pax) */
@@ -88,6 +90,9 @@ static void printflg(unsigned int);
 static int c_frmt(const void *, const void *);
 static off_t str_offt(char *);
 static char *get_line(FILE *fp);
+#ifndef SMALL
+static int set_tstamp(const char *, struct stat *);
+#endif
 static void pax_options(int, char **);
 __dead static void pax_usage(void);
 static void tar_options(int, char **);
@@ -129,8 +134,9 @@ static int get_line_error;
 #define	OPT_SPARSE			16
 #define OPT_XZ17
 #define OPT_GNU18
+#define	OPT_TIMESTAMP			19
 #if !HAVE_NBTOOL_CONFIG_H
-#define	OPT_CHROOT			19
+#define	OPT_CHROOT			20
 #endif
 
 /*
@@ -803,6 +809,8 @@ struct option tar_longopts[] = {
 	{ "chroot",		no_argument,		0,
 		OPT_CHROOT },
 #endif
+	{ "timestamp",		required_argument,	0,
+		OPT_TIMESTAMP },
 #if 0 /* Not implemented */
 	{ "catenate",		no_argument,		0,	'A' },	/* F */
 	{ "concatenate",	no_argument,		0,	'A' },	/* F */
@@ -1144,6 +1152,14 @@ tar_options(int argc, char **argv)
 			do_chroot = 1;
 			break;
 #endif
+#ifndef SMALL
+		case OPT_TIMESTAMP:
+			if (set_tstamp(optarg, &tst) == -1) {
+tty_warn(1, "Invalid timestamp `%s'", optarg);
+tar_usage();
+			}
+			break;
+#endif
 		default:
 			tar_usage();
 			break;
@@ -2083,6 +2099,43 @@ get_line(FILE *f)
 	return temp;
 }
 
+#ifndef SMALL
+/*
+ * set_tstamp()
+ *	Use a specific timestamp for all individual files created in the
+ *	archive
+ */
+static int
+set_tstamp(const char *b, struct stat *st)
+{
+	time_t when;
+	char *eb;
+	long long l;
+
+	if (stat(b, st) != -1)
+		return 0;
+
+#ifndef HAVE_NBTOOL_CONFIG_H
+	errno = 0;
+	if ((when = parsedate(b, NULL, NULL)) == -1 && errno != 0)
+#endif
+	{
+		errno = 0;
+		l = strtoll(b, &eb, 0);
+		if (b == eb || *eb || errno)
+			return -1;
+		when = (time_t)l;
+	}
+
+	st->st_ino = 1;
+#if HAVE_STRUCT_STAT_BIRTHTIME 
+	st->st_birthtime =
+#endif
+	st->st_mtime = st->st_ctime = st->st_atime = when;
+	return 0;
+}
+#endif
+
 /*
  * no_op()
  *	for those option functions where the archive format has nothing to do.

Index: src/bin/pax/tar.1
diff -u src/bin/pax/tar.1:1.35 src/bin/pax/tar.1:1.36
--- src/bin/pax/tar.1:1.35	Sat Apr 11 12:22:07 2015
+++ src/bin/pax/tar.1	Sat Dec 19 13:28:54 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: tar.1,v 1.35 2015/04/11 16:22:07 wiz Exp $
+.\" $NetBSD: tar.1,v 1.36 2015/12/19 18:28:54 christos Exp $
 .\"
 .\" Copyright (c) 1996 SigmaSoft, Th. Lockert
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\"
 .\"	OpenBSD: tar.1,v 1.28 2000/11/09 23:58:56 aaron Exp
 .\"
-.Dd April 11, 2015
+.Dd December 19, 2015
 .Dt TAR 1
 .Os
 .Sh NAME
@@ -297,6 +297,19 @@ can be processed.
 Cause files of type directory being copied or archived, or archive members of
 type directory being extracted, to match only the directory file or archive
 member and not the file hierarchy rooted at the directory.
+.It Fl Fl timestamp Ar timestamp
+Store all modification times in the archive with the
+.Ar timestamp
+given instead of the actual modification time of the individual archive member
+so that repeatable builds are possible.
+The
+.Ar timestamp
+can be a
+.Pa pathname ,
+where the timestamps are derived from that file, a parseable date for
+.Xr parsedate 3
+(this option is not yet available in the tools build), or an integer value
+interpreted as the number of seconds from the Epoch.
 .El
 .Pp
 The 

CVS commit: src/usr.bin/sortinfo

2015-12-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Dec 19 17:30:00 UTC 2015

Modified Files:
src/usr.bin/sortinfo: Makefile sortinfo.c

Log Message:
Fix tools build.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/sortinfo/Makefile \
src/usr.bin/sortinfo/sortinfo.c

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

Modified files:

Index: src/usr.bin/sortinfo/Makefile
diff -u src/usr.bin/sortinfo/Makefile:1.1 src/usr.bin/sortinfo/Makefile:1.2
--- src/usr.bin/sortinfo/Makefile:1.1	Fri Dec 18 18:56:47 2015
+++ src/usr.bin/sortinfo/Makefile	Sat Dec 19 17:30:00 2015
@@ -1,9 +1,11 @@
-#	$NetBSD: Makefile,v 1.1 2015/12/18 18:56:47 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2015/12/19 17:30:00 joerg Exp $
 
 WARNS=6
 PROG=sortinfo
 
+.ifndef HOSTPROG
 LDADD+=-lutil
 DPADD+=${LIBUTIL}
+.endif
 
 .include 
Index: src/usr.bin/sortinfo/sortinfo.c
diff -u src/usr.bin/sortinfo/sortinfo.c:1.1 src/usr.bin/sortinfo/sortinfo.c:1.2
--- src/usr.bin/sortinfo/sortinfo.c:1.1	Fri Dec 18 18:56:47 2015
+++ src/usr.bin/sortinfo/sortinfo.c	Sat Dec 19 17:30:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sortinfo.c,v 1.1 2015/12/18 18:56:47 christos Exp $	*/
+/*	$NetBSD: sortinfo.c,v 1.2 2015/12/19 17:30:00 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -29,8 +29,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include 
-__RCSID("$NetBSD: sortinfo.c,v 1.1 2015/12/18 18:56:47 christos Exp $");
+__RCSID("$NetBSD: sortinfo.c,v 1.2 2015/12/19 17:30:00 joerg Exp $");
 
 /*
  * Sort a texinfo(1) directory file.



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 14:57:49 UTC 2015

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

Log Message:
C&P of change in rpi.conf (maybe factor out)

By default, RPI firmware sets the max CPU frequency to 600MHz. This can be
overridden by setting arm_freq in config.txt, but the default freq at boot
is still 600MHz.

Add logic to rc.local to compare the current vs. max CPU frequency; if they
differ, set the target frequency to the maximum.


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

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

Modified files:

Index: src/distrib/utils/embedded/conf/armv7.conf
diff -u src/distrib/utils/embedded/conf/armv7.conf:1.9 src/distrib/utils/embedded/conf/armv7.conf:1.10
--- src/distrib/utils/embedded/conf/armv7.conf:1.9	Sun Dec 13 23:02:56 2015
+++ src/distrib/utils/embedded/conf/armv7.conf	Sat Dec 19 14:57:49 2015
@@ -1,4 +1,4 @@
-# $NetBSD: armv7.conf,v 1.9 2015/12/13 23:02:56 jmcneill Exp $
+# $NetBSD: armv7.conf,v 1.10 2015/12/19 14:57:49 skrll Exp $
 # ARMv7 customization script used by mkimage
 #
 board=armv7
@@ -73,6 +73,23 @@ EOF
 	)
 
 	fi
+
+	#
+	# If arm_freq is specified in config.txt, set CPU frequency
+	# to match at boot time.
+	#
+	cp ${release}/etc/rc.local ${mnt}/etc/rc.local
+	cat >> ${mnt}/etc/rc.local << EOF
+if /sbin/sysctl -q machdep.cpu.frequency.max; then
+	cpufreq_max=\$(/sbin/sysctl -n machdep.cpu.frequency.max)
+	cpufreq_cur=\$(/sbin/sysctl -n machdep.cpu.frequency.current)
+	if [ ! "\$cpufreq_max" = "\$cpufreq_cur" ]; then
+		/sbin/sysctl -w machdep.cpu.frequency.target=\$cpufreq_max
+	fi
+fi
+EOF
+	echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" \
+	>> "$tmp/selected_sets"
 }
 
 populate_amlogic() {



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 13:28:22 UTC 2015

Modified Files:
src/sys/arch/evbarm/conf: CUBIEBOARD std.awin

Log Message:
Tweak CPUFLAGS to cover all CPUs


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbarm/conf/CUBIEBOARD
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/std.awin

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

Modified files:

Index: src/sys/arch/evbarm/conf/CUBIEBOARD
diff -u src/sys/arch/evbarm/conf/CUBIEBOARD:1.44 src/sys/arch/evbarm/conf/CUBIEBOARD:1.45
--- src/sys/arch/evbarm/conf/CUBIEBOARD:1.44	Mon Nov 16 12:35:54 2015
+++ src/sys/arch/evbarm/conf/CUBIEBOARD	Sat Dec 19 13:28:22 2015
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: CUBIEBOARD,v 1.44 2015/11/16 12:35:54 bouyer Exp $
+#	$NetBSD: CUBIEBOARD,v 1.45 2015/12/19 13:28:22 skrll Exp $
 #
 #	CUBIEBOARD -- Allwinner A10/A20 Eval Board Kernel
 #
@@ -10,6 +10,8 @@ include	"arch/evbarm/conf/std.awin"
 
 no makeoptions	BOARDTYPE
 makeoptions	BOARDTYPE="cubieboard"
+no makeoptions	CPUFLAGS
+makeoptions	CPUFLAGS="-mcpu=cortex-a7 -mfpu=neon"
 #options 	UVMHIST,UVMHIST_PRINT
 options 	ALLWINNER_A10
 options 	ALLWINNER_A20

Index: src/sys/arch/evbarm/conf/std.awin
diff -u src/sys/arch/evbarm/conf/std.awin:1.8 src/sys/arch/evbarm/conf/std.awin:1.9
--- src/sys/arch/evbarm/conf/std.awin:1.8	Sun Nov 29 19:52:03 2015
+++ src/sys/arch/evbarm/conf/std.awin	Sat Dec 19 13:28:22 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: std.awin,v 1.8 2015/11/29 19:52:03 skrll Exp $
+#	$NetBSD: std.awin,v 1.9 2015/12/19 13:28:22 skrll Exp $
 #
 # standard NetBSD/evbarm for Allwinner based options
 
@@ -27,7 +27,7 @@ makeoptions	KERNEL_BASE_PHYS="0x40008000
 makeoptions	KERNEL_BASE_VIRT="0x80008000"
 makeoptions	BOARDTYPE="awin"
 makeoptions	BOARDMKFRAG="${THISARM}/conf/mk.awin"
-makeoptions	CPUFLAGS="-mcpu=cortex-a8 -mfpu=neon"
+makeoptions	CPUFLAGS="-mcpu=generic-armv7-a -mfpu=neon"
 
 options 	ARM_INTR_IMPL=""
 options		ARM_GENERIC_TODR



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 13:27:29 UTC 2015

Modified Files:
src/sys/arch/arm/cortex: a9_mpsubr.S

Log Message:
Deal with kernel builds where virtualisation isn't available


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/cortex/a9_mpsubr.S

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

Modified files:

Index: src/sys/arch/arm/cortex/a9_mpsubr.S
diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.45 src/sys/arch/arm/cortex/a9_mpsubr.S:1.46
--- src/sys/arch/arm/cortex/a9_mpsubr.S:1.45	Thu Dec 17 08:02:42 2015
+++ src/sys/arch/arm/cortex/a9_mpsubr.S	Sat Dec 19 13:27:29 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9_mpsubr.S,v 1.45 2015/12/17 08:02:42 skrll Exp $	*/
+/*	$NetBSD: a9_mpsubr.S,v 1.46 2015/12/19 13:27:29 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -347,6 +347,7 @@ xputc:
 cortex_init:
 	mov	r10, lr// save lr
 
+#if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA15) || defined(CPU_CORTEXA17)
 	/* Leave HYP mode and move into supervisor mode with IRQs/FIQs disabled. */
 	mrs	r0, cpsr
 	and	r0, r0, #(PSR_MODE)	/* Mode is in the low 5 bits of CPSR */
@@ -360,11 +361,15 @@ cortex_init:
 	orr	r0, r0, #(I32_bit | F32_bit)
 	msr	spsr_cxsf, r0
 	/* Exit hypervisor mode */
-	adr	lr, 1f
+	adr	lr, 2f
 	msr	elr_hyp, lr
 	eret
+#endif
+
 1:
+	cpsid	if, #PSR_SVC32_MODE		// SVC32 with no interrupts
 
+2:
 	mov	r0, #0
 	msr	spsr_sxc, r0			// set SPSR[23:8] to known value
 



CVS commit: src/sys/compat/netbsd32

2015-12-19 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Dec 19 13:15:21 UTC 2015

Modified Files:
src/sys/compat/netbsd32: netbsd32_module.c

Log Message:
Missing field (was here before my change).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/netbsd32/netbsd32_module.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_module.c
diff -u src/sys/compat/netbsd32/netbsd32_module.c:1.3 src/sys/compat/netbsd32/netbsd32_module.c:1.4
--- src/sys/compat/netbsd32/netbsd32_module.c:1.3	Sat Dec 12 15:27:42 2015
+++ src/sys/compat/netbsd32/netbsd32_module.c	Sat Dec 19 13:15:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_module.c,v 1.3 2015/12/12 15:27:42 maxv Exp $	*/
+/*	$NetBSD: netbsd32_module.c,v 1.4 2015/12/19 13:15:21 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_module.c,v 1.3 2015/12/12 15:27:42 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_module.c,v 1.4 2015/12/19 13:15:21 maxv Exp $");
 
 #include 
 #include 
@@ -76,6 +76,7 @@ modctl32_handle_stat(struct netbsd32_iov
 		ms->ms_class = mi->mi_class;
 		ms->ms_refcnt = mod->mod_refcnt;
 		ms->ms_source = mod->mod_source;
+		ms->ms_flags = mod->mod_flags;
 		ms++;
 	}
 	TAILQ_FOREACH(mod, &module_builtins, mod_chain) {



CVS commit: src/external/broadcom/rpi-firmware/dist

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 12:34:06 UTC 2015

Modified Files:
src/external/broadcom/rpi-firmware/dist: LICENCE.broadcom bootcode.bin
fixup.dat fixup_cd.dat start.elf start_cd.elf

Log Message:
Update RPI firmware to version after the following commit

commit 224c75602b8bae1a9e942b4f1c7ed3aa8e0f0ec8
Author: popcornmix 
Date:   Tue Dec 8 14:48:57 2015 +


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom
cvs rdiff -u -r1.7 -r1.8 src/external/broadcom/rpi-firmware/dist/bootcode.bin \
src/external/broadcom/rpi-firmware/dist/fixup.dat \
src/external/broadcom/rpi-firmware/dist/fixup_cd.dat \
src/external/broadcom/rpi-firmware/dist/start.elf \
src/external/broadcom/rpi-firmware/dist/start_cd.elf

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

Modified files:

Index: src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom
diff -u src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom:1.1 src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom:1.2
--- src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom:1.1	Fri Oct 26 10:22:42 2012
+++ src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom	Sat Dec 19 12:34:06 2015
@@ -1,4 +1,5 @@
 Copyright (c) 2006, Broadcom Corporation.
+Copyright (c) 2015, Raspberry Pi (Trading) Ltd
 All rights reserved.
 
 Redistribution.  Redistribution and use in binary form, without

Index: src/external/broadcom/rpi-firmware/dist/bootcode.bin
Binary files are different
Index: src/external/broadcom/rpi-firmware/dist/fixup.dat
Binary files are different
Index: src/external/broadcom/rpi-firmware/dist/fixup_cd.dat
Binary files are different
Index: src/external/broadcom/rpi-firmware/dist/start.elf
Binary files are different
Index: src/external/broadcom/rpi-firmware/dist/start_cd.elf
Binary files are different



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 10:11:14 UTC 2015

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

Log Message:
Use NULL instead of 0 for (function) pointer


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.9 -r1.50.2.10 src/sys/dev/usb/if_atu.c
cvs rdiff -u -r1.162.2.35 -r1.162.2.36 src/sys/dev/usb/usbdi.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/if_atu.c
diff -u src/sys/dev/usb/if_atu.c:1.50.2.9 src/sys/dev/usb/if_atu.c:1.50.2.10
--- src/sys/dev/usb/if_atu.c:1.50.2.9	Tue Oct  6 21:32:15 2015
+++ src/sys/dev/usb/if_atu.c	Sat Dec 19 10:11:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_atu.c,v 1.50.2.9 2015/10/06 21:32:15 skrll Exp $ */
+/*	$NetBSD: if_atu.c,v 1.50.2.10 2015/12/19 10:11:13 skrll Exp $ */
 /*	$OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
 /*
  * Copyright (c) 2003, 2004
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.50.2.9 2015/10/06 21:32:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.50.2.10 2015/12/19 10:11:13 skrll Exp $");
 
 #include 
 #include 
@@ -320,7 +320,7 @@ atu_usb_request(struct atu_softc *sc, ui
 		return USBD_IOERROR;
 	}
 	usbd_setup_default_xfer(xfer, sc->atu_udev, 0, 50, &req, data,
-	length, USBD_SHORT_XFER_OK, 0);
+	length, USBD_SHORT_XFER_OK, NULL);
 
 	err = usbd_sync_transfer(xfer);
 

Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.162.2.35 src/sys/dev/usb/usbdi.c:1.162.2.36
--- src/sys/dev/usb/usbdi.c:1.162.2.35	Sat Dec 19 10:06:32 2015
+++ src/sys/dev/usb/usbdi.c	Sat Dec 19 10:11:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.162.2.35 2015/12/19 10:06:32 skrll Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.162.2.36 2015/12/19 10:11:13 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.35 2015/12/19 10:06:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.36 2015/12/19 10:11:13 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1087,7 +1087,7 @@ usbd_do_request_flags_pipe(struct usbd_d
 		return error;
 
 	usbd_setup_default_xfer(xfer, dev, 0, timeout, req,
-data, UGETW(req->wLength), flags, 0);
+data, UGETW(req->wLength), flags, NULL);
 	xfer->ux_pipe = pipe;
 	err = usbd_sync_transfer(xfer);
 #if defined(USB_DEBUG) || defined(DIAGNOSTIC)



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 10:06:32 UTC 2015

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

Log Message:
Add some debug


To generate a diff of this commit:
cvs rdiff -u -r1.162.2.34 -r1.162.2.35 src/sys/dev/usb/usbdi.c

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

Modified files:

Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.162.2.34 src/sys/dev/usb/usbdi.c:1.162.2.35
--- src/sys/dev/usb/usbdi.c:1.162.2.34	Sat Dec 19 10:04:35 2015
+++ src/sys/dev/usb/usbdi.c	Sat Dec 19 10:06:32 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.162.2.34 2015/12/19 10:04:35 skrll Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.162.2.35 2015/12/19 10:06:32 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.34 2015/12/19 10:04:35 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.35 2015/12/19 10:06:32 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -775,17 +775,23 @@ usbd_set_interface(struct usbd_interface
 	usbd_status err;
 	void *endpoints;
 
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
 	if (LIST_FIRST(&iface->ui_pipes) != NULL)
 		return USBD_IN_USE;
 
 	endpoints = iface->ui_endpoints;
 	int nendpt = iface->ui_idesc->bNumEndpoints;
+	USBHIST_LOG(usbdebug, "iface %p endpoints = %p nendpt", iface,
+	endpoints, iface->ui_idesc->bNumEndpoints, 0);
 	err = usbd_fill_iface_data(iface->ui_dev, iface->ui_index, altidx);
 	if (err)
 		return err;
 
 	/* new setting works, we can free old endpoints */
 	if (endpoints != NULL) {
+		USBHIST_LOG(usbdebug, "iface %p endpoints = %p nendpt", iface,
+		endpoints, nendpt, 0);
 		kmem_free(endpoints, nendpt * sizeof(struct usbd_endpoint));
 	}
 	KASSERT(iface->ui_idesc != NULL);



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 10:04:35 UTC 2015

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

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.162.2.33 -r1.162.2.34 src/sys/dev/usb/usbdi.c

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

Modified files:

Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.162.2.33 src/sys/dev/usb/usbdi.c:1.162.2.34
--- src/sys/dev/usb/usbdi.c:1.162.2.33	Wed Oct 21 07:36:31 2015
+++ src/sys/dev/usb/usbdi.c	Sat Dec 19 10:04:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.162.2.33 2015/10/21 07:36:31 skrll Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.162.2.34 2015/12/19 10:04:35 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.33 2015/10/21 07:36:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.34 2015/12/19 10:04:35 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -630,6 +630,7 @@ usbd_get_device_descriptor(struct usbd_d
 usb_endpoint_descriptor_t *
 usbd_interface2endpoint_descriptor(struct usbd_interface *iface, uint8_t index)
 {
+
 	if (index >= iface->ui_idesc->bNumEndpoints)
 		return NULL;
 	return iface->ui_endpoints[index].ue_edesc;
@@ -713,6 +714,7 @@ usbd_clear_endpoint_stall_async(struct u
 void
 usbd_clear_endpoint_toggle(struct usbd_pipe *pipe)
 {
+
 	pipe->up_methods->upm_cleartoggle(pipe);
 }
 
@@ -729,6 +731,7 @@ usbd_endpoint_count(struct usbd_interfac
 usbd_status
 usbd_interface_count(struct usbd_device *dev, uint8_t *count)
 {
+
 	if (dev->ud_cdesc == NULL)
 		return USBD_NOT_CONFIGURED;
 	*count = dev->ud_cdesc->bNumInterface;
@@ -739,6 +742,7 @@ void
 usbd_interface2device_handle(struct usbd_interface *iface,
 			 struct usbd_device **dev)
 {
+
 	*dev = iface->ui_dev;
 }
 
@@ -746,6 +750,7 @@ usbd_status
 usbd_device2interface_handle(struct usbd_device *dev,
 			 uint8_t ifaceno, struct usbd_interface **iface)
 {
+
 	if (dev->ud_cdesc == NULL)
 		return USBD_NOT_CONFIGURED;
 	if (ifaceno >= dev->ud_cdesc->bNumInterface)



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 09:59:03 UTC 2015

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

Log Message:
Use KASSERT* instead of panic wrapped in #ifdef DIAGNOSTIC / #endif


To generate a diff of this commit:
cvs rdiff -u -r1.12.2.24 -r1.12.2.25 src/sys/dev/usb/motg.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/motg.c
diff -u src/sys/dev/usb/motg.c:1.12.2.24 src/sys/dev/usb/motg.c:1.12.2.25
--- src/sys/dev/usb/motg.c:1.12.2.24	Sat Dec 19 09:56:41 2015
+++ src/sys/dev/usb/motg.c	Sat Dec 19 09:59:03 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.12.2.24 2015/12/19 09:56:41 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.12.2.25 2015/12/19 09:59:03 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 #include "opt_motg.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.24 2015/12/19 09:56:41 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.25 2015/12/19 09:59:03 skrll Exp $");
 
 #include 
 
@@ -690,8 +690,7 @@ motg_softintr(void *v)
 	rx_status |= UREAD2(sc, MUSB2_REG_INTRX);
 	tx_status |= UREAD2(sc, MUSB2_REG_INTTX);
 
-	if (rx_status & 0x01)
-		panic("ctrl_rx %08x", rx_status);
+	KASSERTMSG((rx_status & 0x01) == 0, "ctrl_rx %08x", rx_status);
 	if (tx_status & 0x01)
 		motg_device_ctrl_intr_tx(sc);
 	for (i = 1; i <= sc->sc_ep_max; i++) {
@@ -1332,10 +1331,7 @@ motg_device_ctrl_start1(struct motg_soft
 	xfer->ux_status = USBD_IN_PROGRESS;
 	KASSERT(otgpipe == MOTG_PIPE2MPIPE(xfer->ux_pipe));
 	KASSERT(otgpipe->hw_ep == ep);
-#ifdef DIAGNOSTIC
-	if (!(xfer->ux_rqflags & URQ_REQUEST))
-		panic("motg_device_ctrl_transfer: not a request");
-#endif
+	KASSERT(xfer->ux_rqflags & URQ_REQUEST);
 	// KASSERT(xfer->ux_actlen == 0);
 	xfer->ux_actlen = 0;
 
@@ -1408,11 +1404,7 @@ motg_device_ctrl_intr_rx(struct motg_sof
 
 	KASSERT(mutex_owned(&sc->sc_lock));
 
-#ifdef DIAGNOSTIC
-	if (ep->phase != DATA_IN &&
-	ep->phase != STATUS_IN)
-		panic("motg_device_ctrl_intr_rx: bad phase %d", ep->phase);
-#endif
+	KASSERT(ep->phase == DATA_IN || ep->phase != STATUS_IN);
 	/* select endpoint 0 */
 	UWRITE1(sc, MUSB2_REG_EPINDEX, 0);
 
@@ -1529,11 +1521,9 @@ motg_device_ctrl_intr_tx(struct motg_sof
 		return;
 	}
 
-#ifdef DIAGNOSTIC
-	if (ep->phase != SETUP && ep->phase != DATA_OUT &&
-	ep->phase != STATUS_OUT)
-		panic("motg_device_ctrl_intr_tx: bad phase %d", ep->phase);
-#endif
+	KASSERT(ep->phase == SETUP || ep->phase == DATA_OUT ||
+	ep->phase == STATUS_OUT);
+
 	/* select endpoint 0 */
 	UWRITE1(sc, MUSB2_REG_EPINDEX, 0);
 
@@ -1781,10 +1771,7 @@ motg_device_data_start1(struct motg_soft
 	xfer->ux_status = USBD_IN_PROGRESS;
 	KASSERT(otgpipe == MOTG_PIPE2MPIPE(xfer->ux_pipe));
 	KASSERT(otgpipe->hw_ep == ep);
-#ifdef DIAGNOSTIC
-	if (xfer->ux_rqflags & URQ_REQUEST)
-		panic("motg_device_data_transfer: a request");
-#endif
+	KASSERT(!(xfer->ux_rqflags & URQ_REQUEST));
 	// KASSERT(xfer->ux_actlen == 0);
 	xfer->ux_actlen = 0;
 
@@ -1942,10 +1929,7 @@ motg_device_intr_rx(struct motg_softc *s
 	MUSB2_MASK_CSRL_RXERROR | MUSB2_MASK_CSRL_RXPKTRDY)) == 0)
 		return;
 
-#ifdef DIAGNOSTIC
-	if (ep->phase != DATA_IN)
-		panic("motg_device_intr_rx: bad phase %d", ep->phase);
-#endif
+	KASSERTMSG(ep->phase == DATA_IN, "phase %d", ep->phase);
 	if (csr & MUSB2_MASK_CSRL_RXNAKTO) {
 		csr &= ~MUSB2_MASK_CSRL_RXREQPKT;
 		UWRITE1(sc, MUSB2_REG_RXCSRL, csr);
@@ -2085,10 +2069,7 @@ motg_device_intr_tx(struct motg_softc *s
 	}
 	if (xfer == NULL || xfer->ux_status != USBD_IN_PROGRESS)
 		goto complete;
-#ifdef DIAGNOSTIC
-	if (ep->phase != DATA_OUT)
-		panic("motg_device_intr_tx: bad phase %d", ep->phase);
-#endif
+	KASSERT(ep->phase == DATA_OUT);
 
 	otgpipe = MOTG_PIPE2MPIPE(xfer->ux_pipe);
 	otgpipe->nexttoggle = otgpipe->nexttoggle ^ 1;



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 09:56:41 UTC 2015

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

Log Message:
use __diagused


To generate a diff of this commit:
cvs rdiff -u -r1.12.2.23 -r1.12.2.24 src/sys/dev/usb/motg.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/motg.c
diff -u src/sys/dev/usb/motg.c:1.12.2.23 src/sys/dev/usb/motg.c:1.12.2.24
--- src/sys/dev/usb/motg.c:1.12.2.23	Sat Dec 19 09:55:07 2015
+++ src/sys/dev/usb/motg.c	Sat Dec 19 09:56:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.12.2.23 2015/12/19 09:55:07 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.12.2.24 2015/12/19 09:56:41 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 #include "opt_motg.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.23 2015/12/19 09:55:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.24 2015/12/19 09:56:41 skrll Exp $");
 
 #include 
 
@@ -2126,9 +2126,7 @@ complete:
 void
 motg_device_data_abort(struct usbd_xfer *xfer)
 {
-#ifdef DIAGNOSTIC
-	struct motg_softc *sc = MOTG_XFER2SC(xfer);
-#endif
+	struct motg_softc __diagused *sc = MOTG_XFER2SC(xfer);
 	KASSERT(mutex_owned(&sc->sc_lock));
 
 	MOTGHIST_FUNC(); MOTGHIST_CALLED();



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 09:55:08 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: motg.c motgvar.h

Log Message:
Provide and use a MOTG_PIPE2MPIPE helper macro


To generate a diff of this commit:
cvs rdiff -u -r1.12.2.22 -r1.12.2.23 src/sys/dev/usb/motg.c
cvs rdiff -u -r1.4.2.8 -r1.4.2.9 src/sys/dev/usb/motgvar.h

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

Modified files:

Index: src/sys/dev/usb/motg.c
diff -u src/sys/dev/usb/motg.c:1.12.2.22 src/sys/dev/usb/motg.c:1.12.2.23
--- src/sys/dev/usb/motg.c:1.12.2.22	Sat Dec 19 09:47:57 2015
+++ src/sys/dev/usb/motg.c	Sat Dec 19 09:55:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.12.2.22 2015/12/19 09:47:57 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.12.2.23 2015/12/19 09:55:07 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 #include "opt_motg.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.22 2015/12/19 09:47:57 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.23 2015/12/19 09:55:07 skrll Exp $");
 
 #include 
 
@@ -481,7 +481,7 @@ motg_init(struct motg_softc *sc)
 static int
 motg_select_ep(struct motg_softc *sc, struct usbd_pipe *pipe)
 {
-	struct motg_pipe *otgpipe = (struct motg_pipe *)pipe;
+	struct motg_pipe *otgpipe = MOTG_PIPE2MPIPE(pipe);
 	usb_endpoint_descriptor_t *ed = pipe->up_endpoint->ue_edesc;
 	struct motg_hw_ep *ep;
 	int i, size;
@@ -522,7 +522,7 @@ usbd_status
 motg_open(struct usbd_pipe *pipe)
 {
 	struct motg_softc *sc = MOTG_PIPE2SC(pipe);
-	struct motg_pipe *otgpipe = (struct motg_pipe *)pipe;
+	struct motg_pipe *otgpipe = MOTG_PIPE2MPIPE(pipe);
 	usb_endpoint_descriptor_t *ed = pipe->up_endpoint->ue_edesc;
 	uint8_t rhaddr = pipe->up_dev->ud_bus->ub_rhaddr;
 
@@ -1159,7 +1159,7 @@ static void
 motg_setup_endpoint_tx(struct usbd_xfer *xfer)
 {
 	struct motg_softc *sc = MOTG_XFER2SC(xfer);
-	struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->ux_pipe;
+	struct motg_pipe *otgpipe = MOTG_PIPE2MPIPE(xfer->ux_pipe);
 	struct usbd_device *dev = otgpipe->pipe.up_dev;
 	int epnumber = otgpipe->hw_ep->ep_number;
 
@@ -1209,7 +1209,7 @@ motg_setup_endpoint_rx(struct usbd_xfer 
 {
 	struct motg_softc *sc = MOTG_XFER2SC(xfer);
 	struct usbd_device *dev = xfer->ux_pipe->up_dev;
-	struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->ux_pipe;
+	struct motg_pipe *otgpipe = MOTG_PIPE2MPIPE(xfer->ux_pipe);
 	int epnumber = otgpipe->hw_ep->ep_number;
 
 	UWRITE1(sc, MUSB2_REG_RXFADDR(epnumber), dev->ud_addr);
@@ -1330,7 +1330,7 @@ motg_device_ctrl_start1(struct motg_soft
 		goto end;
 	}
 	xfer->ux_status = USBD_IN_PROGRESS;
-	KASSERT(otgpipe == (struct motg_pipe *)xfer->ux_pipe);
+	KASSERT(otgpipe == MOTG_PIPE2MPIPE(xfer->ux_pipe));
 	KASSERT(otgpipe->hw_ep == ep);
 #ifdef DIAGNOSTIC
 	if (!(xfer->ux_rqflags & URQ_REQUEST))
@@ -1385,7 +1385,7 @@ static void
 motg_device_ctrl_read(struct usbd_xfer *xfer)
 {
 	struct motg_softc *sc = MOTG_XFER2SC(xfer);
-	struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->ux_pipe;
+	struct motg_pipe *otgpipe = MOTG_PIPE2MPIPE(xfer->ux_pipe);
 	/* assume endpoint already selected */
 	motg_setup_endpoint_rx(xfer);
 	/* start transaction */
@@ -1664,7 +1664,7 @@ void
 motg_device_ctrl_close(struct usbd_pipe *pipe)
 {
 	struct motg_softc *sc __diagused = MOTG_PIPE2SC(pipe);
-	struct motg_pipe *otgpipe = (struct motg_pipe *)pipe;
+	struct motg_pipe *otgpipe = MOTG_PIPE2MPIPE(pipe);
 	struct motg_pipe *otgpipeiter;
 
 	MOTGHIST_FUNC(); MOTGHIST_CALLED();
@@ -1689,7 +1689,7 @@ motg_device_ctrl_close(struct usbd_pipe 
 void
 motg_device_ctrl_done(struct usbd_xfer *xfer)
 {
-	struct motg_pipe *otgpipe __diagused = (struct motg_pipe *)xfer->ux_pipe;
+	struct motg_pipe *otgpipe __diagused = MOTG_PIPE2MPIPE(xfer->ux_pipe);
 	MOTGHIST_FUNC(); MOTGHIST_CALLED();
 
 	KASSERT(otgpipe->hw_ep->xfer != xfer);
@@ -1723,7 +1723,7 @@ static usbd_status
 motg_device_data_start(struct usbd_xfer *xfer)
 {
 	struct motg_softc *sc = MOTG_XFER2SC(xfer);
-	struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->ux_pipe;
+	struct motg_pipe *otgpipe = MOTG_PIPE2MPIPE(xfer->ux_pipe);
 	usbd_status err;
 
 	MOTGHIST_FUNC(); MOTGHIST_CALLED();
@@ -1779,7 +1779,7 @@ motg_device_data_start1(struct motg_soft
 		goto end;
 	}
 	xfer->ux_status = USBD_IN_PROGRESS;
-	KASSERT(otgpipe == (struct motg_pipe *)xfer->ux_pipe);
+	KASSERT(otgpipe == MOTG_PIPE2MPIPE(xfer->ux_pipe));
 	KASSERT(otgpipe->hw_ep == ep);
 #ifdef DIAGNOSTIC
 	if (xfer->ux_rqflags & URQ_REQUEST)
@@ -1830,7 +1830,7 @@ static void
 motg_device_data_read(struct usbd_xfer *xfer)
 {
 	struct motg_softc *sc = MOTG_XFER2SC(xfer);
-	struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->ux_pipe;
+	struct motg_pipe *otgpipe = MOTG_PIPE2MPIPE(xfer->ux_pipe);
 	uint32_t val;
 
 	MOTGHIST_FUNC(); MOTGHIST_CALLED();
@@ -1861,7 +1861,7 @@ static void
 motg_device_data_write(struct usbd_xfer *

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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 09:47:57 UTC 2015

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

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.12.2.21 -r1.12.2.22 src/sys/dev/usb/motg.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/motg.c
diff -u src/sys/dev/usb/motg.c:1.12.2.21 src/sys/dev/usb/motg.c:1.12.2.22
--- src/sys/dev/usb/motg.c:1.12.2.21	Tue Oct 20 15:31:21 2015
+++ src/sys/dev/usb/motg.c	Sat Dec 19 09:47:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.12.2.21 2015/10/20 15:31:21 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.12.2.22 2015/12/19 09:47:57 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 #include "opt_motg.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.21 2015/10/20 15:31:21 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.22 2015/12/19 09:47:57 skrll Exp $");
 
 #include 
 
@@ -149,7 +149,7 @@ static struct usbd_xfer *
 static void		motg_freex(struct usbd_bus *, struct usbd_xfer *);
 static void		motg_get_lock(struct usbd_bus *, kmutex_t **);
 static int		motg_roothub_ctrl(struct usbd_bus *, usb_device_request_t *,
-void *, int);
+			void *, int);
 
 static void		motg_noop(struct usbd_pipe *pipe);
 static usbd_status	motg_portreset(struct motg_softc*);



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 09:20:35 UTC 2015

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

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.198.2.19 -r1.198.2.20 src/sys/dev/usb/usb_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/dev/usb/usb_subr.c
diff -u src/sys/dev/usb/usb_subr.c:1.198.2.19 src/sys/dev/usb/usb_subr.c:1.198.2.20
--- src/sys/dev/usb/usb_subr.c:1.198.2.19	Sat Dec 19 09:18:58 2015
+++ src/sys/dev/usb/usb_subr.c	Sat Dec 19 09:20:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_subr.c,v 1.198.2.19 2015/12/19 09:18:58 skrll Exp $	*/
+/*	$NetBSD: usb_subr.c,v 1.198.2.20 2015/12/19 09:20:35 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.19 2015/12/19 09:18:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.20 2015/12/19 09:20:35 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -700,7 +700,7 @@ usbd_set_config_index(struct usbd_device
 	/* Allocate and fill interface data. */
 	nifc = cdp->bNumInterface;
 	dev->ud_ifaces = kmem_alloc(nifc * sizeof(struct usbd_interface),
-			 KM_SLEEP);
+	KM_SLEEP);
 	if (dev->ud_ifaces == NULL) {
 		err = USBD_NOMEM;
 		goto bad;



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 09:18:58 UTC 2015

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

Log Message:
Improve debug a little.


To generate a diff of this commit:
cvs rdiff -u -r1.198.2.18 -r1.198.2.19 src/sys/dev/usb/usb_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/dev/usb/usb_subr.c
diff -u src/sys/dev/usb/usb_subr.c:1.198.2.18 src/sys/dev/usb/usb_subr.c:1.198.2.19
--- src/sys/dev/usb/usb_subr.c:1.198.2.18	Tue Sep 29 11:38:29 2015
+++ src/sys/dev/usb/usb_subr.c	Sat Dec 19 09:18:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_subr.c,v 1.198.2.18 2015/09/29 11:38:29 skrll Exp $	*/
+/*	$NetBSD: usb_subr.c,v 1.198.2.19 2015/12/19 09:18:58 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.18 2015/09/29 11:38:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.19 2015/12/19 09:18:58 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -747,9 +747,11 @@ usbd_setup_pipe_flags(struct usbd_device
 	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
 
 	p = kmem_alloc(dev->ud_bus->ub_pipesize, KM_SLEEP);
-	DPRINTFN(1, "dev=%p iface=%p ep=%p pipe=%p", dev, iface, ep, p);
-	if (p == NULL)
+	DPRINTFN(1, "dev=%p addr=%d iface=%p ep=%p pipe=%p", dev, dev->ud_addr, iface, ep);
+	if (p == NULL) {
+		DPRINTFN(1, "(nomem)", 0, 0, 0, 0);
 		return USBD_NOMEM;
+	}
 	p->up_dev = dev;
 	p->up_iface = iface;
 	p->up_endpoint = ep;
@@ -771,6 +773,7 @@ usbd_setup_pipe_flags(struct usbd_device
 	}
 	usb_init_task(&p->up_async_task, usbd_clear_endpoint_stall_task, p,
 	USB_TASKQ_MPSAFE);
+	DPRINTFN(1, "pipe=%p", p, 0, 0, 0);
 	*pipe = p;
 	return USBD_NORMAL_COMPLETION;
 }



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

2015-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 19 08:27:01 UTC 2015

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_space.c

Log Message:
Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/broadcom/bcm2835_space.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/broadcom/bcm2835_space.c
diff -u src/sys/arch/arm/broadcom/bcm2835_space.c:1.8 src/sys/arch/arm/broadcom/bcm2835_space.c:1.9
--- src/sys/arch/arm/broadcom/bcm2835_space.c:1.8	Sat Feb 28 09:34:34 2015
+++ src/sys/arch/arm/broadcom/bcm2835_space.c	Sat Dec 19 08:27:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_space.c,v 1.8 2015/02/28 09:34:34 skrll Exp $	*/
+/*	$NetBSD: bcm2835_space.c,v 1.9 2015/12/19 08:27:01 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_space.c,v 1.8 2015/02/28 09:34:34 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_space.c,v 1.9 2015/12/19 08:27:01 skrll Exp $");
 
 #include 
 #include 
@@ -292,18 +292,17 @@ bcm2835_bs_map(void *t, bus_addr_t ba, b
 	int pmap_flags;
 
 
-#if defined(BCM2836)
+	/* Attempt to find the PA device mapping */
 	pa = ba;
-#else
-	pa = ba & ~BCM2835_BUSADDR_CACHE_MASK;
-#endif
-	/* this does device addresses */
-	if ((pd = pmap_devmap_find_pa(pa, size)) != NULL) {
+	if ((pd = pmap_devmap_find_pa(ba, size)) != NULL) {
 		/* Device was statically mapped. */
 		*bshp = pd->pd_va + (pa - pd->pd_pa);
 		return 0;
 	}
 
+	/* Now assume bus address so convert to PA */
+	pa = ba & ~BCM2835_BUSADDR_CACHE_MASK;
+
 	startpa = trunc_page(pa);
 	endpa = round_page(pa + size);