Re: CVS commit: src/gnu/usr.bin/texinfo/makeinfo

2014-03-25 Thread Matthias Scheler
On Mon, Mar 24, 2014 at 11:20:04PM +, Christos Zoulas wrote:
 In article 20140324230302.1ad1...@cvs.netbsd.org,
 Matthias Scheler source-changes-d@NetBSD.org wrote:
 Module Name: src
 Committed By:tron
 Date:Mon Mar 24 23:03:02 UTC 2014
 
 Modified Files:
  src/gnu/usr.bin/texinfo/makeinfo: Makefile
 
 Log Message:
 Don't compile with fortification. It breaks makeinfo(1) for certain
 input files (e.g. cl.texi shipped with Emacs 23.4) if it is compiled
 with GCC 4.8.3 and USE_SSP set to yes.
 
 How does it fail? Segv? Syntax error?

It complains about a lot missing links between nodes. All nodes need
to have up, next and prev link. And it has code to automatically
populate those. But for some reason the string it is coping is empty
and it therefore considers the links missing. I've tried to find
out what and where goes wrong but failed to do so.

Kind regards

-- 
Matthias Scheler https://zhadum.org.uk/


Re: CVS commit: src/gnu/usr.bin/texinfo/makeinfo

2014-03-25 Thread Christos Zoulas
On Mar 25,  7:47am, t...@netbsd.org (Matthias Scheler) wrote:
-- Subject: Re: CVS commit: src/gnu/usr.bin/texinfo/makeinfo

| On Mon, Mar 24, 2014 at 11:20:04PM +, Christos Zoulas wrote:
|  In article 20140324230302.1ad1...@cvs.netbsd.org,
|  Matthias Scheler source-changes-d@NetBSD.org wrote:
|  Module Name:   src
|  Committed By:  tron
|  Date:  Mon Mar 24 23:03:02 UTC 2014
|  
|  Modified Files:
| src/gnu/usr.bin/texinfo/makeinfo: Makefile
|  
|  Log Message:
|  Don't compile with fortification. It breaks makeinfo(1) for certain
|  input files (e.g. cl.texi shipped with Emacs 23.4) if it is compiled
|  with GCC 4.8.3 and USE_SSP set to yes.
|  
|  How does it fail? Segv? Syntax error?
| 
| It complains about a lot missing links between nodes. All nodes need
| to have up, next and prev link. And it has code to automatically
| populate those. But for some reason the string it is coping is empty
| and it therefore considers the links missing. I've tried to find
| out what and where goes wrong but failed to do so.

Thanks! Perhaps it is a real bug...

christos


Re: CVS commit: src/gnu/usr.bin/texinfo/makeinfo

2014-03-25 Thread Matthias Scheler
On Tue, Mar 25, 2014 at 11:56:56AM -0400, Christos Zoulas wrote:
 |  How does it fail? Segv? Syntax error?
 | 
 | It complains about a lot missing links between nodes. All nodes need
 | to have up, next and prev link. And it has code to automatically
 | populate those. But for some reason the string it is coping is empty
 | and it therefore considers the links missing. I've tried to find
 | out what and where goes wrong but failed to do so.
 
 Thanks! Perhaps it is a real bug...

I guess it is somewhere in the middle. There might be some questionable
code which breaks because of the limit enforcing of fortification.
But I couldn't find it yesterday and I really wanted to have emacs
on my NetBSD-current machine.

Kind regards

-- 
Matthias Scheler https://zhadum.org.uk/


Re: CVS commit: src/usr.sbin/rtsold

2014-03-25 Thread David Laight
On Tue, Mar 25, 2014 at 05:17:44PM +, Joerg Sonnenberger wrote:
 Module Name:  src
 Committed By: joerg
 Date: Tue Mar 25 17:17:44 UTC 2014
 
 Modified Files:
   src/usr.sbin/rtsold: rtsold.c
 
 Log Message:
 Don't cast to time_t just to implicitly cast to uint32_t next.

Gah - I hadn't spotted that xtos had added a cast as well.
There is another cast that ought to be pointless two lines later.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/bin/ed

2014-03-25 Thread David Holland
On Tue, Mar 25, 2014 at 05:23:37PM +, Joerg Sonnenberger wrote:
  Modified Files:
   src/bin/ed: ed.h
  
  Log Message:
  Use __printflike.

Oops, sorry about that.

-- 
David A. Holland
dholl...@netbsd.org


CVS commit: src

2014-03-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Mar 25 09:52:56 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/man: mi
src/etc: Makefile.params
src/external/cddl: Makefile
src/external/cddl/osnet/lib: Makefile
src/external/cddl/osnet/usr.bin: Makefile
src/share/man/man5: mk.conf.5
src/share/mk: bsd.README bsd.own.mk bsd.prog.mk
src/tools: Makefile

Log Message:
Add MKCTF

This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).

This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.


To generate a diff of this commit:
cvs rdiff -u -r1.1886 -r1.1887 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.1465 -r1.1466 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.10 -r1.11 src/etc/Makefile.params
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/lib/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/usr.bin/Makefile
cvs rdiff -u -r1.67 -r1.68 src/share/man/man5/mk.conf.5
cvs rdiff -u -r1.328 -r1.329 src/share/mk/bsd.README
cvs rdiff -u -r1.791 -r1.792 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.289 -r1.290 src/share/mk/bsd.prog.mk
cvs rdiff -u -r1.171 -r1.172 src/tools/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1886 src/distrib/sets/lists/comp/mi:1.1887
--- src/distrib/sets/lists/comp/mi:1.1886	Mon Mar 24 13:42:40 2014
+++ src/distrib/sets/lists/comp/mi	Tue Mar 25 09:52:55 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1886 2014/03/24 13:42:40 hannken Exp $
+#	$NetBSD: mi,v 1.1887 2014/03/25 09:52:55 ozaki-r Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -20,9 +20,9 @@
 ./usr/bin/configcomp-util-bin
 ./usr/bin/crunchgencomp-c-bin
 ./usr/bin/crunchidecomp-c-bin
-./usr/bin/ctfconvertcomp-util-bin		dtrace
-./usr/bin/ctfdumpcomp-util-bin		dtrace
-./usr/bin/ctfmergecomp-util-bin		dtrace
+./usr/bin/ctfconvertcomp-util-bin		ctf
+./usr/bin/ctfdumpcomp-util-bin		ctf
+./usr/bin/ctfmergecomp-util-bin		ctf
 ./usr/bin/cvs	comp-cvs-bin		cvs
 ./usr/bin/cvsbugcomp-cvs-bin		cvs
 ./usr/bin/elfeditcomp-util-bin		binutils

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1465 src/distrib/sets/lists/man/mi:1.1466
--- src/distrib/sets/lists/man/mi:1.1465	Wed Mar 19 15:26:41 2014
+++ src/distrib/sets/lists/man/mi	Tue Mar 25 09:52:55 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1465 2014/03/19 15:26:41 nonaka Exp $
+# $NetBSD: mi,v 1.1466 2014/03/25 09:52:55 ozaki-r Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -125,9 +125,9 @@
 ./usr/share/man/cat1/csh.0			man-util-catman		.cat
 ./usr/share/man/cat1/csplit.0			man-util-catman		.cat
 ./usr/share/man/cat1/ctags.0			man-c-catman		.cat
-./usr/share/man/cat1/ctfconvert.0		man-util-catman		.cat,dtrace
-./usr/share/man/cat1/ctfdump.0			man-util-catman		.cat,dtrace
-./usr/share/man/cat1/ctfmerge.0			man-util-catman		.cat,dtrace
+./usr/share/man/cat1/ctfconvert.0		man-util-catman		.cat,ctf
+./usr/share/man/cat1/ctfdump.0			man-util-catman		.cat,ctf
+./usr/share/man/cat1/ctfmerge.0			man-util-catman		.cat,ctf
 ./usr/share/man/cat1/cu.0			man-util-catman		.cat
 ./usr/share/man/cat1/cut.0			man-util-catman		.cat
 ./usr/share/man/cat1/daicctl.0			man-sysutil-catman	.cat
@@ -3240,9 +3240,9 @@
 ./usr/share/man/html1/csh.html			man-util-htmlman	html
 ./usr/share/man/html1/csplit.html		man-util-htmlman	html
 ./usr/share/man/html1/ctags.html		man-c-htmlman		html
-./usr/share/man/html1/ctfconvert.html		man-util-htmlman	html,dtrace
-./usr/share/man/html1/ctfdump.html		man-util-htmlman	html,dtrace
-./usr/share/man/html1/ctfmerge.html		man-util-htmlman	html,dtrace
+./usr/share/man/html1/ctfconvert.html		man-util-htmlman	html,ctf
+./usr/share/man/html1/ctfdump.html		man-util-htmlman	html,ctf
+./usr/share/man/html1/ctfmerge.html		man-util-htmlman	html,ctf
 ./usr/share/man/html1/cu.html			man-util-htmlman	html
 ./usr/share/man/html1/cut.html			man-util-htmlman	html
 ./usr/share/man/html1/daicctl.html		man-sysutil-htmlman	html
@@ -5963,9 +5963,9 @@
 ./usr/share/man/man1/csh.1			man-util-man		.man
 ./usr/share/man/man1/csplit.1			man-util-man		.man
 ./usr/share/man/man1/ctags.1			man-c-man		.man
-./usr/share/man/man1/ctfconvert.1		man-util-man		.man,dtrace
-./usr/share/man/man1/ctfdump.1			man-util-man		.man,dtrace
-./usr/share/man/man1/ctfmerge.1			man-util-man		.man,dtrace
+./usr/share/man/man1/ctfconvert.1		man-util-man		.man,ctf
+./usr/share/man/man1/ctfdump.1			man-util-man		.man,ctf
+./usr/share/man/man1/ctfmerge.1			man-util-man		.man,ctf

CVS commit: src/external/gpl3/gcc/dist/libgcc

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 10:03:51 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/libgcc: unwind-sjlj.c

Log Message:
Cast to _Unwind_Ptr here as well.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/libgcc/unwind-sjlj.c

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

Modified files:

