CVS commit: src/sys/dev/sdmmc

2015-07-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 28 07:14:48 UTC 2015

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

Log Message:
Remove unnecessary #include


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/sdmmc/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/dev/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.61 src/sys/dev/sdmmc/sdhc.c:1.62
--- src/sys/dev/sdmmc/sdhc.c:1.61	Thu Jul 23 23:52:54 2015
+++ src/sys/dev/sdmmc/sdhc.c	Tue Jul 28 07:14:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.61 2015/07/23 23:52:54 jmcneill Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.62 2015/07/28 07:14:48 skrll Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.61 2015/07/23 23:52:54 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.62 2015/07/28 07:14:48 skrll Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_sdmmc.h
@@ -32,7 +32,6 @@ __KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.6
 #include sys/param.h
 #include sys/device.h
 #include sys/kernel.h
-#include sys/kthread.h
 #include sys/malloc.h
 #include sys/systm.h
 #include sys/mutex.h



CVS commit: src/sys/dev/pci

2015-07-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 28 07:15:03 UTC 2015

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

Log Message:
 Print interrupt type correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.344 -r1.345 src/sys/dev/pci/if_wm.c

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.344 src/sys/dev/pci/if_wm.c:1.345
--- src/sys/dev/pci/if_wm.c:1.344	Thu Jul 23 08:29:58 2015
+++ src/sys/dev/pci/if_wm.c	Tue Jul 28 07:15:03 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.344 2015/07/23 08:29:58 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.345 2015/07/28 07:15:03 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.344 2015/07/23 08:29:58 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.345 2015/07/28 07:15:03 msaitoh Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_net_mpsafe.h
@@ -1664,11 +1664,13 @@ alloc_retry:
 			error = pci_intr_distribute(vih, affinity, NULL);
 			if (error == 0) {
 aprint_normal_dev(sc-sc_dev,
-for TX interrupting at %s affinity to %u\n,
-intrstr, msix_matrix[i].cpuid % ncpu);
+for %s interrupting at %s affinity to %u\n,
+msix_matrix[i].intrname, intrstr,
+msix_matrix[i].cpuid % ncpu);
 			} else {
 aprint_normal_dev(sc-sc_dev,
-for TX interrupting at %s\n, intrstr);
+for %s interrupting at %s\n,
+msix_matrix[i].intrname, intrstr);
 			}
 			sc-sc_ihs[msix_matrix[i].intridx] = vih;
 		}



CVS commit: src/share/man/man9

2015-07-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul 28 08:59:48 UTC 2015

Modified Files:
src/share/man/man9: kmem.9

Log Message:
Document KMEM_SIZE, KMEM_REDZONE and KMEM_GUARD.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/kmem.9

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

Modified files:

Index: src/share/man/man9/kmem.9
diff -u src/share/man/man9/kmem.9:1.14 src/share/man/man9/kmem.9:1.15
--- src/share/man/man9/kmem.9:1.14	Tue Nov 26 20:47:26 2013
+++ src/share/man/man9/kmem.9	Tue Jul 28 08:59:47 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: kmem.9,v 1.14 2013/11/26 20:47:26 rmind Exp $
+.\	$NetBSD: kmem.9,v 1.15 2015/07/28 08:59:47 maxv Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -25,7 +25,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ 
-.Dd November 26, 2013
+.Dd July 28, 2015
 .Dt KMEM 9
 .Os
 .\ 
@@ -61,7 +61,9 @@
 const char *fmt ...
 .\ 
 .Pp
-.Cd options DEBUG
+.Cd options KMEM_SIZE
+.Cd options KMEM_REDZONE
+.Cd options KMEM_GUARD
 .Sh DESCRIPTION
 .Fn kmem_alloc
 allocates kernel wired memory.
@@ -204,15 +206,70 @@ For example:
 .Ed
 .\ 
 .Sh OPTIONS
+.Ss KMEM_SIZE
 Kernels compiled with the
-.Dv DEBUG
-option perform CPU intensive sanity checks on kmem operations,
-and include the
-.Dv kmguard
-facility which can be enabled at runtime.
+.Dv KMEM_SIZE
+option ensure the size given in
+.Fn kmem_free
+matches the actual allocated size. On
+.Fn kmem_alloc ,
+the kernel will allocate an additional contiguous kmem page of eight
+bytes in the buffer, will register the allocated size in the first kmem
+page of that buffer, and will return a pointer to the second kmem page
+in that same buffer. When freeing, the kernel reads the first page, and
+compares the size registered with the one given in
+.Fn kmem_free .
+Any mismatch triggers a panic.
+.Pp
+.Dv KMEM_SIZE
+is enabled by default on
+.Dv DIAGNOSTIC
+and
+.Dv DEBUG .
+.Ss KMEM_REDZONE
+Kernels compiled with the
+.Dv KMEM_REDZONE
+option add a dynamic pattern of two bytes at the end of each allocated
+buffer, and check this pattern when freeing to ensure the caller hasn't
+written outside the requested area. This option does not introduce a
+significant performance impact, but has two drawbacks: it only catches
+write overflows, and catches them only on
+.Fn kmem_free .
+.Pp
+.Dv KMEM_REDZONE
+is enabled by default on
+.Dv DIAGNOSTIC .
+.Ss KMEM_GUARD
+Kernels compiled with the
+.Dv KMEM_GUARD
+option perform CPU intensive sanity checks on kmem operations. It adds
+additional, very high overhead runtime verification to kmem operations.
+It must be enabled with
+.Dv KMEM_SIZE .
+.Pp
+.Dv KMEM_GUARD
+tries to catch the following types of bugs:
+.Bl -bullet
+.It
+Overflow at time of occurrence, by means of a guard page. An unmapped
+guard page sits immediately after the requested area; a read/write
+overflow therefore triggers a page fault.
+.It
+Underflow at
+.Fn kmem_free ,
+by using KMEM_SIZE's registered size. If an underflow occurs, the size
+stored by
+.Dv KMEM_SIZE
+will be overwritten, which means that when freeing, the kernel will
+spot the mismatch.
+.It
+Use-after-free at time of occurrence. When freeing, the memory is
+unmapped, and depending on the value of kmem_guard_depth, the kernel
+will more or less delay the recycling of that memory. Which means that
+any ulterior read/write access to the memory will trigger a page fault,
+given it hasn't been recycled yet.
+.El
 .Pp
-.Dv kmguard
-adds additional, very high overhead runtime verification to kmem operations.
 To enable it, boot the system with the
 .Fl d
 option, which causes the debugger to be entered early during the kernel
@@ -224,7 +281,7 @@ db\*[Gt] c
 .Ed
 .Pp
 This instructs
-.Dv kmguard
+.Dv kmem_guard
 to queue up to 6 (3*2) pages of unmapped KVA to catch
 use-after-free type errors.
 When
@@ -239,23 +296,11 @@ Limitations:
 It has a severe impact on performance.
 .It
 It is best used on a 64-bit machine with lots of RAM.
-.It
-Allocations larger than PAGE_SIZE bypass the
-.Dv kmguard
-facility.
 .El
 .Pp
-kmguard tries to catch the following types of bugs:
-.Bl -bullet
-.It
-Overflow at time of occurrence, by means of a guard page.
-.It
-Underflow at
-.Fn kmem_free ,
-by using a canary value.
-.It
-Invalid pointer or size passed, at
-.Fn kmem_free .
+.Dv KMEM_GUARD
+is enabled by default on
+.Dv DEBUG .
 .El
 .Sh RETURN VALUES
 On success,



CVS commit: src/share/man/man9

2015-07-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 28 09:52:43 UTC 2015

Modified Files:
src/share/man/man9: kmem.9

Log Message:
Use more Dv.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/kmem.9

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

Modified files:

Index: src/share/man/man9/kmem.9
diff -u src/share/man/man9/kmem.9:1.16 src/share/man/man9/kmem.9:1.17
--- src/share/man/man9/kmem.9:1.16	Tue Jul 28 09:51:42 2015
+++ src/share/man/man9/kmem.9	Tue Jul 28 09:52:43 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: kmem.9,v 1.16 2015/07/28 09:51:42 wiz Exp $
+.\	$NetBSD: kmem.9,v 1.17 2015/07/28 09:52:43 wiz Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -74,10 +74,10 @@ Specify the size of allocation in bytes.
 .It Fa kmflags
 Either of the following:
 .Bl -tag -width KM_NOSLEEP
-.It KM_SLEEP
+.It Dv KM_SLEEP
 If the allocation cannot be satisfied immediately, sleep until enough
 memory is available.
-.It KM_NOSLEEP
+.It Dv KM_NOSLEEP
 Don't sleep.
 Immediately return
 .Dv NULL
