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

2015-02-08 Thread Jukka Andberg
Module Name:src
Committed By:   jandberg
Date:   Sun Feb  8 09:55:25 UTC 2015

Modified Files:
src/sys/arch/amiga/dev: gayle_pcmcia.c

Log Message:
Add a delay between the recently added new PCMCIA reset method and the old
reset method to get the card reset work reliably on my A1200 model and network
cards.

Discussed on port-amiga.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amiga/dev/gayle_pcmcia.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/amiga/dev/gayle_pcmcia.c
diff -u src/sys/arch/amiga/dev/gayle_pcmcia.c:1.30 src/sys/arch/amiga/dev/gayle_pcmcia.c:1.31
--- src/sys/arch/amiga/dev/gayle_pcmcia.c:1.30	Sun Sep  7 22:24:40 2014
+++ src/sys/arch/amiga/dev/gayle_pcmcia.c	Sun Feb  8 09:55:25 2015
@@ -1,9 +1,9 @@
-/*	$NetBSD: gayle_pcmcia.c,v 1.30 2014/09/07 22:24:40 phx Exp $ */
+/*	$NetBSD: gayle_pcmcia.c,v 1.31 2015/02/08 09:55:25 jandberg Exp $ */
 
 /* public domain */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gayle_pcmcia.c,v 1.30 2014/09/07 22:24:40 phx Exp $);
+__KERNEL_RCSID(0, $NetBSD: gayle_pcmcia.c,v 1.31 2015/02/08 09:55:25 jandberg Exp $);
 
 /* PCMCIA front-end driver for A1200's and A600's. */
 
@@ -211,6 +211,8 @@ pccard_attach(device_t parent, device_t 
 		delay(500);
 		gayle_intr_ack(0xfc);
 
+		delay(100*1000);
+
 		*reset_card_reg = 0x0;
 		delay(1000);
 		x = *reset_card_reg;



CVS commit: src/lib/libc/sys

2015-02-08 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Feb  8 11:27:43 UTC 2015

Modified Files:
src/lib/libc/sys: mlock.2

Log Message:
The length argument is of an unsigned type (size_t) and cannot be
negative. Remove wrong statements in ERRORS section.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/sys/mlock.2

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

Modified files:

Index: src/lib/libc/sys/mlock.2
diff -u src/lib/libc/sys/mlock.2:1.20 src/lib/libc/sys/mlock.2:1.21
--- src/lib/libc/sys/mlock.2:1.20	Mon Feb 28 07:17:02 2011
+++ src/lib/libc/sys/mlock.2	Sun Feb  8 11:27:43 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: mlock.2,v 1.20 2011/02/28 07:17:02 wiz Exp $
+.\	$NetBSD: mlock.2,v 1.21 2015/02/08 11:27:43 njoly Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)mlock.2	8.2 (Berkeley) 12/11/93
 .\
-.Dd February 28, 2011
+.Dd February 8, 2014
 .Dt MLOCK 2
 .Os
 .Sh NAME
@@ -116,8 +116,8 @@ will fail if:
 Locking the indicated range would exceed either the system or per-process
 limit for locked memory.
 .It Bq Er EINVAL
-The length is negative; or the address or length given is not page
-aligned and the implementation does not round.
+The address or length given is not page aligned and the implementation does
+not round.
 .It Bq Er ENOMEM
 Some portion of the indicated address range is not allocated.
 There was an error faulting/mapping a page.
@@ -131,8 +131,8 @@ is not implemented.
 will fail if:
 .Bl -tag -width Er
 .It Bq Er EINVAL
-The length is negative; or the address or length given is not page
-aligned and the implementation does not round.
+The address or length given is not page aligned and the implementation does
+not round.
 .It Bq Er ENOMEM
 Some portion of the indicated address range is not allocated.
 Some portion of the indicated address range is not locked.



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

2015-02-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb  8 13:51:23 UTC 2015

Modified Files:
src/sys/arch/arm/arm32: cortex_pmc.c

Log Message:
RCSid police


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/arm32/cortex_pmc.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/arm32/cortex_pmc.c
diff -u src/sys/arch/arm/arm32/cortex_pmc.c:1.2 src/sys/arch/arm/arm32/cortex_pmc.c:1.3
--- src/sys/arch/arm/arm32/cortex_pmc.c:1.2	Wed Aug 29 19:10:15 2012
+++ src/sys/arch/arm/arm32/cortex_pmc.c	Sun Feb  8 13:51:23 2015
@@ -1,3 +1,5 @@
+/*	$NetBSD: cortex_pmc.c,v 1.3 2015/02/08 13:51:23 skrll Exp $	*/
+
 /* Copyright (c) 2007 Microsoft
  * All rights reserved.
  *
@@ -33,12 +35,12 @@
  */
 
 #include sys/cdefs.h
-/* __KERNEL_RCSID(0, $NetBSD: cortex_pmc.c,v 1.2 2012/08/29 19:10:15 matt Exp $); */
+/* __KERNEL_RCSID(0, $NetBSD: cortex_pmc.c,v 1.3 2015/02/08 13:51:23 skrll Exp $); */
 #include opt_perfctrs.h
 #include sys/types.h
 #include sys/param.h
 #include sys/systm.h
-#include sys/kernel.h  
+#include sys/kernel.h
 #include sys/time.h
 #include sys/timetc.h
 