Index: src/external/gpl3/gcc/dist/libgcc/unwind-sjlj.c
diff -u src/external/gpl3/gcc/dist/libgcc/unwind-sjlj.c:1.2 src/external/gpl3/gcc/dist/libgcc/unwind-sjlj.c:1.3
--- src/external/gpl3/gcc/dist/libgcc/unwind-sjlj.c:1.2	Mon Mar 24 21:26:01 2014
+++ src/external/gpl3/gcc/dist/libgcc/unwind-sjlj.c	Tue Mar 25 10:03:51 2014
@@ -234,7 +234,7 @@ _Unwind_SetIP (struct _Unwind_Context *c
 _Unwind_Ptr
 _Unwind_GetLanguageSpecificData (struct _Unwind_Context *context)
 {
-  return context-fc-lsda;
+  return (_Unwind_Ptr) context-fc-lsda;
 }
 
 _Unwind_Ptr



CVS commit: src/share/man/man5

2014-03-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Mar 25 10:23:26 UTC 2014

Modified Files:
src/share/man/man5: mk.conf.5

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/share/man/man5/mk.conf.5

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/man5/mk.conf.5
diff -u src/share/man/man5/mk.conf.5:1.68 src/share/man/man5/mk.conf.5:1.69
--- src/share/man/man5/mk.conf.5:1.68	Tue Mar 25 09:52:55 2014
+++ src/share/man/man5/mk.conf.5	Tue Mar 25 10:23:26 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: mk.conf.5,v 1.68 2014/03/25 09:52:55 ozaki-r Exp $
+.\	$NetBSD: mk.conf.5,v 1.69 2014/03/25 10:23:26 wiz Exp $
 .\
 .\  Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
 .\  All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd June 2, 2013
+.Dd March 25, 2014
 .Dt MK.CONF 5
 .Os
 .\ turn off hyphenation



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

2014-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar 25 10:44:12 UTC 2014

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

Log Message:
Typo


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/evbmips/alchemy/machdep.c

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

Modified files:

Index: src/sys/arch/evbmips/alchemy/machdep.c
diff -u src/sys/arch/evbmips/alchemy/machdep.c:1.53 src/sys/arch/evbmips/alchemy/machdep.c:1.54
--- src/sys/arch/evbmips/alchemy/machdep.c:1.53	Mon Mar 24 20:06:31 2014
+++ src/sys/arch/evbmips/alchemy/machdep.c	Tue Mar 25 10:44:12 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.53 2014/03/24 20:06:31 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.54 2014/03/25 10:44:12 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.53 2014/03/24 20:06:31 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.54 2014/03/25 10:44:12 martin Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -356,7 +356,7 @@ cpu_startup(void)
 	 * Good {morning,afternoon,evening,night}.
 	 */
 	printf(%s%s, copyright, version);
-	printf(%s\n, gpu_getmodel());
+	printf(%s\n, cpu_getmodel());
 	format_bytes(pbuf, sizeof(pbuf), ctob(physmem));
 	printf(total memory = %s\n, pbuf);
 



CVS commit: src/sys/kern

2014-03-25 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Mar 25 12:50:53 UTC 2014

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

Log Message:
snprintf - vsnprintf in cpu_setmodel()
now this can actually work
hi christos


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/kern/kern_cpu.c

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

Modified files:

Index: src/sys/kern/kern_cpu.c
diff -u src/sys/kern/kern_cpu.c:1.64 src/sys/kern/kern_cpu.c:1.65
--- src/sys/kern/kern_cpu.c:1.64	Mon Mar 24 20:07:41 2014
+++ src/sys/kern/kern_cpu.c	Tue Mar 25 12:50:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_cpu.c,v 1.64 2014/03/24 20:07:41 christos Exp $	*/
+/*	$NetBSD: kern_cpu.c,v 1.65 2014/03/25 12:50:53 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010, 2012 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.64 2014/03/24 20:07:41 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.65 2014/03/25 12:50:53 macallan Exp $);
 
 #include opt_cpu_ucode.h
 #include opt_compat_netbsd.h
@@ -485,7 +485,7 @@ cpu_setmodel(const char *fmt, ...)
 	va_list ap;
 
 	va_start(ap, fmt);
-	len = snprintf(cpu_model, sizeof(cpu_model), fmt, ap);
+	len = vsnprintf(cpu_model, sizeof(cpu_model), fmt, ap);
 	va_end(ap);
 	return len;
 }



CVS commit: src/sys/arch/hpcmips/hpcmips

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 13:38:25 UTC 2014

Modified Files:
src/sys/arch/hpcmips/hpcmips: machdep.c

Log Message:
add missing include


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/hpcmips/hpcmips/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/hpcmips/hpcmips/machdep.c
diff -u src/sys/arch/hpcmips/hpcmips/machdep.c:1.117 src/sys/arch/hpcmips/hpcmips/machdep.c:1.118
--- src/sys/arch/hpcmips/hpcmips/machdep.c:1.117	Mon Mar 24 16:06:32 2014
+++ src/sys/arch/hpcmips/hpcmips/machdep.c	Tue Mar 25 09:38:25 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.117 2014/03/24 20:06:32 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.118 2014/03/25 13:38:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -69,7 +69,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.117 2014/03/24 20:06:32 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.118 2014/03/25 13:38:25 christos Exp $);
 
 #include opt_vr41xx.h
 #include opt_tx39xx.h
@@ -97,6 +97,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include sys/ksyms.h
 #include sys/device.h
 #include sys/lwp.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 



CVS commit: src/external/lgpl3

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 15:28:15 UTC 2014

Modified Files:
src/external/lgpl3/gmp/dist: longlong.h
src/external/lgpl3/mpfr/dist/src: mpfr-longlong.h

Log Message:
Use C version of umul_ppmm for Clang on MIPS.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/lgpl3/gmp/dist/longlong.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h

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

Modified files:

Index: src/external/lgpl3/gmp/dist/longlong.h
diff -u src/external/lgpl3/gmp/dist/longlong.h:1.1.1.2 src/external/lgpl3/gmp/dist/longlong.h:1.2
--- src/external/lgpl3/gmp/dist/longlong.h:1.1.1.2	Fri Nov 29 07:49:47 2013
+++ src/external/lgpl3/gmp/dist/longlong.h	Tue Mar 25 15:28:15 2014
@@ -1209,7 +1209,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype 
 #endif /* __m88000__ */
 
 #if defined (__mips)  W_TYPE_SIZE == 32
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {	\
 UDItype __ll = (UDItype)(u) * (v);	\
@@ -1231,7 +1231,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype 
 #endif /* __mips */
 
 #if (defined (__mips)  __mips = 3)  W_TYPE_SIZE == 64
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {	\
 typedef unsigned int __ll_UTItype __attribute__((mode(TI)));	\
@@ -1347,7 +1347,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype 
   __asm__ (cntlzw %0,%1 : =r (count) : r (x))
 #define COUNT_LEADING_ZEROS_0 32
 #if HAVE_HOST_CPU_FAMILY_powerpc
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {	\
 UDItype __ll = (UDItype)(u) * (v);	\

Index: src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h
diff -u src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h:1.1.1.1 src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h:1.2
--- src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h:1.1.1.1	Thu Nov 28 12:30:54 2013
+++ src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h	Tue Mar 25 15:28:15 2014
@@ -1022,7 +1022,7 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
 #endif /* __m88000__ */
 
 #if defined (__mips)  W_TYPE_SIZE == 32
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {	\
 UDItype __ll = (UDItype)(u) * (v);	\
@@ -1044,7 +1044,7 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
 #endif /* __mips */
 
 #if (defined (__mips)  __mips = 3)  W_TYPE_SIZE == 64
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {	\
 typedef unsigned int __ll_UTItype __attribute__((mode(TI)));	\
@@ -1160,7 +1160,7 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
   __asm__ ({cntlz|cntlzw} %0,%1 : =r (count) : r (x))
 #define COUNT_LEADING_ZEROS_0 32
 #if HAVE_HOST_CPU_FAMILY_powerpc
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {	\
 UDItype __ll = (UDItype)(u) * (v);	\
@@ -1259,7 +1259,7 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
 #define count_leading_zeros(count, x) \
   __asm__ (cntlzd %0,%1 : =r (count) : r (x))
 #define COUNT_LEADING_ZEROS_0 64
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {	\
 typedef unsigned int __ll_UTItype __attribute__((mode(TI)));	\



CVS commit: src/sys/external/bsd

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 15:33:22 UTC 2014

Modified Files:
src/sys/external/bsd/drm/dist/libdrm: xf86drm.c xf86drmMode.c
src/sys/external/bsd/drm/dist/libdrm/nouveau: nouveau_dma.h
src/sys/external/bsd/drm/dist/tests: dristat.c drmstat.c
src/sys/external/bsd/drm2/dist/drm: drm_debugfs.c drm_pci.c
drm_platform.c drm_proc.c
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_arm.c
vchiq_proc.c

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/libdrm/xf86drm.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/drm/dist/libdrm/xf86drmMode.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_dma.h
cvs rdiff -u -r1.1.1.2 -r1.2 src/sys/external/bsd/drm/dist/tests/dristat.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/drm/dist/tests/drmstat.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/drm2/dist/drm/drm_debugfs.c \
src/sys/external/bsd/drm2/dist/drm/drm_pci.c \
src/sys/external/bsd/drm2/dist/drm/drm_platform.c \
src/sys/external/bsd/drm2/dist/drm/drm_proc.c
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_proc.c

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

Modified files:

Index: src/sys/external/bsd/drm/dist/libdrm/xf86drm.c
diff -u src/sys/external/bsd/drm/dist/libdrm/xf86drm.c:1.2 src/sys/external/bsd/drm/dist/libdrm/xf86drm.c:1.3
--- src/sys/external/bsd/drm/dist/libdrm/xf86drm.c:1.2	Fri Jun 19 21:07:10 2009
+++ src/sys/external/bsd/drm/dist/libdrm/xf86drm.c	Tue Mar 25 11:33:22 2014
@@ -292,7 +292,8 @@ static int drmOpenDevice(long dev, int m
 uid_t   user= DRM_DEV_UID;
 gid_t   group   = DRM_DEV_GID, serv_group;
 
-sprintf(buf, type ? DRM_DEV_NAME : DRM_CONTROL_DEV_NAME, DRM_DIR_NAME, minor);
+snprintf(buf, sizeof(buf), type ? DRM_DEV_NAME : DRM_CONTROL_DEV_NAME,
+	DRM_DIR_NAME, minor);
 drmMsg(drmOpenDevice: node name is %s\n, buf);
 
 if (drm_server_info) {
@@ -399,7 +400,8 @@ static int drmOpenMinor(int minor, int c
 if (create)
 	return drmOpenDevice(makedev(DRM_MAJOR, minor), minor, type);
 
-sprintf(buf, type ? DRM_DEV_NAME : DRM_CONTROL_DEV_NAME, DRM_DIR_NAME, minor);
+snprintf(buf, sizeof(buf), type ? DRM_DEV_NAME : DRM_CONTROL_DEV_NAME,
+	DRM_DIR_NAME, minor);
 if ((fd = open(buf, O_RDWR, 0)) = 0)
 	return fd;
 return -errno;
@@ -553,7 +555,7 @@ static int drmOpenByName(const char *nam
 	char *driver, *pt, *devstring;
 	int  retcode;
 	
-	sprintf(proc_name, /proc/dri/%d/name, i);
+	snprintf(proc_name, sizeof(proc_name), /proc/dri/%d/name, i);
 	if ((fd = open(proc_name, 0, 0)) = 0) {
 	retcode = read(fd, buf, sizeof(buf)-1);
 	close(fd);

Index: src/sys/external/bsd/drm/dist/libdrm/xf86drmMode.c
diff -u src/sys/external/bsd/drm/dist/libdrm/xf86drmMode.c:1.1.1.1 src/sys/external/bsd/drm/dist/libdrm/xf86drmMode.c:1.2
--- src/sys/external/bsd/drm/dist/libdrm/xf86drmMode.c:1.1.1.1	Thu Jun 18 23:22:23 2009
+++ src/sys/external/bsd/drm/dist/libdrm/xf86drmMode.c	Tue Mar 25 11:33:22 2014
@@ -585,7 +585,8 @@ int drmCheckModesettingSupported(const c
 	if (ret != 4)
 		return -EINVAL;
 
-	sprintf(pci_dev_dir, /sys/bus/pci/devices/%04x:%02x:%02x.%d/drm,
+	snprintf(pci_dev_dir, sizeof(pci_dev_dir),
+		/sys/bus/pci/devices/%04x:%02x:%02x.%d/drm,
 		domain, bus, dev, func);
 
 	sysdir = opendir(pci_dev_dir);
@@ -604,7 +605,8 @@ int drmCheckModesettingSupported(const c
 			return 0;
 	}
 
-	sprintf(pci_dev_dir, /sys/bus/pci/devices/%04x:%02x:%02x.%d/,
+	snprintf(pci_dev_dir, sizeof(pci_dev_dir),
+		/sys/bus/pci/devices/%04x:%02x:%02x.%d/,
 		domain, bus, dev, func);
 
 	sysdir = opendir(pci_dev_dir);

Index: src/sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_dma.h
diff -u src/sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_dma.h:1.1.1.1 src/sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_dma.h:1.2
--- src/sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_dma.h:1.1.1.1	Thu Jun 18 23:22:24 2009
+++ src/sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_dma.h	Tue Mar 25 11:33:22 2014
@@ -136,7 +136,7 @@ nouveau_dma_begin(struct nouveau_channel
 		   dma-push_free, faulty);
 		return;
 	}
-	sprintf(faulty,%s:%d,file,line);
+	snprintf(faulty, sizeof(faulty), %s:%d, file, line);
 #endif
 
 	nouveau_dma_space(chan, (size + 1));

Index: src/sys/external/bsd/drm/dist/tests/dristat.c
diff -u src/sys/external/bsd/drm/dist/tests/dristat.c:1.1.1.2 src/sys/external/bsd/drm/dist/tests/dristat.c:1.2
--- src/sys/external/bsd/drm/dist/tests/dristat.c:1.1.1.2	Thu Jun 18 23:22:25 2009
+++ src/sys/external/bsd/drm/dist/tests/dristat.c	Tue Mar 25 11:33:22 2014
@@ -130,7 +130,7 @@ static void 

CVS commit: src/sys/dev/ic

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 15:51:58 UTC 2014

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

Log Message:
fix unused/uninitialized


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/ic/clmpcc.c

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

Modified files:

Index: src/sys/dev/ic/clmpcc.c
diff -u src/sys/dev/ic/clmpcc.c:1.47 src/sys/dev/ic/clmpcc.c:1.48
--- src/sys/dev/ic/clmpcc.c:1.47	Sun Mar 16 01:20:27 2014
+++ src/sys/dev/ic/clmpcc.c	Tue Mar 25 11:51:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: clmpcc.c,v 1.47 2014/03/16 05:20:27 dholland Exp $ */
+/*	$NetBSD: clmpcc.c,v 1.48 2014/03/25 15:51:58 christos Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clmpcc.c,v 1.47 2014/03/16 05:20:27 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: clmpcc.c,v 1.48 2014/03/25 15:51:58 christos Exp $);
 
 #include opt_ddb.h
 
@@ -329,8 +329,8 @@ clmpcc_attach(struct clmpcc_softc *sc)
 static int
 clmpcc_init(struct clmpcc_softc *sc)
 {
-	u_int tcor, tbpr;
-	u_int rcor, rbpr;
+	u_int tcor = 0, tbpr = 0;
+	u_int rcor = 0, rbpr = 0;
 	u_int msvr_rts, msvr_dtr;
 	u_int ccr;
 	int is_console;
@@ -1201,7 +1201,6 @@ clmpcc_txintr(void *arg)
 {
 	struct clmpcc_softc *sc = (struct clmpcc_softc *)arg;
 	struct clmpcc_chan *ch;
-	struct tty *tp;
 	u_char ftc, oftc;
 	u_char tir, teoir;
 	int etcmode = 0;
@@ -1218,7 +1217,6 @@ clmpcc_txintr(void *arg)
 
 	/* Get pointer to interrupting channel's data structure */
 	ch = sc-sc_chans[tir  CLMPCC_TIR_TCN_MASK];
-	tp = ch-ch_tty;
 
 	/* Dummy read of the interrupt status register */
 	(void) clmpcc_rdreg(sc, CLMPCC_REG_TISR);



CVS commit: src/sys/dev/mvme

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 15:52:33 UTC 2014

Modified Files:
src/sys/dev/mvme: if_ie_mvme.c

Log Message:
fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/mvme/if_ie_mvme.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/mvme/if_ie_mvme.c
diff -u src/sys/dev/mvme/if_ie_mvme.c:1.19 src/sys/dev/mvme/if_ie_mvme.c:1.20
--- src/sys/dev/mvme/if_ie_mvme.c:1.19	Sun Jun  5 12:22:00 2011
+++ src/sys/dev/mvme/if_ie_mvme.c	Tue Mar 25 11:52:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ie_mvme.c,v 1.19 2011/06/05 16:22:00 tsutsui Exp $	*/
+/*	$NetBSD: if_ie_mvme.c,v 1.20 2014/03/25 15:52:33 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_ie_mvme.c,v 1.19 2011/06/05 16:22:00 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_ie_mvme.c,v 1.20 2014/03/25 15:52:33 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -130,11 +130,8 @@ ie_reset(struct ie_softc *sc, int why)
 static int
 ie_intrhook(struct ie_softc *sc, int when)
 {
-	struct ie_pcctwo_softc *ps;
 	u_int8_t reg;
 
-	ps = (struct ie_pcctwo_softc *) sc;
-
 	if (when == INTR_EXIT) {
 		reg = pcc2_reg_read(sys_pcctwo, PCC2REG_ETH_ICSR);
 		reg |= PCCTWO_ICR_ICLR;



CVS commit: src/sys/dev/mvme

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 15:52:17 UTC 2014

Modified Files:
src/sys/dev/mvme: clmpcc_pcctwo.c

Log Message:
fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/mvme/clmpcc_pcctwo.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/mvme/clmpcc_pcctwo.c
diff -u src/sys/dev/mvme/clmpcc_pcctwo.c:1.19 src/sys/dev/mvme/clmpcc_pcctwo.c:1.20
--- src/sys/dev/mvme/clmpcc_pcctwo.c:1.19	Sat Oct 27 13:18:27 2012
+++ src/sys/dev/mvme/clmpcc_pcctwo.c	Tue Mar 25 11:52:16 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: clmpcc_pcctwo.c,v 1.19 2012/10/27 17:18:27 chs Exp $	*/
+/*	$NetBSD: clmpcc_pcctwo.c,v 1.20 2014/03/25 15:52:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clmpcc_pcctwo.c,v 1.19 2012/10/27 17:18:27 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: clmpcc_pcctwo.c,v 1.20 2014/03/25 15:52:16 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -168,6 +168,7 @@ clmpcc_pcctwo_iackhook(struct clmpcc_sof
 	}
 
 	foo = pcc2_reg_read(sys_pcctwo, offset);
+	__USE(foo);
 }
 
 /*
@@ -210,6 +211,7 @@ clmpcc_pcctwo_consiackhook(struct clmpcc
 		PCCTWO_REG_OFF]);
 
 	foo = bus_space_read_1(_mainbus_space_tag, bush, offset);
+	__USE(foo);
 #else
 #error Need consiack hook
 #endif



CVS commit: src/external/gpl3/binutils/dist/gas/config

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar 25 16:17:33 UTC 2014

Modified Files:
src/external/gpl3/binutils/dist/gas/config: tc-vax.c

Log Message:
Bias the cfi pc expr by nbytes since vax pcrel are relative to end of the
relocation, not the beginning.  By adding the size of relocation, it will
become relative to the start of the relocation.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/binutils/dist/gas/config/tc-vax.c

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

Modified files:

Index: src/external/gpl3/binutils/dist/gas/config/tc-vax.c
diff -u src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.7 src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.8
--- src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.7	Tue Mar 18 23:41:36 2014
+++ src/external/gpl3/binutils/dist/gas/config/tc-vax.c	Tue Mar 25 16:17:33 2014
@@ -3599,9 +3599,10 @@ tc_vax_regname_to_dw2regnum (char *regna
 }
 
 void
-vax_cfi_emit_pcrel_expr (expressionS *exp, unsigned int nbytes)
+vax_cfi_emit_pcrel_expr (expressionS *expP, unsigned int nbytes)
 {
   vax_cons_special_reloc = pcrel;
-  emit_expr (exp, nbytes);
+  expP-X_add_number += nbytes;
+  emit_expr (expP, nbytes);
   vax_cons_special_reloc = NULL;
 }



CVS commit: src/sys/dev

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 16:19:14 UTC 2014

Modified Files:
src/sys/dev: firmload.c
src/sys/dev/ata: ata_raid_intel.c ata_raid_jmicron.c ata_raid_nvidia.c
ata_raid_via.c
src/sys/dev/ic: ncr53c9xvar.h sunscpal.c
src/sys/dev/pci: if_kse.c if_wm.c
src/sys/dev/pci/cxgb: cxgb_l2t.c cxgb_offload.c
src/sys/dev/pci/hdaudio: hdafg.c
src/sys/dev/pci/ixgbe: ixv.c
src/sys/dev/pci/n8/common/api: n8_callback.c n8_daemon_sks.c n8_sks.c
n8_system.c
src/sys/dev/pci/n8/include_public: n8_pub_service.h n8_pub_sks.h
src/sys/dev/raidframe: rf_disks.c rf_general.h

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/firmload.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ata/ata_raid_intel.c \
src/sys/dev/ata/ata_raid_via.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ata/ata_raid_jmicron.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ata/ata_raid_nvidia.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ic/ncr53c9xvar.h
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/sunscpal.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/if_kse.c
cvs rdiff -u -r1.266 -r1.267 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/cxgb/cxgb_l2t.c \
src/sys/dev/pci/cxgb/cxgb_offload.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/hdaudio/hdafg.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixv.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/n8/common/api/n8_callback.c \
src/sys/dev/pci/n8/common/api/n8_daemon_sks.c \
src/sys/dev/pci/n8/common/api/n8_system.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/n8/common/api/n8_sks.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/n8/include_public/n8_pub_service.h \
src/sys/dev/pci/n8/include_public/n8_pub_sks.h
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/raidframe/rf_disks.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/raidframe/rf_general.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/firmload.c
diff -u src/sys/dev/firmload.c:1.18 src/sys/dev/firmload.c:1.19
--- src/sys/dev/firmload.c:1.18	Tue Feb 25 13:30:09 2014
+++ src/sys/dev/firmload.c	Tue Mar 25 12:19:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: firmload.c,v 1.18 2014/02/25 18:30:09 pooka Exp $	*/
+/*	$NetBSD: firmload.c,v 1.19 2014/03/25 16:19:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: firmload.c,v 1.18 2014/02/25 18:30:09 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: firmload.c,v 1.19 2014/03/25 16:19:13 christos Exp $);
 
 /*
  * The firmload API provides an interface for device drivers to access
@@ -185,11 +185,8 @@ firmware_path_next(const char *drvname, 
 		prefix++;
 	*prefixp = prefix;
 
-	/*
-	 * This sprintf() is safe because of the maxprefix calculation
-	 * performed above.
-	 */
-	sprintf(pnbuf[i], /%s/%s, drvname, imgname);
+	KASSERT(MAXPATHLEN = i);
+	snprintf(pnbuf + i, MAXPATHLEN - i, /%s/%s, drvname, imgname);
 
 	return (pnbuf);
 }

Index: src/sys/dev/ata/ata_raid_intel.c
diff -u src/sys/dev/ata/ata_raid_intel.c:1.6 src/sys/dev/ata/ata_raid_intel.c:1.7
--- src/sys/dev/ata/ata_raid_intel.c:1.6	Tue Jul  6 14:09:04 2010
+++ src/sys/dev/ata/ata_raid_intel.c	Tue Mar 25 12:19:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata_raid_intel.c,v 1.6 2010/07/06 18:09:04 bsh Exp $	*/
+/*	$NetBSD: ata_raid_intel.c,v 1.7 2014/03/25 16:19:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000-2008 Søren Schmidt s...@freebsd.org
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ata_raid_intel.c,v 1.6 2010/07/06 18:09:04 bsh Exp $);
+__KERNEL_RCSID(0, $NetBSD: ata_raid_intel.c,v 1.7 2014/03/25 16:19:13 christos Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -79,7 +79,7 @@ ata_raid_intel_type(int type)
 	case INTEL_T_RAID5:
 		return RAID5;
 	default:
-		sprintf(buffer, UNKNOWN 0x%02x, type);
+		snprintf(buffer, sizeof(buffer), UNKNOWN 0x%02x, type);
 		return buffer;
 	}
 }
Index: src/sys/dev/ata/ata_raid_via.c
diff -u src/sys/dev/ata/ata_raid_via.c:1.6 src/sys/dev/ata/ata_raid_via.c:1.7
--- src/sys/dev/ata/ata_raid_via.c:1.6	Fri Sep 19 12:49:27 2008
+++ src/sys/dev/ata/ata_raid_via.c	Tue Mar 25 12:19:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata_raid_via.c,v 1.6 2008/09/19 16:49:27 christos Exp $	*/
+/*	$NetBSD: ata_raid_via.c,v 1.7 2014/03/25 16:19:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000,2001,2002 Søren Schmidt s...@freebsd.org
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ata_raid_via.c,v 1.6 2008/09/19 16:49:27 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ata_raid_via.c,v 1.7 2014/03/25 16:19:13 christos Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -71,13 +71,13 @@ ata_raid_via_type(int type)
 	static char buffer[16];
 
 	switch (type) {
-	case VIA_T_RAID0:   return RAID0;
-	case VIA_T_RAID1:   return 

CVS commit: [yamt-pagecache] src/common/lib/libc/gen

2014-03-25 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Mar 25 16:21:08 UTC 2014

Modified Files:
src/common/lib/libc/gen [yamt-pagecache]: radixtree.c

Log Message:
comments.  some ascii arts to explain memory consumption.


To generate a diff of this commit:
cvs rdiff -u -r1.17.2.4 -r1.17.2.5 src/common/lib/libc/gen/radixtree.c

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

Modified files:

Index: src/common/lib/libc/gen/radixtree.c
diff -u src/common/lib/libc/gen/radixtree.c:1.17.2.4 src/common/lib/libc/gen/radixtree.c:1.17.2.5
--- src/common/lib/libc/gen/radixtree.c:1.17.2.4	Wed Aug  1 21:09:27 2012
+++ src/common/lib/libc/gen/radixtree.c	Tue Mar 25 16:21:08 2014
@@ -1,7 +1,7 @@
-/*	$NetBSD: radixtree.c,v 1.17.2.4 2012/08/01 21:09:27 yamt Exp $	*/
+/*	$NetBSD: radixtree.c,v 1.17.2.5 2014/03/25 16:21:08 yamt Exp $	*/
 
 /*-
- * Copyright (c)2011,2012 YAMAMOTO Takashi,
+ * Copyright (c)2011,2012,2013 YAMAMOTO Takashi,
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,22 +44,49 @@
  * Intermediate nodes are automatically allocated and freed internally and
  * basically users don't need to care about them.  The allocation is done via
  * pool_cache_get(9) for _KERNEL, malloc(3) for userland, and alloc() for
- * _STANDALONE environment.  Only radix_tree_insert_node function can allocatei
+ * _STANDALONE environment.  Only radix_tree_insert_node function can allocate
  * memory for intermediate nodes and thus can fail for ENOMEM.
  *
- * Efficiency:
+ * Memory Efficiency:
  *
  * It's designed to work efficiently with dense index distribution.
  * The memory consumption (number of necessary intermediate nodes) heavily
  * depends on the index distribution.  Basically, more dense index distribution
  * consumes less nodes per item.  Approximately,
+ *
  *  - the best case: about RADIX_TREE_PTR_PER_NODE items per intermediate node.
+ *it would look like the following.
+ *
+ * root (t_height=1)
+ *  |
+ *  v
+ *  [ | | | ]   (intermediate node.  RADIX_TREE_PTR_PER_NODE=4 in this fig)
+ *   | | | |
+ *   v v v v
+ *   p p p p(items)
+ *
  *  - the worst case: RADIX_TREE_MAX_HEIGHT intermediate nodes per item.
+ *it would look like the following if RADIX_TREE_MAX_HEIGHT=3.
  *
- * The height of tree is dynamic.  It's smaller if only small index values are
- * used.  As an extreme case, if only index 0 is used, the corresponding value
- * is directly stored in the root of the tree (struct radix_tree) without
- * allocating any intermediate nodes.
+ * root (t_height=3)
+ *  |
+ *  v
+ *  [ | | | ]
+ *   |
+ *   v
+ *   [ | | | ]
+ *|
+ *v
+ *[ | | | ]
+ *   |
+ *   v
+ *   p
+ *
+ * The height of tree (t_height) is dynamic.  It's smaller if only small
+ * index values are used.  As an extreme case, if only index 0 is used,
+ * the corresponding value is directly stored in the root of the tree
+ * (struct radix_tree) without allocating any intermediate nodes.  In that
+ * case, t_height=0.
  *
  * Gang lookup:
  *
@@ -85,7 +112,7 @@
 #include sys/cdefs.h
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.17.2.4 2012/08/01 21:09:27 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.17.2.5 2014/03/25 16:21:08 yamt Exp $);
 #include sys/param.h
 #include sys/errno.h
 #include sys/pool.h
@@ -95,7 +122,7 @@ __KERNEL_RCSID(0, $NetBSD: radixtree.c,
 #include lib/libsa/stand.h
 #endif /* defined(_STANDALONE) */
 #else /* defined(_KERNEL) || defined(_STANDALONE) */
-__RCSID($NetBSD: radixtree.c,v 1.17.2.4 2012/08/01 21:09:27 yamt Exp $);
+__RCSID($NetBSD: radixtree.c,v 1.17.2.5 2014/03/25 16:21:08 yamt Exp $);
 #include assert.h
 #include errno.h
 #include stdbool.h



CVS commit: src/sys/compat/ndis

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 16:23:58 UTC 2014

Modified Files:
src/sys/compat/ndis: kern_ndis.c subr_ndis.c subr_ntoskrnl.c

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/ndis/kern_ndis.c
cvs rdiff -u -r1.27 -r1.28 src/sys/compat/ndis/subr_ndis.c
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/ndis/subr_ntoskrnl.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/ndis/kern_ndis.c
diff -u src/sys/compat/ndis/kern_ndis.c:1.25 src/sys/compat/ndis/kern_ndis.c:1.26
--- src/sys/compat/ndis/kern_ndis.c:1.25	Sat Mar 22 22:55:26 2014
+++ src/sys/compat/ndis/kern_ndis.c	Tue Mar 25 12:23:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ndis.c,v 1.25 2014/03/23 02:55:26 christos Exp $	*/
+/*	$NetBSD: kern_ndis.c,v 1.26 2014/03/25 16:23:58 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003
@@ -37,7 +37,7 @@
 __FBSDID($FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.60.2.5 2005/04/01 17:14:20 wpaul Exp $);
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, $NetBSD: kern_ndis.c,v 1.25 2014/03/23 02:55:26 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_ndis.c,v 1.26 2014/03/25 16:23:58 christos Exp $);
 #endif
 
 #include sys/param.h
@@ -920,17 +920,18 @@ ndis_create_sysctls(void *arg)
 	NDIS API Version, 0x00050001, CTLFLAG_RD);
 
 	/* Bus type (PCI, PCMCIA, etc...) */
-	sprintf(buf, %d, (int)sc-ndis_iftype);
+	snprintf(buf, sizeof(buf), %d, (int)sc-ndis_iftype);
 	ndis_add_sysctl(sc, BusType, Bus Type, buf, CTLFLAG_RD);
 
 	if (sc-ndis_res_io != NULL) {
-		sprintf(buf, 0x%lx, rman_get_start(sc-ndis_res_io));
+		snprintf(buf, sizeof(buf), 0x%lx,
+		rman_get_start(sc-ndis_res_io));
 		ndis_add_sysctl(sc, IOBaseAddress,
 		Base I/O Address, buf, CTLFLAG_RD);
 	}
 
 	if (sc-ndis_irq != NULL) {
-		sprintf(buf, %lu, rman_get_start(sc-ndis_irq));
+		snprintf(buf, sizeof(buf), %lu, rman_get_start(sc-ndis_irq));
 		ndis_add_sysctl(sc, InterruptNumber,
 		Interrupt Number, buf, CTLFLAG_RD);
 	}
@@ -1015,17 +1016,18 @@ ndis_create_sysctls(void *arg)
 		/*NDIS API Version*/ Version, 0x00050001, CTLFLAG_RD);
 		
 		/* Bus type (PCI, PCMCIA, etc...) */
-		sprintf(buf, %d, (int)sc-ndis_iftype);
+		snprintf(buf, sizeof(buf), %d, (int)sc-ndis_iftype);
 		ndis_add_sysctl(sc, BusType, Bus Type, buf, CTLFLAG_RD);
 
 		if (sc-ndis_res_io != NULL) {
-			sprintf(buf, 0x%lx, (long unsigned int)rman_get_start(sc-ndis_res_io));
+			snprintf(buf, sizeof(buf), 0x%lx,
+			(long unsigned int)rman_get_start(sc-ndis_res_io));
 			ndis_add_sysctl(sc, IOBaseAddress,
 			/*Base I/O Address*/ Base I/O, buf, CTLFLAG_RD);
 		}
 
 		if (sc-ndis_irq != NULL) {
-			sprintf(buf, %lu, (long unsigned int)rman_get_start(sc-ndis_irq));
+			snprintf(buf, sizeof(buf), %lu, (long unsigned int)rman_get_start(sc-ndis_irq));
 			ndis_add_sysctl(sc, InterruptNumber,
 			Interrupt Number, buf, CTLFLAG_RD);
 		}

Index: src/sys/compat/ndis/subr_ndis.c
diff -u src/sys/compat/ndis/subr_ndis.c:1.27 src/sys/compat/ndis/subr_ndis.c:1.28
--- src/sys/compat/ndis/subr_ndis.c:1.27	Sun Mar 23 05:31:15 2014
+++ src/sys/compat/ndis/subr_ndis.c	Tue Mar 25 12:23:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_ndis.c,v 1.27 2014/03/23 09:31:15 christos Exp $	*/
+/*	$NetBSD: subr_ndis.c,v 1.28 2014/03/25 16:23:58 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003
@@ -37,7 +37,7 @@
 __FBSDID($FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.67.2.7 2005/03/31 21:50:11 wpaul Exp $);
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, $NetBSD: subr_ndis.c,v 1.27 2014/03/23 09:31:15 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_ndis.c,v 1.28 2014/03/25 16:23:58 christos Exp $);
 #endif
 
 /*
@@ -160,7 +160,7 @@ __stdcall static void NdisOpenConfigurat
 static ndis_status ndis_encode_parm(ndis_miniport_block *,
 	struct sysctl_oid *, ndis_parm_type, ndis_config_parm **);
 static ndis_status ndis_decode_parm(ndis_miniport_block *,
-	ndis_config_parm *, char *);
+	ndis_config_parm *, char *, size_t);
 #else /* __NetBSD__ */
 static ndis_status ndis_encode_parm(ndis_miniport_block *,
 	void *, ndis_parm_type, ndis_config_parm **);
@@ -853,7 +853,8 @@ NdisReadConfiguration(ndis_status *statu
 
 #ifdef __FreeBSD__
 static ndis_status
-ndis_decode_parm(ndis_miniport_block *block, ndis_config_parm *parm, char *val)
+ndis_decode_parm(ndis_miniport_block *block, ndis_config_parm *parm, char *val,
+size_t len)
 {
 	ndis_unicode_string	*ustr;
 	char			*astr = NULL;
@@ -868,10 +869,10 @@ ndis_decode_parm(ndis_miniport_block *bl
 		free(astr, M_DEVBUF);
 		break;
 	case ndis_parm_int:
-		sprintf(val, %d, parm-ncp_parmdata.ncp_intdata);
+		snprintf(val, len, %d, parm-ncp_parmdata.ncp_intdata);
 		break;
 	case ndis_parm_hexint:
-		sprintf(val, %xu, parm-ncp_parmdata.ncp_intdata);
+		snprintf(val, len, %xu, parm-ncp_parmdata.ncp_intdata);
 		break;
 	default:
 		return(NDIS_STATUS_FAILURE);
@@ -910,7 

CVS commit: src/sys/crypto/des

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 16:28:16 UTC 2014

Modified Files:
src/sys/crypto/des: des_ecb.c

Log Message:
fix sprintf.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/crypto/des/des_ecb.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/crypto/des/des_ecb.c
diff -u src/sys/crypto/des/des_ecb.c:1.9 src/sys/crypto/des/des_ecb.c:1.10
--- src/sys/crypto/des/des_ecb.c:1.9	Sun Dec 11 07:20:52 2005
+++ src/sys/crypto/des/des_ecb.c	Tue Mar 25 12:28:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: des_ecb.c,v 1.9 2005/12/11 12:20:52 christos Exp $	*/
+/*	$NetBSD: des_ecb.c,v 1.10 2014/03/25 16:28:15 christos Exp $	*/
 /*	$KAME: des_ecb.c,v 1.5 2000/11/06 13:58:08 itojun Exp $	*/
 
 /* crypto/des/ecb_enc.c */
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: des_ecb.c,v 1.9 2005/12/11 12:20:52 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: des_ecb.c,v 1.10 2014/03/25 16:28:15 christos Exp $);
 
 #include sys/param.h
 #ifdef _KERNEL
@@ -98,7 +98,8 @@ char *des_options(void)
 size=int;
 else
 size=long;
-sprintf(buf,des(%s,%s,%s,%s),ptr,risc,unroll,size);
+snprintf(buf, sizeof(buf), des(%s,%s,%s,%s),
+		ptr, risc, unroll, size);
 init=0;
 }
 return(buf);



CVS commit: src/sys/fs/nfs

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 16:30:28 UTC 2014

Modified Files:
src/sys/fs/nfs/client: nfs_clvnops.c
src/sys/fs/nfs/server: nfs_nfsdkrpc.c nfs_nfsdserv.c

Log Message:
kill sprintf.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/fs/nfs/client/nfs_clvnops.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/fs/nfs/server/nfs_nfsdkrpc.c \
src/sys/fs/nfs/server/nfs_nfsdserv.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/nfs/client/nfs_clvnops.c
diff -u src/sys/fs/nfs/client/nfs_clvnops.c:1.1.1.1 src/sys/fs/nfs/client/nfs_clvnops.c:1.2
--- src/sys/fs/nfs/client/nfs_clvnops.c:1.1.1.1	Mon Sep 30 03:19:20 2013
+++ src/sys/fs/nfs/client/nfs_clvnops.c	Tue Mar 25 12:30:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_clvnops.c,v 1.1.1.1 2013/09/30 07:19:20 dholland Exp $	*/
+/*	$NetBSD: nfs_clvnops.c,v 1.2 2014/03/25 16:30:28 christos Exp $	*/
 /*-
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID(FreeBSD: head/sys/fs/nfsclient/nfs_clvnops.c 252072 2013-06-21 22:26:18Z rmacklem ); */
-__RCSID($NetBSD: nfs_clvnops.c,v 1.1.1.1 2013/09/30 07:19:20 dholland Exp $);
+__RCSID($NetBSD: nfs_clvnops.c,v 1.2 2014/03/25 16:30:28 christos Exp $);
 
 /*
  * vnode op calls for Sun NFS version 2, 3 and 4
@@ -2428,7 +2428,7 @@ nfs_sillyrename(struct vnode *dvp, struc
 	pid = cnp-cn_thread-td_proc-p_pid;
 	lticks = (unsigned int)ticks;
 	for ( ; ; ) {
-		sp-s_namlen = sprintf(sp-s_name, 
+		sp-s_namlen = snprintf(sp-s_name, sizeof(sp-s_name),
    .nfs.%08x.%04x4.4, lticks, 
    pid);
 		if (nfs_lookitup(dvp, sp-s_name, sp-s_namlen, sp-s_cred,

Index: src/sys/fs/nfs/server/nfs_nfsdkrpc.c
diff -u src/sys/fs/nfs/server/nfs_nfsdkrpc.c:1.1.1.1 src/sys/fs/nfs/server/nfs_nfsdkrpc.c:1.2
--- src/sys/fs/nfs/server/nfs_nfsdkrpc.c:1.1.1.1	Mon Sep 30 03:19:53 2013
+++ src/sys/fs/nfs/server/nfs_nfsdkrpc.c	Tue Mar 25 12:30:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_nfsdkrpc.c,v 1.1.1.1 2013/09/30 07:19:53 dholland Exp $	*/
+/*	$NetBSD: nfs_nfsdkrpc.c,v 1.2 2014/03/25 16:30:28 christos Exp $	*/
 /*-
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID(FreeBSD: head/sys/fs/nfsserver/nfs_nfsdkrpc.c 249596 2013-04-17 22:42:43Z ken ); */
-__RCSID($NetBSD: nfs_nfsdkrpc.c,v 1.1.1.1 2013/09/30 07:19:53 dholland Exp $);
+__RCSID($NetBSD: nfs_nfsdkrpc.c,v 1.2 2014/03/25 16:30:28 christos Exp $);
 
 #include opt_inet6.h
 #include opt_kgssapi.h
@@ -179,7 +179,7 @@ nfssvc_program(struct svc_req *rqst, SVC
 #if defined(KLD_MODULE)
 			/* Do not use ip6_sprintf: the nfs module should work without INET6. */
 #define	ip6_sprintf(buf, a)		\
-			(sprintf((buf), %x:%x:%x:%x:%x:%x:%x:%x,	\
+			(snprintf((buf), sizeof(buf), %x:%x:%x:%x:%x:%x:%x:%x,	\
 			(a)-s6_addr16[0], (a)-s6_addr16[1],	\
 			(a)-s6_addr16[2], (a)-s6_addr16[3],	\
 			(a)-s6_addr16[4], (a)-s6_addr16[5],	\
Index: src/sys/fs/nfs/server/nfs_nfsdserv.c
diff -u src/sys/fs/nfs/server/nfs_nfsdserv.c:1.1.1.1 src/sys/fs/nfs/server/nfs_nfsdserv.c:1.2
--- src/sys/fs/nfs/server/nfs_nfsdserv.c:1.1.1.1	Mon Sep 30 03:19:55 2013
+++ src/sys/fs/nfs/server/nfs_nfsdserv.c	Tue Mar 25 12:30:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_nfsdserv.c,v 1.1.1.1 2013/09/30 07:19:55 dholland Exp $	*/
+/*	$NetBSD: nfs_nfsdserv.c,v 1.2 2014/03/25 16:30:28 christos Exp $	*/
 /*-
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID(FreeBSD: head/sys/fs/nfsserver/nfs_nfsdserv.c 245613 2013-01-18 19:42:08Z delphij ); */
-__RCSID($NetBSD: nfs_nfsdserv.c,v 1.1.1.1 2013/09/30 07:19:55 dholland Exp $);
+__RCSID($NetBSD: nfs_nfsdserv.c,v 1.2 2014/03/25 16:30:28 christos Exp $);
 
 /*
  * nfs version 2, 3 and 4 server calls to vnode ops
@@ -3346,8 +3346,8 @@ nfsrvd_setclientid(struct nfsrv_descript
 		rad = NFSSOCKADDR(clp-lc_req.nr_nam, struct sockaddr_in *);
 		ucp = (u_char *)rad-sin_addr.s_addr;
 		ucp2 = (u_char *)rad-sin_port;
-		sprintf(addrbuf, %d.%d.%d.%d.%d.%d, ucp[0]  0xff,
-		ucp[1]  0xff, ucp[2]  0xff, ucp[3]  0xff,
+		snprintf(addrbuf, sizeof(addrbuf), %d.%d.%d.%d.%d.%d,
+		ucp[0]  0xff, ucp[1]  0xff, ucp[2]  0xff, ucp[3]  0xff,
 		ucp2[0]  0xff, ucp2[1]  0xff);
 		(void) nfsm_strtom(nd, addrbuf, strlen(addrbuf));
 	}



CVS commit: src/sys/arch/powerpc/pci

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar 25 16:40:28 UTC 2014

Modified Files:
src/sys/arch/powerpc/pci: pci_machdep_common.c

Log Message:
sprintf - snprintf


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/pci/pci_machdep_common.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/powerpc/pci/pci_machdep_common.c
diff -u src/sys/arch/powerpc/pci/pci_machdep_common.c:1.18 src/sys/arch/powerpc/pci/pci_machdep_common.c:1.19
--- src/sys/arch/powerpc/pci/pci_machdep_common.c:1.18	Sun Apr 28 00:45:45 2013
+++ src/sys/arch/powerpc/pci/pci_machdep_common.c	Tue Mar 25 16:40:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep_common.c,v 1.18 2013/04/28 00:45:45 macallan Exp $ */
+/* $NetBSD: pci_machdep_common.c,v 1.19 2014/03/25 16:40:28 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_machdep_common.c,v 1.18 2013/04/28 00:45:45 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_machdep_common.c,v 1.19 2014/03/25 16:40:28 matt Exp $);
 
 #define _POWERPC_BUS_DMA_PRIVATE
 
@@ -99,7 +99,7 @@ genppc_pci_intr_string(void *v, pci_intr
 		panic(pci_intr_string: bogus handle 0x%x, ih);
 #endif
 
-	sprintf(irqstr, irq %d, ih);
+	snprintf(irqstr, sizeof(irqstr), irq %d, ih);
 	return (irqstr);
 	
 }



CVS commit: src/sys/arch/powerpc/pci

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar 25 16:39:27 UTC 2014

Modified Files:
src/sys/arch/powerpc/pci: pci_machdep_ofw.c

Log Message:
sprintf - snprintf


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/pci/pci_machdep_ofw.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/powerpc/pci/pci_machdep_ofw.c
diff -u src/sys/arch/powerpc/pci/pci_machdep_ofw.c:1.19 src/sys/arch/powerpc/pci/pci_machdep_ofw.c:1.20
--- src/sys/arch/powerpc/pci/pci_machdep_ofw.c:1.19	Sun Nov  3 22:22:03 2013
+++ src/sys/arch/powerpc/pci/pci_machdep_ofw.c	Tue Mar 25 16:39:27 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep_ofw.c,v 1.19 2013/11/03 22:22:03 mrg Exp $ */
+/* $NetBSD: pci_machdep_ofw.c,v 1.20 2014/03/25 16:39:27 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_machdep_ofw.c,v 1.19 2013/11/03 22:22:03 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_machdep_ofw.c,v 1.20 2014/03/25 16:39:27 matt Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -238,12 +238,12 @@ genofw_setup_pciintr_map(void *v, struct
 			sub = prop_dictionary_create_with_capacity(4);
 		pin = map[i*reclen + acells];
 		intr_num = prop_number_create_integer(map[i*reclen + acells + icells + 1] + picnodes[pic].offset);
-		sprintf(key, pin-%c, 'A' + (pin-1));
+		snprintf(key, sizeof(key), pin-%c, 'A' + (pin-1));
 		prop_dictionary_set(sub, key, intr_num);
 		prop_object_release(intr_num);
 		/* should we care about level? */
 
-		sprintf(key, devfunc-%d, dev*0x8 + func);
+		snprintf(key, sizeof(key), devfunc-%d, dev*0x8 + func);
 		prop_dictionary_set(dict, key, sub);
 		if (curdev != dev) {
 			prop_object_release(sub);
@@ -293,10 +293,10 @@ nomap:
 			if (OF_getprop(node, interrupts, pin, 4)  0)
 pin = 1;
 			intr_num = prop_number_create_integer(irqs[0]);
-			sprintf(key, pin-%c, 'A' + (pin-1));
+			snprintf(key, sizeof(key), pin-%c, 'A' + (pin-1));
 			prop_dictionary_set(sub, key, intr_num);
 			prop_object_release(intr_num);
-			sprintf(key, devfunc-%d, dev*0x8 + func);
+			snprintf(key, sizeof(key), devfunc-%d, dev*0x8 + func);
 			prop_dictionary_set(dict, key, sub);
 			prop_object_release(sub);
 			foundirqs++;
@@ -331,10 +331,10 @@ nomap:
 			if (OF_getprop(node, interrupts, pin, 4)  0)
 pin = 1;
 			intr_num = prop_number_create_integer(irq);
-			sprintf(key, pin-%c, 'A' + (pin-1));
+			snprintf(key, sizeof(key), pin-%c, 'A' + (pin-1));
 			prop_dictionary_set(sub, key, intr_num);
 			prop_object_release(intr_num);
-			sprintf(key, devfunc-%d, dev*0x8 + func);
+			snprintf(key, sizeof(key), devfunc-%d, dev*0x8 + func);
 			prop_dictionary_set(dict, key, sub);
 			prop_object_release(sub);
 		}
@@ -430,11 +430,11 @@ genofw_pci_intr_map(const struct pci_att
 		goto bad;
 	}
 
-	sprintf(key, devfunc-%d, dev*0x8 + func);
+	snprintf(key, sizeof(key), devfunc-%d, dev*0x8 + func);
 	devsub = prop_dictionary_get(dict, key);
 	if (devsub == NULL)
 		goto bad;
-	sprintf(key, pin-%c, 'A' + (pin-1));
+	snprintf(key, sizeof(key), pin-%c, 'A' + (pin-1));
 	pinsub = prop_dictionary_get(devsub, key);
 	if (pinsub == NULL)
 		goto bad;



CVS commit: src/sys/arch/powerpc/oea

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar 25 16:41:37 UTC 2014

Modified Files:
src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
sprintf - snprintf


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/oea/ofwoea_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/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.37 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.38
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.37	Mon Mar  3 15:36:36 2014
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Tue Mar 25 16:41:37 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.37 2014/03/03 15:36:36 macallan Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.38 2014/03/25 16:41:37 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ofwoea_machdep.c,v 1.37 2014/03/03 15:36:36 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: ofwoea_machdep.c,v 1.38 2014/03/25 16:41:37 matt Exp $);
 
 #include opt_ppcarch.h
 #include opt_compat_netbsd.h
@@ -191,7 +191,7 @@ ofwoea_initppc(u_int startkernel, u_int 
 
 #if defined(MULTIPROCESSOR)  defined(ofppc)
 	for (i=1; i  CPU_MAXNUM; i++) {
-		sprintf(cpupath, /cpus/@%x, i);
+		snprintf(cpupath, sizeof(cpupath), /cpus/@%x, i);
 		node = OF_finddevice(cpupath);
 		if (node = 0)
 			continue;



CVS commit: src/usr.sbin/rtsold

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 17:17:44 UTC 2014

Modified Files:
src/usr.sbin/rtsold: rtsold.c

Log Message:
Don't cast to time_t just to implicitly cast to uint32_t next.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/rtsold/rtsold.c

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

Modified files:

Index: src/usr.sbin/rtsold/rtsold.c
diff -u src/usr.sbin/rtsold/rtsold.c:1.40 src/usr.sbin/rtsold/rtsold.c:1.41
--- src/usr.sbin/rtsold/rtsold.c:1.40	Tue Mar 18 20:39:55 2014
+++ src/usr.sbin/rtsold/rtsold.c	Tue Mar 25 17:17:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsold.c,v 1.40 2014/03/18 20:39:55 dsl Exp $	*/
+/*	$NetBSD: rtsold.c,v 1.41 2014/03/25 17:17:44 joerg Exp $	*/
 /*	$KAME: rtsold.c,v 1.77 2004/01/03 01:35:13 itojun Exp $	*/
 
 /*
@@ -587,7 +587,7 @@ rtsol_timer_update(struct ifinfo *ifinfo
 			ifinfo-timer = tm_max;	/* stop timer(valid?) */
 		break;
 	case IFS_DELAY:
-		interval = (time_t) (arc4random() % (MAX_RTR_SOLICITATION_DELAY * MILLION));
+		interval = arc4random() % (MAX_RTR_SOLICITATION_DELAY * MILLION);
 		ifinfo-timer.tv_sec = interval / MILLION;
 		ifinfo-timer.tv_usec = (suseconds_t)(interval % MILLION);
 		break;



CVS commit: src/bin/ed

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 17:23:37 UTC 2014

Modified Files:
src/bin/ed: ed.h

Log Message:
Use __printflike.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/bin/ed/ed.h

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

Modified files:

Index: src/bin/ed/ed.h
diff -u src/bin/ed/ed.h:1.36 src/bin/ed/ed.h:1.37
--- src/bin/ed/ed.h:1.36	Sun Mar 23 05:06:42 2014
+++ src/bin/ed/ed.h	Tue Mar 25 17:23:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ed.h,v 1.36 2014/03/23 05:06:42 dholland Exp $	*/
+/*	$NetBSD: ed.h,v 1.37 2014/03/25 17:23:37 joerg Exp $	*/
 
 /* ed.h: type and constant definitions for the ed editor. */
 /*
@@ -257,7 +257,7 @@ void unmark_line_node(line_t *);
 void unset_active_nodes(line_t *, line_t *);
 long write_file(const char *, const char *, long, long);
 long write_stream(FILE *, long, long);
-void seterrmsg(const char *, ...);
+void seterrmsg(const char *, ...) __printflike(1, 2);
 
 /* global buffers */
 extern char stdinbuf[];



CVS commit: src/tests/lib/libm

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 17:30:15 UTC 2014

Modified Files:
src/tests/lib/libm: t_libm.h

Log Message:
Consistently use long double.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libm/t_libm.h

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

Modified files:

Index: src/tests/lib/libm/t_libm.h
diff -u src/tests/lib/libm/t_libm.h:1.5 src/tests/lib/libm/t_libm.h:1.6
--- src/tests/lib/libm/t_libm.h:1.5	Sun Mar 16 22:49:27 2014
+++ src/tests/lib/libm/t_libm.h	Tue Mar 25 17:30:14 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: t_libm.h,v 1.5 2014/03/16 22:49:27 dsl Exp $ */
+/* $NetBSD: t_libm.h,v 1.6 2014/03/25 17:30:14 joerg Exp $ */
 
 /*
  * Check result of fn(arg) is correct within the bounds.
@@ -7,12 +7,15 @@
  * be out of range for the function - so save and print as 'long double'.
  * (otherwise you can get 'inf != inf' reported!)
  */
-#define T_LIBM_CHECK(subtest, fn, arg, expect, epsilon) do { \
+#define T_LIBM_CHECK(subtest, fn, arg, expect_, epsilon_) do { \
+	long double epsilon = epsilon_; \
+	long double expect = expect_; \
 	long double r = fn(arg); \
-	double e = fabs(r - expect); \
+	long double e = fabsl(r - expect); \
 	if (r != expect  e  epsilon) \
 		atf_tc_fail_nonfatal( \
-		subtest %u:  #fn (%g) is %Lg (%.14La) not %g (%.13a), error %g (%.6a)  %g, \
+		subtest %u:  #fn (%g) is %Lg (%.14La)  \
+		not %Lg (%.13La), error %Lg (%.6La)  %Lg, \
 		subtest, arg, r, r, expect, expect, e, e, epsilon); \
 } while (0)
 



CVS commit: othersrc/external/bsd/multigest/dist

2014-03-25 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Tue Mar 25 17:44:34 UTC 2014

Modified Files:
othersrc/external/bsd/multigest/dist: multigest.c

Log Message:
Minor change to multigest

+ avoid advancing the pointer in multigest_format_hex to include a NUL
  byte - unintended side effects in callers


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 othersrc/external/bsd/multigest/dist/multigest.c

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

Modified files:

Index: othersrc/external/bsd/multigest/dist/multigest.c
diff -u othersrc/external/bsd/multigest/dist/multigest.c:1.9 othersrc/external/bsd/multigest/dist/multigest.c:1.10
--- othersrc/external/bsd/multigest/dist/multigest.c:1.9	Wed Mar  5 04:56:00 2014
+++ othersrc/external/bsd/multigest/dist/multigest.c	Tue Mar 25 17:44:34 2014
@@ -586,7 +586,7 @@ multigest_format_hex(uint8_t *raw, const
 			algname += 1;
 		}
 	}
-	return (int)(rawsize + rawsize + 1);
+	return (int)(rawsize + rawsize);
 }
 
 /* return the size of output array we'll need */



CVS commit: src/sys/arch/ia64

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 18:35:33 UTC 2014

Modified Files:
src/sys/arch/ia64/disasm: disasm_format.c
src/sys/arch/ia64/stand/common: boot.c bootstrap.h commands.c dev_net.c
fileload.c interp.c ls.c misc.c
src/sys/arch/ia64/stand/efi/libefi: devicename.c efifs.c
src/sys/arch/ia64/stand/ia64/efi: main.c
src/sys/arch/ia64/stand/ia64/ski: devicename.c

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/disasm/disasm_format.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/common/boot.c \
src/sys/arch/ia64/stand/common/interp.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/stand/common/bootstrap.h \
src/sys/arch/ia64/stand/common/dev_net.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/common/commands.c \
src/sys/arch/ia64/stand/common/ls.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/common/fileload.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/common/misc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/efi/libefi/devicename.c \
src/sys/arch/ia64/stand/efi/libefi/efifs.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/stand/ia64/efi/main.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/ia64/ski/devicename.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/ia64/disasm/disasm_format.c
diff -u src/sys/arch/ia64/disasm/disasm_format.c:1.1 src/sys/arch/ia64/disasm/disasm_format.c:1.2
--- src/sys/arch/ia64/disasm/disasm_format.c:1.1	Fri Apr  7 10:21:18 2006
+++ src/sys/arch/ia64/disasm/disasm_format.c	Tue Mar 25 14:35:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: disasm_format.c,v 1.1 2006/04/07 14:21:18 cherry Exp $	*/
+/*	$NetBSD: disasm_format.c,v 1.2 2014/03/25 18:35:32 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 Marcel Moolenaar
@@ -111,21 +111,23 @@ static const char *asm_completers[] = {
 };
 
 void
-asm_completer(const struct asm_cmpltr *c, char *buf)
+asm_completer(const struct asm_cmpltr *c, char *buf, size_t buflen)
 {
-	strcpy(buf, asm_completers[c-c_type]);
+	strlcpy(buf, asm_completers[c-c_type], buflen);
 }
 
 void
-asm_mnemonic(enum asm_op op, char *buf)
+asm_mnemonic(enum asm_op op, char *buf, size_t buflen)
 {
-	strcpy(buf, asm_mnemonics[(op  ASM_OP_INTERNAL_OPCODES) ? op : 0]); 
+	strlcpy(buf, asm_mnemonics[(op  ASM_OP_INTERNAL_OPCODES) ? op : 0],
+	buflen); 
 }
 
 void
-asm_operand(const struct asm_oper *o, char *buf, uint64_t ip)
+asm_operand(const struct asm_oper *o, char *buf, size_t buflen, uint64_t ip)
 {
 	const char *n;
+	size_t l;
 
 	n = ;
 	switch (o-o_type) {
@@ -159,16 +161,16 @@ asm_operand(const struct asm_oper *o, ch
 		case AR_LC: n = lc; break;
 		case AR_EC: n = ec; break;
 		default:
-			sprintf(buf, ar%d, (int)o-o_value);
+			snprintf(buf, buflen, ar%d, (int)o-o_value);
 			return;
 		}
-		sprintf(buf, ar.%s, n);
+		snprintf(buf, buflen, ar.%s, n);
 		return;
 	case ASM_OPER_BREG:
 		if (o-o_value != 0)
-			sprintf(buf, b%d, (int)o-o_value);
+			snprintf(buf, buflen, b%d, (int)o-o_value);
 		else
-			strcpy(buf, rp);
+			strlcpy(buf, rp, buflen);
 		return;
 	case ASM_OPER_CPUID:
 		n = cpuid;
@@ -202,22 +204,22 @@ asm_operand(const struct asm_oper *o, ch
 		case CR_LRR0: n = lrr0; break;
 		case CR_LRR1: n = lrr1; break;
 		default:
-			sprintf(buf, cr%d, (int)o-o_value);
+			snprintf(buf, buflen, cr%d, (int)o-o_value);
 			return;
 		}
-		sprintf(buf, cr.%s, n);
+		snprintf(buf, buflen, cr.%s, n);
 		return;
 	case ASM_OPER_DBR:
 		n = dbr;
 		break;
 	case ASM_OPER_DISP:
-		sprintf(buf, %lx, ip + o-o_value);
+		snprintf(buf, buflen, %lx, ip + o-o_value);
 		return;
 	case ASM_OPER_DTR:
 		n = dtr;
 		break;
 	case ASM_OPER_FREG:
-		sprintf(buf, f%d, (int)o-o_value);
+		snprintf(buf, buflen, f%d, (int)o-o_value);
 		return;
 	case ASM_OPER_GREG:
 		break;
@@ -225,10 +227,10 @@ asm_operand(const struct asm_oper *o, ch
 		n = ibr;
 		break;
 	case ASM_OPER_IMM:
-		sprintf(buf, 0x%lx, o-o_value);
+		snprintf(buf, buflen, 0x%lx, o-o_value);
 		return;
 	case ASM_OPER_IP:
-		strcpy(buf, ip);
+		strlcpy(buf, ip, buflen);
 		return;
 	case ASM_OPER_ITR:
 		n = itr;
@@ -249,22 +251,22 @@ asm_operand(const struct asm_oper *o, ch
 		n = pmd;
 		break;
 	case ASM_OPER_PR:
-		strcpy(buf, pr);
+		strlcpy(buf, pr, buflen);
 return;
 	case ASM_OPER_PR_ROT:
-		strcpy(buf, pr.rot);
+		strlcpy(buf, pr.rot, buflen);
 		return;
 	case ASM_OPER_PREG:
-		sprintf(buf, p%d, (int)o-o_value);
+		snprintf(buf, buflen, p%d, (int)o-o_value);
 		return;
 	case ASM_OPER_PSR:
-		strcpy(buf, psr);
+		strlcpy(buf, psr, buflen);
 		return;
 	case ASM_OPER_PSR_L:
-		strcpy(buf, psr.l);
+		strlcpy(buf, psr.l, buflen);
 		return;
 	case ASM_OPER_PSR_UM:
-		strcpy(buf, psr.um);
+		strlcpy(buf, psr.um, buflen);
 		return;
 	case ASM_OPER_RR:
 		n = rr;
@@ -273,16 +275,21 @@ asm_operand(const struct asm_oper *o, ch
 		

CVS commit: src/sys/arch/next68k/dev

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 19:41:32 UTC 2014

Modified Files:
src/sys/arch/next68k/dev: esp.c if_xe.c nextdma.c nextdmavar.h

Log Message:
fix sprintf debugging mess.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/next68k/dev/esp.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/next68k/dev/if_xe.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/next68k/dev/nextdma.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/next68k/dev/nextdmavar.h

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

Modified files:

Index: src/sys/arch/next68k/dev/esp.c
diff -u src/sys/arch/next68k/dev/esp.c:1.60 src/sys/arch/next68k/dev/esp.c:1.61
--- src/sys/arch/next68k/dev/esp.c:1.60	Sat Oct 27 13:18:05 2012
+++ src/sys/arch/next68k/dev/esp.c	Tue Mar 25 15:41:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: esp.c,v 1.60 2012/10/27 17:18:05 chs Exp $	*/
+/*	$NetBSD: esp.c,v 1.61 2014/03/25 19:41:32 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: esp.c,v 1.60 2012/10/27 17:18:05 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: esp.c,v 1.61 2014/03/25 19:41:32 christos Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -118,10 +118,7 @@ __KERNEL_RCSID(0, $NetBSD: esp.c,v 1.60
 #ifdef ESP_DEBUG
 int esp_debug = 0;
 #define DPRINTF(x) if (esp_debug) printf x;
-extern char *ndtracep;
-extern char ndtrace[];
-extern int ndtraceshow;
-#define NDTRACEIF(x) if (10  ndtracep  (ndtrace + 8192)) do {x;} while (0)
+#define NDTRACEIF(x) if (10) do {x;} while (0)
 #else
 #define DPRINTF(x)
 #define NDTRACEIF(x)
@@ -145,6 +142,7 @@ struct ncr53c9x_softc *esp_debug_sc = 0;
 void esp_dma_store(struct ncr53c9x_softc *);
 void esp_dma_print(struct ncr53c9x_softc *);
 int esp_dma_nest = 0;
+int esptraceshow;
 #endif
 
 
@@ -461,7 +459,7 @@ esp_dma_isintr(struct ncr53c9x_softc *sc
 	struct esp_softc *esc = (struct esp_softc *)sc;
 
 	if (INTR_OCCURRED(NEXT_I_SCSI)) {
-		NDTRACEIF (*ndtracep++ = 'i');
+		NDTRACEIF (ndtrace_addc('i'));
 		NCR_WRITE_REG(sc, ESP_DCTL,
 		ESPDCTL_16MHZ | ESPDCTL_INTENB |
 		(esc-sc_datain ? ESPDCTL_DMARD : 0));
@@ -487,7 +485,7 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 
 	r = 1;
 
-	NDTRACEIF (*ndtracep++ = 'I');
+	NDTRACEIF (ndtrace_addc('I'));
 	if (r) {
 		/* printf (esp_dma_isintr start\n); */
 		{
@@ -513,14 +511,13 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 
 			while (!nextdma_finished(nsc)) {
 			/* esp_dma_isactive(sc)) { */
-NDTRACEIF (*ndtracep++ = 'w');
+NDTRACEIF (ndtrace_addc('w'));
 NDTRACEIF (
-	sprintf(ndtracep, f%dm%dl%dw,
+	ndtrace_printf(f%dm%dl%dw,
 	NCR_READ_REG(sc, NCR_FFLAG) 
 	NCRFIFO_FF,
 	NCR_READ_REG((sc), NCR_TCM),
 	NCR_READ_REG((sc), NCR_TCL));
-	ndtracep += strlen(ndtracep);
 );
 if (NCR_READ_REG(sc, NCR_FFLAG)  NCRFIFO_FF)
 	flushcount = 5;
@@ -535,7 +532,7 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 (nd_bsr4 (DD_CSR)  0x0800) == 0
    ++flushcount  5) {
 	splx(s);
-	NDTRACEIF (*ndtracep++ = 'F');
+	NDTRACEIF (ndtrace_addc('F'));
 	NCR_WRITE_REG(sc, ESP_DCTL,
 	ESPDCTL_FLUSH | ESPDCTL_16MHZ |
 	ESPDCTL_INTENB | ESPDCTL_DMAMOD |
@@ -550,7 +547,7 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 	doze(0x32);
 	s = spldma();
 }
-NDTRACEIF (*ndtracep++ = '0' + flushcount);
+NDTRACEIF (ndtrace_addc('0' + flushcount));
 if (flushcount  4) {
 	int next;
 	int onext = 0;
@@ -563,18 +560,17 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 		onext = next;
 		DELAY(50);
 	}
-	NDTRACEIF (*ndtracep++ = 'R');
+	NDTRACEIF (ndtrace_addc('R'));
 	NCR_WRITE_REG(sc, ESP_DCTL,
 	ESPDCTL_16MHZ | ESPDCTL_INTENB);
 	NDTRACEIF (
-		sprintf(ndtracep,
+		ndtrace_printf(
 		ff:%d tcm:%d tcl:%d ,
 		NCR_READ_REG(sc, NCR_FFLAG)
 		 NCRFIFO_FF,
 		NCR_READ_REG((sc), NCR_TCM),
 		NCR_READ_REG((sc),
 		NCR_TCL));
-		ndtracep += strlen (ndtracep);
 		);
 	s = spldma();
 	nextdma_reset (nsc);
@@ -585,7 +581,7 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 
 #ifdef DIAGNOSTIC
 if (flushcount  4) {
-	NDTRACEIF (*ndtracep++ = '+');
+	NDTRACEIF (ndtrace_addc('+'));
 	printf(%s: unexpected flushcount
 	 %d on %s\n,
 	device_xname(sc-sc_dev),
@@ -596,7 +592,7 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 
 if (!nextdma_finished(nsc)) {
 /* esp_dma_isactive(sc)) { */
-	NDTRACEIF (*ndtracep++ = '1');
+	NDTRACEIF (ndtrace_addc('1'));
 }
 flushcount = 0;
 s = spldma();
@@ -618,7 +614,7 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 		NCR_WRITE_REG(sc, ESP_DCTL,
 		ESPDCTL_16MHZ | ESPDCTL_INTENB |
 		(esc-sc_datain ? ESPDCTL_DMARD : 0));
-		NDTRACEIF (*ndtracep++ = 'b');
+		NDTRACEIF (ndtrace_addc('b'));
 
 		

CVS commit: src/sys/arch/next68k/stand/boot

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 19:43:49 UTC 2014

Modified Files:
src/sys/arch/next68k/stand/boot: boot.c

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/next68k/stand/boot/boot.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/next68k/stand/boot/boot.c
diff -u src/sys/arch/next68k/stand/boot/boot.c:1.10 src/sys/arch/next68k/stand/boot/boot.c:1.11
--- src/sys/arch/next68k/stand/boot/boot.c:1.10	Sun Dec 11 07:18:29 2005
+++ src/sys/arch/next68k/stand/boot/boot.c	Tue Mar 25 15:43:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.10 2005/12/11 12:18:29 christos Exp $	*/
+/*	$NetBSD: boot.c,v 1.11 2014/03/25 19:43:48 christos Exp $	*/
 /*
  * Copyright (c) 1994 Rolf Grossmann
  * All rights reserved.
@@ -143,10 +143,10 @@ main(char *boot_arg)
 		strcpy (p, devsw[dev].dv_name);
 		MON(char *, MG_boot_dev) = p;
 		p += strlen (p) + 1;
-		sprintf (p, (%d,%d,%d), count, lun, part);
+		snprintf (p, 1024, (%d,%d,%d), count, lun, part); /* XXX */
 		MON(char *, MG_boot_info) = p;
 		p += strlen (p) + 1;
-		sprintf (p, %s, file);
+		snprintf (p, 1024, %s, file); /* XXX */
 		MON(char *, MG_boot_file) = p;
 #ifdef PROCESS_ARGS
 		p += strlen (p) + 1;



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

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:14:52 UTC 2014

Modified Files:
src/sys/arch/arm/include: armreg.h

Log Message:
Add NSACR


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/arm/include/armreg.h

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

Modified files:

Index: src/sys/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.93 src/sys/arch/arm/include/armreg.h:1.94
--- src/sys/arch/arm/include/armreg.h:1.93	Fri Mar  7 05:30:08 2014
+++ src/sys/arch/arm/include/armreg.h	Wed Mar 26 01:14:52 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.93 2014/03/07 05:30:08 matt Exp $	*/
+/*	$NetBSD: armreg.h,v 1.94 2014/03/26 01:14:52 matt Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -387,6 +387,13 @@
 #define	CPACR_RESERVED		2
 #define	CPACR_ALL		3 /* Privileged and User mode access */
 
+/* ARMv6/ARMv7 Non-Secure Access Control Register (CP15, 0, c1, c1, 2) */
+#define NSACR_SMP		0x0004 /* ACTRL.SMP is writeable (!A8) */
+#define NSACR_L2ERR		0x0002 /* L2ECTRL is writeable (!A8) */
+#define NSACR_ASEDIS		0x8000 /* Deny Advanced SIMD Ext. */
+#define NSACR_D32DIS		0x4000 /* Deny VFP regs 15-31 */
+#define NSACR_CPn(n)		(1  (n)) /* NonSecure access allowed */
+
 /* ARM11x6 Auxiliary Control Register (CP15 register 1, opcode2 1) */
 #define	ARM11X6_AUXCTL_RS	0x0001 /* return stack */
 #define	ARM11X6_AUXCTL_DB	0x0002 /* dynamic branch prediction */
@@ -895,6 +902,7 @@ ARMREG_READ_INLINE(auxctl, p15,0,%0,c1,
 ARMREG_WRITE_INLINE(auxctl, p15,0,%0,c1,c0,1) /* Auxiliary Control Register */
 ARMREG_READ_INLINE(cpacr, p15,0,%0,c1,c0,2) /* Co-Processor Access Control Register */
 ARMREG_WRITE_INLINE(cpacr, p15,0,%0,c1,c0,2) /* Co-Processor Access Control Register */
+ARMREG_READ_INLINE(nsacr, p15,0,%0,c1,c1,2) /* Non-Secure Access Control Register */
 /* cp15 c2 registers */
 ARMREG_READ_INLINE(ttbr, p15,0,%0,c2,c0,0) /* Translation Table Base Register 0 */
 ARMREG_WRITE_INLINE(ttbr, p15,0,%0,c2,c0,0) /* Translation Table Base Register 0 */



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:15:48 UTC 2014

Modified Files:
src/sys/arch/arm/include [matt-nb5-mips64]: armreg.h

Log Message:
sync with HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.41.12.2 -r1.41.12.3 src/sys/arch/arm/include/armreg.h

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

Modified files:

Index: src/sys/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.41.12.2 src/sys/arch/arm/include/armreg.h:1.41.12.3
--- src/sys/arch/arm/include/armreg.h:1.41.12.2	Mon Mar 24 18:43:40 2014
+++ src/sys/arch/arm/include/armreg.h	Wed Mar 26 01:15:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.41.12.2 2014/03/24 18:43:40 matt Exp $	*/
+/*	$NetBSD: armreg.h,v 1.41.12.3 2014/03/26 01:15:48 matt Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -58,13 +58,24 @@
 #define PSR_V_bit (1  28)	/* overflow */
 
 #define PSR_Q_bit (1  27)	/* saturation */
+#define PSR_IT1_bit (1  26)
+#define PSR_IT0_bit (1  25)
+#define PSR_J_bit (1  24)	/* Jazelle mode */
+#define PSR_GE_bits (15  16)	/* SIMD GE bits */
+#define PSR_IT7_bit (1  15)
+#define PSR_IT6_bit (1  14)
+#define PSR_IT5_bit (1  13)
+#define PSR_IT4_bit (1  12)
+#define PSR_IT3_bit (1  11)
+#define PSR_IT2_bit (1  10)
+#define PSR_E_BIT (1  9)	/* Endian state */
+#define PSR_A_BIT (1  8)	/* Async abort disable */
 
 #define I32_bit (1  7)	/* IRQ disable */
 #define F32_bit (1  6)	/* FIQ disable */
-#define	IF32_bits (3  6)	/* IRQ/FIQ disable */
+#define IF32_bits (3  6)	/* IRQ/FIQ disable */
 
 #define PSR_T_bit (1  5)	/* Thumb state */
-#define PSR_J_bit (1  24)	/* Java mode */
 
 #define PSR_MODE	0x001f	/* mode mask */
 #define PSR_USR26_MODE	0x
@@ -258,6 +269,11 @@
 #define CPU_ID_ARM_88SV584X_V6	0x410fb020 /* Marvell Sheeva 88SV584x v6 Core */
 
 /* CPUID registers */
+#define ARM_ISA3_SYNCHPRIM_MASK	0xf000
+#define ARM_ISA4_SYNCHPRIM_MASK	0x00f0
+#define ARM_ISA3_SYNCHPRIM_LDREX	0x10	// LDREX
+#define ARM_ISA3_SYNCHPRIM_LDREXPLUS	0x13	// +CLREX/LDREXB/LDREXH
+#define ARM_ISA3_SYNCHPRIM_LDREXD	0x20	// +LDREXD
 #define ARM_PFR0_THUMBEE_MASK	0xf000
 #define ARM_PFR1_GTIMER_MASK	0x000f
 #define ARM_PFR1_VIRT_MASK	0xf000
@@ -347,6 +363,9 @@
 #define CPU_CONTROL_VECRELOC	0x2000 /* V: Vector relocation */
 #define CPU_CONTROL_ROUNDROBIN	0x4000 /* RR: Predictable replacement */
 #define CPU_CONTROL_V4COMPAT	0x8000 /* L4: ARMv4 compat LDR R15 etc */
+#define CPU_CONTROL_HA_ENABLE	0x0002 /* HA: Hardware Access flag enable */
+#define CPU_CONTROL_WXN_ENABLE	0x0008 /* WXN: Write Execute Never */
+#define CPU_CONTROL_UWXN_ENABLE	0x0010 /* UWXN: User Write eXecute Never */
 #define CPU_CONTROL_FI_ENABLE	0x0020 /* FI: Low interrupt latency */
 #define CPU_CONTROL_UNAL_ENABLE	0x0040 /* U: unaligned data access */
 #define CPU_CONTROL_XP_ENABLE	0x0080 /* XP: extended page table */
@@ -368,6 +387,13 @@
 #define	CPACR_RESERVED		2
 #define	CPACR_ALL		3 /* Privileged and User mode access */
 
+/* ARMv6/ARMv7 Non-Secure Access Control Register (CP15, 0, c1, c1, 2) */
+#define NSACR_SMP		0x0004 /* ACTRL.SMP is writeable (!A8) */
+#define NSACR_L2ERR		0x0002 /* L2ECTRL is writeable (!A8) */
+#define NSACR_ASEDIS		0x8000 /* Deny Advanced SIMD Ext. */
+#define NSACR_D32DIS		0x4000 /* Deny VFP regs 15-31 */
+#define NSACR_CPn(n)		(1  (n)) /* NonSecure access allowed */
+
 /* ARM11x6 Auxiliary Control Register (CP15 register 1, opcode2 1) */
 #define	ARM11X6_AUXCTL_RS	0x0001 /* return stack */
 #define	ARM11X6_AUXCTL_DB	0x0002 /* dynamic branch prediction */
@@ -521,7 +547,11 @@
 #define FAULT_PERM_S0x0d /* Permission -- Section */
 #define FAULT_PERM_P0x0f /* Permission -- Page */
 
-#define	FAULT_IMPRECISE	0x400	/* Imprecise exception (XSCALE) */
+#define FAULT_LPAE	0x0200	/* (SW) used long descriptors */
+#define FAULT_IMPRECISE	0x0400	/* Imprecise exception (XSCALE) */
+#define FAULT_WRITE	0x0800	/* fault was due to write (ARMv6+) */
+#define FAULT_EXT	0x1000	/* fault was due to external abort (ARMv6+) */
+#define FAULT_CM	0x2000	/* fault was due to cache maintenance (ARMv7+) */
 
 /*
  * Address of the vector page, low and high versions.
@@ -542,7 +572,21 @@
 
 #define INSN_SIZE		4		/* Always 4 bytes */
 #define INSN_COND_MASK		0xf000	/* Condition mask */
-#define INSN_COND_AL		0xe000	/* Always condition */
+#define INSN_COND_EQ		0		/* Z == 1 */
+#define INSN_COND_NE		1		/* Z == 0 */
+#define INSN_COND_CS		2		/* C == 1 */
+#define INSN_COND_CC		3		/* C == 0 */
+#define INSN_COND_MI		4		/* N == 1 */
+#define INSN_COND_PL		5		/* N == 0 */
+#define INSN_COND_VS		6		/* V == 1 */
+#define INSN_COND_VC		7		/* V == 0 */
+#define INSN_COND_HI		8		/* C == 1  Z == 0 */
+#define INSN_COND_LS		9		/* C == 0 || Z == 1 */
+#define INSN_COND_GE		10		/* N == V */
+#define INSN_COND_LT		11		/* N != V */
+#define INSN_COND_GT		12		/* Z == 

CVS commit: othersrc/external/bsd/multigest

2014-03-25 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Mar 26 01:20:34 UTC 2014

Modified Files:
othersrc/external/bsd/multigest/bin: Makefile
othersrc/external/bsd/multigest/dist: multigest.c multigest.h
Added Files:
othersrc/external/bsd/multigest/bin: 24.expected 25.expected
26.expected

Log Message:
Update multigest to version 20140325

+ add digest combiners to the finalisation part of multigest.
  4 combiners are provided:

  + concat (the default, where output is appended)
collision resistance is needed, but NOT pre-image-resistance,
second pre-image resistance, PRF

  + comb4p
(see On the Security of Hash function Combiners, Ph.D. thesis
 by Anja Lehmann)


http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.4611rep=rep1type=pdf

collision-resistant, PRF, target-collision-resistant, and MAC
not as efficient as other combiners

  + xor (result is final-digest1 ^ final-digest2)
where PRF needed, but NOT collision resistance

  + hash (finalisation part does is update-digest1(final-digest2()))
where pre-image-resistance needed, but NOT collision resistance

  these are specified as pseudo-digests in the algorithm specification
  For a discussion of digest combiners, please see:
  https://tahoe-lafs.org/pipermail/tahoe-dev/2010-June/004575.html

+ modify rawsize calculation to only require as many bytes as will appear
  in the resulting hash


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/multigest/bin/24.expected \
othersrc/external/bsd/multigest/bin/25.expected \
othersrc/external/bsd/multigest/bin/26.expected
cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/multigest/bin/Makefile
cvs rdiff -u -r1.10 -r1.11 othersrc/external/bsd/multigest/dist/multigest.c
cvs rdiff -u -r1.8 -r1.9 othersrc/external/bsd/multigest/dist/multigest.h

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

Modified files:

Index: othersrc/external/bsd/multigest/bin/Makefile
diff -u othersrc/external/bsd/multigest/bin/Makefile:1.4 othersrc/external/bsd/multigest/bin/Makefile:1.5
--- othersrc/external/bsd/multigest/bin/Makefile:1.4	Sun Aug 18 06:03:14 2013
+++ othersrc/external/bsd/multigest/bin/Makefile	Wed Mar 26 01:20:34 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2013/08/18 06:03:14 agc Exp $
+# $NetBSD: Makefile,v 1.5 2014/03/26 01:20:34 agc Exp $
 
 .include bsd.own.mk
 
@@ -94,3 +94,12 @@ t: ${PROG}
 	env LD_LIBRARY_PATH=${LIB_MULTIGEST_DIR} ./${PROG} -o 23.out -Fdigest -a blake2,crc32c,md5,rmd160,sha1,sha256,sha3-224,sha3-256,sha3-384,sha3-512,sha512,size,tiger2,tiger,whirlpool -r 2.in
 	diff 23.expected 23.out
 	rm -f 23.out
+	env LD_LIBRARY_PATH=${LIB_MULTIGEST_DIR} ./${PROG} -o 24.out -a comb4p,rmd160,sha1 2.in
+	diff 24.expected 24.out
+	rm -f 24.out
+	env LD_LIBRARY_PATH=${LIB_MULTIGEST_DIR} ./${PROG} -o 25.out -a xor,rmd160,sha1 2.in
+	diff 25.expected 25.out
+	rm -f 25.out
+	env LD_LIBRARY_PATH=${LIB_MULTIGEST_DIR} ./${PROG} -o 26.out -a hash,rmd160,sha1 2.in
+	diff 26.expected 26.out
+	rm -f 26.out

Index: othersrc/external/bsd/multigest/dist/multigest.c
diff -u othersrc/external/bsd/multigest/dist/multigest.c:1.10 othersrc/external/bsd/multigest/dist/multigest.c:1.11
--- othersrc/external/bsd/multigest/dist/multigest.c:1.10	Tue Mar 25 17:44:34 2014
+++ othersrc/external/bsd/multigest/dist/multigest.c	Wed Mar 26 01:20:34 2014
@@ -175,6 +175,12 @@ wrap_size_init(void *v)
 	memset(v, 0x0, sizeof(uint64_t));
 }
 
+static void
+wrap_null_init(void *v)
+{
+	USE_ARG(v);
+}
+
 /*/
 
 static void
@@ -249,6 +255,14 @@ wrap_size_update(void *v, const char *da
 	memcpy(v, n, sizeof(n));
 }
 
+static void
+wrap_null_update(void *v, const char *data, unsigned len)
+{
+	USE_ARG(v);
+	USE_ARG(data);
+	USE_ARG(len);
+}
+
 /*/
 
 static void
@@ -330,8 +344,20 @@ wrap_size_final(uint8_t *raw, void *v)
 	memcpy(raw, w, sizeof(w));
 }
 
+static void
+wrap_null_final(uint8_t *raw, void *v)
+{
+	USE_ARG(raw);
+	USE_ARG(v);
+}
+
 /*/
 
+#define COMBINE_CONCAT		0x0
+#define COMBINE_COMB4P		0x1
+#define COMBINE_HASH		0x2
+#define COMBINE_XOR		0x3
+
 /* digest algorithm struct */
 typedef struct Alg {
 	const char	*name;		/* digest name */
@@ -341,30 +367,38 @@ typedef struct Alg {
 	mg_initfunc_t	 init;		/* digest init function */
 	mg_updatefunc_t	 update;	/* digest update function */
 	mg_finalfunc_t	 final;		/* digest final function */
+	uint32_t	 combiner;	/* combination type */
 } Alg;
 
 static const Alg	algs[] = {
-	{ MD5,	3, sizeof(MD5_CTX), 	16, wrap_md5_init, wrap_md5_update, wrap_md5_final },
-	{ SHA1,	4, sizeof(SHA1_CTX), 	20, wrap_sha1_init, wrap_sha1_update, wrap_sha1_final },
-	{ SHA256,	6, sizeof(SHA256_CTX), 	32, wrap_sha256_init, wrap_sha256_update, wrap_sha256_final },
-	{ SHA512,	6, sizeof(SHA512_CTX), 	64, wrap_sha512_init, wrap_sha512_update, wrap_sha512_final },
-	{ BLAKE2,	6, sizeof(BLAKE2_CTX),	64

CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:57:04 UTC 2014

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ahcisata_pci.c

Log Message:
Use ahci_resume


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.2.4.1 -r1.12.4.2.4.2 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.1 src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.2
--- src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.1	Tue Nov  5 18:32:45 2013
+++ src/sys/dev/pci/ahcisata_pci.c	Wed Mar 26 01:57:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.12.4.2.4.2 2014/03/26 01:57:03 matt Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.2 2014/03/26 01:57:03 matt Exp $);
 
 #include sys/types.h
 #include sys/malloc.h
@@ -211,10 +211,7 @@ ahci_pci_resume(device_t dv PMF_FN_ARGS)
 	int s;
 
 	s = splbio();
-	ahci_reset(sc);
-	ahci_setup_ports(sc);
-	ahci_reprobe_drives(sc);
-	ahci_enable_intrs(sc);
+	ahci_resume(sc);
 	splx(s);
 
 	return true;



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:59:08 UTC 2014

Modified Files:
src/sys/arch/arm/cortex [matt-nb5-mips64]: gic.c

Log Message:
Let bus_space so the endian conversion if needed


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 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.5.2.2 src/sys/arch/arm/cortex/gic.c:1.5.2.3
--- src/sys/arch/arm/cortex/gic.c:1.5.2.2	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/cortex/gic.c	Wed Mar 26 01:59:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $	*/
+/*	$NetBSD: gic.c,v 1.5.2.3 2014/03/26 01:59:08 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,7 +31,7 @@
 #define _INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gic.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: gic.c,v 1.5.2.3 2014/03/26 01:59:08 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -109,28 +109,24 @@ __CTASSERT(NIPL == 8);
 static inline uint32_t
 gicc_read(struct armgic_softc *sc, bus_size_t o)
 {
-	uint32_t v = bus_space_read_4(sc-sc_memt, sc-sc_gicch, o);
-	return le32toh(v);
+	return bus_space_read_4(sc-sc_memt, sc-sc_gicch, o);
 }
 
 static inline void
 gicc_write(struct armgic_softc *sc, bus_size_t o, uint32_t v)
 {
-	v = htole32(v);
 	bus_space_write_4(sc-sc_memt, sc-sc_gicch, o, v);
 }
 
 static inline uint32_t
 gicd_read(struct armgic_softc *sc, bus_size_t o)
 {
-	uint32_t v = bus_space_read_4(sc-sc_memt, sc-sc_gicdh, o);
-	return le32toh(v);
+	return bus_space_read_4(sc-sc_memt, sc-sc_gicdh, o);
 }
 
 static inline void
 gicd_write(struct armgic_softc *sc, bus_size_t o, uint32_t v)
 {
-	v = htole32(v);
 	bus_space_write_4(sc-sc_memt, sc-sc_gicdh, o, v);
 }
 



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:00:46 UTC 2014

Modified Files:
src/sys/arch/arm/arm [matt-nb5-mips64]: cpufunc.c

Log Message:
For armv7, enable BE properly.  Make sure UNAL is always set.


To generate a diff of this commit:
cvs rdiff -u -r1.89.10.1 -r1.89.10.2 src/sys/arch/arm/arm/cpufunc.c

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

Modified files:

Index: src/sys/arch/arm/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.89.10.1 src/sys/arch/arm/arm/cpufunc.c:1.89.10.2
--- src/sys/arch/arm/arm/cpufunc.c:1.89.10.1	Sat Feb 15 16:18:35 2014
+++ src/sys/arch/arm/arm/cpufunc.c	Wed Mar 26 02:00:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.89.10.1 2014/02/15 16:18:35 matt Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.89.10.2 2014/03/26 02:00:45 matt Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.89.10.1 2014/02/15 16:18:35 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.89.10.2 2014/03/26 02:00:45 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_cpuoptions.h
@@ -3053,20 +3053,15 @@ armv7_setup(char *args)
 	int cpuctrl;
 
 	cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_IC_ENABLE
-	| CPU_CONTROL_DC_ENABLE | CPU_CONTROL_BPRD_ENABLE ;
-#if 0
-	int cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE
-	| CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
-	| CPU_CONTROL_ROM_ENABLE | CPU_CONTROL_BPRD_ENABLE
-	| CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE
-	| CPU_CONTROL_ROUNDROBIN | CPU_CONTROL_CPCLK;
+	| CPU_CONTROL_DC_ENABLE | CPU_CONTROL_BPRD_ENABLE
+#ifdef __ARMEB__
+	| CPU_CONTROL_EX_BEND
 #endif
-
 #ifdef ARM32_DISABLE_ALIGNMENT_FAULTS
-	cpuctrl |= CPU_CONTROL_UNAL_ENABLE;
-#else
-	cpuctrl |= CPU_CONTROL_AFLT_ENABLE;
+	| CPU_CONTROL_AFLT_ENABLE
 #endif
+	| CPU_CONTROL_UNAL_ENABLE;
+	const int cpuctrlmask = cpuctrl | CPU_CONTROL_AFLT_ENABLE;
 
 	cpuctrl = parse_cpu_options(args, armv7_options, cpuctrl);
 
@@ -3080,7 +3075,7 @@ armv7_setup(char *args)
 
 	/* Set the control register */
 	curcpu()-ci_ctrl = cpuctrl;
-	cpu_control(0x, cpuctrl);
+	cpu_control(cpuctrlmask, cpuctrl);
 }
 #endif /* CPU_CORTEX */
 



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:01:10 UTC 2014

Modified Files:
src/sys/arch/arm/arm [matt-nb5-mips64]: arm_machdep.c

Log Message:
If BE on armv7, set PSR_E_BIT


To generate a diff of this commit:
cvs rdiff -u -r1.21.8.1 -r1.21.8.2 src/sys/arch/arm/arm/arm_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/arm/arm/arm_machdep.c
diff -u src/sys/arch/arm/arm/arm_machdep.c:1.21.8.1 src/sys/arch/arm/arm/arm_machdep.c:1.21.8.2
--- src/sys/arch/arm/arm/arm_machdep.c:1.21.8.1	Sat Feb 15 16:18:35 2014
+++ src/sys/arch/arm/arm/arm_machdep.c	Wed Mar 26 02:01:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm_machdep.c,v 1.21.8.1 2014/02/15 16:18:35 matt Exp $	*/
+/*	$NetBSD: arm_machdep.c,v 1.21.8.2 2014/03/26 02:01:10 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -79,7 +79,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: arm_machdep.c,v 1.21.8.1 2014/02/15 16:18:35 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: arm_machdep.c,v 1.21.8.2 2014/03/26 02:01:10 matt Exp $);
 
 #include sys/exec.h
 #include sys/proc.h
@@ -173,12 +173,20 @@ setregs(struct lwp *l, struct exec_packa
 	tf-tf_svc_lr = 0x;		/* Something we can see */
 	tf-tf_pc = pack-ep_entry;
 #ifdef __PROG32
+#if defined(__ARMEB__)
+	/*
+	 * If we are running on ARMv7, we need to set the E bit to force
+	 * programs to start as big endian.
+	 */
+	tf-tf_spsr = PSR_USR32_MODE | (CPU_IS_ARMV7_P() ? PSR_E_BIT : 0);
+#else
 	tf-tf_spsr = PSR_USR32_MODE;
+#endif /* __ARMEB__ */ 
 #ifdef THUMB_CODE
 	if (pack-ep_entry  1)
 		tf-tf_spsr |= PSR_T_bit;
 #endif
-#endif
+#endif /* __PROG32 */
 
 	l-l_md.md_flags = 0;
 #ifdef EXEC_AOUT



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:02:29 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_cca.c

Log Message:
For non-BCM5301X, set frequency to 1/4 of the apb clock.


To generate a diff of this commit:
cvs rdiff -u -r1.1.16.2 -r1.1.16.3 src/sys/arch/arm/broadcom/bcm53xx_cca.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/bcm53xx_cca.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_cca.c:1.1.16.2 src/sys/arch/arm/broadcom/bcm53xx_cca.c:1.1.16.3
--- src/sys/arch/arm/broadcom/bcm53xx_cca.c:1.1.16.2	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_cca.c	Wed Mar 26 02:02:29 2014
@@ -43,7 +43,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_cca.c,v 1.1.16.2 2014/02/15 16:18:36 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_cca.c,v 1.1.16.3 2014/03/26 02:02:29 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -279,7 +279,13 @@ com_cca_attach(device_t parent, device_t
 	bus_space_handle_t bsh;
 
 	sc-sc_dev = self;
+
+#ifdef BCM5301X
 	sc-sc_frequency = BCM53XX_REF_CLK;
+#else
+	const struct cpu_softc * const cpu = curcpu()-ci_softc;
+	sc-sc_frequency = cpu-cpu_clk.clk_apb / 4; 
+#endif  
 	sc-sc_type = COM_TYPE_NORMAL;
 
 	if (com_is_console(ccaaa-ccaaa_bst, addr, bsh) == 0 



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:13:54 UTC 2014

Modified Files:
src/sys/arch/arm/cortex [matt-nb5-mips64]: a9_mpsubr.S

Log Message:
flush the icache after enabling the SCU


To generate a diff of this commit:
cvs rdiff -u -r1.12.2.4 -r1.12.2.5 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.12.2.4 src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.5
--- src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.4	Mon Mar 24 18:44:13 2014
+++ src/sys/arch/arm/cortex/a9_mpsubr.S	Wed Mar 26 02:13:54 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9_mpsubr.S,v 1.12.2.4 2014/03/24 18:44:13 matt Exp $	*/
+/*	$NetBSD: a9_mpsubr.S,v 1.12.2.5 2014/03/26 02:13:54 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -397,13 +397,23 @@ cortex_init:
 	isb
 	XPUTC(#50)
 
+#ifdef KERNEL_BASES_EQUAL
+	bl	_C_LABEL(armv7_icache_inv_all)	@ invalidate i-cache
+#else
+	adr	ip, cortex_init
+	ldr	r0, =armv7_icache_inv_all
+	bfi	ip, r0, #0, #28
+	blx	ip
+#endif
+	XPUTC(#51)
+
 	/*
 	 * Step 4a, enable the data cache
 	 */
 	orr	r2, r2, #CPU_CONTROL_DC_ENABLE	@ set data cache enable
 	mcr	p15, 0, r2, c1, c0, 0		@ reenable caches
 	isb
-	XPUTC(#51)
+	XPUTC(#52)
 #endif
 
 	/*



CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/bcm53xx

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:15:02 UTC 2014

Modified Files:
src/sys/arch/evbarm/bcm53xx [matt-nb5-mips64]: bcm53xx_machdep.c

Log Message:
Use apb/4 for the com freq on !BCM5301X


To generate a diff of this commit:
cvs rdiff -u -r1.7.4.2 -r1.7.4.3 \
src/sys/arch/evbarm/bcm53xx/bcm53xx_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/bcm53xx/bcm53xx_machdep.c
diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.7.4.2 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.7.4.3
--- src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.7.4.2	Sat Feb 15 16:18:37 2014
+++ src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c	Wed Mar 26 02:15:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_machdep.c,v 1.7.4.2 2014/02/15 16:18:37 matt Exp $	*/
+/*	$NetBSD: bcm53xx_machdep.c,v 1.7.4.3 2014/03/26 02:15:02 matt Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define IDM_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bcm53xx_machdep.c,v 1.7.4.2 2014/02/15 16:18:37 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bcm53xx_machdep.c,v 1.7.4.3 2014/03/26 02:15:02 matt Exp $);
 
 #include opt_evbarm_boardtype.h
 #include opt_broadcom.h
@@ -330,14 +330,20 @@ consinit(void)
 	/*
 	 * Switch to the reference clock
 	 */
+#ifdef BCM5301X
+	const int comfreq = BCM53XX_REF_CLK;
 	v = bus_space_read_4(bcm53xx_ioreg_bst, bcm53xx_ioreg_bsh,
 	CCA_MISC_BASE + MISC_CORECTL);
 	v = ~CORECTL_UART_CLK_OVERRIDE;
 	bus_space_write_4(bcm53xx_ioreg_bst, bcm53xx_ioreg_bsh,
 	CCA_MISC_BASE + MISC_CORECTL, v);
+#else
+	const struct cpu_softc * const cpu = curcpu()-ci_softc;
+	const int comfreq = cpu-cpu_clk.clk_apb / 4;
+#endif
 
 if (comcnattach(bcm53xx_ioreg_bst, comcnaddr, comcnspeed,
-BCM53XX_REF_CLK, COM_TYPE_NORMAL, comcnmode))
+comfreq, COM_TYPE_NORMAL, comcnmode))
 panic(Serial console can not be initialized.);
 }
 



CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/bcm53xx

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:16:05 UTC 2014

Modified Files:
src/sys/arch/evbarm/bcm53xx [matt-nb5-mips64]: bcm53xx_start.S

Log Message:
Use adr/bfi to access kernel variables.


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.2 -r1.10.2.3 \
src/sys/arch/evbarm/bcm53xx/bcm53xx_start.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/evbarm/bcm53xx/bcm53xx_start.S
diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.10.2.2 src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.10.2.3
--- src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.10.2.2	Sat Feb 15 16:18:37 2014
+++ src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S	Wed Mar 26 02:16:05 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_start.S,v 1.10.2.2 2014/02/15 16:18:37 matt Exp $	*/
+/*	$NetBSD: bcm53xx_start.S,v 1.10.2.3 2014/03/26 02:16:05 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -45,7 +45,7 @@
 #define	CONADDR		0x18000300
 #endif
 
-RCSID($NetBSD: bcm53xx_start.S,v 1.10.2.2 2014/02/15 16:18:37 matt Exp $)
+RCSID($NetBSD: bcm53xx_start.S,v 1.10.2.3 2014/03/26 02:16:05 matt Exp $)
 
 #undef VERBOSE_INIT_ARM
 #define VERBOSE_INIT_ARM
@@ -74,10 +74,14 @@ _C_LABEL(bcm53xx_start):
 	/*
 	 * Save any arguments u-boot passed us.
 	 */
-	ldr	r4, .Luboot_args_pic0
-	add	r4, r4, pc
+#ifdef KERNEL_BASES_EQUAL
+	ldr	r4, .Luboot_args
+#else
+	adr	r4, bcm53xx_start
+	ldr	r5, .Luboot_args
+	bfi	r4, r5, #0, #28
+#endif
 	stmia	r4, {r0-r3}
-.LPIC0:
 
 	/*
 	 * Let's turn on the CCA watchdog in case something goes horribly wrong.
@@ -121,15 +125,6 @@ _C_LABEL(bcm53xx_start):
 
 	XPUTC(#89)
 
-	ldr	r0, .Luboot_args
-	ldr	r2, [r0]
-	ldr	r1, .Luboot_args_pic1
-	add	r1, r1, pc
-	ldr	r1, [r1]
-.LPIC1:
-	cmp	r1, r2
-1:	bne	1b
-
 	XPUTC(#90)
 
 	/*
@@ -153,10 +148,6 @@ _C_LABEL(bcm53xx_start):
 	nop
 
 	/* NOTREACHED */
-.Luboot_args_pic0:
-	.word	uboot_args - .LPIC0
-.Luboot_args_pic1:
-	.word	uboot_args - .LPIC0
 .Luboot_args:
 	.word	uboot_args
 .Lstart:



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

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:39:58 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_reg.h

Log Message:
Be consistent and use #definespace


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/broadcom/bcm53xx_reg.h

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm53xx_reg.h
diff -u src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.14 src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.15
--- src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.14	Mon Oct 28 22:51:16 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_reg.h	Wed Mar 26 02:39:57 2014
@@ -45,183 +45,183 @@
  * 0x_..0x_043f	1088B	Internal SKU ROM Region
  * 0x_1000..0x_1fff	   4KB	Enumeration ROM Register Region
  */
-#define	BCM53XX_PCIE0_OWIN_PBASE 0x0800
-#define	BCM53XX_PCIE0_OWIN_SIZE	0x0400
-#define	BCM53XX_PCIE0_OWIN_MAX	0x0800
+#define BCM53XX_PCIE0_OWIN_PBASE 0x0800
+#define BCM53XX_PCIE0_OWIN_SIZE	0x0400
+#define BCM53XX_PCIE0_OWIN_MAX	0x0800
 
-#define	BCM53XX_IOREG_PBASE	0x1800
-#define	BCM53XX_IOREG_SIZE	0x0020
+#define BCM53XX_IOREG_PBASE	0x1800
+#define BCM53XX_IOREG_SIZE	0x0020
 
-#define	BCM53XX_ARMCORE_PBASE	0x1900
-#define	BCM53XX_ARMCORE_SIZE	0x0010
+#define BCM53XX_ARMCORE_PBASE	0x1900
+#define BCM53XX_ARMCORE_SIZE	0x0010
 
-#define	BCM53XX_NAND_PBASE	0x1c00
-#define	BCM53XX_NAND_SIZE	0x0100
+#define BCM53XX_NAND_PBASE	0x1c00
+#define BCM53XX_NAND_SIZE	0x0100
 
-#define	BCM53XX_SPIFLASH_PBASE	0x1d00
-#define	BCM53XX_SPIFLASH_SIZE	0x0100
+#define BCM53XX_SPIFLASH_PBASE	0x1d00
+#define BCM53XX_SPIFLASH_SIZE	0x0100
 
-#define	BCM53XX_PCIE1_OWIN_PBASE 0x4000
-#define	BCM53XX_PCIE1_OWIN_SIZE	0x0400
-#define	BCM53XX_PCIE1_OWIN_MAX	0x0800
+#define BCM53XX_PCIE1_OWIN_PBASE 0x4000
+#define BCM53XX_PCIE1_OWIN_SIZE	0x0400
+#define BCM53XX_PCIE1_OWIN_MAX	0x0800
 
-#define	BCM53XX_PCIE2_OWIN_PBASE 0x4800
-#define	BCM53XX_PCIE2_OWIN_SIZE	0x0400
-#define	BCM53XX_PCIE2_OWIN_MAX	0x0800
+#define BCM53XX_PCIE2_OWIN_PBASE 0x4800
+#define BCM53XX_PCIE2_OWIN_SIZE	0x0400
+#define BCM53XX_PCIE2_OWIN_MAX	0x0800
 
-#define	BCM53XX_IO_SIZE		(BCM53XX_IOREG_SIZE		\
+#define BCM53XX_IO_SIZE		(BCM53XX_IOREG_SIZE		\
  + BCM53XX_ARMCORE_SIZE		\
  + BCM53XX_PCIE0_OWIN_SIZE	\
  + BCM53XX_PCIE1_OWIN_SIZE	\
  + BCM53XX_PCIE2_OWIN_SIZE)
 
-#define	BCM53XX_REF_CLK		(25*1000*1000)
+#define BCM53XX_REF_CLK		(25*1000*1000)
 
-#define	CCA_UART_FREQ		BCM53XX_REF_CLK
+#define CCA_UART_FREQ		BCM53XX_REF_CLK
 
 /* Chip Common A */
-#define	CCA_MISC_BASE		0x00
-#define	CCA_MISC_SIZE		0x001000
-#define	CCA_UART0_BASE		0x000300
-#define	CCA_UART1_BASE		0x000400
+#define CCA_MISC_BASE		0x00
+#define CCA_MISC_SIZE		0x001000
+#define CCA_UART0_BASE		0x000300
+#define CCA_UART1_BASE		0x000400
 
 /* Chip Common B */
-#define	CCB_BASE		0x00
-#define	CCB_SIZE		0x03
-#define	PWM_BASE		0x002000
-#define	MII_BASE		0x003000
-#define	RNG_BASE		0x004000
-#define	TIMER0_BASE		0x005000
-#define	TIMER1_BASE		0x006000
-#define	SRAB_BASE		0x007000
+#define CCB_BASE		0x00
+#define CCB_SIZE		0x03
+#define PWM_BASE		0x002000
+#define MII_BASE		0x003000
+#define RNG_BASE		0x004000
+#define TIMER0_BASE		0x005000
+#define TIMER1_BASE		0x006000
+#define SRAB_BASE		0x007000
 
-#define	CRU_BASE		0x00b000
-#define	DMU_BASE		0x00c000
+#define CRU_BASE		0x00b000
+#define DMU_BASE		0x00c000
 
-#define	DDR_BASE		0x01
+#define DDR_BASE		0x01
 
-#define	PCIE0_BASE		0x012000
-#define	PCIE1_BASE		0x013000
+#define PCIE0_BASE		0x012000
+#define PCIE1_BASE		0x013000
 
 #ifdef BCM5301X
-#define	UART2_BASE		0x008000
-#define	SMBUS1_BASE		0x009000
-#define	PCIE2_BASE		0x014000
+#define UART2_BASE		0x008000
+#define SMBUS1_BASE		0x009000
+#define PCIE2_BASE		0x014000
 #define SDIO_BASE		0x02
-#define	EHCI_BASE		0x021000
-#define	OHCI_BASE		0x022000
-#define	GMAC0_BASE		0x024000
-#define	GMAC1_BASE		0x025000
-#define	GMAC2_BASE		0x026000
-#define	GMAC3_BASE		0x027000
-#define	NAND_BASE		0x028000
+#define EHCI_BASE		0x021000
+#define OHCI_BASE		0x022000
+#define GMAC0_BASE		0x024000
+#define GMAC1_BASE		0x025000
+#define GMAC2_BASE		0x026000
+#define GMAC3_BASE		0x027000
+#define NAND_BASE		0x028000
 #define QSPI_BASE		0x029000
 #define I2S_BASE		0x02A000
 #define DMAC_BASE		0x02C000
 #endif
 
 #ifdef BCM563XX
-#define	UART2_BASE		0x007000
-#define	SMBUS1_BASE		0x008000
-#define	WDT_BASE		0x009000
-#define	PKA_BASE		0x00a000
-#define	SMBUS2_BASE		0x00b000
+#define UART2_BASE		0x007000
+#define SMBUS1_BASE		0x008000
+#define WDT_BASE		0x009000
+#define PKA_BASE		0x00a000
+#define SMBUS2_BASE		0x00b000
 #define DMAC_BASE		0x02
-#define	GMAC0_BASE		0x022000
-#define	GMAC1_BASE		0x023000
-#define	NAND_BASE		0x026000
-#define	QSPI_BASE		0x027000

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

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 03:18:56 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_reg.h

Log Message:
Correct BCM563XX values.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/broadcom/bcm53xx_reg.h

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm53xx_reg.h
diff -u src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.15 src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.16
--- src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.15	Wed Mar 26 02:39:57 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_reg.h	Wed Mar 26 03:18:56 2014
@@ -87,6 +87,7 @@
 
 /* Chip Common B */
 #define CCB_BASE		0x00
+#ifdef BCM5301X
 #define CCB_SIZE		0x03
 #define PWM_BASE		0x002000
 #define MII_BASE		0x003000
@@ -94,9 +95,28 @@
 #define TIMER0_BASE		0x005000
 #define TIMER1_BASE		0x006000
 #define SRAB_BASE		0x007000
+#define UART2_BASE		0x008000
+#define SMBUS1_BASE		0x009000
 
 #define CRU_BASE		0x00b000
 #define DMU_BASE		0x00c000
+#elif defined(BCM563XX)
+#define CCB_SIZE		0x04
+#define GPIO_BASE		0x03
+#define PWM_BASE		0x031000
+#define MII_BASE		0x032000
+#define RNG_BASE		0x033000
+#define TIMER0_BASE		0x034000
+#define TIMER1_BASE		0x035000
+#define UART2_BASE		0x037000
+#define SMBUS0_BASE		0x038000
+#define WDT_BASE		0x039000
+#define PKA_BASE		0x03a000
+#define SMBUS1_BASE		0x03b000
+
+#define CRU_BASE		0x03e000
+#define DMU_BASE		0x03f000
+#endif
 
 #define DDR_BASE		0x01
 
@@ -104,8 +124,6 @@
 #define PCIE1_BASE		0x013000
 
 #ifdef BCM5301X
-#define UART2_BASE		0x008000
-#define SMBUS1_BASE		0x009000
 #define PCIE2_BASE		0x014000
 #define SDIO_BASE		0x02
 #define EHCI_BASE		0x021000
@@ -121,11 +139,6 @@
 #endif
 
 #ifdef BCM563XX
-#define UART2_BASE		0x007000
-#define SMBUS1_BASE		0x008000
-#define WDT_BASE		0x009000
-#define PKA_BASE		0x00a000
-#define SMBUS2_BASE		0x00b000
 #define DMAC_BASE		0x02
 #define GMAC0_BASE		0x022000
 #define GMAC1_BASE		0x023000
@@ -379,6 +392,10 @@
 #define LCPLL_CONTROL2_CH2_MDIV	__BITS(15,8)	// = (n ? n : 256), clk_ddr 
 #define LCPLL_CONTROL2_CH3_MDIV	__BITS(7,0)	// = (n ? n : 256), clf_dft
 
+#define DMU_CRU_RESET		0x200
+#define DMU_CRU_RESET_IPROC	__BIT(1)
+#define DMU_CRU_RESET_CMICD	__BIT(0)
+
 #endif /* DMU_PRIVATE */
 
 #ifdef DDR_PRIVATE
@@ -657,8 +674,14 @@
 #define IDM_SDIO_BASE			0x16000
 #define IDM_I2S_M0_BASE			0x17000
 #define IDM_A9JTAG_M0_BASE		0x18000
+#ifdef BCM5301X
 #define IDM_NAND_BASE			0x1a000
 #define IDM_QSPI_BASE			0x1b000
+#endif
+#ifdef BCM563XX
+#define IDM_NAND_BASE			0x1b000
+#define IDM_QSPI_BASE			0x1c000
+#endif
 #define IDM_APBX_BASE			0x21000
 
 #define IDM_IO_CONTROL_DIRECT		0x0408
@@ -933,6 +956,7 @@ struct gmac_rxdb {
 #define NAND_CMD_ADDR	0x000c	// Nand Flash Command Address
 #define NAND_CMD_END_ADDR	0x0010	// Nand Flash Command End Address
 #define NAND_INTFC_STATUS	0x0014	// Nand Flash Interface Status
+#define NAND_CS_NAND_SELECT	0x0018	// Nand Flash CS
 #define NAND_CS_NAND_XOR	0x001c	// Nand Flash EBI
 #define NAND_LL_OP		0x0020	// Nand Flash Low Level Operation
 #define NAND_MPLANE_BASE_EXT_ADDR	0x0024	// Nand Flash Multiplane base address
@@ -1016,6 +1040,9 @@ struct gmac_rxdb {
 #define NAND_CMD_START_CSEL	__BITS(18,16)
 #define NAND_CMD_EXT_ADDRESS	__BITS(15,0)
 
+#define BCM_NAND_IDM_IO_CONTROL_APB_LE_MODE_BIT		__BIT(24)
+
+
 #endif /* NAND_PRIVATE */
 
 #endif /* _ARM_BROADCOM_BCM53XX_REG_H_ */



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

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 03:19:11 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c bcm53xx_ccb.c

Log Message:
Allow SRAB to be optional.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/broadcom/bcm53xx_board.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/broadcom/bcm53xx_ccb.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/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.20 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.21
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.20	Wed Feb 19 23:21:02 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Wed Mar 26 03:19:11 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.20 2014/02/19 23:21:02 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.21 2014/03/26 03:19:11 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.20 2014/02/19 23:21:02 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.21 2014/03/26 03:19:11 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -640,6 +640,7 @@ bcm53xx_device_register(device_t self, v
 	}
 }
 
+#ifdef SRAB_BASE
 static kmutex_t srab_lock __cacheline_aligned;
 
 void
@@ -742,3 +743,4 @@ bcm53xx_srab_write_8(u_int pageoffset, u
 	bcm53xx_srab_busywait(bst, bsh);
 	mutex_spin_exit(srab_lock);
 }
+#endif

Index: src/sys/arch/arm/broadcom/bcm53xx_ccb.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_ccb.c:1.5 src/sys/arch/arm/broadcom/bcm53xx_ccb.c:1.6
--- src/sys/arch/arm/broadcom/bcm53xx_ccb.c:1.5	Tue Dec 17 13:13:26 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_ccb.c	Wed Mar 26 03:19:11 2014
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_ccb.c,v 1.5 2013/12/17 13:13:26 joerg Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_ccb.c,v 1.6 2014/03/26 03:19:11 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -99,7 +99,9 @@ static const struct bcm_locators bcmccb_
 	{ bcmrng, RNG_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 1, { IRQ_RNG } },
 	{ bcmtmr, TIMER0_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 2, { IRQ_TIMER0_1, IRQ_TIMER0_2 } },
 	{ bcmtmr, TIMER1_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 2, { IRQ_TIMER1_1, IRQ_TIMER1_2 } },
+#ifdef SRAB_BASE
 	{ bcmsw, SRAB_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, },
+#endif
 	{ bcmcom, UART2_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 1, { IRQ_UART2 } },
 #ifdef BCM5301X
 	{ bcmi2c, SMBUS1_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 1, { IRQ_SMBUS1 } },



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 03:19:32 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_board.c
bcm53xx_ccb.c

Log Message:
Allow SRAB to be optional


To generate a diff of this commit:
cvs rdiff -u -r1.17.2.3 -r1.17.2.4 src/sys/arch/arm/broadcom/bcm53xx_board.c
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/arm/broadcom/bcm53xx_ccb.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/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.3 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.4
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.3	Wed Feb 19 23:19:57 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Wed Mar 26 03:19:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.17.2.3 2014/02/19 23:19:57 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.17.2.4 2014/03/26 03:19:32 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.17.2.3 2014/02/19 23:19:57 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.17.2.4 2014/03/26 03:19:32 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -640,6 +640,7 @@ bcm53xx_device_register(device_t self, v
 	}
 }
 
+#ifdef SRAB_BASE
 static kmutex_t srab_lock __cacheline_aligned;
 
 void
@@ -742,3 +743,4 @@ bcm53xx_srab_write_8(u_int pageoffset, u
 	bcm53xx_srab_busywait(bst, bsh);
 	mutex_spin_exit(srab_lock);
 }
+#endif /* SRAB_BASE */

Index: src/sys/arch/arm/broadcom/bcm53xx_ccb.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_ccb.c:1.5.2.2 src/sys/arch/arm/broadcom/bcm53xx_ccb.c:1.5.2.3
--- src/sys/arch/arm/broadcom/bcm53xx_ccb.c:1.5.2.2	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_ccb.c	Wed Mar 26 03:19:32 2014
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_ccb.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_ccb.c,v 1.5.2.3 2014/03/26 03:19:32 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -99,7 +99,9 @@ static const struct bcm_locators bcmccb_
 	{ bcmrng, RNG_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 1, { IRQ_RNG } },
 	{ bcmtmr, TIMER0_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 2, { IRQ_TIMER0_1, IRQ_TIMER0_2 } },
 	{ bcmtmr, TIMER1_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 2, { IRQ_TIMER1_1, IRQ_TIMER1_2 } },
+#ifdef SRAB_BASE
 	{ bcmsw, SRAB_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, },
+#endif
 	{ bcmcom, UART2_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 1, { IRQ_UART2 } },
 #ifdef BCM5301X
 	{ bcmi2c, SMBUS1_BASE, 0x1000, BCMCCBCF_PORT_DEFAULT, 1, { IRQ_SMBUS1 } },



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 03:20:18 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_reg.h

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/arch/arm/broadcom/bcm53xx_reg.h

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm53xx_reg.h
diff -u src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.14.2.2 src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.14.2.3
--- src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.14.2.2	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_reg.h	Wed Mar 26 03:20:18 2014
@@ -45,183 +45,196 @@
  * 0x_..0x_043f	1088B	Internal SKU ROM Region
  * 0x_1000..0x_1fff	   4KB	Enumeration ROM Register Region
  */
-#define	BCM53XX_PCIE0_OWIN_PBASE 0x0800
-#define	BCM53XX_PCIE0_OWIN_SIZE	0x0400
-#define	BCM53XX_PCIE0_OWIN_MAX	0x0800
+#define BCM53XX_PCIE0_OWIN_PBASE 0x0800
+#define BCM53XX_PCIE0_OWIN_SIZE	0x0400
+#define BCM53XX_PCIE0_OWIN_MAX	0x0800
 
-#define	BCM53XX_IOREG_PBASE	0x1800
-#define	BCM53XX_IOREG_SIZE	0x0020
+#define BCM53XX_IOREG_PBASE	0x1800
+#define BCM53XX_IOREG_SIZE	0x0020
 
-#define	BCM53XX_ARMCORE_PBASE	0x1900
-#define	BCM53XX_ARMCORE_SIZE	0x0010
+#define BCM53XX_ARMCORE_PBASE	0x1900
+#define BCM53XX_ARMCORE_SIZE	0x0010
 
-#define	BCM53XX_NAND_PBASE	0x1c00
-#define	BCM53XX_NAND_SIZE	0x0100
+#define BCM53XX_NAND_PBASE	0x1c00
+#define BCM53XX_NAND_SIZE	0x0100
 
-#define	BCM53XX_SPIFLASH_PBASE	0x1d00
-#define	BCM53XX_SPIFLASH_SIZE	0x0100
+#define BCM53XX_SPIFLASH_PBASE	0x1d00
+#define BCM53XX_SPIFLASH_SIZE	0x0100
 
-#define	BCM53XX_PCIE1_OWIN_PBASE 0x4000
-#define	BCM53XX_PCIE1_OWIN_SIZE	0x0400
-#define	BCM53XX_PCIE1_OWIN_MAX	0x0800
+#define BCM53XX_PCIE1_OWIN_PBASE 0x4000
+#define BCM53XX_PCIE1_OWIN_SIZE	0x0400
+#define BCM53XX_PCIE1_OWIN_MAX	0x0800
 
-#define	BCM53XX_PCIE2_OWIN_PBASE 0x4800
-#define	BCM53XX_PCIE2_OWIN_SIZE	0x0400
-#define	BCM53XX_PCIE2_OWIN_MAX	0x0800
+#define BCM53XX_PCIE2_OWIN_PBASE 0x4800
+#define BCM53XX_PCIE2_OWIN_SIZE	0x0400
+#define BCM53XX_PCIE2_OWIN_MAX	0x0800
 
-#define	BCM53XX_IO_SIZE		(BCM53XX_IOREG_SIZE		\
+#define BCM53XX_IO_SIZE		(BCM53XX_IOREG_SIZE		\
  + BCM53XX_ARMCORE_SIZE		\
  + BCM53XX_PCIE0_OWIN_SIZE	\
  + BCM53XX_PCIE1_OWIN_SIZE	\
  + BCM53XX_PCIE2_OWIN_SIZE)
 
-#define	BCM53XX_REF_CLK		(25*1000*1000)
+#define BCM53XX_REF_CLK		(25*1000*1000)
 
-#define	CCA_UART_FREQ		BCM53XX_REF_CLK
+#define CCA_UART_FREQ		BCM53XX_REF_CLK
 
 /* Chip Common A */
-#define	CCA_MISC_BASE		0x00
-#define	CCA_MISC_SIZE		0x001000
-#define	CCA_UART0_BASE		0x000300
-#define	CCA_UART1_BASE		0x000400
+#define CCA_MISC_BASE		0x00
+#define CCA_MISC_SIZE		0x001000
+#define CCA_UART0_BASE		0x000300
+#define CCA_UART1_BASE		0x000400
 
 /* Chip Common B */
-#define	CCB_BASE		0x00
-#define	CCB_SIZE		0x03
-#define	PWM_BASE		0x002000
-#define	MII_BASE		0x003000
-#define	RNG_BASE		0x004000
-#define	TIMER0_BASE		0x005000
-#define	TIMER1_BASE		0x006000
-#define	SRAB_BASE		0x007000
+#define CCB_BASE		0x00
+#ifdef BCM5301X
+#define CCB_SIZE		0x03
+#define PWM_BASE		0x002000
+#define MII_BASE		0x003000
+#define RNG_BASE		0x004000
+#define TIMER0_BASE		0x005000
+#define TIMER1_BASE		0x006000
+#define SRAB_BASE		0x007000
+#define UART2_BASE		0x008000
+#define SMBUS1_BASE		0x009000
+
+#define CRU_BASE		0x00b000
+#define DMU_BASE		0x00c000
+#elif defined(BCM563XX)
+#define CCB_SIZE		0x04
+#define GPIO_BASE		0x03
+#define PWM_BASE		0x031000
+#define MII_BASE		0x032000
+#define RNG_BASE		0x033000
+#define TIMER0_BASE		0x034000
+#define TIMER1_BASE		0x035000
+#define UART2_BASE		0x037000
+#define SMBUS0_BASE		0x038000
+#define WDT_BASE		0x039000
+#define PKA_BASE		0x03a000
+#define SMBUS1_BASE		0x03b000
 
-#define	CRU_BASE		0x00b000
-#define	DMU_BASE		0x00c000
+#define CRU_BASE		0x03e000
+#define DMU_BASE		0x03f000
+#endif
 
-#define	DDR_BASE		0x01
+#define DDR_BASE		0x01
 
-#define	PCIE0_BASE		0x012000
-#define	PCIE1_BASE		0x013000
+#define PCIE0_BASE		0x012000
+#define PCIE1_BASE		0x013000
 
 #ifdef BCM5301X
-#define	UART2_BASE		0x008000
-#define	SMBUS1_BASE		0x009000
-#define	PCIE2_BASE		0x014000
+#define PCIE2_BASE		0x014000
 #define SDIO_BASE		0x02
-#define	EHCI_BASE		0x021000
-#define	OHCI_BASE		0x022000
-#define	GMAC0_BASE		0x024000
-#define	GMAC1_BASE		0x025000
-#define	GMAC2_BASE		0x026000
-#define	GMAC3_BASE		0x027000
-#define	NAND_BASE		0x028000
+#define EHCI_BASE		0x021000
+#define OHCI_BASE		0x022000
+#define GMAC0_BASE		0x024000
+#define GMAC1_BASE		0x025000
+#define GMAC2_BASE		0x026000
+#define GMAC3_BASE		0x027000
+#define NAND_BASE		0x028000
 #define QSPI_BASE		0x029000
 #define I2S_BASE		0x02A000
 #define DMAC_BASE		

CVS commit: src

2014-03-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Mar 25 09:52:56 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/man: mi
src/etc: Makefile.params
src/external/cddl: Makefile
src/external/cddl/osnet/lib: Makefile
src/external/cddl/osnet/usr.bin: Makefile
src/share/man/man5: mk.conf.5
src/share/mk: bsd.README bsd.own.mk bsd.prog.mk
src/tools: Makefile

Log Message:
Add MKCTF

This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).

This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.


To generate a diff of this commit:
cvs rdiff -u -r1.1886 -r1.1887 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.1465 -r1.1466 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.10 -r1.11 src/etc/Makefile.params
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/lib/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/usr.bin/Makefile
cvs rdiff -u -r1.67 -r1.68 src/share/man/man5/mk.conf.5
cvs rdiff -u -r1.328 -r1.329 src/share/mk/bsd.README
cvs rdiff -u -r1.791 -r1.792 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.289 -r1.290 src/share/mk/bsd.prog.mk
cvs rdiff -u -r1.171 -r1.172 src/tools/Makefile

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



CVS commit: src/external/gpl3/gcc/dist/libgcc

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 10:03:51 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/libgcc: unwind-sjlj.c

Log Message:
Cast to _Unwind_Ptr here as well.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/libgcc/unwind-sjlj.c

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



CVS commit: src/share/man/man5

2014-03-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Mar 25 10:23:26 UTC 2014

Modified Files:
src/share/man/man5: mk.conf.5

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/share/man/man5/mk.conf.5

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



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

2014-03-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar 25 10:44:12 UTC 2014

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

Log Message:
Typo


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/evbmips/alchemy/machdep.c

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



CVS commit: src/sys/kern

2014-03-25 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Mar 25 12:50:53 UTC 2014

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

Log Message:
snprintf - vsnprintf in cpu_setmodel()
now this can actually work
hi christos


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/kern/kern_cpu.c

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



CVS commit: src/sys/arch/hpcmips/hpcmips

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 13:38:25 UTC 2014

Modified Files:
src/sys/arch/hpcmips/hpcmips: machdep.c

Log Message:
add missing include


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/hpcmips/hpcmips/machdep.c

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



CVS commit: src/external/lgpl3

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 15:28:15 UTC 2014

Modified Files:
src/external/lgpl3/gmp/dist: longlong.h
src/external/lgpl3/mpfr/dist/src: mpfr-longlong.h

Log Message:
Use C version of umul_ppmm for Clang on MIPS.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/lgpl3/gmp/dist/longlong.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h

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



CVS commit: src/sys/external/bsd

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 15:33:22 UTC 2014

Modified Files:
src/sys/external/bsd/drm/dist/libdrm: xf86drm.c xf86drmMode.c
src/sys/external/bsd/drm/dist/libdrm/nouveau: nouveau_dma.h
src/sys/external/bsd/drm/dist/tests: dristat.c drmstat.c
src/sys/external/bsd/drm2/dist/drm: drm_debugfs.c drm_pci.c
drm_platform.c drm_proc.c
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_arm.c
vchiq_proc.c

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/libdrm/xf86drm.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/drm/dist/libdrm/xf86drmMode.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_dma.h
cvs rdiff -u -r1.1.1.2 -r1.2 src/sys/external/bsd/drm/dist/tests/dristat.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/drm/dist/tests/drmstat.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/drm2/dist/drm/drm_debugfs.c \
src/sys/external/bsd/drm2/dist/drm/drm_pci.c \
src/sys/external/bsd/drm2/dist/drm/drm_platform.c \
src/sys/external/bsd/drm2/dist/drm/drm_proc.c
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_proc.c

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



CVS commit: src/sys/dev/ic

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 15:51:58 UTC 2014

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

Log Message:
fix unused/uninitialized


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/ic/clmpcc.c

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



CVS commit: src/sys/dev/mvme

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 15:52:17 UTC 2014

Modified Files:
src/sys/dev/mvme: clmpcc_pcctwo.c

Log Message:
fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/mvme/clmpcc_pcctwo.c

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



CVS commit: src/sys/dev/mvme

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 15:52:33 UTC 2014

Modified Files:
src/sys/dev/mvme: if_ie_mvme.c

Log Message:
fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/mvme/if_ie_mvme.c

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



CVS commit: src/external/gpl3/binutils/dist/gas/config

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar 25 16:17:33 UTC 2014

Modified Files:
src/external/gpl3/binutils/dist/gas/config: tc-vax.c

Log Message:
Bias the cfi pc expr by nbytes since vax pcrel are relative to end of the
relocation, not the beginning.  By adding the size of relocation, it will
become relative to the start of the relocation.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/binutils/dist/gas/config/tc-vax.c

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



CVS commit: src/sys/dev

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 16:19:14 UTC 2014

Modified Files:
src/sys/dev: firmload.c
src/sys/dev/ata: ata_raid_intel.c ata_raid_jmicron.c ata_raid_nvidia.c
ata_raid_via.c
src/sys/dev/ic: ncr53c9xvar.h sunscpal.c
src/sys/dev/pci: if_kse.c if_wm.c
src/sys/dev/pci/cxgb: cxgb_l2t.c cxgb_offload.c
src/sys/dev/pci/hdaudio: hdafg.c
src/sys/dev/pci/ixgbe: ixv.c
src/sys/dev/pci/n8/common/api: n8_callback.c n8_daemon_sks.c n8_sks.c
n8_system.c
src/sys/dev/pci/n8/include_public: n8_pub_service.h n8_pub_sks.h
src/sys/dev/raidframe: rf_disks.c rf_general.h

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/firmload.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ata/ata_raid_intel.c \
src/sys/dev/ata/ata_raid_via.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ata/ata_raid_jmicron.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ata/ata_raid_nvidia.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ic/ncr53c9xvar.h
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/sunscpal.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/if_kse.c
cvs rdiff -u -r1.266 -r1.267 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/cxgb/cxgb_l2t.c \
src/sys/dev/pci/cxgb/cxgb_offload.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/hdaudio/hdafg.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixv.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/n8/common/api/n8_callback.c \
src/sys/dev/pci/n8/common/api/n8_daemon_sks.c \
src/sys/dev/pci/n8/common/api/n8_system.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/n8/common/api/n8_sks.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/n8/include_public/n8_pub_service.h \
src/sys/dev/pci/n8/include_public/n8_pub_sks.h
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/raidframe/rf_disks.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/raidframe/rf_general.h

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



CVS commit: [yamt-pagecache] src/common/lib/libc/gen

2014-03-25 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Mar 25 16:21:08 UTC 2014

Modified Files:
src/common/lib/libc/gen [yamt-pagecache]: radixtree.c

Log Message:
comments.  some ascii arts to explain memory consumption.


To generate a diff of this commit:
cvs rdiff -u -r1.17.2.4 -r1.17.2.5 src/common/lib/libc/gen/radixtree.c

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



CVS commit: src/sys/compat/ndis

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 16:23:58 UTC 2014

Modified Files:
src/sys/compat/ndis: kern_ndis.c subr_ndis.c subr_ntoskrnl.c

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/ndis/kern_ndis.c
cvs rdiff -u -r1.27 -r1.28 src/sys/compat/ndis/subr_ndis.c
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/ndis/subr_ntoskrnl.c

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



CVS commit: src/sys/crypto/des

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 16:28:16 UTC 2014

Modified Files:
src/sys/crypto/des: des_ecb.c

Log Message:
fix sprintf.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/crypto/des/des_ecb.c

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



CVS commit: src/sys/fs/nfs

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 16:30:28 UTC 2014

Modified Files:
src/sys/fs/nfs/client: nfs_clvnops.c
src/sys/fs/nfs/server: nfs_nfsdkrpc.c nfs_nfsdserv.c

Log Message:
kill sprintf.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/fs/nfs/client/nfs_clvnops.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/fs/nfs/server/nfs_nfsdkrpc.c \
src/sys/fs/nfs/server/nfs_nfsdserv.c

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



CVS commit: src/sys/arch/powerpc/pci

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar 25 16:39:27 UTC 2014

Modified Files:
src/sys/arch/powerpc/pci: pci_machdep_ofw.c

Log Message:
sprintf - snprintf


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/pci/pci_machdep_ofw.c

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



CVS commit: src/sys/arch/powerpc/pci

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar 25 16:40:28 UTC 2014

Modified Files:
src/sys/arch/powerpc/pci: pci_machdep_common.c

Log Message:
sprintf - snprintf


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/pci/pci_machdep_common.c

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



CVS commit: src/sys/arch/powerpc/oea

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar 25 16:41:37 UTC 2014

Modified Files:
src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
sprintf - snprintf


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/oea/ofwoea_machdep.c

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



CVS commit: src/usr.sbin/rtsold

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 17:17:44 UTC 2014

Modified Files:
src/usr.sbin/rtsold: rtsold.c

Log Message:
Don't cast to time_t just to implicitly cast to uint32_t next.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/rtsold/rtsold.c

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



CVS commit: src/bin/ed

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 17:23:37 UTC 2014

Modified Files:
src/bin/ed: ed.h

Log Message:
Use __printflike.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/bin/ed/ed.h

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



CVS commit: src/tests/lib/libm

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 17:30:15 UTC 2014

Modified Files:
src/tests/lib/libm: t_libm.h

Log Message:
Consistently use long double.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libm/t_libm.h

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



CVS commit: othersrc/external/bsd/multigest/dist

2014-03-25 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Tue Mar 25 17:44:34 UTC 2014

Modified Files:
othersrc/external/bsd/multigest/dist: multigest.c

Log Message:
Minor change to multigest

+ avoid advancing the pointer in multigest_format_hex to include a NUL
  byte - unintended side effects in callers


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 othersrc/external/bsd/multigest/dist/multigest.c

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



CVS commit: src/sys/arch/ia64

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 18:35:33 UTC 2014

Modified Files:
src/sys/arch/ia64/disasm: disasm_format.c
src/sys/arch/ia64/stand/common: boot.c bootstrap.h commands.c dev_net.c
fileload.c interp.c ls.c misc.c
src/sys/arch/ia64/stand/efi/libefi: devicename.c efifs.c
src/sys/arch/ia64/stand/ia64/efi: main.c
src/sys/arch/ia64/stand/ia64/ski: devicename.c

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/disasm/disasm_format.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/common/boot.c \
src/sys/arch/ia64/stand/common/interp.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/stand/common/bootstrap.h \
src/sys/arch/ia64/stand/common/dev_net.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/common/commands.c \
src/sys/arch/ia64/stand/common/ls.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/common/fileload.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/common/misc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/efi/libefi/devicename.c \
src/sys/arch/ia64/stand/efi/libefi/efifs.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/stand/ia64/efi/main.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/ia64/ski/devicename.c

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



CVS commit: src/sys/arch/next68k/dev

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 19:41:32 UTC 2014

Modified Files:
src/sys/arch/next68k/dev: esp.c if_xe.c nextdma.c nextdmavar.h

Log Message:
fix sprintf debugging mess.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/next68k/dev/esp.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/next68k/dev/if_xe.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/next68k/dev/nextdma.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/next68k/dev/nextdmavar.h

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



CVS commit: src/sys/arch/next68k/stand/boot

2014-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 25 19:43:49 UTC 2014

Modified Files:
src/sys/arch/next68k/stand/boot: boot.c

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/next68k/stand/boot/boot.c

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



CVS commit: src/usr.sbin/rtsold

2014-03-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 21:07:59 UTC 2014

Modified Files:
src/usr.sbin/rtsold: rtsold.c

Log Message:
Don't modify format string, use asprintf to format the original msg and
syslog the result.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/rtsold/rtsold.c

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



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

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:14:52 UTC 2014

Modified Files:
src/sys/arch/arm/include: armreg.h

Log Message:
Add NSACR


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/arm/include/armreg.h

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



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:15:48 UTC 2014

Modified Files:
src/sys/arch/arm/include [matt-nb5-mips64]: armreg.h

Log Message:
sync with HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.41.12.2 -r1.41.12.3 src/sys/arch/arm/include/armreg.h

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



CVS commit: othersrc/external/bsd/multigest

2014-03-25 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Mar 26 01:20:34 UTC 2014

Modified Files:
othersrc/external/bsd/multigest/bin: Makefile
othersrc/external/bsd/multigest/dist: multigest.c multigest.h
Added Files:
othersrc/external/bsd/multigest/bin: 24.expected 25.expected
26.expected

Log Message:
Update multigest to version 20140325

+ add digest combiners to the finalisation part of multigest.
  4 combiners are provided:

  + concat (the default, where output is appended)
collision resistance is needed, but NOT pre-image-resistance,
second pre-image resistance, PRF

  + comb4p
(see On the Security of Hash function Combiners, Ph.D. thesis
 by Anja Lehmann)


http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.4611rep=rep1type=pdf

collision-resistant, PRF, target-collision-resistant, and MAC
not as efficient as other combiners

  + xor (result is final-digest1 ^ final-digest2)
where PRF needed, but NOT collision resistance

  + hash (finalisation part does is update-digest1(final-digest2()))
where pre-image-resistance needed, but NOT collision resistance

  these are specified as pseudo-digests in the algorithm specification
  For a discussion of digest combiners, please see:
  https://tahoe-lafs.org/pipermail/tahoe-dev/2010-June/004575.html

+ modify rawsize calculation to only require as many bytes as will appear
  in the resulting hash


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/multigest/bin/24.expected \
othersrc/external/bsd/multigest/bin/25.expected \
othersrc/external/bsd/multigest/bin/26.expected
cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/multigest/bin/Makefile
cvs rdiff -u -r1.10 -r1.11 othersrc/external/bsd/multigest/dist/multigest.c
cvs rdiff -u -r1.8 -r1.9 othersrc/external/bsd/multigest/dist/multigest.h

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:57:04 UTC 2014

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ahcisata_pci.c

Log Message:
Use ahci_resume


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.2.4.1 -r1.12.4.2.4.2 src/sys/dev/pci/ahcisata_pci.c

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



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:59:08 UTC 2014

Modified Files:
src/sys/arch/arm/cortex [matt-nb5-mips64]: gic.c

Log Message:
Let bus_space so the endian conversion if needed


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 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.



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:00:46 UTC 2014

Modified Files:
src/sys/arch/arm/arm [matt-nb5-mips64]: cpufunc.c

Log Message:
For armv7, enable BE properly.  Make sure UNAL is always set.


To generate a diff of this commit:
cvs rdiff -u -r1.89.10.1 -r1.89.10.2 src/sys/arch/arm/arm/cpufunc.c

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



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:01:10 UTC 2014

Modified Files:
src/sys/arch/arm/arm [matt-nb5-mips64]: arm_machdep.c

Log Message:
If BE on armv7, set PSR_E_BIT


To generate a diff of this commit:
cvs rdiff -u -r1.21.8.1 -r1.21.8.2 src/sys/arch/arm/arm/arm_machdep.c

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



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:02:29 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_cca.c

Log Message:
For non-BCM5301X, set frequency to 1/4 of the apb clock.


To generate a diff of this commit:
cvs rdiff -u -r1.1.16.2 -r1.1.16.3 src/sys/arch/arm/broadcom/bcm53xx_cca.c

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



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/cortex

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:13:54 UTC 2014

Modified Files:
src/sys/arch/arm/cortex [matt-nb5-mips64]: a9_mpsubr.S

Log Message:
flush the icache after enabling the SCU


To generate a diff of this commit:
cvs rdiff -u -r1.12.2.4 -r1.12.2.5 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.



CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/bcm53xx

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:15:02 UTC 2014

Modified Files:
src/sys/arch/evbarm/bcm53xx [matt-nb5-mips64]: bcm53xx_machdep.c

Log Message:
Use apb/4 for the com freq on !BCM5301X


To generate a diff of this commit:
cvs rdiff -u -r1.7.4.2 -r1.7.4.3 \
src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c

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



CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/bcm53xx

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:16:05 UTC 2014

Modified Files:
src/sys/arch/evbarm/bcm53xx [matt-nb5-mips64]: bcm53xx_start.S

Log Message:
Use adr/bfi to access kernel variables.


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.2 -r1.10.2.3 \
src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S

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



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

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 02:39:58 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_reg.h

Log Message:
Be consistent and use #definespace


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/broadcom/bcm53xx_reg.h

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



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

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 03:19:11 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c bcm53xx_ccb.c

Log Message:
Allow SRAB to be optional.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/broadcom/bcm53xx_board.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/broadcom/bcm53xx_ccb.c

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



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

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 03:18:56 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_reg.h

Log Message:
Correct BCM563XX values.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/broadcom/bcm53xx_reg.h

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



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 03:19:32 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_board.c
bcm53xx_ccb.c

Log Message:
Allow SRAB to be optional


To generate a diff of this commit:
cvs rdiff -u -r1.17.2.3 -r1.17.2.4 src/sys/arch/arm/broadcom/bcm53xx_board.c
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/arm/broadcom/bcm53xx_ccb.c

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



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/broadcom

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 03:20:18 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_reg.h

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/arch/arm/broadcom/bcm53xx_reg.h

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