@@ -261,7 +261,9 @@ a read/write overflow therefore triggers
 .It
 Underflow at
 .Fn kmem_free ,
-by using KMEM_SIZE's registered size.
+by using
+.Dv KMEM_SIZE Ap s
+registered size.
 If an underflow occurs, the size stored by
 .Dv KMEM_SIZE
 will be overwritten, which means that when freeing, the kernel will



CVS commit: src/share/man/man9

2015-07-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 28 09:51:42 UTC 2015

Modified Files:
src/share/man/man9: kmem.9

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/kmem.9

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

Modified files:

Index: src/share/man/man9/kmem.9
diff -u src/share/man/man9/kmem.9:1.15 src/share/man/man9/kmem.9:1.16
--- src/share/man/man9/kmem.9:1.15	Tue Jul 28 08:59:47 2015
+++ src/share/man/man9/kmem.9	Tue Jul 28 09:51:42 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: kmem.9,v 1.15 2015/07/28 08:59:47 maxv Exp $
+.\	$NetBSD: kmem.9,v 1.16 2015/07/28 09:51:42 wiz Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -211,13 +211,15 @@ Kernels compiled with the
 .Dv KMEM_SIZE
 option ensure the size given in
 .Fn kmem_free
-matches the actual allocated size. On
+matches the actual allocated size.
+On
 .Fn kmem_alloc ,
 the kernel will allocate an additional contiguous kmem page of eight
 bytes in the buffer, will register the allocated size in the first kmem
 page of that buffer, and will return a pointer to the second kmem page
-in that same buffer. When freeing, the kernel reads the first page, and
-compares the size registered with the one given in
+in that same buffer.
+When freeing, the kernel reads the first page, and compares the
+size registered with the one given in
 .Fn kmem_free .
 Any mismatch triggers a panic.
 .Pp
@@ -231,9 +233,10 @@ Kernels compiled with the
 .Dv KMEM_REDZONE
 option add a dynamic pattern of two bytes at the end of each allocated
 buffer, and check this pattern when freeing to ensure the caller hasn't
-written outside the requested area. This option does not introduce a
-significant performance impact, but has two drawbacks: it only catches
-write overflows, and catches them only on
+written outside the requested area.
+This option does not introduce a significant performance impact,
+but has two drawbacks: it only catches write overflows, and catches
+them only on
 .Fn kmem_free .
 .Pp
 .Dv KMEM_REDZONE
@@ -242,8 +245,9 @@ is enabled by default on
 .Ss KMEM_GUARD
 Kernels compiled with the
 .Dv KMEM_GUARD
-option perform CPU intensive sanity checks on kmem operations. It adds
-additional, very high overhead runtime verification to kmem operations.
+option perform CPU intensive sanity checks on kmem operations.
+It adds additional, very high overhead runtime verification to kmem
+operations.
 It must be enabled with
 .Dv KMEM_SIZE .
 .Pp
@@ -251,23 +255,24 @@ It must be enabled with
 tries to catch the following types of bugs:
 .Bl -bullet
 .It
-Overflow at time of occurrence, by means of a guard page. An unmapped
-guard page sits immediately after the requested area; a read/write
-overflow therefore triggers a page fault.
+Overflow at time of occurrence, by means of a guard page.
+An unmapped guard page sits immediately after the requested area;
+a read/write overflow therefore triggers a page fault.
 .It
 Underflow at
 .Fn kmem_free ,
-by using KMEM_SIZE's registered size. If an underflow occurs, the size
-stored by
+by using KMEM_SIZE's registered size.
+If an underflow occurs, the size stored by
 .Dv KMEM_SIZE
 will be overwritten, which means that when freeing, the kernel will
 spot the mismatch.
 .It
-Use-after-free at time of occurrence. When freeing, the memory is
-unmapped, and depending on the value of kmem_guard_depth, the kernel
-will more or less delay the recycling of that memory. Which means that
-any ulterior read/write access to the memory will trigger a page fault,
-given it hasn't been recycled yet.
+Use-after-free at time of occurrence.
+When freeing, the memory is unmapped, and depending on the value
+of kmem_guard_depth, the kernel will more or less delay the recycling
+of that memory.
+Which means that any ulterior read/write access to the memory will
+trigger a page fault, given it hasn't been recycled yet.
 .El
 .Pp
 To enable it, boot the system with the



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

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 29 00:12:27 UTC 2015

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
add sys/stdbool.h


To generate a diff of this commit:
cvs rdiff -u -r1.1973 -r1.1974 src/distrib/sets/lists/comp/mi

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.1973 src/distrib/sets/lists/comp/mi:1.1974
--- src/distrib/sets/lists/comp/mi:1.1973	Tue Jul 28 01:09:34 2015
+++ src/distrib/sets/lists/comp/mi	Tue Jul 28 20:12:27 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1973 2015/07/28 05:09:34 dholland Exp $
+#	$NetBSD: mi,v 1.1974 2015/07/29 00:12:27 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3299,6 +3299,7 @@
 ./usr/include/sys/stat.h			comp-c-include
 ./usr/include/sys/statvfs.h			comp-c-include
 ./usr/include/sys/stdarg.h			comp-c-include
+./usr/include/sys/stdbool.h			comp-c-include
 ./usr/include/sys/stdint.h			comp-c-include
 ./usr/include/sys/swap.h			comp-c-include
 ./usr/include/sys/syncobj.h			comp-c-include



CVS commit: src

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 29 00:10:26 UTC 2015

Modified Files:
src/include: Makefile
src/sys/sys: Makefile pool.h types.h
Added Files:
src/sys/sys: stdbool.h
Removed Files:
src/include: stdbool.h

Log Message:
move stdbool.h to sys, reuire pool.h to include sys/stdbool.h for bool,
centralize definitions of bool, true, false, to sys/stdbool.h


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/include/Makefile
cvs rdiff -u -r1.5 -r0 src/include/stdbool.h
cvs rdiff -u -r1.154 -r1.155 src/sys/sys/Makefile
cvs rdiff -u -r1.78 -r1.79 src/sys/sys/pool.h
cvs rdiff -u -r0 -r1.1 src/sys/sys/stdbool.h
cvs rdiff -u -r1.91 -r1.92 src/sys/sys/types.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/Makefile
diff -u src/include/Makefile:1.140 src/include/Makefile:1.141
--- src/include/Makefile:1.140	Tue Dec 10 20:24:08 2013
+++ src/include/Makefile	Tue Jul 28 20:10:26 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.140 2013/12/11 01:24:08 joerg Exp $
+#	$NetBSD: Makefile,v 1.141 2015/07/29 00:10:26 christos Exp $
 #	@(#)Makefile	8.2 (Berkeley) 1/4/94
 
 # Doing a make includes builds /usr/include
@@ -18,7 +18,7 @@ INCS=	a.out.h aio.h ar.h assert.h atomic
 	ndbm.h netconfig.h netdb.h netgroup.h nlist.h nl_types.h nsswitch.h \
 	paths.h pwd.h quota.h randomid.h ranlib.h re_comp.h regex.h regexp.h \
 	resolv.h res_update.h rmt.h sched.h search.h semaphore.h setjmp.h \
-	string.h sgtty.h signal.h spawn.h stab.h stdbool.h stddef.h stdio.h \
+	string.h sgtty.h signal.h spawn.h stab.h stddef.h stdio.h \
 	stdlib.h strings.h stringlist.h struct.h sysexits.h tar.h time.h \
 	ttyent.h tzfile.h ucontext.h ulimit.h unistd.h util.h utime.h utmp.h \
 	utmpx.h uuid.h vis.h wchar.h wctype.h wordexp.h

Index: src/sys/sys/Makefile
diff -u src/sys/sys/Makefile:1.154 src/sys/sys/Makefile:1.155
--- src/sys/sys/Makefile:1.154	Fri Jun 26 10:38:54 2015
+++ src/sys/sys/Makefile	Tue Jul 28 20:10:25 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.154 2015/06/26 14:38:54 matt Exp $
+#	$NetBSD: Makefile,v 1.155 2015/07/29 00:10:25 christos Exp $
 
 .include bsd.own.mk
 
@@ -37,8 +37,8 @@ INCS=	acct.h agpio.h aio.h ansi.h aout_m
 	sha2.h shm.h siginfo.h signal.h signalvar.h sigtypes.h \
 	sleepq.h socket.h \
 	socketvar.h sockio.h spawn.h specificdata.h stat.h \