@@ -94,7 +96,7 @@ delay(u_int arg)
 	delta = usecs = 0;
 	while (arg  usecs) {
 		cur = armreg_pmccntr_read();
-		
+
 		/* overflow flag is moved to a separate register
 		   and is not read from PMC Control Register */
 		ctrl = armreg_pmovsr_read();



CVS commit: src/lib/libc/cdb

2015-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Feb  8 19:09:56 UTC 2015

Modified Files:
src/lib/libc/cdb: cdb.5

Log Message:
Fix typo. Reported by rudolf on netbsd-docs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/cdb/cdb.5

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

Modified files:

Index: src/lib/libc/cdb/cdb.5
diff -u src/lib/libc/cdb/cdb.5:1.5 src/lib/libc/cdb/cdb.5:1.6
--- src/lib/libc/cdb/cdb.5:1.5	Tue Mar 18 18:20:37 2014
+++ src/lib/libc/cdb/cdb.5	Sun Feb  8 19:09:56 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: cdb.5,v 1.5 2014/03/18 18:20:37 riastradh Exp $
+.\	$NetBSD: cdb.5,v 1.6 2015/02/08 19:09:56 wiz Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -73,7 +73,7 @@ The index records are followed by the st
 followed by
 .Va data_size .
 The offsets are relative to the end of the offset record table and are
-monotically increasing.
+monotonically increasing.
 The size of each offset record is the logarithm of
 .Va data_size
 to base 256, rounded up.



CVS commit: src

2015-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Feb  8 16:44:09 UTC 2015

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4: Makefile
Added Files:
src/share/man/man4: iwm.4

Log Message:
Add man page for iwm(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1494 -r1.1495 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.618 -r1.619 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/iwm.4

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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1494 src/distrib/sets/lists/man/mi:1.1495
--- src/distrib/sets/lists/man/mi:1.1494	Sun Jan 25 15:50:30 2015
+++ src/distrib/sets/lists/man/mi	Sun Feb  8 16:44:09 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1494 2015/01/25 15:50:30 christos Exp $
+# $NetBSD: mi,v 1.1495 2015/02/08 16:44:09 wiz Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1326,6 +1326,7 @@
 ./usr/share/man/cat4/itesio.0			man-sys-catman		.cat
 ./usr/share/man/cat4/iwi.0			man-sys-catman		.cat
 ./usr/share/man/cat4/iwic.0			man-sys-catman		.cat
+./usr/share/man/cat4/iwm.0			man-sys-catman		.cat
 ./usr/share/man/cat4/iwn.0			man-sys-catman		.cat
 ./usr/share/man/cat4/ix.0			man-sys-catman		.cat
 ./usr/share/man/cat4/ixg.0			man-sys-catman		.cat
@@ -4344,6 +4345,7 @@
 ./usr/share/man/html4/itesio.html		man-sys-htmlman		html
 ./usr/share/man/html4/iwi.html			man-sys-htmlman		html
 ./usr/share/man/html4/iwic.html			man-sys-htmlman		html
+./usr/share/man/html4/iwm.html			man-sys-htmlman		html
 ./usr/share/man/html4/iwn.html			man-sys-htmlman		html
 ./usr/share/man/html4/ix.html			man-sys-htmlman		html
 ./usr/share/man/html4/ixg.html			man-sys-htmlman		html
@@ -7205,6 +7207,7 @@
 ./usr/share/man/man4/itesio.4			man-sys-man		.man
 ./usr/share/man/man4/iwi.4			man-sys-man		.man
 ./usr/share/man/man4/iwic.4			man-sys-man		.man
+./usr/share/man/man4/iwm.4			man-sys-man		.man
 ./usr/share/man/man4/iwn.4			man-sys-man		.man
 ./usr/share/man/man4/ix.4			man-sys-man		.man
 ./usr/share/man/man4/ixg.4			man-sys-man		.man

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.618 src/share/man/man4/Makefile:1.619
--- src/share/man/man4/Makefile:1.618	Sun Oct 26 18:48:09 2014
+++ src/share/man/man4/Makefile	Sun Feb  8 16:44:09 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.618 2014/10/26 18:48:09 tls Exp $
+#	$NetBSD: Makefile,v 1.619 2015/02/08 16:44:09 wiz Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -33,7 +33,7 @@ MAN=	aac.4 ac97.4 acardide.4 aceride.4 a
 	ifmedia.4 igmafb.4 igphy.4 igsfb.4 iha.4 ihphy.4 iic.4 inet.4 ikphy.4 \
 	inphy.4 intersil7170.4 \
 	ioasic.4 ioat.4 iop.4 iophy.4 iopsp.4 ip.4 ipkdb.4 ipmi.4 ipw.4 \
-	irmce.4 isp.4 isv.4 itesio.4 iteide.4 iwi.4 iwn.4 ixg.4 ixpide.4 \
+	irmce.4 isp.4 isv.4 itesio.4 iteide.4 iwi.4 iwm.4 iwn.4 ixg.4 ixpide.4 \
 	jme.4 jmide.4 joy.4 \
 	kloader.4 kse.4 ksyms.4 kttcp.4 \
 	lc.4 ld.4 lii.4 lo.4 lua.4 lxtphy.4 \

Added files:

Index: src/share/man/man4/iwm.4
diff -u /dev/null src/share/man/man4/iwm.4:1.1
--- /dev/null	Sun Feb  8 16:44:09 2015
+++ src/share/man/man4/iwm.4	Sun Feb  8 16:44:09 2015
@@ -0,0 +1,70 @@
+.\ $NetBSD: iwm.4,v 1.1 2015/02/08 16:44:09 wiz Exp $
+.\
+.\ Copyright (c) 2015 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Thomas Klausner.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\ POSSIBILITY OF SUCH DAMAGE.
+.\
+.Dd February 8, 2015
+.Dt IWM 4
+.Os
+.Sh NAME
+.Nm iwm
+.Nd Intel Wireless and 

CVS commit: src/sys/kern

2015-02-08 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Feb  8 14:46:30 UTC 2015

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

Log Message:
Correct m_len calculation for m_dup() with mbuf clusters.
Fixes kern/49650.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/kern/uipc_mbuf.c

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

Modified files:

Index: src/sys/kern/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.160 src/sys/kern/uipc_mbuf.c:1.161
--- src/sys/kern/uipc_mbuf.c:1.160	Tue Dec  2 04:43:35 2014
+++ src/sys/kern/uipc_mbuf.c	Sun Feb  8 14:46:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbuf.c,v 1.160 2014/12/02 04:43:35 ozaki-r Exp $	*/
+/*	$NetBSD: uipc_mbuf.c,v 1.161 2015/02/08 14:46:30 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.160 2014/12/02 04:43:35 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.161 2015/02/08 14:46:30 mlelstv Exp $);
 
 #include opt_mbuftrace.h
 #include opt_nmbclusters.h
@@ -777,8 +777,13 @@ m_copym0(struct mbuf *m, int off0, int l
 /*
  * we are unsure about the way m was allocated.
  * copy into multiple MCLBYTES cluster mbufs.
+ *
+ * recompute m_len, it is no longer valid if MCLGET()
+ * fails to allocate a cluster. Then we try to split
+ * the source into normal sized mbufs.
  */
 MCLGET(n, wait);
+n-m_len = 0;
 n-m_len = M_TRAILINGSPACE(n);
 n-m_len = m_copylen(len, n-m_len);
 n-m_len = min(n-m_len, m-m_len - off);



CVS commit: src/usr.bin/netstat

2015-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  8 15:09:45 UTC 2015

Modified Files:
src/usr.bin/netstat: inet.c inet6.c

Log Message:
Allocate the right size for pcb blocks.
XXX: pullup-7!


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/usr.bin/netstat/inet.c
cvs rdiff -u -r1.67 -r1.68 src/usr.bin/netstat/inet6.c

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

Modified files:

Index: src/usr.bin/netstat/inet.c
diff -u src/usr.bin/netstat/inet.c:1.105 src/usr.bin/netstat/inet.c:1.106
--- src/usr.bin/netstat/inet.c:1.105	Sat Feb  7 14:36:06 2015
+++ src/usr.bin/netstat/inet.c	Sun Feb  8 10:09:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: inet.c,v 1.105 2015/02/07 19:36:06 christos Exp $	*/
+/*	$NetBSD: inet.c,v 1.106 2015/02/08 15:09:45 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = from: @(#)inet.c	8.4 (Berkeley) 4/20/94;
 #else
-__RCSID($NetBSD: inet.c,v 1.105 2015/02/07 19:36:06 christos Exp $);
+__RCSID($NetBSD: inet.c,v 1.106 2015/02/08 15:09:45 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -286,7 +286,7 @@ getpcblist_kmem(u_long off, const char *
 	next = TAILQ_FIRST(head);
 	prev = TAILQ_END(head);
 
-	if ((pcblist = malloc(size)) == NULL)
+	if ((pcblist = malloc(size * sizeof(*pcblist))) == NULL)
 		err(1, malloc);
 
 	i = 0;
@@ -317,7 +317,9 @@ getpcblist_kmem(u_long off, const char *
 		pcblist[i].ki_tstate = tcpcb.t_state;
 		pcblist[i].ki_pflags = inpcb.inp_flags;
 		if (i++ == size) {
-			struct kinfo_pcb *n = realloc(pcblist, size += 100);
+			size += 100;
+			struct kinfo_pcb *n = realloc(pcblist,
+			size * sizeof(*pcblist));
 			if (n == NULL)
 err(1, realloc);
 			pcblist = n;

Index: src/usr.bin/netstat/inet6.c
diff -u src/usr.bin/netstat/inet6.c:1.67 src/usr.bin/netstat/inet6.c:1.68
--- src/usr.bin/netstat/inet6.c:1.67	Sat Feb  7 14:36:06 2015
+++ src/usr.bin/netstat/inet6.c	Sun Feb  8 10:09:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: inet6.c,v 1.67 2015/02/07 19:36:06 christos Exp $	*/
+/*	$NetBSD: inet6.c,v 1.68 2015/02/08 15:09:45 christos Exp $	*/
 /*	BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp	*/
 
 /*
@@ -64,7 +64,7 @@
 #if 0
 static char sccsid[] = @(#)inet.c	8.4 (Berkeley) 4/20/94;
 #else
-__RCSID($NetBSD: inet6.c,v 1.67 2015/02/07 19:36:06 christos Exp $);
+__RCSID($NetBSD: inet6.c,v 1.68 2015/02/08 15:09:45 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -303,7 +303,7 @@ getpcblist_kmem(u_long off, const char *
 	next = TAILQ_FIRST(head);
 	prev = TAILQ_END(head);
 
-	if ((pcblist = malloc(size)) == NULL)
+	if ((pcblist = malloc(size * sizeof(*pcblist))) == NULL)
 		err(1, malloc);
 
 	i = 0;
@@ -338,7 +338,9 @@ getpcblist_kmem(u_long off, const char *
 		memcpy(pcblist[i].ki_d, sin6, sizeof(sin6));
 		pcblist[i].ki_tstate = tcpcb.t_state;
 		if (i++ == size) {
-			struct kinfo_pcb *n = realloc(pcblist, size += 100);
+			size += 100;
+			struct kinfo_pcb *n = realloc(pcblist,
+			size * sizeof(*pcblist));
 			if (n == NULL)
 err(1, realloc);
 			pcblist = n;



CVS commit: src/lib/libc/sys

2015-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Feb  8 14:10:28 UTC 2015

Modified Files:
src/lib/libc/sys: mlock.2

Log Message:
It is 2015 already.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libc/sys/mlock.2

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

Modified files:

Index: src/lib/libc/sys/mlock.2
diff -u src/lib/libc/sys/mlock.2:1.21 src/lib/libc/sys/mlock.2:1.22
--- src/lib/libc/sys/mlock.2:1.21	Sun Feb  8 11:27:43 2015
+++ src/lib/libc/sys/mlock.2	Sun Feb  8 14:10:28 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: mlock.2,v 1.21 2015/02/08 11:27:43 njoly Exp $
+.\	$NetBSD: mlock.2,v 1.22 2015/02/08 14:10:28 wiz Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)mlock.2	8.2 (Berkeley) 12/11/93
 .\
-.Dd February 8, 2014
+.Dd February 8, 2015
 .Dt MLOCK 2
 .Os
 .Sh NAME



CVS commit: src/sys/arch/mips/mips

2015-02-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sun Feb  8 15:22:33 UTC 2015

Modified Files:
src/sys/arch/mips/mips: bus_space_alignstride_chipdep.c

Log Message:
- add CHIP_WRONG_ENDIAN for things like PCI buses behind endianness
  converting hardware that can't be turned off, like MACE PCI found in
  the SGI O2
- when using CHIP_ACCESS_SIZE on a bus with CHIP_ALIGN_STRIDE  0 make
  sure we apply the stride when shifting data around
ok matt@ and my gdium still works


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c

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

Modified files:

Index: src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c
diff -u src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.19 src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.20
--- src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.19	Fri Jan 27 18:52:58 2012
+++ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c	Sun Feb  8 15:22:33 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.19 2012/01/27 18:52:58 para Exp $ */
+/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.20 2015/02/08 15:22:33 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -74,6 +74,11 @@
  *			for the memory or I/O memory space extent.
  *	CHIP_LITTLE_ENDIAN | CHIP_BIG_ENDIAN
  *			For endian-specific busses, like PCI (little).
+ *	CHIP_WRONG_ENDIAN
+ *			For things like PCI bridges with endian conversion that
+ *			can't be turned off, so we need to switch address bits
+ *			for 8 and 16bit accesses.
+ *			Example: MACE PCI bridge in SGI O2
  *	CHIP_ACCESS_SIZE
  *			Size (in bytes) of minimum bus access, e.g. 4
  *			to indicate all bus cycles are 32-bits.  Defaults
@@ -81,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_space_alignstride_chipdep.c,v 1.19 2012/01/27 18:52:58 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_space_alignstride_chipdep.c,v 1.20 2015/02/08 15:22:33 macallan Exp $);
 
 #ifdef CHIP_EXTENT
 #include sys/extent.h
@@ -194,17 +199,25 @@ static long
 #define	CHIP_ALIGN_STRIDE	0
 #endif
 
+#ifdef CHIP_WRONG_ENDIAN
+#define	CHIP_OFF8(o)	((o) ^ 3)
+#else
 #if CHIP_ALIGN_STRIDE  0
 #define	CHIP_OFF8(o)	((o)  (CHIP_ALIGN_STRIDE))
 #else
 #define	CHIP_OFF8(o)	(o)
 #endif
+#endif
 
+#ifdef CHIP_WRONG_ENDIAN
+#define	CHIP_OFF16(o)	((o) ^ 2)
+#else
 #if CHIP_ALIGN_STRIDE  1
 #define	CHIP_OFF16(o)	((o)  (CHIP_ALIGN_STRIDE - 1))
 #else
 #define	CHIP_OFF16(o)	(o)
 #endif
+#endif
 
 #if CHIP_ALIGN_STRIDE  2
 #define	CHIP_OFF32(o)	((o)  (CHIP_ALIGN_STRIDE - 2))
@@ -662,7 +675,8 @@ __BS(read_1)(void *v, bus_space_handle_t
 int shift;
 
 h += CHIP_OFF8(off);
-shift = (off  (CHIP_ACCESS_SIZE - 1)) * 8;
+
+shift = (h  (CHIP_ACCESS_SIZE - 1)) * 8;
 ptr = (void *)(h  ~((bus_space_handle_t)(CHIP_ACCESS_SIZE - 1)));
 r = (uint8_t)(CHIP_SWAP_ACCESS(*ptr)  shift);
 
@@ -682,7 +696,7 @@ __BS(read_2)(void *v, bus_space_handle_t
 
 	KASSERT((off  1) == 0);
 h += CHIP_OFF16(off);
-shift = (off  (CHIP_ACCESS_SIZE - 1)) * 8;
+shift = (h  (CHIP_ACCESS_SIZE - 1)) * 8;
 ptr = (void *)(h  ~((bus_space_handle_t)(CHIP_ACCESS_SIZE - 1)));
 	r = (uint16_t)CHIP_SWAP16(*ptr  shift);
 
@@ -702,7 +716,7 @@ __BS(read_4)(void *v, bus_space_handle_t
 
 	KASSERT((off  3) == 0);
 h += CHIP_OFF32(off);
-shift = (off  (CHIP_ACCESS_SIZE - 1)) * 8;
+shift = (h  (CHIP_ACCESS_SIZE - 1)) * 8;
 ptr = (void *)(h  ~((bus_space_handle_t)(CHIP_ACCESS_SIZE - 1)));
 	r = (uint32_t)CHIP_SWAP32(*ptr  shift);
 
@@ -718,7 +732,7 @@ __BS(read_8)(void *v, bus_space_handle_t
 
 	KASSERT((off  7) == 0);
 h += CHIP_OFF64(off);
-shift = (off  (CHIP_ACCESS_SIZE - 1)) * 8;
+shift = (h  (CHIP_ACCESS_SIZE - 1)) * 8;
 ptr = (void *)(h  ~((bus_space_handle_t)(CHIP_ACCESS_SIZE - 1)));
 	r =  CHIP_SWAP64(*ptr  shift);
 
@@ -771,7 +785,7 @@ __BS(write_1)(void *v, bus_space_handle_
 	int shift;
 
 	h += CHIP_OFF8(off);
-	shift = (off  (CHIP_ACCESS_SIZE - 1)) * 8;
+	shift = (h  (CHIP_ACCESS_SIZE - 1)) * 8;
 	ptr = (void *)(h  ~((bus_space_handle_t)(CHIP_ACCESS_SIZE - 1)));
 	*ptr = CHIP_SWAP_ACCESS(((CHIP_TYPE)val)  shift);
 }
@@ -788,7 +802,7 @@ __BS(write_2)(void *v, bus_space_handle_
 
 	KASSERT((off  1) == 0);
 	h += CHIP_OFF16(off);
-	shift = (off  (CHIP_ACCESS_SIZE - 1)) * 8;
+	shift = (h  (CHIP_ACCESS_SIZE - 1)) * 8;
 	ptr = (void *)(h  ~((bus_space_handle_t)(CHIP_ACCESS_SIZE - 1)));
 	if (CHIP_ACCESS_SIZE  2)
 		*ptr = (CHIP_TYPE)(CHIP_SWAP16(val))  shift;
@@ -808,7 +822,7 @@ __BS(write_4)(void *v, bus_space_handle_
 
 	KASSERT((off  3) == 0);
 h += CHIP_OFF32(off);
-shift = (off  (CHIP_ACCESS_SIZE - 1)) * 8;
+shift = (h  (CHIP_ACCESS_SIZE - 1)) * 8;
 ptr = (void *)(h  

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

2015-02-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Feb  8 22:05:55 UTC 2015

Modified Files:
src/lib/libc/include [netbsd-7]: namespace.h
src/lib/libc/sys [netbsd-7]: Makefile.inc fdiscard.2
Added Files:
src/lib/libc/sys [netbsd-7]: fdiscard.c posix_fallocate.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #472):
lib/libc/include/namespace.h: revision 1.175
lib/libc/sys/Makefile.inc: revision 1.225, 1.227
lib/libc/sys/fdiscard.2: revision 1.3
lib/libc/sys/fdiscard.c: revision 1.1
lib/libc/sys/posix_fallocate.c: revision 1.1
Fix argument paddiing for posix_fallocate and fdiscard with gcc 1.x
--
PR/49617: Kirk Russell: posix_fallocate() should be returning an error on
failure, without setting errno, so make it PSEUDO_NOERROR, by adding a new
category GLUENOERR.
--
PR/49617: Kirk Russell: Describe the posix_fallocate return values correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.174.2.1 src/lib/libc/include/namespace.h
cvs rdiff -u -r1.224 -r1.224.2.1 src/lib/libc/sys/Makefile.inc
cvs rdiff -u -r1.2 -r1.2.4.1 src/lib/libc/sys/fdiscard.2
cvs rdiff -u -r0 -r1.1.2.2 src/lib/libc/sys/fdiscard.c \
src/lib/libc/sys/posix_fallocate.c

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

Modified files:

Index: src/lib/libc/include/namespace.h
diff -u src/lib/libc/include/namespace.h:1.174 src/lib/libc/include/namespace.h:1.174.2.1
--- src/lib/libc/include/namespace.h:1.174	Fri Jun 13 15:45:05 2014
+++ src/lib/libc/include/namespace.h	Sun Feb  8 22:05:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: namespace.h,v 1.174 2014/06/13 15:45:05 joerg Exp $	*/
+/*	$NetBSD: namespace.h,v 1.174.2.1 2015/02/08 22:05:55 snj Exp $	*/
 
 /*-
  * Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -281,6 +281,7 @@
 #define execv			_execv
 #define execvp			_execvp
 #define explicit_memset		_explicit_memset
+#define fdiscard		_fdiscard
 #define fdopen			_fdopen
 #define fgetln			_fgetln
 #define fgetwln			_fgetwln
@@ -520,6 +521,7 @@
 #define pread			_pread
 #define printf_l		_printf_l
 #define pselect			_pselect
+#define posix_fallocate		_posix_fallocate
 #define psignal			_psignal
 #define pthread_atfork		_pthread_atfork
 #define ptree_init		ptree_init

Index: src/lib/libc/sys/Makefile.inc
diff -u src/lib/libc/sys/Makefile.inc:1.224 src/lib/libc/sys/Makefile.inc:1.224.2.1
--- src/lib/libc/sys/Makefile.inc:1.224	Fri Jul 25 08:30:47 2014
+++ src/lib/libc/sys/Makefile.inc	Sun Feb  8 22:05:55 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.224 2014/07/25 08:30:47 dholland Exp $
+#	$NetBSD: Makefile.inc,v 1.224.2.1 2015/02/08 22:05:55 snj Exp $
 #	@(#)Makefile.inc	8.3 (Berkeley) 10/24/94
 
 # sys sources
@@ -30,9 +30,10 @@ SRCS+=	posix_fadvise.c posix_madvise.c s
 
 # glue to provide compatibility between GCC 1.X and 2.X and for compat
 # with old syscall interfaces.
-GLUE+= ftruncate.c lseek.c mmap.c pread.c preadv.c pwrite.c \
-	pwritev.c truncate.c ntp_adjtime.c mknodat.c
-
+GLUE+= fdiscard.c ftruncate.c lseek.c mmap.c \
+	pread.c preadv.c pwrite.c pwritev.c truncate.c ntp_adjtime.c \
+	mknodat.c
+GLUENOERR+= posix_fallocate.c
 GLUE50+= adjtime.c clock_settime.c settimeofday.c
 
 # 'glue' files might .c or .S depending on the architecture
@@ -53,6 +54,23 @@ ASM_GLUE+= tmp_${glue:.c=.S}
 .endfor
 
 # 'glue' files might .c or .S depending on the architecture
+.for glue in ${GLUENOERR}
+. if exists(${glue:.c=.S})
+# Build the ASM glue file
+SRCS+=${glue:.c=.S}
+. else
+.  if exists(__${glue:.c=.S})
+SRCS+=__${glue:.c=.S} ${glue}
+.  else
+# Build the C glue file
+SRCS+= ${glue}
+# and an asm entry for __syscall
+ASM_GLUENOERR+= tmp_${glue:.c=.S}
+.  endif
+. endif
+.endfor
+
+# 'glue' files might .c or .S depending on the architecture
 .for glue in ${GLUE50}
 . if exists(${glue:.c=.S})
 # Build the ASM glue file
@@ -147,11 +165,11 @@ ASM_MD=	_lwp_getprivate.S mremap.S 
 .endfor
 
 WEAKASM= accept.S __aio_suspend50.S close.S connect.S execve.S \
-	fcntl.S fdatasync.S fdiscard.S fsync.S \
+	fcntl.S fdatasync.S fsync.S \
 	fsync_range.S __kevent50.S \
 	kill.S mq_receive.S mq_send.S __mq_timedreceive50.S __mq_timedsend50.S \
 	msgrcv.S msgsnd.S __msync13.S  __nanosleep50.S open.S poll.S \
-	__pollts50.S posix_fallocate.S __pselect50.S read.S readlink.S \
+	__pollts50.S __pselect50.S read.S readlink.S \
 	readv.S _sched_setparam.S _sched_getparam.S _sched_setaffinity.S \
 	_sched_getaffinity.S sched_yield.S \
 	__select50.S setcontext.S __sigprocmask14.S __sigsuspend14.S sysarch.S \
@@ -162,8 +180,11 @@ NOERR=	getegid.S geteuid.S getgid.S getp
 
 PSEUDONOERR=	_exit.S
 
-SRCS+=		${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR} ${ASM_GLUE}
-CLEANFILES+=	${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR} ${ASM_GLUE}
+_GENFILES=	${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR} \
+	${ASM_GLUE} ${ASM_GLUENOERR}
+
+SRCS+=		${_GENFILES}
+CLEANFILES+=	${_GENFILES}
 
 ASMDEPS=	

CVS commit: [netbsd-7] src/distrib/utils/embedded/conf

2015-02-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Feb  8 22:09:27 UTC 2015

Modified Files:
src/distrib/utils/embedded/conf [netbsd-7]: rpi.conf

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #496):
distrib/utils/embedded/conf/rpi.conf: revision 1.25
By default, RPI firmware sets the max CPU frequency to 600MHz. This can be
overridden by setting arm_freq in config.txt, but the default freq at boot
is still 600MHz.
Add logic to rc.local to compare the current vs. max CPU frequency; if they
differ, set the target frequency to the maximum.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.4.1 src/distrib/utils/embedded/conf/rpi.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/rpi.conf
diff -u src/distrib/utils/embedded/conf/rpi.conf:1.24 src/distrib/utils/embedded/conf/rpi.conf:1.24.4.1
--- src/distrib/utils/embedded/conf/rpi.conf:1.24	Thu Nov 28 13:39:18 2013
+++ src/distrib/utils/embedded/conf/rpi.conf	Sun Feb  8 22:09:27 2015
@@ -1,4 +1,4 @@
-# $NetBSD: rpi.conf,v 1.24 2013/11/28 13:39:18 skrll Exp $
+# $NetBSD: rpi.conf,v 1.24.4.1 2015/02/08 22:09:27 snj Exp $
 # Raspberry Pi customization script used by mkimage
 #
 
@@ -29,6 +29,22 @@ wscons=YES
 devpubd=YES
 EOF
 
+	#
+	# If arm_freq is specified in config.txt, set CPU frequency
+	# to match at boot time.
+	#
+	cp ${release}/etc/rc.local ${mnt}/etc/rc.local
+	cat  /tmp/a  EOF
+if /sbin/sysctl -q machdep.cpu.frequency.max; then
+	cpufreq_max=\$(/sbin/sysctl -n machdep.cpu.frequency.max)
+	cpufreq_cur=\$(/sbin/sysctl -n machdep.cpu.frequency.current)
+	if [ ! \$cpufreq_max = \$cpufreq_cur ]; then
+		/sbin/sysctl -w machdep.cpu.frequency.target=\$cpufreq_max
+	fi
+fi
+EOF
+	echo ./etc/rc.local type=file uname=root gname=wheel mode=0644 \
+	 $tmp/selected_sets
 }
 
 populate() {



CVS commit: src/sys/sys

2015-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  8 19:39:09 UTC 2015

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

Log Message:
make this kmemuser friendly.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/sys/sleepq.h

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

Modified files:

Index: src/sys/sys/sleepq.h
diff -u src/sys/sys/sleepq.h:1.23 src/sys/sys/sleepq.h:1.24
--- src/sys/sys/sleepq.h:1.23	Thu Apr 24 08:04:28 2014
+++ src/sys/sys/sleepq.h	Sun Feb  8 14:39:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.h,v 1.23 2014/04/24 12:04:28 pooka Exp $	*/
+/*	$NetBSD: sleepq.h,v 1.24 2015/02/08 19:39:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@ typedef struct sleeptab {
 
 void	sleepq_init(sleepq_t *);
 void	sleepq_remove(sleepq_t *, lwp_t *);
-void	sleepq_enqueue(sleepq_t *, wchan_t, const char *, syncobj_t *);
+void	sleepq_enqueue(sleepq_t *, wchan_t, const char *, struct syncobj *);
 void	sleepq_unsleep(lwp_t *, bool);
 void	sleepq_timeout(void *);
 void	sleepq_wake(sleepq_t *, wchan_t, u_int, kmutex_t *);
@@ -74,6 +74,7 @@ void	sleeptab_init(sleeptab_t *);
 
 extern sleeptab_t	sleeptab;
 
+#ifdef _KERNEL
 /*
  * Return non-zero if it is unsafe to sleep.
  *
@@ -128,6 +129,7 @@ sleepq_enter(sleepq_t *sq, lwp_t *l, kmu
 	lwp_unlock_to(l, mp);
 	KERNEL_UNLOCK_ALL(NULL, l-l_biglocks);
 }
+#endif
 
 /*
  * Turnstiles, specialized sleep queues for use by kernel locks.



CVS commit: src/usr.sbin/crash

2015-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  8 19:42:12 UTC 2015

Modified Files:
src/usr.sbin/crash: Makefile

Log Message:
add kern_timeout.c for show callout


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/crash/Makefile

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/crash/Makefile
diff -u src/usr.sbin/crash/Makefile:1.27 src/usr.sbin/crash/Makefile:1.28
--- src/usr.sbin/crash/Makefile:1.27	Sun Mar 30 03:29:22 2014
+++ src/usr.sbin/crash/Makefile	Sun Feb  8 14:42:12 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.27 2014/03/30 07:29:22 skrll Exp $
+#	$NetBSD: Makefile,v 1.28 2015/02/08 19:42:12 christos Exp $
 
 PROG=		crash
 MAN=		crash.8
@@ -34,7 +34,7 @@ S=		${.CURDIR}/../../sys
 
 CPPFLAGS+=	-I${.CURDIR} -I${.OBJDIR} -I${S} -fno-strict-aliasing
 CPPFLAGS+=	-DDDB_VERBOSE_HELP -DDB_MAX_LINE=1000 -D_KMEMUSER
-CPPFLAGS+=	-UDB_MACHINE_COMMANDS
+CPPFLAGS+=	-UDB_MACHINE_COMMANDS -DCRASH -DDDB
 
 # ddb files from kernel
 .PATH:	$S/ddb
@@ -47,6 +47,9 @@ SRCS+=	db_sym.c db_variables.c db_write_
 .PATH:	${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
 SRCS+=	db_disasm.c
 
+.PATH:  $S/kern
+SRCS+=	kern_timeout.c
+
 CPPFLAGS+=	-I${S}/arch
 
 . if${MACHINE} == amd64 \



CVS commit: src/sys/rump

2015-02-08 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Sun Feb  8 20:22:02 UTC 2015

Modified Files:
src/sys/rump: listsrcdirs

Log Message:
Add rtadvd to rump user sources


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/rump/listsrcdirs

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

Modified files:

Index: src/sys/rump/listsrcdirs
diff -u src/sys/rump/listsrcdirs:1.26 src/sys/rump/listsrcdirs:1.27
--- src/sys/rump/listsrcdirs:1.26	Wed Dec 24 21:21:18 2014
+++ src/sys/rump/listsrcdirs	Sun Feb  8 20:22:01 2015
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: listsrcdirs,v 1.26 2014/12/24 21:21:18 justin Exp $
+#	$NetBSD: listsrcdirs,v 1.27 2015/02/08 20:22:01 justin Exp $
 #
 
 #
@@ -106,7 +106,7 @@ lsrc usr /sbin/			ping ping6 raidctl reb
 lsrc usr /sbin/			rndctl route setkey sysctl umount
 lsrc usr /usr.bin/		kdump ktrace
 lsrc usr /usr.sbin/		arp dumpfs mdconfig ndp npf pcictl
-lsrc usr /usr.sbin/		vnconfig wlanctl
+lsrc usr /usr.sbin/		rtadvd vnconfig wlanctl
 lsrc usr /external/bsd/		libelf libpcap tcpdump wpa
 lsrc usr /crypto/		Makefile.openssl
 lsrc usr /crypto/dist/		ipsec-tools



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

2015-02-08 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Feb  8 20:25:10 UTC 2015

Modified Files:
src/sys/arch/evbarm/conf: HUMMINGBIRD_A31

Log Message:
Include vnd, fss and putter


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/HUMMINGBIRD_A31

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

Modified files:

Index: src/sys/arch/evbarm/conf/HUMMINGBIRD_A31
diff -u src/sys/arch/evbarm/conf/HUMMINGBIRD_A31:1.20 src/sys/arch/evbarm/conf/HUMMINGBIRD_A31:1.21
--- src/sys/arch/evbarm/conf/HUMMINGBIRD_A31:1.20	Sun Nov 23 13:42:06 2014
+++ src/sys/arch/evbarm/conf/HUMMINGBIRD_A31	Sun Feb  8 20:25:10 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: HUMMINGBIRD_A31,v 1.20 2014/11/23 13:42:06 jmcneill Exp $
+#	$NetBSD: HUMMINGBIRD_A31,v 1.21 2015/02/08 20:25:10 joerg Exp $
 #
 #	HUMMINGBIRD_A31 - Merrii Hummingbird A31
 #
@@ -288,9 +288,9 @@ ukphy*		at mii? phy ?
 
 # disk/mass storage pseudo-devices
 #pseudo-device	md			# memory disk device (ramdisk)
-#pseudo-device	vnd			# disk-like interface to files
-#pseudo-device	fss			# file system snapshot device
-#pseudo-device	putter			# for puffs and pud
+pseudo-device	vnd			# disk-like interface to files
+pseudo-device	fss			# file system snapshot device
+pseudo-device	putter			# for puffs and pud
 pseudo-device	drvctl			# driver control
 
 # network pseudo-devices



CVS commit: src/sys/dev/usb

2015-02-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  8 19:22:45 UTC 2015

Modified Files:
src/sys/dev/usb: uhidev.c uhidev.h
Added Files:
src/sys/dev/usb: x1input_rdesc.h


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/usb/uhidev.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/uhidev.h
cvs rdiff -u -r0 -r1.1 src/sys/dev/usb/x1input_rdesc.h

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

Modified files:

Index: src/sys/dev/usb/uhidev.c
diff -u src/sys/dev/usb/uhidev.c:1.61 src/sys/dev/usb/uhidev.c:1.62
--- src/sys/dev/usb/uhidev.c:1.61	Sun Aug 10 16:44:36 2014
+++ src/sys/dev/usb/uhidev.c	Sun Feb  8 19:22:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhidev.c,v 1.61 2014/08/10 16:44:36 tls Exp $	*/
+/*	$NetBSD: uhidev.c,v 1.62 2015/02/08 19:22:45 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhidev.c,v 1.61 2014/08/10 16:44:36 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhidev.c,v 1.62 2015/02/08 19:22:45 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -61,6 +61,8 @@ __KERNEL_RCSID(0, $NetBSD: uhidev.c,v 1
 #include dev/usb/ugraphire_rdesc.h
 /* Report descriptor for game controllers in XInput mode */
 #include dev/usb/xinput_rdesc.h
+/* Report descriptor for Xbox One controllers */
+#include dev/usb/x1input_rdesc.h
 
 #include locators.h
 
@@ -95,6 +97,10 @@ uhidev_match(device_t parent, cfdata_t m
 	/* Game controllers in XInput mode */
 	if (USBIF_IS_XINPUT(uaa))
 		return UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO;
+	/* Xbox One controllers */
+ 	if (USBIF_IS_X1INPUT(uaa)  uaa-ifaceno == 0)
+		return UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO;
+
 	if (uaa-class != UICLASS_HID)
 		return (UMATCH_NONE);
 	if (usbd_get_quirks(uaa-device)-uq_flags  UQ_HID_IGNORE)
@@ -224,6 +230,11 @@ uhidev_attach(device_t parent, device_t 
 		size = sizeof uhid_xinput_report_descr;
 		descptr = uhid_xinput_report_descr;
 	}
+	if (USBIF_IS_X1INPUT(uaa)) {
+		sc-sc_flags |= UHIDEV_F_XB1;
+		size = sizeof uhid_x1input_report_descr;
+		descptr = uhid_x1input_report_descr;
+	}
 
 	if (descptr) {
 		desc = malloc(size, M_USBDEV, M_NOWAIT);
@@ -595,9 +606,27 @@ uhidev_open(struct uhidev *scd)
 			error = ENOMEM;
 			goto out3;
 		}
+
+		if (sc-sc_flags  UHIDEV_F_XB1) {
+			uint8_t init_data[] = { 0x05, 0x20 };
+			int init_data_len = sizeof(init_data);
+			err = usbd_intr_transfer(sc-sc_oxfer, sc-sc_opipe, 0,
+			USBD_NO_TIMEOUT, init_data, init_data_len,
+			uhidevxb1);
+			if (err != USBD_NORMAL_COMPLETION) {
+DPRINTF((uhidev_open: xb1 init failed, 
+error=%d\n, err));
+error = EIO;
+goto out4;
+			}
+		}
 	}
 
 	return (0);
+out4:
+	/* Free output xfer */
+	if (sc-sc_oxfer != NULL)
+		usbd_free_xfer(sc-sc_oxfer);
 out3:
 	/* Abort output pipe */
 	usbd_close_pipe(sc-sc_opipe);

Index: src/sys/dev/usb/uhidev.h
diff -u src/sys/dev/usb/uhidev.h:1.15 src/sys/dev/usb/uhidev.h:1.16
--- src/sys/dev/usb/uhidev.h:1.15	Tue Jun 17 09:35:46 2014
+++ src/sys/dev/usb/uhidev.h	Sun Feb  8 19:22:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhidev.h,v 1.15 2014/06/17 09:35:46 skrll Exp $	*/
+/*	$NetBSD: uhidev.h,v 1.16 2015/02/08 19:22:45 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -57,6 +57,9 @@ struct uhidev_softc {
 	u_char sc_dying;
 
 	kmutex_t sc_lock;		/* protects writes to sc_state */
+
+	u_int sc_flags;
+#define UHIDEV_F_XB1	0x0001	/* Xbox 1 controller */
 };
 
 struct uhidev {

Added files:

Index: src/sys/dev/usb/x1input_rdesc.h
diff -u /dev/null src/sys/dev/usb/x1input_rdesc.h:1.1
--- /dev/null	Sun Feb  8 19:22:45 2015
+++ src/sys/dev/usb/x1input_rdesc.h	Sun Feb  8 19:22:45 2015
@@ -0,0 +1,105 @@
+/* $NetBSD: x1input_rdesc.h,v 1.1 2015/02/08 19:22:45 jmcneill Exp $ */
+
+/*-
+ * Copyright (C) 2014 Loic Nageleisen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *   * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *   * Neither the name of the copyright holders nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 

CVS commit: src/sys/kern

2015-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  8 19:41:00 UTC 2015

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

Log Message:
make the ddb code crash(8) friendly.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/kern/kern_timeout.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_timeout.c
diff -u src/sys/kern/kern_timeout.c:1.48 src/sys/kern/kern_timeout.c:1.49
--- src/sys/kern/kern_timeout.c:1.48	Wed Dec 10 12:09:49 2014
+++ src/sys/kern/kern_timeout.c	Sun Feb  8 14:41:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_timeout.c,v 1.48 2014/12/10 17:09:49 martin Exp $	*/
+/*	$NetBSD: kern_timeout.c,v 1.49 2015/02/08 19:41:00 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_timeout.c,v 1.48 2014/12/10 17:09:49 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_timeout.c,v 1.49 2015/02/08 19:41:00 christos Exp $);
 
 /*
  * Timeouts are kept in a hierarchical timing wheel.  The c_time is the
@@ -101,6 +101,7 @@ __KERNEL_RCSID(0, $NetBSD: kern_timeout
 #include machine/db_machdep.h
 #include ddb/db_interface.h
 #include ddb/db_access.h
+#include ddb/db_cpu.h
 #include ddb/db_sym.h
 #include ddb/db_output.h
 #endif
@@ -165,8 +166,6 @@ do {	\
 #define CIRCQ_LAST(elem,list)	((elem)-cq_next_l == (list))
 #define CIRCQ_EMPTY(list)	((list)-cq_next_l == (list))
 
-static void	callout_softclock(void *);
-
 struct callout_cpu {
 	kmutex_t	*cc_lock;
 	sleepq_t	cc_sleepq;
@@ -183,6 +182,9 @@ struct callout_cpu {
 	char		cc_name2[12];
 };
 
+#ifndef CRASH
+
+static void	callout_softclock(void *);
 static struct callout_cpu callout_cpu0;
 static void *callout_sih;
 
@@ -757,21 +759,32 @@ callout_softclock(void *v)
 	cc-cc_lwp = NULL;
 	mutex_spin_exit(cc-cc_lock);
 }
+#endif
 
 #ifdef DDB
 static void
 db_show_callout_bucket(struct callout_cpu *cc, struct callout_circq *bucket)
 {
-	callout_impl_t *c;
+	callout_impl_t *c, ci;
 	db_expr_t offset;
 	const char *name;
 	static char question[] = ?;
+	struct callout_circq bi;
+	struct callout_cpu cci;
 	int b;
 
+	db_read_bytes((db_addr_t)cc, sizeof(cci), (char *)cci);
+	cc = cci;
+
+	db_read_bytes((db_addr_t)bucket, sizeof(bi), (char *)bi);
+	bucket = bi;
+
 	if (CIRCQ_EMPTY(bucket))
 		return;
 
 	for (c = CIRCQ_FIRST(bucket); /*nothing*/; c = CIRCQ_NEXT(c-c_list)) {
+		db_read_bytes((db_addr_t)c, sizeof(ci), (char *)ci);
+		c = ci;
 		db_find_sym_and_offset((db_addr_t)(intptr_t)c-c_func, name,
 		offset);
 		name = name ? name : question;
@@ -789,12 +802,13 @@ db_show_callout_bucket(struct callout_cp
 void
 db_show_callout(db_expr_t addr, bool haddr, db_expr_t count, const char *modif)
 {
-	CPU_INFO_ITERATOR cii;
 	struct callout_cpu *cc;
 	struct cpu_info *ci;
 	int b;
 
+#ifndef CRASH
 	db_printf(hardclock_ticks now: %d\n, hardclock_ticks);
+#endif
 	db_printf(ticks  wheel   arg  func\n);
 
 	/*
@@ -802,13 +816,15 @@ db_show_callout(db_expr_t addr, bool had
 	 * anyhow, and we might be called in a circumstance where
 	 * some other CPU was paused while holding the lock.
 	 */
-	for (CPU_INFO_FOREACH(cii, ci)) {
-		cc = ci-ci_data.cpu_callout;
+	for (ci = db_cpu_first(); ci != NULL; ci = db_cpu_next(ci)) {
+		db_read_bytes((db_addr_t)ci-ci_data.cpu_callout,
+		sizeof(cc), (char *)cc);
 		db_show_callout_bucket(cc, cc-cc_todo);
 	}
 	for (b = 0; b  BUCKETS; b++) {
-		for (CPU_INFO_FOREACH(cii, ci)) {
-			cc = ci-ci_data.cpu_callout;
+		for (ci = db_cpu_first(); ci != NULL; ci = db_cpu_next(ci)) {
+			db_read_bytes((db_addr_t)ci-ci_data.cpu_callout,
+			sizeof(cc), (char *)cc);
 			db_show_callout_bucket(cc, cc-cc_wheel[b]);
 		}
 	}



CVS commit: src/sys/ddb

2015-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  8 19:41:39 UTC 2015

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

Log Message:
we can use show callout now from crash


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

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

Modified files:

Index: src/sys/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.143 src/sys/ddb/db_command.c:1.144
--- src/sys/ddb/db_command.c:1.143	Sat Oct 19 11:20:52 2013
+++ src/sys/ddb/db_command.c	Sun Feb  8 14:41:39 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.143 2013/10/19 15:20:52 christos Exp $	*/
+/*	$NetBSD: db_command.c,v 1.144 2015/02/08 19:41:39 christos Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_command.c,v 1.143 2013/10/19 15:20:52 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_command.c,v 1.144 2015/02/08 19:41:39 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_aio.h
@@ -212,10 +212,8 @@ static void	db_vmem_print_cmd(db_expr_t,
 
 static const struct db_command db_show_cmds[] = {
 	/*added from all sub cmds*/
-#ifdef _KERNEL	/* XXX CRASH(8) */
 	{ DDB_ADD_CMD(callout,  db_show_callout,
 	0 ,List all used callout functions.,NULL,NULL) },
-#endif
 	{ DDB_ADD_CMD(pages,	db_show_all_pages,
 	0 ,List all used memory pages.,NULL,NULL) },
 	{ DDB_ADD_CMD(proc,	db_show_proc,
@@ -305,10 +303,8 @@ static const struct db_command db_comman
 	Continue execution., [/c],NULL) },
 	{ DDB_ADD_CMD(call,	db_fncall,		CS_OWN,
 	Call the function, address[(expression[,...])],NULL) },
-#ifdef _KERNEL	/* XXX CRASH(8) */
 	{ DDB_ADD_CMD(callout,	db_show_callout,	0, NULL,
 	NULL,NULL ) },
-#endif
 	{ DDB_ADD_CMD(continue,	db_continue_cmd,	0,
 	Continue execution., [/c],NULL) },
 	{ DDB_ADD_CMD(d,		db_delete_cmd,		0,



CVS commit: [netbsd-7] src/distrib/sets/lists

2015-02-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Feb  8 22:15:02 UTC 2015

Modified Files:
src/distrib/sets/lists/base [netbsd-7]: ad.arm ad.mips md.amd64
md.sparc64
src/distrib/sets/lists/comp [netbsd-7]: ad.arm ad.mips md.amd64
md.sparc64
src/distrib/sets/lists/debug [netbsd-7]: ad.arm ad.mips ad.powerpc
md.amd64 md.evbmips md.sparc64

Log Message:
Apply patch (requested by joerg in ticket 497):
Fix set lists for builds without GCC.


To generate a diff of this commit:
cvs rdiff -u -r1.54.2.4 -r1.54.2.5 src/distrib/sets/lists/base/ad.arm
cvs rdiff -u -r1.48.2.4 -r1.48.2.5 src/distrib/sets/lists/base/ad.mips
cvs rdiff -u -r1.244.2.4 -r1.244.2.5 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.232.2.4 -r1.232.2.5 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.59.2.1 -r1.59.2.2 src/distrib/sets/lists/comp/ad.arm
cvs rdiff -u -r1.50.2.1 -r1.50.2.2 src/distrib/sets/lists/comp/ad.mips
cvs rdiff -u -r1.224.2.1 -r1.224.2.2 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.187.2.1 -r1.187.2.2 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.42.2.4 -r1.42.2.5 src/distrib/sets/lists/debug/ad.arm
cvs rdiff -u -r1.38.2.4 -r1.38.2.5 src/distrib/sets/lists/debug/ad.mips
cvs rdiff -u -r1.18.2.4 -r1.18.2.5 src/distrib/sets/lists/debug/ad.powerpc
cvs rdiff -u -r1.63.2.4 -r1.63.2.5 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/distrib/sets/lists/debug/md.evbmips
cvs rdiff -u -r1.61.2.4 -r1.61.2.5 src/distrib/sets/lists/debug/md.sparc64

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/base/ad.arm
diff -u src/distrib/sets/lists/base/ad.arm:1.54.2.4 src/distrib/sets/lists/base/ad.arm:1.54.2.5
--- src/distrib/sets/lists/base/ad.arm:1.54.2.4	Sun Jan 25 00:19:24 2015
+++ src/distrib/sets/lists/base/ad.arm	Sun Feb  8 22:15:02 2015
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.54.2.4 2015/01/25 00:19:24 martin Exp $
+# $NetBSD: ad.arm,v 1.54.2.5 2015/02/08 22:15:02 snj Exp $
 ./lib/oabi	base-compat-shlib	compat
 ./lib/oabi/npf	base-npf-shlib		compat
 ./lib/oabi/npf/ext_log.so			base-npf-shlib		compat,pic
@@ -73,8 +73,8 @@
 ./usr/lib/oabi/libarchive.so.3.1		base-compat-shlib	compat,pic
 ./usr/lib/oabi/libarm.so.0			base-sys-shlib		compat,pic
 ./usr/lib/oabi/libarm.so.0.0			base-sys-shlib		compat,pic
-./usr/lib/oabi/libasan.so.0			base-compat-shlib	compat,pic
-./usr/lib/oabi/libasan.so.0.0			base-compat-shlib	compat,pic
+./usr/lib/oabi/libasan.so.0			base-compat-shlib	compat,pic,gcc=48
+./usr/lib/oabi/libasan.so.0.0			base-compat-shlib	compat,pic,gcc=48
 ./usr/lib/oabi/libasn1.so.9			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/oabi/libasn1.so.9.0			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/oabi/libatf-c++.so.1			base-compat-shlib	compat,pic,atf

Index: src/distrib/sets/lists/base/ad.mips
diff -u src/distrib/sets/lists/base/ad.mips:1.48.2.4 src/distrib/sets/lists/base/ad.mips:1.48.2.5
--- src/distrib/sets/lists/base/ad.mips:1.48.2.4	Sun Jan 25 00:19:24 2015
+++ src/distrib/sets/lists/base/ad.mips	Sun Feb  8 22:15:02 2015
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips,v 1.48.2.4 2015/01/25 00:19:24 martin Exp $
+# $NetBSD: ad.mips,v 1.48.2.5 2015/02/08 22:15:02 snj Exp $
 ./lib/64	base-compat-shlib	compat,arch64
 ./lib/64/npf	base-npf-shlib		compat,arch64
 ./lib/64/npf/ext_log.sobase-npf-shlib		compat,pic,arch64
@@ -75,8 +75,8 @@
 ./usr/lib/64/libamu.so.4.0			base-compat-shlib	compat,pic,arch64
 ./usr/lib/64/libarchive.so.3			base-compat-shlib	compat,pic,arch64
 ./usr/lib/64/libarchive.so.3.1			base-compat-shlib	compat,pic,arch64
-./usr/lib/64/libasan.so.0			base-compat-shlib	compat,pic
-./usr/lib/64/libasan.so.0.0			base-compat-shlib	compat,pic
+./usr/lib/64/libasan.so.0			base-compat-shlib	compat,pic,gcc=48
+./usr/lib/64/libasan.so.0.0			base-compat-shlib	compat,pic,gcc=48
 ./usr/lib/64/libasn1.so.9			base-compat-shlib	compat,pic,kerberos,arch64
 ./usr/lib/64/libasn1.so.9.0			base-compat-shlib	compat,pic,kerberos,arch64
 ./usr/lib/64/libatf-c++.so.1			base-compat-shlib	compat,pic,atf,arch64
@@ -423,8 +423,8 @@
 ./usr/lib/o32/libamu.so.4.0			base-compat-shlib	compat,pic,arch64
 ./usr/lib/o32/libarchive.so.3			base-compat-shlib	compat,pic,arch64
 ./usr/lib/o32/libarchive.so.3.1			base-compat-shlib	compat,pic,arch64
-./usr/lib/o32/libasan.so.0			base-compat-shlib	compat,pic
-./usr/lib/o32/libasan.so.0.0			base-compat-shlib	compat,pic
+./usr/lib/o32/libasan.so.0			base-compat-shlib	compat,pic,gcc=48
+./usr/lib/o32/libasan.so.0.0			base-compat-shlib	compat,pic,gcc=48
 ./usr/lib/o32/libasn1.so.9			base-compat-shlib	compat,pic,kerberos,arch64
 ./usr/lib/o32/libasn1.so.9.0			base-compat-shlib	compat,pic,kerberos,arch64
 ./usr/lib/o32/libatf-c++.so.1			base-compat-shlib	compat,pic,atf,arch64

Index: src/distrib/sets/lists/base/md.amd64
diff -u src/distrib/sets/lists/base/md.amd64:1.244.2.4 

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

2015-02-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Feb  8 22:18:30 UTC 2015

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

Log Message:
Pull up following revision(s) (requested by joerg in ticket #498):
sys/arch/xen/x86/xen_ipi.c: revision 1.19
valid_ipimask is only used under DIAGNOSTIC, so only define it then.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/arch/xen/x86/xen_ipi.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/xen/x86/xen_ipi.c
diff -u src/sys/arch/xen/x86/xen_ipi.c:1.18 src/sys/arch/xen/x86/xen_ipi.c:1.18.2.1
--- src/sys/arch/xen/x86/xen_ipi.c:1.18	Mon May 19 22:47:54 2014
+++ src/sys/arch/xen/x86/xen_ipi.c	Sun Feb  8 22:18:30 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_ipi.c,v 1.18 2014/05/19 22:47:54 rmind Exp $ */
+/* $NetBSD: xen_ipi.c,v 1.18.2.1 2015/02/08 22:18:30 snj Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,10 +33,10 @@
 
 /* 
  * Based on: x86/ipi.c
- * __KERNEL_RCSID(0, $NetBSD: xen_ipi.c,v 1.18 2014/05/19 22:47:54 rmind Exp $); 
+ * __KERNEL_RCSID(0, $NetBSD: xen_ipi.c,v 1.18.2.1 2015/02/08 22:18:30 snj Exp $); 
  */
 
-__KERNEL_RCSID(0, $NetBSD: xen_ipi.c,v 1.18 2014/05/19 22:47:54 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: xen_ipi.c,v 1.18.2.1 2015/02/08 22:18:30 snj Exp $);
 
 #include sys/types.h
 
@@ -131,6 +131,7 @@ xen_ipi_init(void)
 	hypervisor_enable_event(evtchn);
 }
 
+#ifdef DIAGNOSTIC
 static inline bool /* helper */
 valid_ipimask(uint32_t ipimask)
 {
@@ -145,6 +146,7 @@ valid_ipimask(uint32_t ipimask)
 	}
 
 }
+#endif
 
 int
 xen_send_ipi(struct cpu_info *ci, uint32_t ipimask)



CVS commit: [netbsd-7] src/doc

2015-02-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Feb  8 22:21:09 UTC 2015

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

Log Message:
tickets 472 and 496-498


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.196 -r1.1.2.197 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.196 src/doc/CHANGES-7.0:1.1.2.197
--- src/doc/CHANGES-7.0:1.1.2.196	Thu Feb  5 15:14:19 2015
+++ src/doc/CHANGES-7.0	Sun Feb  8 22:21:09 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.196 2015/02/05 15:14:19 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.197 2015/02/08 22:21:09 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -15688,3 +15688,45 @@ doc/3RDPARTY	1.1198
 
 	Import dhcpcd version 6.7.1.
 	[pettai, ticket #495]
+
+lib/libc/include/namespace.h			1.175
+lib/libc/sys/Makefile.inc			1.225, 1.227
+lib/libc/sys/fdiscard.21.3
+lib/libc/sys/fdiscard.c1.1
+lib/libc/sys/posix_fallocate.c			1.1
+
+	Fix argument paddiing for posix_fallocate and fdiscard with gcc 1.x
+	PR/49617: Make posix_fallocate() return an error on failure, without
+	setting errno.
+	[christos, ticket #472]
+
+distrib/utils/embedded/conf/rpi.conf		1.25
+
+	Set CPU frequency to the value specified in firmware config
+	(/boot/config.txt) at boot on Raspberry Pi.
+	[jmcneill, ticket #496]
+
+distrib/sets/lists/base/ad.arm			patch
+distrib/sets/lists/base/ad.mips			patch
+distrib/sets/lists/base/md.amd64		patch
+distrib/sets/lists/base/md.sparc64		patch
+distrib/sets/lists/comp/ad.arm			patch
+distrib/sets/lists/comp/ad.mips			patch
+distrib/sets/lists/comp/md.amd64		patch
+distrib/sets/lists/comp/md.sparc64		patch
+distrib/sets/lists/debug/ad.arm			patch
+distrib/sets/lists/debug/ad.mips		patch
+distrib/sets/lists/debug/ad.powerpc		patch
+distrib/sets/lists/debug/md.amd64		patch
+distrib/sets/lists/debug/md.evbmips		patch
+distrib/sets/lists/debug/md.sparc64		patch
+
+	Fix set lists for builds without GCC.
+	[joerg, ticket #497]
+
+sys/arch/xen/x86/xen_ipi.c			1.19
+
+	valid_ipimask is only used under DIAGNOSTIC, so only define
+	it then.  Fixes build with clang.
+	[joerg, ticket #498]
+



CVS commit: src/sys/external/bsd/acpica/dist/namespace

2015-02-08 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Feb  9 03:16:33 UTC 2015

Modified Files:
src/sys/external/bsd/acpica/dist/namespace: nsinit.c

Log Message:
revert rev 1.5, which brings back PR 48494.
that earlier revision itself reverted an upstream bugfix,
and that change fixed some systems but broke others
(in particular, it broke my HP Z800 workstation.)
this latest revision brings us back in sync with upstream.
the current upstream (and this latest flip-flop of our copy)
is clearly correct, since it zeros a buffer which is intended
to be used as scratch space for a single acpica operation.
agreed by christos and ryoon back in april 2014.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/acpica/dist/namespace/nsinit.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/acpica/dist/namespace/nsinit.c
diff -u src/sys/external/bsd/acpica/dist/namespace/nsinit.c:1.6 src/sys/external/bsd/acpica/dist/namespace/nsinit.c:1.7
--- src/sys/external/bsd/acpica/dist/namespace/nsinit.c:1.6	Sat Oct 25 21:00:07 2014
+++ src/sys/external/bsd/acpica/dist/namespace/nsinit.c	Mon Feb  9 03:16:33 2015
@@ -616,10 +616,7 @@ AcpiNsInitOneDevice (
 ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
 ACPI_TYPE_METHOD, DeviceNode, METHOD_NAME__INI));
 
-#if 0
-// https://bugs.acpica.org/show_bug.cgi?id=1016
 ACPI_MEMSET (Info, 0, sizeof (ACPI_EVALUATE_INFO));
-#endif
 Info-PrefixNode = DeviceNode;
 Info-RelativePathname = __UNCONST(METHOD_NAME__INI);
 Info-Parameters = NULL;



CVS commit: src/sys/arch/evbarm

2015-02-08 Thread Sergio Lopez
Module Name:src
Committed By:   slp
Date:   Mon Feb  9 07:47:15 UTC 2015

Added Files:
src/sys/arch/evbarm/conf: files.vexpress mk.vexpress std.vexpress
src/sys/arch/evbarm/vexpress: if_smsh_axi.c platform.h vexpress_axi.c
vexpress_intr.h vexpress_machdep.c vexpress_plcom.c
vexpress_plmmc.c vexpress_space.c vexpress_start.S vexpress_var.h

Log Message:
Add support for Versatile Express A15 board.

This has not been tested with real hardware, just with the software
model emulated by QEMU.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/files.vexpress \
src/sys/arch/evbarm/conf/mk.vexpress \
src/sys/arch/evbarm/conf/std.vexpress
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/vexpress/if_smsh_axi.c \
src/sys/arch/evbarm/vexpress/platform.h \
src/sys/arch/evbarm/vexpress/vexpress_axi.c \
src/sys/arch/evbarm/vexpress/vexpress_intr.h \
src/sys/arch/evbarm/vexpress/vexpress_machdep.c \
src/sys/arch/evbarm/vexpress/vexpress_plcom.c \
src/sys/arch/evbarm/vexpress/vexpress_plmmc.c \
src/sys/arch/evbarm/vexpress/vexpress_space.c \
src/sys/arch/evbarm/vexpress/vexpress_start.S \
src/sys/arch/evbarm/vexpress/vexpress_var.h

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

Added files:

Index: src/sys/arch/evbarm/conf/files.vexpress
diff -u /dev/null src/sys/arch/evbarm/conf/files.vexpress:1.1
--- /dev/null	Mon Feb  9 07:47:15 2015
+++ src/sys/arch/evbarm/conf/files.vexpress	Mon Feb  9 07:47:15 2015
@@ -0,0 +1,68 @@
+#	$NetBSD: files.vexpress,v 1.1 2015/02/09 07:47:15 slp Exp $
+#
+# Versatile Express board configuration info
+#
+
+file	arch/evbarm/vexpress/vexpress_machdep.c
+
+include arch/arm/pic/files.pic
+include arch/arm/cortex/files.cortex
+
+filearch/arm/arm32/arm32_boot.c
+filearch/arm/arm32/arm32_kvminit.c
+filearch/arm/arm32/arm32_reboot.c
+filearch/arm/arm32/irq_dispatch.S
+
+file	arch/evbarm/vexpress/vexpress_space.c
+
+# VEXPRESS AXI/AHB bus interface and SoC domains
+device  axi { [addr=-1], [size=0], [irq=-1], [irqbase=-1]} : bus_space_generic
+attach  axi at mainbus
+filearch/evbarm/vexpress/vexpress_axi.c	axi
+
+# UART Interface
+attach  plcom at axi with vexpressplcom
+filearch/evbarm/vexpress/vexpress_plcom.c	vexpressplcom
+
+# MMCI host controller
+attach	plmmc at axi with vexpressplmmc
+file	arch/evbarm/vexpress/vexpress_plmmc.c	vexpressplmmc
+
+# SMSC LAN9118
+attach  smsh at axi with smsh_axi
+filearch/evbarm/vexpress/if_smsh_axi.c	smsh_axi
+
+#	$NetBSD: files.vexpress,v 1.1 2015/02/09 07:47:15 slp Exp $
+#
+# Versatile Express board configuration info
+#
+
+file	arch/evbarm/vexpress/vexpress_machdep.c
+
+include arch/arm/pic/files.pic
+include arch/arm/cortex/files.cortex
+
+filearch/arm/arm32/arm32_boot.c
+filearch/arm/arm32/arm32_kvminit.c
+filearch/arm/arm32/arm32_reboot.c
+filearch/arm/arm32/irq_dispatch.S
+
+file	arch/evbarm/vexpress/vexpress_space.c
+
+# VEXPRESS AXI/AHB bus interface and SoC domains
+device  axi { [addr=-1], [size=0], [irq=-1], [irqbase=-1]} : bus_space_generic
+attach  axi at mainbus
+filearch/evbarm/vexpress/vexpress_axi.c	axi
+
+# UART Interface
+attach  plcom at axi with vexpressplcom
+filearch/evbarm/vexpress/vexpress_plcom.c	vexpressplcom
+
+# MMCI host controller
+attach	plmmc at axi with vexpressplmmc
+file	arch/evbarm/vexpress/vexpress_plmmc.c	vexpressplmmc
+
+# SMSC LAN9118
+attach  smsh at axi with smsh_axi
+filearch/evbarm/vexpress/if_smsh_axi.c	smsh_axi
+
Index: src/sys/arch/evbarm/conf/mk.vexpress
diff -u /dev/null src/sys/arch/evbarm/conf/mk.vexpress:1.1
--- /dev/null	Mon Feb  9 07:47:15 2015
+++ src/sys/arch/evbarm/conf/mk.vexpress	Mon Feb  9 07:47:15 2015
@@ -0,0 +1,70 @@
+#	$NetBSD: mk.vexpress,v 1.1 2015/02/09 07:47:15 slp Exp $
+
+.if !empty(MACHINE_ARCH:M*eb)
+EXTRA_LINKFLAGS+=	--be8
+.endif
+
+SYSTEM_FIRST_OBJ=	vexpress_start.o
+SYSTEM_FIRST_SFILE=	${THISARM}/vexpress/vexpress_start.S
+
+_OSRELEASE!=		${HOST_SH} $S/conf/osrelease.sh
+
+KERNEL_BASE_PHYS?=$(LOADADDRESS)
+KERNEL_BASE_VIRT?=$(LOADADDRESS)
+
+MKUBOOTIMAGEARGS=	-A arm -T kernel
+MKUBOOTIMAGEARGS+=	-a $(KERNEL_BASE_PHYS) -e $(KERNEL_BASE_PHYS)
+MKUBOOTIMAGEARGS+=	-n NetBSD/$(BOARDTYPE) ${_OSRELEASE}
+MKUBOOTIMAGEARGS_NONE=	${MKUBOOTIMAGEARGS} -C none
+MKUBOOTIMAGEARGS_GZ=	${MKUBOOTIMAGEARGS} -C gz
+
+SYSTEM_LD_TAIL_EXTRA+=; \
+	echo ${OBJCOPY} -S -O binary $@ $@.bin; \
+	${OBJCOPY} -S -O binary $@ $@.bin; \
+	echo ${TOOL_GZIP} -9c $@.bin  $@.bin.gz; \
+	${TOOL_GZIP} -9c $@.bin  $@.bin.gz; \
+	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub; \
+	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub; \
+	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
+	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
+	echo
+
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}
+EXTRA_KERNELS+= 

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

2015-02-08 Thread Sergio Lopez
Module Name:src
Committed By:   slp
Date:   Mon Feb  9 07:50:24 UTC 2015

Added Files:
src/sys/arch/evbarm/conf: VEXPRESS_A15

Log Message:
Add configuration file for Versatile Express A15 board.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/VEXPRESS_A15

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

Added files:

Index: src/sys/arch/evbarm/conf/VEXPRESS_A15
diff -u /dev/null src/sys/arch/evbarm/conf/VEXPRESS_A15:1.1
--- /dev/null	Mon Feb  9 07:50:24 2015
+++ src/sys/arch/evbarm/conf/VEXPRESS_A15	Mon Feb  9 07:50:24 2015
@@ -0,0 +1,434 @@
+#
+#	$NetBSD: VEXPRESS_A15,v 1.1 2015/02/09 07:50:24 slp Exp $
+#
+#	VEXPRESS_A15 -- Versatile Express A15 kernel
+#
+
+include	arch/evbarm/conf/std.vexpress
+
+# estimated number of users
+
+maxusers	32
+
+# Standard system options
+
+options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
+#options 	NTP		# NTP phase/frequency locked loop
+
+# CPU options
+options 	CPU_CORTEX
+options 	CPU_CORTEXA7
+options 	CPU_CORTEXA15
+#options 	MULTIPROCESSOR
+
+options 	PMAPCOUNTERS
+options 	BUSDMA_COUNTERS
+#options 	EXYNOS_CONSOLE_EARLY
+#options 	UVMHIST
+#options 	USBHIST
+#options 	USBHIST_SIZE=10
+#options 	UVMHIST_PRINT,KERNHIST_DELAY=0
+options 	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
+options 	PMAP_NEED_ALLOC_POOLPAGE
+
+# Specify the memory size in megabytes (optional).
+#options 	MEMSIZE=512
+
+# File systems
+file-system	FFS		# UFS
+#file-system	LFS		# log-structured file system
+file-system	MFS		# memory file system
+file-system	NFS		# Network file system
+#file-system 	ADOSFS		# AmigaDOS-compatible file system
+#file-system 	EXT2FS		# second extended file system (linux)
+#file-system	CD9660		# ISO 9660 + Rock Ridge file system
+file-system	MSDOSFS		# MS-DOS file system
+#file-system	FDESC		# /dev/fd
+file-system	KERNFS		# /kern
+#file-system	NULLFS		# loopback file system
+file-system	PROCFS		# /proc
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+#file-system	UNION		# union file system
+file-system	TMPFS		# memory file system
+file-system	PTYFS		# /dev/pts/N support
+
+# File system options
+#options 	QUOTA		# legacy UFS quotas
+#options 	QUOTA2		# new, in-filesystem UFS quotas
+#options 	FFS_EI		# FFS Endian Independent support
+#options 	NFSSERVER
+options 	WAPBL		# File system journaling support
+#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
+
+# Networking options
+
+#options 	GATEWAY		# packet forwarding
+options 	INET		# IP + ICMP + TCP + UDP
+options 	INET6		# IPV6
+#options 	IPSEC		# IP security
+#options 	IPSEC_DEBUG	# debug for IP security
+#options 	MROUTING	# IP multicast routing
+#options 	PIM		# Protocol Independent Multicast
+#options 	NETATALK	# AppleTalk networking
+#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
+#options 	PPP_DEFLATE	# Deflate compression support for PPP
+#options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
+#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
+
+options 	NFS_BOOT_BOOTP
+options 	NFS_BOOT_DHCP
+#options 	NFS_BOOT_BOOTSTATIC
+#options 	NFS_BOOTSTATIC_MYIP=\192.168.1.4\
+#options 	NFS_BOOTSTATIC_GWIP=\192.168.1.1\
+#options 	NFS_BOOTSTATIC_MASK=\255.255.255.0\
+#options 	NFS_BOOTSTATIC_SERVADDR=\192.168.1.1\
+#options 	NFS_BOOTSTATIC_SERVER=\192.168.1.1:/nfs/sdp2430\
+
+options 	NFS_BOOT_RWSIZE=1024
+
+# Compatibility options
+
+options 	COMPAT_NETBSD32	# allow running arm (e.g. non-earm) binaries
+#options 	COMPAT_43	# 4.3BSD compatibility.
+#options 	COMPAT_09	# NetBSD 0.9,
+#options 	COMPAT_10	# NetBSD 1.0,
+#options 	COMPAT_11	# NetBSD 1.1,
+#options 	COMPAT_12	# NetBSD 1.2,
+#options 	COMPAT_13	# NetBSD 1.3,
+#options 	COMPAT_14	# NetBSD 1.4,
+#options 	COMPAT_15	# NetBSD 1.5,
+#options 	COMPAT_16	# NetBSD 1.6,
+#options 	COMPAT_20	# NetBSD 2.0,
+options 	COMPAT_30	# NetBSD 3.0,
+options 	COMPAT_40	# NetBSD 4.0,
+options 	COMPAT_50	# NetBSD 5.0,
+options 	COMPAT_60	# NetBSD 6.0, and
+options 	COMPAT_70	# NetBSD 7.0 binary compatibility.
+#options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
+#options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
+
+# Shared memory options
+
+options 	SYSVMSG		# System V-like message queues
+options 	SYSVSEM		# System V-like semaphores
+options 	SYSVSHM		# System V-like memory sharing
+
+# Device options
+
+#options 	MEMORY_DISK_HOOKS	# boottime setup of ramdisk
+#options 	MEMORY_DISK_ROOT_SIZE=8192	# Size in blocks
+#options 	MEMORY_DISK_DYNAMIC
+#options 	MINIROOTSIZE=1000	# Size in blocks
+#options 	MEMORY_DISK_IS_ROOT	# use memory disk as root
+
+# Wedge support
+options 	DKWEDGE_AUTODISCOVER	# Automatically add dk(4) instances
+options 	DKWEDGE_METHOD_GPT	# Supports GPT partitions as wedges
+
+# Miscellaneous kernel options
+options 	KTRACE		# system call tracing, a la ktrace(1)
+#options 	KMEMSTATS	# kernel 

CVS commit: src/sys/dev/usb

2015-02-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  8 23:43:14 UTC 2015

Modified Files:
src/sys/dev/usb: hid.c

Log Message:
From FreeBSD via OpenBSD:

Global Item #3 should be Physical Minimum not Maximum according to the
HID spec.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/usb/hid.c

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

Modified files:

Index: src/sys/dev/usb/hid.c
diff -u src/sys/dev/usb/hid.c:1.35 src/sys/dev/usb/hid.c:1.36
--- src/sys/dev/usb/hid.c:1.35	Fri Feb 24 06:48:23 2012
+++ src/sys/dev/usb/hid.c	Sun Feb  8 23:43:14 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: hid.c,v 1.35 2012/02/24 06:48:23 mrg Exp $	*/
+/*	$NetBSD: hid.c,v 1.36 2015/02/08 23:43:14 jmcneill Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hid.c,v 1.35 2012/02/24 06:48:23 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: hid.c,v 1.36 2015/02/08 23:43:14 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -267,7 +267,7 @@ hid_get_item(struct hid_data *s, struct 
 c-logical_maximum = dval;
 break;
 			case 3:
-c-physical_maximum = dval;
+c-physical_minimum = dval;
 break;
 			case 4:
 c-physical_maximum = dval;



CVS commit: src/sys/dev/ic

2015-02-08 Thread Sergio Lopez
Module Name:src
Committed By:   slp
Date:   Mon Feb  9 07:53:39 UTC 2015

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

Log Message:
Configure interrupt polarity before enabling PHY.

This prevents a interrupt storm when running under QEMU.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ic/lan9118.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/lan9118.c
diff -u src/sys/dev/ic/lan9118.c:1.17 src/sys/dev/ic/lan9118.c:1.18
--- src/sys/dev/ic/lan9118.c:1.17	Sun Aug 10 16:44:35 2014
+++ src/sys/dev/ic/lan9118.c	Mon Feb  9 07:53:39 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lan9118.c,v 1.17 2014/08/10 16:44:35 tls Exp $	*/
+/*	$NetBSD: lan9118.c,v 1.18 2015/02/09 07:53:39 slp Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lan9118.c,v 1.17 2014/08/10 16:44:35 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: lan9118.c,v 1.18 2015/02/09 07:53:39 slp Exp $);
 
 /*
  * The LAN9118 Family
@@ -169,6 +169,10 @@ lan9118_attach(struct lan9118_softc *sc)
 		return EINVAL;
 	}
 
+	/* Configure interrupt polarity */
+	bus_space_write_4(sc-sc_iot, sc-sc_ioh, LAN9118_IRQ_CFG,
+	LAN9118_IRQ_CFG_IRQ_TYPE | LAN9118_IRQ_CFG_IRQ_POL);
+
 	val = bus_space_read_4(sc-sc_iot, sc-sc_ioh, LAN9118_ID_REV);
 	sc-sc_id = LAN9118_ID_REV_ID(val);
 	sc-sc_rev = LAN9118_ID_REV_REV(val);



CVS commit: src/sys/arch/arm

2015-02-08 Thread Sergio Lopez
Module Name:src
Committed By:   slp
Date:   Mon Feb  9 07:55:52 UTC 2015

Modified Files:
src/sys/arch/arm/include: vfpreg.h
src/sys/arch/arm/vfp: vfp_init.c

Log Message:
Add VFP IDs for QEMU's emulated Cortex-A15.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/include/vfpreg.h
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arm/vfp/vfp_init.c

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

Modified files:

Index: src/sys/arch/arm/include/vfpreg.h
diff -u src/sys/arch/arm/include/vfpreg.h:1.13 src/sys/arch/arm/include/vfpreg.h:1.14
--- src/sys/arch/arm/include/vfpreg.h:1.13	Tue Mar 18 07:03:22 2014
+++ src/sys/arch/arm/include/vfpreg.h	Mon Feb  9 07:55:52 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: vfpreg.h,v 1.13 2014/03/18 07:03:22 matt Exp $ */
+/*  $NetBSD: vfpreg.h,v 1.14 2015/02/09 07:55:52 slp Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -64,6 +64,7 @@
 #define FPU_VFP_CORTEXA8	0x410330c0
 #define FPU_VFP_CORTEXA9	0x41033090
 #define FPU_VFP_CORTEXA15	0x410330f0
+#define FPU_VFP_CORTEXA15_QEMU	0x410430f0
 #define FPU_VFP_MV88SV58XX	0x56022090
 
 #define VFP_FPEXC_EX		0x8000	/* EXception status bit */

Index: src/sys/arch/arm/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.41 src/sys/arch/arm/vfp/vfp_init.c:1.42
--- src/sys/arch/arm/vfp/vfp_init.c:1.41	Fri Jul 18 22:54:53 2014
+++ src/sys/arch/arm/vfp/vfp_init.c	Mon Feb  9 07:55:52 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: vfp_init.c,v 1.41 2014/07/18 22:54:53 matt Exp $ */
+/*  $NetBSD: vfp_init.c,v 1.42 2015/02/09 07:55:52 slp Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -94,6 +94,7 @@ load_vfpregs(const struct vfpreg *fregs)
 	case FPU_VFP_CORTEXA8:
 	case FPU_VFP_CORTEXA9:
 	case FPU_VFP_CORTEXA15:
+	case FPU_VFP_CORTEXA15_QEMU:
 #endif
 		load_vfpregs_hi(fregs-vfp_regs);
 #ifdef CPU_ARM11
@@ -115,6 +116,7 @@ save_vfpregs(struct vfpreg *fregs)
 	case FPU_VFP_CORTEXA8:
 	case FPU_VFP_CORTEXA9:
 	case FPU_VFP_CORTEXA15:
+	case FPU_VFP_CORTEXA15_QEMU:
 #endif
 		save_vfpregs_hi(fregs-vfp_regs);
 #ifdef CPU_ARM11
@@ -312,6 +314,7 @@ vfp_attach(struct cpu_info *ci)
 	case FPU_VFP_CORTEXA8:
 	case FPU_VFP_CORTEXA9:
 	case FPU_VFP_CORTEXA15:
+	case FPU_VFP_CORTEXA15_QEMU:
 		if (armreg_cpacr_read()  CPACR_V7_ASEDIS) {
 			model = VFP 4.0+;
 		} else {



CVS commit: [netbsd-7] src/doc

2015-02-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Feb  9 00:27:28 UTC 2015

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

Log Message:
499


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.197 -r1.1.2.198 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.197 src/doc/CHANGES-7.0:1.1.2.198
--- src/doc/CHANGES-7.0:1.1.2.197	Sun Feb  8 22:21:09 2015
+++ src/doc/CHANGES-7.0	Mon Feb  9 00:27:28 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.197 2015/02/08 22:21:09 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.198 2015/02/09 00:27:28 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -15730,3 +15730,8 @@ sys/arch/xen/x86/xen_ipi.c			1.19
 	it then.  Fixes build with clang.
 	[joerg, ticket #498]
 
+share/mk/bsd.own.mkpatch
+
+	Switch powerpc64 and m68k to gcc 4.8.
+	[chs, ticket #499]
+



CVS commit: [netbsd-7] src/share/mk

2015-02-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Feb  9 00:25:33 UTC 2015

Modified Files:
src/share/mk [netbsd-7]: bsd.own.mk

Log Message:
Apply patch (requested by chs in ticket #499):
Switch powerpc64 and m68k to gcc 4.8.


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

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.829.2.2 src/share/mk/bsd.own.mk:1.829.2.3
--- src/share/mk/bsd.own.mk:1.829.2.2	Fri Jan  2 20:47:51 2015
+++ src/share/mk/bsd.own.mk	Mon Feb  9 00:25:33 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.829.2.2 2015/01/02 20:47:51 martin Exp $
+#	$NetBSD: bsd.own.mk,v 1.829.2.3 2015/02/09 00:25:33 snj Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -61,13 +61,7 @@ MKGCC?=		no
 #
 .if ${MKGCC:Uyes} != no
 
-# Platforms still using GCC 4.5
-.if \
-  ${MACHINE_CPU} == m68k || \
-  ${MACHINE_ARCH} == powerpc64
-HAVE_GCC?=45
-
-.elif ${MACHINE} == playstation2 || ${MACHINE_CPU} == aarch64
+.if ${MACHINE} == playstation2 || ${MACHINE_CPU} == aarch64
 HAVE_GCC?=0
 .else
 # Otherwise, default to GCC4.8