-	statvfs.h syscall.h syscallargs.h sysctl.h stdarg.h stdint.h swap.h \
-	syncobj.h syslimits.h syslog.h \
+	statvfs.h syscall.h syscallargs.h sysctl.h stdarg.h stdbool.h \
+	stdint.h swap.h syncobj.h syslimits.h syslog.h \
 	tape.h termios.h time.h timeb.h timepps.h times.h \
 	timex.h tls.h trace.h tree.h tty.h ttychars.h ttycom.h \
 	ttydefaults.h ttydev.h types.h \
@@ -52,6 +52,7 @@ INCSYMLINKS=\
 	sys/fcntl.h /usr/include/fcntl.h \
 	sys/poll.h /usr/include/poll.h \
 	sys/stdarg.h /usr/include/stdarg.h \
+	sys/stdbool.h /usr/include/stdbool.h \
 	sys/stdint.h /usr/include/stdint.h \
 	sys/syslog.h /usr/include/syslog.h \
 	sys/termios.h /usr/include/termios.h \

Index: src/sys/sys/pool.h
diff -u src/sys/sys/pool.h:1.78 src/sys/sys/pool.h:1.79
--- src/sys/sys/pool.h:1.78	Tue Jul 28 08:32:44 2015
+++ src/sys/sys/pool.h	Tue Jul 28 20:10:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pool.h,v 1.78 2015/07/28 12:32:44 maxv Exp $	*/
+/*	$NetBSD: pool.h,v 1.79 2015/07/29 00:10:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000, 2007 The NetBSD Foundation, Inc.
@@ -32,6 +32,8 @@
 
 #ifndef _SYS_POOL_H_
 #define _SYS_POOL_H_
+
+#include sys/stdbool.h
 #include sys/stdint.h
 
 struct pool_sysctl {

Index: src/sys/sys/types.h
diff -u src/sys/sys/types.h:1.91 src/sys/sys/types.h:1.92
--- src/sys/sys/types.h:1.91	Thu Dec 12 12:53:03 2013
+++ src/sys/sys/types.h	Tue Jul 28 20:10:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.91 2013/12/12 17:53:03 matt Exp $	*/
+/*	$NetBSD: types.h,v 1.92 2015/07/29 00:10:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1991, 1993, 1994
@@ -204,11 +204,14 @@ typedef	int		psetid_t;
  * Boolean type definitions for the kernel environment.  User-space
  * boolean definitions are found in stdbool.h.
  */
+#ifndef __bool_true_false_are_defined
 #ifndef __cplusplus
 #define bool	_Bool
 #define true	1
 #define false	0
 #endif
+#define __bool_true_false_are_defined 1
+#endif
 
 /*
  * Deprecated Mach-style boolean_t type.  Should not be used by new code.

Added files:

Index: src/sys/sys/stdbool.h
diff -u /dev/null src/sys/sys/stdbool.h:1.1
--- /dev/null	Tue Jul 28 20:10:26 2015
+++ src/sys/sys/stdbool.h	Tue Jul 28 20:10:25 2015
@@ -0,0 +1,47 @@
+/*	$NetBSD: stdbool.h,v 1.1 2015/07/29 00:10:25 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2002 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe of Wasabi Systems, Inc.
+ *
+ * Redistribution and use in source and binary 

CVS commit: xsrc/external/mit/xf86-video-r128/dist/src

2015-07-28 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Jul 29 01:51:18 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-r128/dist/src: r128_driver.c r128_output.c

Log Message:
port static EDID support via WSDISPLAYIO_GET_EDID back, now this works again
on my pismo


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c
diff -u xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.13 xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.14
--- xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.13	Mon Jul 20 01:33:51 2015
+++ xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c	Wed Jul 29 01:51:18 2015
@@ -508,7 +508,7 @@ void R128GetPanelInfoFromBIOS(xf86Output
 xf86GetOptValInteger(info-Options, OPTION_PANEL_WIDTH,  (r128_output-PanelXRes));
 xf86GetOptValInteger(info-Options, OPTION_PANEL_HEIGHT, (r128_output-PanelYRes));
 
-if (!info-VBIOS) return;
+if (!info-VBIOS) goto fallback;
 info-FPBIOSstart = 0;
 
 /* FIXME: There should be direct access to the start of the FP info
@@ -529,7 +529,7 @@ void R128GetPanelInfoFromBIOS(xf86Output
 }
 }
 
-if (!FPHeader) return;
+if (!FPHeader) goto fallback;
 
 
 /* Assume that only one panel is attached and supported */
@@ -540,25 +540,6 @@ void R128GetPanelInfoFromBIOS(xf86Output
 }
 }
 
-#ifdef __NetBSD__
-if (!r128_output-PanelXRes || !r128_output-PanelYRes) {
-	/*
-	 * we may not be on x86 so check wsdisplay for panel dimensions
-	 * XXX this assumes that the r128 is the console, although that should
-	 * be the case in the vast majority of cases where an LCD is hooked up
-	 * directly
-	 * We should probably just check the relevant registers but I'm not
-	 * sure they're available at this point.
-	 */
-	struct wsdisplay_fbinfo fbinfo;
-	
-	if (ioctl(xf86Info.screenFd, WSDISPLAYIO_GINFO, fbinfo) == 0) {
-	r128_output-PanelXRes = fbinfo.width;
-	r128_output-PanelYRes = fbinfo.height;
-	}
-}
-#endif
-
 #ifndef AVOID_FBDEV
 if (!info-FPBIOSstart) return;
 #endif
@@ -612,6 +593,26 @@ void R128GetPanelInfoFromBIOS(xf86Output
This support is untested and may not 
function properly\n);
 }
+return;
+fallback:
+#ifdef __NetBSD__
+if (!r128_output-PanelXRes || !r128_output-PanelYRes) {
+	/*
+	 * we may not be on x86 so check wsdisplay for panel dimensions
+	 * XXX this assumes that the r128 is the console, although that should
+	 * be the case in the vast majority of cases where an LCD is hooked up
+	 * directly
+	 * We should probably just check the relevant registers but I'm not
+	 * sure they're available at this point.
+	 */
+	struct wsdisplay_fbinfo fbinfo;
+	
+	if (ioctl(xf86Info.screenFd, WSDISPLAYIO_GINFO, fbinfo) == 0) {
+	r128_output-PanelXRes = fbinfo.width;
+	r128_output-PanelYRes = fbinfo.height;
+	}
+}
+#endif
 }
 
 /* Read PLL parameters from BIOS block.  Default to typical values if there

Index: xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c
diff -u xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c:1.1.1.1 xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c:1.2
--- xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c:1.1.1.1	Mon Jul 20 00:23:09 2015
+++ xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c	Wed Jul 29 01:51:18 2015
@@ -40,6 +40,14 @@
 #include r128.h
 #include r128_probe.h
 #include r128_reg.h
+#include xf86Priv.h
+
+#ifdef __NetBSD__
+#include sys/time.h
+#include sys/ioctl.h
+#include dev/wscons/wsconsio.h
+#endif
+
 
 static void R128ConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr output);
 
@@ -238,6 +246,24 @@ static R128MonitorType R128DisplayDDCCon
 uint32_t mask1, mask2;
 
 if (r128_output-type == OUTPUT_LVDS) {
+#ifdef __NetBSD__
+	struct wsdisplayio_edid_info ei;
+	char *buffer;
+	xf86MonPtr tmp;
+
+	buffer = malloc(1024);
+	ei.edid_data = buffer;
+	ei.buffer_size = 1024;
+	if (ioctl(xf86Info.screenFd, WSDISPLAYIO_GET_EDID, ei) != -1) {
+	xf86Msg(X_ERROR, got %d bytes worth of EDID from wsdisplay\n,
+	  ei.data_size);
+	tmp = xf86InterpretEEDID(pScrn-scrnIndex, buffer);
+	tmp-flags |= MONITOR_EDID_COMPLETE_RAWDATA;
+	*MonInfo = tmp;
+	xf86OutputSetEDID(output, tmp);
+	} else
+	free(buffer);
+#endif
 return MT_LCD;
 } else if (r128_output-type == OUTPUT_VGA) {
 mask1 = R128_GPIO_MONID_MASK_1 | (info-isPro2 ? R128_GPIO_MONID_MASK_2 : R128_GPIO_MONID_MASK_3);
@@ -297,8 +323,8 @@ DisplayModePtr R128ProbeOutputModes(xf86
 if (r128_output-pI2CBus) {
 edid_mon = xf86OutputGetEDID(output, 

CVS commit: src/sys/dev

2015-07-28 Thread Patrick Welche
Module Name:src
Committed By:   prlw1
Date:   Tue Jul 28 13:12:47 UTC 2015

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

Log Message:
Print vndattach error


To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/sys/dev/vnd.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/vnd.c
diff -u src/sys/dev/vnd.c:1.245 src/sys/dev/vnd.c:1.246
--- src/sys/dev/vnd.c:1.245	Mon May 25 21:02:37 2015
+++ src/sys/dev/vnd.c	Tue Jul 28 13:12:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnd.c,v 1.245 2015/05/25 21:02:37 prlw1 Exp $	*/
+/*	$NetBSD: vnd.c,v 1.246 2015/07/28 13:12:47 prlw1 Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vnd.c,v 1.245 2015/05/25 21:02:37 prlw1 Exp $);
+__KERNEL_RCSID(0, $NetBSD: vnd.c,v 1.246 2015/07/28 13:12:47 prlw1 Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_vnd.h
@@ -245,8 +245,8 @@ vndattach(int num)
 
 	error = config_cfattach_attach(vnd_cd.cd_name, vnd_ca);
 	if (error)
-		aprint_error(%s: unable to register cfattach\n,
-		vnd_cd.cd_name);
+		aprint_error(%s: unable to register cfattach, error = %d\n,
+		vnd_cd.cd_name, error);
 }
 
 static int



CVS commit: xsrc/external/mit/xinit/dist

2015-07-28 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Tue Jul 28 15:45:47 UTC 2015

Modified Files:
xsrc/external/mit/xinit/dist: startx.cpp

Log Message:
Use upstream version for expr fix.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xinit/dist/startx.cpp

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

Modified files:

Index: xsrc/external/mit/xinit/dist/startx.cpp
diff -u xsrc/external/mit/xinit/dist/startx.cpp:1.6 xsrc/external/mit/xinit/dist/startx.cpp:1.7
--- xsrc/external/mit/xinit/dist/startx.cpp:1.6	Wed Jul 22 09:16:23 2015
+++ xsrc/external/mit/xinit/dist/startx.cpp	Tue Jul 28 15:45:46 2015
@@ -217,7 +217,7 @@ fi
 XCOMM if no vt is specified add vtarg (which may be empty)
 have_vtarg=no
 for i in $serverargs; do
-if expr $i : '^vt[0-9]\+$'  /dev/null; then
+if expr $i : 'vt[0-9][0-9]*$'  /dev/null; then
 have_vtarg=yes
 fi
 done



CVS commit: src/sys

2015-07-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul 28 12:32:44 UTC 2015

Modified Files:
src/sys/kern: subr_pool.c
src/sys/sys: pool.h

Log Message:
Introduce POOL_REDZONE.


To generate a diff of this commit:
cvs rdiff -u -r1.203 -r1.204 src/sys/kern/subr_pool.c
cvs rdiff -u -r1.77 -r1.78 src/sys/sys/pool.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/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.203 src/sys/kern/subr_pool.c:1.204
--- src/sys/kern/subr_pool.c:1.203	Fri Jun 13 19:09:07 2014
+++ src/sys/kern/subr_pool.c	Tue Jul 28 12:32:44 2015
@@ -1,13 +1,14 @@
-/*	$NetBSD: subr_pool.c,v 1.203 2014/06/13 19:09:07 joerg Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.204 2015/07/28 12:32:44 maxv Exp $	*/
 
 /*-
- * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014
+ * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015
  * The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Paul Kranenburg; by Jason R. Thorpe of the Numerical Aerospace
- * Simulation Facility, NASA Ames Research Center, and by Andrew Doran.
+ * Simulation Facility, NASA Ames Research Center; by Andrew Doran, and by
+ * Maxime Villard.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -32,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.203 2014/06/13 19:09:07 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.204 2015/07/28 12:32:44 maxv Exp $);
 
 #include opt_ddb.h
 #include opt_lockdebug.h
@@ -82,6 +83,17 @@ static struct pool phpool[PHPOOL_MAX];
 static struct pool psppool;
 #endif
 
+#ifdef POOL_REDZONE
+# define POOL_REDZONE_SIZE 2
+static void pool_redzone_init(struct pool *, size_t);
+static void pool_redzone_fill(struct pool *, void *);
+static void pool_redzone_check(struct pool *, void *);
+#else
+# define pool_redzone_init(pp, sz)	/* NOTHING */
+# define pool_redzone_fill(pp, ptr)	/* NOTHING */
+# define pool_redzone_check(pp, ptr)	/* NOTHING */
+#endif
+
 static void *pool_page_alloc_meta(struct pool *, int);
 static void pool_page_free_meta(struct pool *, void *);
 
@@ -459,7 +471,7 @@ pool_init(struct pool *pp, size_t size, 
 const char *wchan, struct pool_allocator *palloc, int ipl)
 {
 	struct pool *pp1;
-	size_t trysize, phsize;
+	size_t trysize, phsize, prsize;
 	int off, slack;
 
 #ifdef DEBUG
@@ -506,13 +518,14 @@ pool_init(struct pool *pp, size_t size, 
 	if (align == 0)
 		align = ALIGN(1);
 
-	if ((flags  PR_NOTOUCH) == 0  size  sizeof(struct pool_item))
-		size = sizeof(struct pool_item);
+	prsize = size;
+	if ((flags  PR_NOTOUCH) == 0  prsize  sizeof(struct pool_item))
+		prsize = sizeof(struct pool_item);
 
-	size = roundup(size, align);
+	prsize = roundup(prsize, align);
 #ifdef DIAGNOSTIC
-	if (size  palloc-pa_pagesz)
-		panic(pool_init: pool item size (%zu) too large, size);
+	if (prsize  palloc-pa_pagesz)
+		panic(pool_init: pool item size (%zu) too large, prsize);
 #endif
 
 	/*
@@ -529,7 +542,7 @@ pool_init(struct pool *pp, size_t size, 
 	pp-pr_maxpages = UINT_MAX;
 	pp-pr_roflags = flags;
 	pp-pr_flags = 0;
-	pp-pr_size = size;
+	pp-pr_size = prsize;
 	pp-pr_align = align;
 	pp-pr_wchan = wchan;
 	pp-pr_alloc = palloc;
@@ -544,6 +557,7 @@ pool_init(struct pool *pp, size_t size, 
 	pp-pr_drain_hook = NULL;
 	pp-pr_drain_hook_arg = NULL;
 	pp-pr_freecheck = NULL;
+	pool_redzone_init(pp, size);
 
 	/*
 	 * Decide whether to put the page header off page to avoid
@@ -935,6 +949,7 @@ pool_get(struct pool *pp, int flags)
 	mutex_exit(pp-pr_lock);
 	KASSERTvaddr_t)v + pp-pr_itemoffset)  (pp-pr_align - 1)) == 0);
 	FREECHECK_OUT(pp-pr_freecheck, v);
+	pool_redzone_fill(pp, v);
 	return (v);
 }
 
@@ -948,6 +963,7 @@ pool_do_put(struct pool *pp, void *v, st
 	struct pool_item_header *ph;
 
 	KASSERT(mutex_owned(pp-pr_lock));
+	pool_redzone_check(pp, v);
 	FREECHECK_IN(pp-pr_freecheck, v);
 	LOCKDEBUG_MEM_CHECK(v, pp-pr_size);
 
@@ -2188,6 +2204,7 @@ pool_cache_get_slow(pool_cache_cpu_t *cc
 	}
 
 	FREECHECK_OUT(pc-pc_freecheck, object);
+	pool_redzone_fill(pc-pc_pool, object);
 	return false;
 }
 
@@ -2233,6 +2250,7 @@ pool_cache_get_paddr(pool_cache_t pc, in
 			cc-cc_hits++;
 			splx(s);
 			FREECHECK_OUT(pc-pc_freecheck, object);
+			pool_redzone_fill(pc-pc_pool, object);
 			return object;
 		}
 
@@ -2376,6 +2394,7 @@ pool_cache_put_paddr(pool_cache_t pc, vo
 	int s;
 
 	KASSERT(object != NULL);
+	pool_redzone_check(pc-pc_pool, object);
 	FREECHECK_IN(pc-pc_freecheck, object);
 
 	/* Lock out interrupts and disable preemption. */
@@ -2597,6 +2616,120 @@ pool_page_free_meta(struct pool *pp, voi
 	vmem_free(kmem_meta_arena, (vmem_addr_t)v, pp-pr_alloc-pa_pagesz);
 }
 
+#ifdef POOL_REDZONE
+#if defined(_LP64)
+# define PRIME 

CVS commit: src/sys/dev/usb

2015-07-28 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Tue Jul 28 12:27:55 UTC 2015

Modified Files:
src/sys/dev/usb: uftdireg.h

Log Message:
Fix URL in comment, no functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/uftdireg.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/uftdireg.h
diff -u src/sys/dev/usb/uftdireg.h:1.8 src/sys/dev/usb/uftdireg.h:1.9
--- src/sys/dev/usb/uftdireg.h:1.8	Mon Jan 21 19:08:42 2013
+++ src/sys/dev/usb/uftdireg.h	Tue Jul 28 12:27:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uftdireg.h,v 1.8 2013/01/21 19:08:42 mlelstv Exp $ */
+/*	$NetBSD: uftdireg.h,v 1.9 2015/07/28 12:27:55 rjs Exp $ */
 
 /*
  * Definitions for the FTDI USB Single Port Serial Converter -
@@ -7,7 +7,7 @@
  * The device is based on the FTDI FT8U100AX chip. It has a DB25 on one side,
  * USB on the other.
  *
- * Thanx to FTDI (http://www.ftdi.co.uk) for so kindly providing details
+ * Thanx to FTDI (http://www.ftdichip.com) for so kindly providing details
  * of the protocol required to talk to the device and ongoing assistence
  * during development.
  *



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

2015-07-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jul 29 04:59:48 UTC 2015

Modified Files:
src/sys/arch/arm/cortex: gic.c

Log Message:
Adjust some of IPLs of various IPIs.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/cortex/gic.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/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.19 src/sys/arch/arm/cortex/gic.c:1.20
--- src/sys/arch/arm/cortex/gic.c:1.19	Wed Apr 15 15:45:06 2015
+++ src/sys/arch/arm/cortex/gic.c	Wed Jul 29 04:59:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.19 2015/04/15 15:45:06 matt Exp $	*/
+/*	$NetBSD: gic.c,v 1.20 2015/07/29 04:59:48 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 #define _INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gic.c,v 1.19 2015/04/15 15:45:06 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: gic.c,v 1.20 2015/07/29 04:59:48 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -612,13 +612,13 @@ armgic_attach(device_t parent, device_t 
 #ifdef MULTIPROCESSOR
 	intr_establish(ARMGIC_SGI_IPIBASE + IPI_AST, IPL_VM,
 	IST_MPSAFE | IST_EDGE, pic_ipi_ast, (void *)-1);
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_XCALL, IPL_VM,
+	intr_establish(ARMGIC_SGI_IPIBASE + IPI_XCALL, IPL_HIGH,
 	IST_MPSAFE | IST_EDGE, pic_ipi_xcall, (void *)-1);
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_GENERIC, IPL_VM,
+	intr_establish(ARMGIC_SGI_IPIBASE + IPI_GENERIC, IPL_HIGH,
 	IST_MPSAFE | IST_EDGE, pic_ipi_generic, (void *)-1);
 	intr_establish(ARMGIC_SGI_IPIBASE + IPI_NOP, IPL_VM,
 	IST_MPSAFE | IST_EDGE, pic_ipi_nop, (void *)-1);
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_SHOOTDOWN, IPL_VM,
+	intr_establish(ARMGIC_SGI_IPIBASE + IPI_SHOOTDOWN, IPL_SCHED,
 	IST_MPSAFE | IST_EDGE, pic_ipi_shootdown, (void *)-1);
 #ifdef DDB
 	intr_establish(ARMGIC_SGI_IPIBASE + IPI_DDB, IPL_HIGH,



CVS commit: src/sys/arch/x68k/stand/boot_ufs

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 16:51:25 UTC 2015

Modified Files:
src/sys/arch/x68k/stand/boot_ufs: readufs_lfs.c

Log Message:
fix build


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/stand/boot_ufs/readufs_lfs.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/stand/boot_ufs/readufs_lfs.c
diff -u src/sys/arch/x68k/stand/boot_ufs/readufs_lfs.c:1.15 src/sys/arch/x68k/stand/boot_ufs/readufs_lfs.c:1.16
--- src/sys/arch/x68k/stand/boot_ufs/readufs_lfs.c:1.15	Mon Dec  9 04:35:16 2013
+++ src/sys/arch/x68k/stand/boot_ufs/readufs_lfs.c	Tue Jul 28 12:51:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: readufs_lfs.c,v 1.15 2013/12/09 09:35:16 wiz Exp $	*/
+/*	$NetBSD: readufs_lfs.c,v 1.16 2015/07/28 16:51:25 christos Exp $	*/
 /*	from Id: readufs_lfs.c,v 1.7 2003/10/15 14:16:58 itohy Exp 	*/
 
 /*
@@ -105,7 +105,7 @@ try_lfs(void)
 
 		if (sblk2.dlfs_magic == LFS_MAGIC) {
 			if (fsi_lfs.version == 1) {
-if (sblk.dlfs_otstamp  sblk2.dlfs_otstamp)
+if (sblk.dlfs_inopf  sblk2.dlfs_inopf)
 	s = sblk2;
 			} else {
 if (sblk.dlfs_serial  sblk2.dlfs_serial)



CVS commit: src/lib/libc/stdlib

2015-07-28 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jul 28 17:13:34 UTC 2015

Modified Files:
src/lib/libc/stdlib: reallocarr.3 reallocarr.c

Log Message:
Compatibility fixes in reallocarr(3)

Make this work on !NetBSD platforms:
- replace __CTASSERT() with platform agnostic solution SQRT_SIZE_MAX
- include nbtool_config.h for cross builds to get definition of __RCSID()
- restore errno in the last rare code path for platforms affecting errno(2)
  in memcpy(2)

While there: rename parameter name 'num' to 'number' to be in sync with
the calloc(3) parameter naming.

Reported by scole_mail at the current-users ml.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/stdlib/reallocarr.3
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/stdlib/reallocarr.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/libc/stdlib/reallocarr.3
diff -u src/lib/libc/stdlib/reallocarr.3:1.3 src/lib/libc/stdlib/reallocarr.3:1.4
--- src/lib/libc/stdlib/reallocarr.3:1.3	Thu Feb 19 23:08:21 2015
+++ src/lib/libc/stdlib/reallocarr.3	Tue Jul 28 17:13:34 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: reallocarr.3,v 1.3 2015/02/19 23:08:21 wiz Exp $
+.\	$NetBSD: reallocarr.3,v 1.4 2015/07/28 17:13:34 kamil Exp $
 .\
 .\ Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -37,7 +37,7 @@
 .Ft int
 .Fo reallocarr
 .Fa void *ptr
-.Fa size_t num
+.Fa size_t number
 .Fa size_t size
 .Fc
 .Sh DESCRIPTION

Index: src/lib/libc/stdlib/reallocarr.c
diff -u src/lib/libc/stdlib/reallocarr.c:1.2 src/lib/libc/stdlib/reallocarr.c:1.3
--- src/lib/libc/stdlib/reallocarr.c:1.2	Thu Jul 16 00:03:59 2015
+++ src/lib/libc/stdlib/reallocarr.c	Tue Jul 28 17:13:34 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: reallocarr.c,v 1.2 2015/07/16 00:03:59 kamil Exp $ */
+/* $NetBSD: reallocarr.c,v 1.3 2015/07/28 17:13:34 kamil Exp $ */
 
 /*-
  * Copyright (c) 2015 Joerg Sonnenberger jo...@netbsd.org.
@@ -29,8 +29,12 @@
  * SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include nbtool_config.h
+#endif
+
 #include sys/cdefs.h
-__RCSID($NetBSD: reallocarr.c,v 1.2 2015/07/16 00:03:59 kamil Exp $);
+__RCSID($NetBSD: reallocarr.c,v 1.3 2015/07/28 17:13:34 kamil Exp $);
 
 #include namespace.h
 #include errno.h
@@ -40,16 +44,17 @@ __RCSID($NetBSD: reallocarr.c,v 1.2 201
 #include stdlib.h
 #include string.h
 
-__CTASSERT(65535  SIZE_MAX / 65535);
-
 #ifdef _LIBC
 #ifdef __weak_alias
 __weak_alias(reallocarr, _reallocarr)
 #endif
 #endif
 
+#define SQRT_SIZE_MAX (1UL  (sizeof(size_t)  2))
+
+#if !HAVE_REALLOCARR
 int
-reallocarr(void *ptr, size_t num, size_t size)
+reallocarr(void *ptr, size_t number, size_t size)
 {
 	int saved_errno, result;
 	void *optr;
@@ -57,16 +62,21 @@ reallocarr(void *ptr, size_t num, size_t
 
 	saved_errno = errno;
 	memcpy(optr, ptr, sizeof(ptr));
-	if (num == 0 || size == 0) {
+	if (number == 0 || size == 0) {
 		free(optr);
 		nptr = NULL;
 		memcpy(ptr, nptr, sizeof(ptr));
 		errno = saved_errno;
 		return 0;
 	}
-	if ((num = 65535 || size = 65535)  num  SIZE_MAX / size)
+
+	if ((number = SQRT_SIZE_MAX || size = SQRT_SIZE_MAX) 
+	number  SIZE_MAX / size) {
+		errno = saved_errno;
 		return EOVERFLOW;
-	nptr = realloc(optr, num * size);
+	}
+
+	nptr = realloc(optr, number * size);
 	if (nptr == NULL) {
 		result = errno;
 	} else {
@@ -76,3 +86,4 @@ reallocarr(void *ptr, size_t num, size_t
 	errno = saved_errno;
 	return result;
 }
+#endif



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

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 16:50:12 UTC 2015

Modified Files:
src/sys/arch/hppa/stand/xxboot: readufs_lfs.c

Log Message:
fix build.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/xxboot/readufs_lfs.c

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

Modified files:

Index: src/sys/arch/hppa/stand/xxboot/readufs_lfs.c
diff -u src/sys/arch/hppa/stand/xxboot/readufs_lfs.c:1.1 src/sys/arch/hppa/stand/xxboot/readufs_lfs.c:1.2
--- src/sys/arch/hppa/stand/xxboot/readufs_lfs.c:1.1	Mon Feb 24 02:23:43 2014
+++ src/sys/arch/hppa/stand/xxboot/readufs_lfs.c	Tue Jul 28 12:50:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: readufs_lfs.c,v 1.1 2014/02/24 07:23:43 skrll Exp $	*/
+/*	$NetBSD: readufs_lfs.c,v 1.2 2015/07/28 16:50:12 christos Exp $	*/
 /*	from Id: readufs_lfs.c,v 1.8 2003/12/16 13:54:11 itohy Exp	*/
 
 /*
@@ -104,7 +104,7 @@ try_lfs(void)
 
 		if (sblk2.dlfs_magic == LFS_MAGIC) {
 			if (fsi_lfs.version == 1) {
-if (sblk.dlfs_otstamp  sblk2.dlfs_otstamp)
+if (sblk.dlfs_inopf  sblk2.dlfs_inopf)
 	s = sblk2;
 			} else {
 if (sblk.dlfs_serial  sblk2.dlfs_serial)



CVS commit: src/usr.bin/xlint/lint1

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 17:56:56 UTC 2015

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
handle c99 nested struct initialization { .data.foo[0] = 1 }


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/usr.bin/xlint/lint1/cgram.y

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/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.70 src/usr.bin/xlint/lint1/cgram.y:1.71
--- src/usr.bin/xlint/lint1/cgram.y:1.70	Wed Jul  1 11:34:30 2015
+++ src/usr.bin/xlint/lint1/cgram.y	Tue Jul 28 13:56:56 2015
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.70 2015/07/01 15:34:30 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.71 2015/07/28 17:56:56 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(lint)
-__RCSID($NetBSD: cgram.y,v 1.70 2015/07/01 15:34:30 christos Exp $);
+__RCSID($NetBSD: cgram.y,v 1.71 2015/07/28 17:56:56 christos Exp $);
 #endif
 
 #include stdlib.h
@@ -1241,16 +1241,25 @@ range:
 	  }
 	;
 
-init_by_name:
-	  T_LBRACK range T_RBRACK T_ASSIGN {
+init_field:
+	  T_LBRACK range T_RBRACK {
 		if (!Sflag)
 			warning(321);
 	  }
-	| point identifier T_ASSIGN {
+	| point identifier {
 		if (!Sflag)
 			warning(313);
 		memberpush($2);
 	  }
+	;
+
+init_field_list:
+	  init_field
+	| init_field_list init_field
+	;
+
+init_by_name:
+	  init_field_list T_ASSIGN
 	| identifier T_COLON {
 		gnuism(315);
 		memberpush($1);



CVS commit: src/usr.bin/xlint/lint1

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 17:55:13 UTC 2015

Modified Files:
src/usr.bin/xlint/lint1: init.c

Log Message:
fix member list deallocation; remove #if 0'ed code.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/xlint/lint1/init.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/xlint/lint1/init.c
diff -u src/usr.bin/xlint/lint1/init.c:1.26 src/usr.bin/xlint/lint1/init.c:1.27
--- src/usr.bin/xlint/lint1/init.c:1.26	Thu Nov 20 15:49:06 2014
+++ src/usr.bin/xlint/lint1/init.c	Tue Jul 28 13:55:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: init.c,v 1.26 2014/11/20 20:49:06 christos Exp $	*/
+/*	$NetBSD: init.c,v 1.27 2015/07/28 17:55:13 christos Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(lint)
-__RCSID($NetBSD: init.c,v 1.26 2014/11/20 20:49:06 christos Exp $);
+__RCSID($NetBSD: init.c,v 1.27 2015/07/28 17:55:13 christos Exp $);
 #endif
 
 #include stdlib.h
@@ -89,7 +89,7 @@ memberpush(sb)
 {
 	namlist_t *nam = xcalloc(1, sizeof (namlist_t)); 
 	nam-n_name = sb-sb_name;
-	DPRINTF((%s: %s\n, __func__, nam-n_name));
+	DPRINTF((%s: %s %p\n, __func__, nam-n_name, nam));
 	if (namedmem == NULL) {
 		nam-n_prev = nam-n_next = nam;
 		namedmem = nam;
@@ -99,28 +99,22 @@ memberpush(sb)
 		nam-n_next = namedmem;
 		namedmem-n_prev = nam;
 	}
-#if 0
-	nam-n_next = namedmem;
-	namedmem = nam;
-#endif
 }
 
 static void
-memberpop()
+memberpop(void)
 {
-	DPRINTF((%s: %s\n, __func__, namedmem-n_name));
+	DPRINTF((%s: %s %p\n, __func__, namedmem-n_name, namedmem));
 	if (namedmem-n_next == namedmem) {
 		free(namedmem);
 		namedmem = NULL;
 	} else {
 		namlist_t *nam = namedmem;
 		namedmem = namedmem-n_next;
+		namedmem-n_next = nam-n_next;
+		namedmem-n_prev = nam-n_prev;
 		free(nam);
 	}
-#if 0
-	namedmem = namedmem-n_next;
-	free(nam);
-#endif
 }
 
 



CVS commit: src/tests/usr.bin/xlint/lint1

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 18:05:19 UTC 2015

Modified Files:
src/tests/usr.bin/xlint/lint1: Makefile
Added Files:
src/tests/usr.bin/xlint/lint1: d_c99_union_init4.c

Log Message:
new c99 init test found by xorg's Iconify.c


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_c99_union_init4.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/Makefile
diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.8 src/tests/usr.bin/xlint/lint1/Makefile:1.9
--- src/tests/usr.bin/xlint/lint1/Makefile:1.8	Wed Jul  1 11:36:44 2015
+++ src/tests/usr.bin/xlint/lint1/Makefile	Tue Jul 28 14:05:19 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2015/07/01 15:36:44 christos Exp $
+# $NetBSD: Makefile,v 1.9 2015/07/28 18:05:19 christos Exp $
 
 NOMAN=		# defined
 
@@ -25,6 +25,7 @@ FILES+=		d_c99_nested_struct.c
 FILES+=		d_c99_union_init1.c
 FILES+=		d_c99_union_init2.c
 FILES+=		d_c99_union_init3.c
+FILES+=		d_c99_union_init4.c
 FILES+=		d_c9x_array_init.c
 FILES+=		d_c9x_recursive_init.c
 FILES+=		d_cast_fun_array_param.c

Added files:

Index: src/tests/usr.bin/xlint/lint1/d_c99_union_init4.c
diff -u /dev/null src/tests/usr.bin/xlint/lint1/d_c99_union_init4.c:1.1
--- /dev/null	Tue Jul 28 14:05:19 2015
+++ src/tests/usr.bin/xlint/lint1/d_c99_union_init4.c	Tue Jul 28 14:05:19 2015
@@ -0,0 +1,15 @@
+/* test .data.l[x] */
+typedef struct {
+int type;
+union {
+char b[20];
+short s[10];
+long l[5];
+	} data;
+} foo;
+
+
+foo bar = {
+.type = 3,
+.data.l[0] = 4
+};



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

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 18:08:37 UTC 2015

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
new test


To generate a diff of this commit:
cvs rdiff -u -r1.632 -r1.633 src/distrib/sets/lists/tests/mi

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.632 src/distrib/sets/lists/tests/mi:1.633
--- src/distrib/sets/lists/tests/mi:1.632	Wed Jul  1 11:37:35 2015
+++ src/distrib/sets/lists/tests/mi	Tue Jul 28 14:08:37 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.632 2015/07/01 15:37:35 christos Exp $
+# $NetBSD: mi,v 1.633 2015/07/28 18:08:37 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3748,6 +3748,7 @@
 ./usr/tests/usr.bin/xlint/lint1/d_c99_union_init1.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_union_init2.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_union_init3.c		tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/d_c99_union_init4.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c9x_array_init.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c9x_recursive_init.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c	tests-usr.bin-tests	compattestfile,atf



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

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 18:55:16 UTC 2015

Modified Files:
src/external/bsd/bind/dist: CHANGES README srcid version
src/external/bsd/bind/dist/doc/arm: Bv9ARM.ch04.html Bv9ARM.ch06.html
Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html Bv9ARM.html
Bv9ARM.pdf man.arpaname.html man.ddns-confgen.html man.delv.html
man.dig.html man.dnssec-checkds.html man.dnssec-coverage.html
man.dnssec-dsfromkey.html man.dnssec-importkey.html
man.dnssec-keyfromlabel.html man.dnssec-keygen.html
man.dnssec-revoke.html man.dnssec-settime.html
man.dnssec-signzone.html man.dnssec-verify.html man.genrandom.html
man.host.html man.isc-hmac-fixup.html man.named-checkconf.html
man.named-checkzone.html man.named-journalprint.html
man.named-rrchecker.html man.named.html man.nsec3hash.html
man.nsupdate.html man.rndc-confgen.html man.rndc.conf.html
man.rndc.html
src/external/bsd/bind/dist/lib/dns: api tkey.c

Log Message:
merge conflicts for bind-9.10.2-P3 to address CVE-2015-5477.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/bind/dist/CHANGES
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/bind/dist/README
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/bind/dist/srcid
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/bind/dist/version
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch04.html \
src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch06.html \
src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch07.html \
src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch08.html \
src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch09.html \
src/external/bsd/bind/dist/doc/arm/Bv9ARM.html \
src/external/bsd/bind/dist/doc/arm/man.arpaname.html \
src/external/bsd/bind/dist/doc/arm/man.ddns-confgen.html \
src/external/bsd/bind/dist/doc/arm/man.delv.html \
src/external/bsd/bind/dist/doc/arm/man.dig.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-checkds.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-coverage.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-dsfromkey.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-importkey.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-keyfromlabel.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-keygen.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-revoke.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-settime.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-signzone.html \
src/external/bsd/bind/dist/doc/arm/man.dnssec-verify.html \
src/external/bsd/bind/dist/doc/arm/man.genrandom.html \
src/external/bsd/bind/dist/doc/arm/man.host.html \
src/external/bsd/bind/dist/doc/arm/man.isc-hmac-fixup.html \
src/external/bsd/bind/dist/doc/arm/man.named-checkconf.html \
src/external/bsd/bind/dist/doc/arm/man.named-checkzone.html \
src/external/bsd/bind/dist/doc/arm/man.named-journalprint.html \
src/external/bsd/bind/dist/doc/arm/man.named-rrchecker.html \
src/external/bsd/bind/dist/doc/arm/man.named.html \
src/external/bsd/bind/dist/doc/arm/man.nsec3hash.html \
src/external/bsd/bind/dist/doc/arm/man.nsupdate.html \
src/external/bsd/bind/dist/doc/arm/man.rndc-confgen.html \
src/external/bsd/bind/dist/doc/arm/man.rndc.conf.html \
src/external/bsd/bind/dist/doc/arm/man.rndc.html
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/bind/dist/doc/arm/Bv9ARM.pdf
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/bind/dist/lib/dns/api
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/bind/dist/lib/dns/tkey.c

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

diffs are larger than 1MB and have been omitted


CVS commit: src/doc

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 18:58:08 UTC 2015

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new bind


To generate a diff of this commit:
cvs rdiff -u -r1.1238 -r1.1239 src/doc/3RDPARTY
cvs rdiff -u -r1.2086 -r1.2087 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1238 src/doc/3RDPARTY:1.1239
--- src/doc/3RDPARTY:1.1238	Sun Jul 26 15:31:19 2015
+++ src/doc/3RDPARTY	Tue Jul 28 14:58:08 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1238 2015/07/26 19:31:19 kamil Exp $
+#	$NetBSD: 3RDPARTY,v 1.1239 2015/07/28 18:58:08 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -113,8 +113,8 @@ Notes:
 bc includes dc, both of which are in the NetBSD tree.
 
 Package:	bind [named and utils]
-Version:	9.10.2-P2
-Current Vers:	9.10.2-P2
+Version:	9.10.2-P3
+Current Vers:	9.10.2-P3
 Maintainer:	Paul Vixie vi...@vix.com
 Archive Site:	ftp://ftp.isc.org/isc/bind9/
 Home Page:	http://www.isc.org/software/bind/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2086 src/doc/CHANGES:1.2087
--- src/doc/CHANGES:1.2086	Wed Jul 15 10:43:01 2015
+++ src/doc/CHANGES	Tue Jul 28 14:58:08 2015
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2086 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2087 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -172,3 +172,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	iostat(8): Support fnmatch(3) patterns for disknames.  [mrg 20150709]
 	openssl: Import openssl 1.0.1p [christos 20150709]
 	ntp: Import ntp 4.2.8p3. [christos 20150710]
+	bind: Import version 9.10.2-P3. [christos 20150728]



CVS commit: src/usr.bin/netstat

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 19:46:42 UTC 2015

Modified Files:
src/usr.bin/netstat: mbuf.c

Log Message:
revert previous, will fix differently.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/netstat/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/usr.bin/netstat/mbuf.c
diff -u src/usr.bin/netstat/mbuf.c:1.32 src/usr.bin/netstat/mbuf.c:1.33
--- src/usr.bin/netstat/mbuf.c:1.32	Tue Jul 28 15:32:07 2015
+++ src/usr.bin/netstat/mbuf.c	Tue Jul 28 15:46:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbuf.c,v 1.32 2015/07/28 19:32:07 christos Exp $	*/
+/*	$NetBSD: mbuf.c,v 1.33 2015/07/28 19:46:42 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,12 +34,11 @@
 #if 0
 static char sccsid[] = from: @(#)mbuf.c	8.1 (Berkeley) 6/6/93;
 #else
-__RCSID($NetBSD: mbuf.c,v 1.32 2015/07/28 19:32:07 christos Exp $);
+__RCSID($NetBSD: mbuf.c,v 1.33 2015/07/28 19:46:42 christos Exp $);
 #endif
 #endif /* not lint */
 
 #define	__POOL_EXPOSE
-#include stdbool.h	// XXX: no sys/stdbool.h
 
 #include sys/param.h
 #include sys/protosw.h



CVS commit: src/sys/kern

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 19:38:48 UTC 2015

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

Log Message:
fix build


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/kern/subr_extent.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_extent.c
diff -u src/sys/kern/subr_extent.c:1.76 src/sys/kern/subr_extent.c:1.77
--- src/sys/kern/subr_extent.c:1.76	Thu Jul 10 17:13:52 2014
+++ src/sys/kern/subr_extent.c	Tue Jul 28 15:38:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_extent.c,v 1.76 2014/07/10 21:13:52 christos Exp $	*/
+/*	$NetBSD: subr_extent.c,v 1.77 2015/07/28 19:38:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1998, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_extent.c,v 1.76 2014/07/10 21:13:52 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_extent.c,v 1.77 2015/07/28 19:38:48 christos Exp $);
 
 #ifdef _KERNEL
 #include opt_lockdebug.h
@@ -50,6 +50,8 @@ __KERNEL_RCSID(0, $NetBSD: subr_extent.
 #include uvm/uvm_extern.h
 
 #elif defined(_EXTENT_TESTING)
+
+#include stdbool.h	// XXX: no sys/stdbool.h
 /*
  * user-land definitions, so it can fit into a testing harness.
  */



CVS commit: src/usr.bin/netstat

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 19:32:07 UTC 2015

Modified Files:
src/usr.bin/netstat: mbuf.c

Log Message:
fix build (stdbool lossage)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/netstat/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/usr.bin/netstat/mbuf.c
diff -u src/usr.bin/netstat/mbuf.c:1.31 src/usr.bin/netstat/mbuf.c:1.32
--- src/usr.bin/netstat/mbuf.c:1.31	Tue Mar 20 16:34:58 2012
+++ src/usr.bin/netstat/mbuf.c	Tue Jul 28 15:32:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbuf.c,v 1.31 2012/03/20 20:34:58 matt Exp $	*/
+/*	$NetBSD: mbuf.c,v 1.32 2015/07/28 19:32:07 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,11 +34,12 @@
 #if 0
 static char sccsid[] = from: @(#)mbuf.c	8.1 (Berkeley) 6/6/93;
 #else
-__RCSID($NetBSD: mbuf.c,v 1.31 2012/03/20 20:34:58 matt Exp $);
+__RCSID($NetBSD: mbuf.c,v 1.32 2015/07/28 19:32:07 christos Exp $);
 #endif
 #endif /* not lint */
 
 #define	__POOL_EXPOSE
+#include stdbool.h	// XXX: no sys/stdbool.h
 
 #include sys/param.h
 #include sys/protosw.h
@@ -53,7 +54,6 @@ __RCSID($NetBSD: mbuf.c,v 1.31 2012/03/
 #include limits.h
 #include errno.h
 #include err.h
-#include stdbool.h
 #include netstat.h
 #include prog_ops.h
 



CVS commit: src/sys/kern

2015-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 28 19:48:12 UTC 2015

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

Log Message:
revert previous, will fix differently.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/kern/subr_extent.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_extent.c
diff -u src/sys/kern/subr_extent.c:1.77 src/sys/kern/subr_extent.c:1.78
--- src/sys/kern/subr_extent.c:1.77	Tue Jul 28 15:38:48 2015
+++ src/sys/kern/subr_extent.c	Tue Jul 28 15:48:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_extent.c,v 1.77 2015/07/28 19:38:48 christos Exp $	*/
+/*	$NetBSD: subr_extent.c,v 1.78 2015/07/28 19:48:12 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1998, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_extent.c,v 1.77 2015/07/28 19:38:48 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_extent.c,v 1.78 2015/07/28 19:48:12 christos Exp $);
 
 #ifdef _KERNEL
 #include opt_lockdebug.h
@@ -51,7 +51,6 @@ __KERNEL_RCSID(0, $NetBSD: subr_extent.
 
 #elif defined(_EXTENT_TESTING)
 
-#include stdbool.h	// XXX: no sys/stdbool.h
 /*
  * user-land definitions, so it can fit into a testing harness.
  */



CVS commit: src/sys/dev/sdmmc

2015-07-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Jul 28 06:17:53 UTC 2015

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

Log Message:
cosmetic change only.


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

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

Modified files:

Index: src/sys/dev/sdmmc/sdmmc_io.c
diff -u src/sys/dev/sdmmc/sdmmc_io.c:1.7 src/sys/dev/sdmmc/sdmmc_io.c:1.8
--- src/sys/dev/sdmmc/sdmmc_io.c:1.7	Wed Feb  1 22:34:43 2012
+++ src/sys/dev/sdmmc/sdmmc_io.c	Tue Jul 28 06:17:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_io.c,v 1.7 2012/02/01 22:34:43 matt Exp $	*/
+/*	$NetBSD: sdmmc_io.c,v 1.8 2015/07/28 06:17:53 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmc_io.c,v 1.10 2007/09/17 01:33:33 krw Exp $	*/
 
 /*
@@ -20,7 +20,7 @@
 /* Routines for SD I/O cards. */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdmmc_io.c,v 1.7 2012/02/01 22:34:43 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdmmc_io.c,v 1.8 2015/07/28 06:17:53 mlelstv Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_sdmmc.h
@@ -693,12 +693,13 @@ sdmmc_card_intr(device_t dev)
 {
 	struct sdmmc_softc *sc = device_private(dev);
 
-	if (sc-sc_sct-card_enable_intr) {
-		mutex_enter(sc-sc_intr_task_mtx);
-		if (!sdmmc_task_pending(sc-sc_intr_task))
-			sdmmc_add_task(sc, sc-sc_intr_task);
-		mutex_exit(sc-sc_intr_task_mtx);
-	}
+	if (sc-sc_sct-card_enable_intr == NULL)
+		return;
+
+	mutex_enter(sc-sc_intr_task_mtx);
+	if (!sdmmc_task_pending(sc-sc_intr_task))
+		sdmmc_add_task(sc, sc-sc_intr_task);
+	mutex_exit(sc-sc_intr_task_mtx);
 }
 
 void



CVS commit: src/sys/dev/sdmmc

2015-07-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Jul 28 06:19:47 UTC 2015

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

Log Message:
Be more verbose about errors.


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

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

Modified files:

Index: src/sys/dev/sdmmc/sdmmc.c
diff -u src/sys/dev/sdmmc/sdmmc.c:1.26 src/sys/dev/sdmmc/sdmmc.c:1.27
--- src/sys/dev/sdmmc/sdmmc.c:1.26	Thu May 21 23:40:02 2015
+++ src/sys/dev/sdmmc/sdmmc.c	Tue Jul 28 06:19:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc.c,v 1.26 2015/05/21 23:40:02 jmcneill Exp $	*/
+/*	$NetBSD: sdmmc.c,v 1.27 2015/07/28 06:19:47 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $	*/
 
 /*
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdmmc.c,v 1.26 2015/05/21 23:40:02 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdmmc.c,v 1.27 2015/07/28 06:19:47 mlelstv Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_sdmmc.h
@@ -845,8 +845,11 @@ sdmmc_set_relative_addr(struct sdmmc_sof
 
 	/* Don't lock */
 
-	if (ISSET(sc-sc_caps, SMC_CAPS_SPI_MODE))
+	if (ISSET(sc-sc_caps, SMC_CAPS_SPI_MODE)) {
+		aprint_error_dev(sc-sc_dev,
+			sdmmc_set_relative_addr: SMC_CAPS_SPI_MODE set);
 		return EIO;
+	}
 
 	memset(cmd, 0, sizeof(cmd));
 	if (ISSET(sc-sc_flags, SMF_SD_MODE)) {
@@ -875,8 +878,11 @@ sdmmc_select_card(struct sdmmc_softc *sc
 
 	/* Don't lock */
 
-	if (ISSET(sc-sc_caps, SMC_CAPS_SPI_MODE))
+	if (ISSET(sc-sc_caps, SMC_CAPS_SPI_MODE)) {
+		aprint_error_dev(sc-sc_dev,
+			sdmmc_select_card: SMC_CAPS_SPI_MODE set);
 		return EIO;
+	}
 
 	if (sc-sc_card == sf
 	 || (sf  sc-sc_card  sc-sc_card-rca == sf-rca)) {



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

2015-07-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 28 21:24:43 UTC 2015

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

Log Message:
Reduce latency a bit. From nat@


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/broadcom/bcm2835_vcaudio.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_vcaudio.c
diff -u src/sys/arch/arm/broadcom/bcm2835_vcaudio.c:1.9 src/sys/arch/arm/broadcom/bcm2835_vcaudio.c:1.10
--- src/sys/arch/arm/broadcom/bcm2835_vcaudio.c:1.9	Sun Mar 15 18:31:29 2015
+++ src/sys/arch/arm/broadcom/bcm2835_vcaudio.c	Tue Jul 28 21:24:43 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_vcaudio.c,v 1.9 2015/03/15 18:31:29 jmcneill Exp $ */
+/* $NetBSD: bcm2835_vcaudio.c,v 1.10 2015/07/28 21:24:43 skrll Exp $ */
 
 /*-
  * Copyright (c) 2013 Jared D. McNeill jmcne...@invisible.ca
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bcm2835_vcaudio.c,v 1.9 2015/03/15 18:31:29 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: bcm2835_vcaudio.c,v 1.10 2015/07/28 21:24:43 skrll Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -81,20 +81,22 @@ enum vcaudio_dest {
 	VCAUDIO_DEST_HDMI = 2,
 };
 
-
 /*
- * Standard message size is 4000 bytes and VCHIQ can accept 16 messages.
+ * Maximum message size is 4000 bytes and VCHIQ can accept 16 messages.
  *
  * 4000 bytes of 16bit 48kHz stereo is approximately 21ms.
  *
  * We get complete messages at ~10ms intervals.
  *
- * Setting blocksize to 2 x 4000 means that we send approx 42ms of audio. We
- * prefill by two blocks before starting audio meaning we have 83ms of latency.
+ * Setting blocksize to 4 x 1600 means that we send approx 33ms of audio. We
+ * prefill by two blocks before starting audio meaning we have 50ms of latency.
+ * 
+ * Six messages of 1600 bytes was chosen working back from a desired latency of
+ * 50ms.
  */
 
-#define VCAUDIO_MSGSIZE		4000
-#define VCAUDIO_NUMMSGS		2
+#define VCAUDIO_MSGSIZE		1600
+#define VCAUDIO_NUMMSGS		4
 #define VCAUDIO_BLOCKSIZE	(VCAUDIO_MSGSIZE * VCAUDIO_NUMMSGS)
 #define VCAUDIO_BUFFERSIZE	128000
 #define VCAUDIO_PREFILLCOUNT	2