CVS commit: src/lib/libc/arch/arm

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 06:34:44 UTC 2012

Modified Files:
src/lib/libc/arch/arm: Makefile.inc

Log Message:
Only compile __aeabi_*ldivmod for earm/earmeb.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/arch/arm/Makefile.inc

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

Modified files:

Index: src/lib/libc/arch/arm/Makefile.inc
diff -u src/lib/libc/arch/arm/Makefile.inc:1.12 src/lib/libc/arch/arm/Makefile.inc:1.13
--- src/lib/libc/arch/arm/Makefile.inc:1.12	Sun Aug  5 04:54:38 2012
+++ src/lib/libc/arch/arm/Makefile.inc	Sun Aug  5 06:34:44 2012
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile.inc,v 1.12 2012/08/05 04:54:38 matt Exp $
+# $NetBSD: Makefile.inc,v 1.13 2012/08/05 06:34:44 matt Exp $
 
 .include 
 
 SRCS+=	__aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S
-SRCS+=	__aeabi_uldivmod.S
 
 CPPFLAGS += -DSOFTFLOAT
 .if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb"
+SRCS+=	__aeabi_ldivmod.S __aeabi_uldivmod.S
 CPPFLAGS += -DSOFTFLOAT_NEED_FIXUNS
 .endif
 



CVS commit: src/common/lib/libc/arch/arm/quad

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 06:34:09 UTC 2012

Modified Files:
src/common/lib/libc/arch/arm/quad: __aeabi_uldivmod.S

Log Message:
Add RCSID.
Simplify.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S

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/arch/arm/quad/__aeabi_uldivmod.S
diff -u src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S:1.1 src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S:1.2
--- src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S:1.1	Sun Aug  5 04:24:13 2012
+++ src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S	Sun Aug  5 06:34:09 2012
@@ -29,17 +29,23 @@
 
 #include 
 
+RCSID("$NetBSD: __aeabi_uldivmod.S,v 1.2 2012/08/05 06:34:09 matt Exp $")
+
+/*
+ * typedef struct { unsigned long long quo, rem } ulldiv_t;
+ * __value_in_regs ulldiv_t __aeabi_uldivmod(unsigned long long n,
+ *	unsigned long long d);
+ */
+
 ENTRY(__aeabi_uldivmod)
 	push	{r4,lr}
 	sub	sp, sp, #8
 	mov	r4, sp
 	bl	PLT_SYM(__qdivrem)
-#ifdef _ARM_ARCH_DWORD_OK
-	ldrd	r2, [sp], #8
-#else
-	ldr	r2, [sp], #4
-	ldr	r3, [sp], #4
-#endif
-	pop	{r4,lr}
+	/*
+	 * The remainder is already on the stack just waiting to be popped
+	 * into r2/r3.
+	 */
+	pop	{r2-r4,lr}
 	RET
 END(__aeabi_uldivmod)



CVS commit: src/common/lib/libc/arch/arm/quad

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 06:33:52 UTC 2012

Added Files:
src/common/lib/libc/arch/arm/quad: __aeabi_ldivmod.S

Log Message:
Add another ARM EABI runtime routine for
combined quotient / remainder for signed long long.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S

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

Added files:

Index: src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S
diff -u /dev/null src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.1
--- /dev/null	Sun Aug  5 06:33:52 2012
+++ src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S	Sun Aug  5 06:33:51 2012
@@ -0,0 +1,128 @@
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * 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.
+ */
+
+#include 
+
+RCSID("$NetBSD: __aeabi_ldivmod.S,v 1.1 2012/08/05 06:33:51 matt Exp $")
+
+ENTRY(__aeabi_ldivmod)
+	push	{r4-r5, sl, lr}
+#define	NEG	r5
+	mov	NEG, #0
+	
+#ifdef __ARMEB__
+#define	ALO	r1	/* incoming numerator, outgoing quotient */
+#define	AHI	r0	/* incoming numerator, outgoing quotient */
+#define	BLO	r3	/* incoming denominator, outgoing remainder */
+#define	BHI	r2	/* incoming denominator, outgoing remainder */
+#else
+#define	ALO	r0	/* incoming numerator, outgoing quotient */
+#define	AHI	r1	/* incoming numerator, outgoing quotient */
+#define	BLO	r2	/* incoming denominator, outgoing remainder */
+#define	BHI	r3	/* incoming denominator, outgoing remainder */
+#endif
+
+	cmp	BHI, #0
+	bge	2f
+	eor	NEG, NEG, #1	/* flip quotient sign */
+	bl	.Lnegate_b
+	bcs	.Lmaxdenom
+
+2:
+	cmp	AHI, #0
+	/* bge	3f */
+	eorlt	NEG, NEG, #3	/* flip quotient sign, flip remainder sign */
+	bllt	.Lnegate_a
+3:
+	/*
+	 * Arguments are setup, allocate some stack for the remainder
+	 * and call __qdivrem for the heavy lifting.
+	 */
+	sub	sp, sp, #8
+	mov	r4, sp		/* pointer to remainder */
+	bl	PLT_SYM(__qdivrem)
+
+	teq	NEG, #0		/* any signs to flip? */
+	/*
+	 * The quotient is already in the right place and neither value
+	 * needs its sign flipped.
+	 */
+	popeq	{r2-r5, sl, lr}
+	RETc(eq)
+
+	pop	{r2, r3}
+	tst	NEG, #2		/* does remainder need to be negative? */
+	bleq	.Lnegate_b
+	tst	NEG, #1		/* does quotient need to be negative? */
+	bleq	.Lnegate_a
+	pop	{r4-r5, sl, lr}
+	RET
+
+.Lnegate_a:
+rsbs	ALO, ALO, #0
+rsc	AHI, AHI, #0
+	RET
+
+.Lnegate_b:
+rsbs	BLO, BLO, #0
+rsc	BHI, BHI, #0
+	RET
+
+.Lmaxdenom:
+	/*
+	 * We had a carry so the denominator must have INT64_MIN
+	 * Also BLO and BHI never changed values so we can use
+	 * them to see if the numerator has the same value.  We
+	 * don't have to worry about sign.
+	 */
+	teq	BHI, AHI 
+	teqeq	BLO, ALO
+	bne	1f
+
+	/*
+	 * They were equal, so we return a quotient of 1 and remainder of 0.
+	 */
+	mov	ALO, #1
+	mov	AHI, #0
+	mov	BLO, #0
+	mov	BHI, #0
+	pop	{r4-r5, sl, lr}
+	RET
+
+	/*
+	 * Our remainder must be the numerator and our quotient is 0.
+	 */
+1:	mov	BLO, ALO
+	mov	BHI, AHI
+	mov	ALO, #0
+	mov	AHI, #0
+	pop	{r4-r5, sl, lr}
+	RET
+
+END(__aeabi_ldivmod)



CVS commit: src/tools

2012-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  5 06:20:14 UTC 2012

Modified Files:
src/tools: Makefile.nbincludes

Log Message:
add -I${TOOLDIR}/include/nbinclude to fix the build (find arm/elf_machdep.h).
Is nbinclude intended here? Why not put the machine files in ${TOOLDIR}/include?


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tools/Makefile.nbincludes

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

Modified files:

Index: src/tools/Makefile.nbincludes
diff -u src/tools/Makefile.nbincludes:1.2 src/tools/Makefile.nbincludes:1.3
--- src/tools/Makefile.nbincludes:1.2	Fri Mar 18 11:13:54 2011
+++ src/tools/Makefile.nbincludes	Sun Aug  5 02:20:14 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.nbincludes,v 1.2 2011/03/18 15:13:54 tsutsui Exp $
+#	$NetBSD: Makefile.nbincludes,v 1.3 2012/08/05 06:20:14 christos Exp $
 
 # NOxxx definitions are copied from Makefile.host, and are
 # required before .include .   The include of bsd.own.mk
@@ -32,7 +32,7 @@ _SYSINCS=	bootblock.h \
 		dkbad.h \
 		exec_elf.h
 
-HOST_CPPFLAGS+=	-I${TOOLDIR}/include
+HOST_CPPFLAGS+=	-I${TOOLDIR}/include -I${TOOLDIR}/include/nbinclude
 
 beforedepend: 
 	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude



CVS commit: src/lib/libc/arch/arm/gen

2012-08-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Aug  5 05:10:38 UTC 2012

Modified Files:
src/lib/libc/arch/arm/gen: swapcontext.S

Log Message:
Ensure stack alignment. "looks fine" matt@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/arm/gen/swapcontext.S

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/arch/arm/gen/swapcontext.S
diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.5 src/lib/libc/arch/arm/gen/swapcontext.S:1.6
--- src/lib/libc/arch/arm/gen/swapcontext.S:1.5	Mon Apr 28 20:22:55 2008
+++ src/lib/libc/arch/arm/gen/swapcontext.S	Sun Aug  5 05:10:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: swapcontext.S,v 1.5 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: swapcontext.S,v 1.6 2012/08/05 05:10:38 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,13 +32,15 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-RCSID("$NetBSD: swapcontext.S,v 1.5 2008/04/28 20:22:55 martin Exp $")
+RCSID("$NetBSD: swapcontext.S,v 1.6 2012/08/05 05:10:38 skrll Exp $")
 #endif /* LIBC_SCCS && !lint */
 
 ENTRY(swapcontext)
 	stmfd	sp!, {r0-r1, lr}	/* Must save oucp, ucp, lr. */
+	sub	sp, #4
 	bl	PIC_SYM(_C_LABEL(_getcontext), PLT)  /* getcontext(oucp) */
 	cmp	r0, #0
+	add	sp, #4
 	ldmfd	sp!, {r0-r1, lr}
 	RETc(ne)
 	str	lr, [r0, #(36 + 15*4)]	/* Adjust saved PC. */



CVS commit: src/lib/libc/arch/arm

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:54:39 UTC 2012

Modified Files:
src/lib/libc/arch/arm: Makefile.inc

Log Message:
For ARM EABI, we need -DDSOFTFLOAT_NEED_FIXUNS too.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/arm/Makefile.inc

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

Modified files:

Index: src/lib/libc/arch/arm/Makefile.inc
diff -u src/lib/libc/arch/arm/Makefile.inc:1.11 src/lib/libc/arch/arm/Makefile.inc:1.12
--- src/lib/libc/arch/arm/Makefile.inc:1.11	Sun Aug  5 04:30:46 2012
+++ src/lib/libc/arch/arm/Makefile.inc	Sun Aug  5 04:54:38 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2012/08/05 04:30:46 matt Exp $
+# $NetBSD: Makefile.inc,v 1.12 2012/08/05 04:54:38 matt Exp $
 
 .include 
 
@@ -6,6 +6,9 @@ SRCS+=	__aeabi_read_tp.S __sigaction14_s
 SRCS+=	__aeabi_uldivmod.S
 
 CPPFLAGS += -DSOFTFLOAT
+.if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb"
+CPPFLAGS += -DSOFTFLOAT_NEED_FIXUNS
+.endif
 
 # for earm, use the 64-bit softfloat
 .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "armeb"



CVS commit: src

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:39:09 UTC 2012

Modified Files:
src: build.sh

Log Message:
Add support for MACHINE_ARCH matching earm or earmeb
Make evbearm-e[bl] a shortcut for evbarm and earmeb or earm.
Allow cats, iyonic, netwiner, shark, zaurus to specify earm though they
still default to arm.


To generate a diff of this commit:
cvs rdiff -u -r1.254 -r1.255 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.254 src/build.sh:1.255
--- src/build.sh:1.254	Sun Feb 26 20:32:40 2012
+++ src/build.sh	Sun Aug  5 04:39:09 2012
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.254 2012/02/26 20:32:40 tsutsui Exp $
+#	$NetBSD: build.sh,v 1.255 2012/08/05 04:39:09 matt Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -554,6 +554,14 @@ getarch()
 	#
 	case "${MACHINE}" in
 
+	evbearm-e[bl])
+		makewrappermachine=${MACHINE}
+		# MACHINE_ARCH is "arm" or "armeb", not "armel"
+		MACHINE_ARCH=earm${MACHINE##*-}
+		MACHINE_ARCH=${MACHINE_ARCH%el}
+		MACHINE=evbarm
+		;;
+
 	evbarm-e[bl])
 		makewrappermachine=${MACHINE}
 		# MACHINE_ARCH is "arm" or "armeb", not "armel"
@@ -671,7 +679,7 @@ validatearch()
 	#
 	case "${MACHINE_ARCH}" in
 
-	alpha|arm|armeb|hppa|i386|m68000|m68k|mipse[bl]|mips64e[bl]|powerpc|powerpc64|sh3e[bl]|sparc|sparc64|vax|x86_64|ia64)
+	alpha|arm|armeb|earm|earmeb|hppa|i386|m68000|m68k|mipse[bl]|mips64e[bl]|powerpc|powerpc64|sh3e[bl]|sparc|sparc64|vax|x86_64|ia64)
 		;;
 
 	"")
@@ -689,7 +697,11 @@ validatearch()
 	case "${MACHINE}" in
 
 	evbarm)
-		arches="arm armeb"
+		arches="arm armeb earm earmeb"
+		;;
+
+	cats|iyonix|netwinder|shark|zaurus)
+		arches="arm earm"
 		;;
 
 	algor|arc|cobalt|pmax)
@@ -1656,7 +1668,7 @@ createmakewrapper()
 	eval cat <

CVS commit: src/lib/libc/arch/arm

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:30:46 UTC 2012

Modified Files:
src/lib/libc/arch/arm: Makefile.inc

Log Message:
Add __aeabi_uldivmod (unsigned long long div/mod).
Only use 32-bit softfloat if arm/armeb.
earm/earmeb will use the 64-bit softfloat.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/Makefile.inc

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

Modified files:

Index: src/lib/libc/arch/arm/Makefile.inc
diff -u src/lib/libc/arch/arm/Makefile.inc:1.10 src/lib/libc/arch/arm/Makefile.inc:1.11
--- src/lib/libc/arch/arm/Makefile.inc:1.10	Fri Nov 18 16:10:02 2011
+++ src/lib/libc/arch/arm/Makefile.inc	Sun Aug  5 04:30:46 2012
@@ -1,10 +1,15 @@
-# $NetBSD: Makefile.inc,v 1.10 2011/11/18 16:10:02 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.11 2012/08/05 04:30:46 matt Exp $
 
 .include 
 
 SRCS+=	__aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S
+SRCS+=	__aeabi_uldivmod.S
 
 CPPFLAGS += -DSOFTFLOAT
 
+# for earm, use the 64-bit softfloat
+.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "armeb"
 SOFTFLOAT_BITS=32
+.endif
+
 .include 



CVS commit: src/lib/libc

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:28:58 UTC 2012

Modified Files:
src/lib/libc/gen: fixunsdfsi_ieee754.c fixunssfsi_ieee754.c
fixunstfsi_ieee754.c
src/lib/libc/quad: fixdfdi.c fixsfdi.c fixunsdfdi.c fixunssfdi.c
floatdidf.c floatdisf.c floatundidf.c floatundisf.c
floatunditf_ieee754.c

Log Message:
If compiling for SOFTFLOAT, include "softfloat/softfloat-for-gcc.h" so we
can pick any redefinitions of the function (for ARM EABI).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/fixunsdfsi_ieee754.c \
src/lib/libc/gen/fixunssfsi_ieee754.c \
src/lib/libc/gen/fixunstfsi_ieee754.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/quad/fixdfdi.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/quad/fixsfdi.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/quad/fixunsdfdi.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/quad/fixunssfdi.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/quad/floatdidf.c \
src/lib/libc/quad/floatdisf.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/quad/floatundidf.c \
src/lib/libc/quad/floatundisf.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/quad/floatunditf_ieee754.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/gen/fixunsdfsi_ieee754.c
diff -u src/lib/libc/gen/fixunsdfsi_ieee754.c:1.1 src/lib/libc/gen/fixunsdfsi_ieee754.c:1.2
--- src/lib/libc/gen/fixunsdfsi_ieee754.c:1.1	Sat Jul  9 02:30:27 2011
+++ src/lib/libc/gen/fixunsdfsi_ieee754.c	Sun Aug  5 04:28:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fixunsdfsi_ieee754.c,v 1.1 2011/07/09 02:30:27 matt Exp $	*/
+/*	$NetBSD: fixunsdfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,7 +31,7 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fixunsdfsi_ieee754.c,v 1.1 2011/07/09 02:30:27 matt Exp $");
+__RCSID("$NetBSD: fixunsdfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -39,6 +39,10 @@ __RCSID("$NetBSD: fixunsdfsi_ieee754.c,v
 #include 
 #include 
 
+#ifdef SOFTFLOAT
+#include "softfloat/softfloat-for-gcc.h"
+#endif
+
 uint32_t __fixunsgen32(int, bool, size_t, size_t, const uint32_t *);
 
 uint32_t __fixunsdfsi(double);
Index: src/lib/libc/gen/fixunssfsi_ieee754.c
diff -u src/lib/libc/gen/fixunssfsi_ieee754.c:1.1 src/lib/libc/gen/fixunssfsi_ieee754.c:1.2
--- src/lib/libc/gen/fixunssfsi_ieee754.c:1.1	Sat Jul  9 02:30:27 2011
+++ src/lib/libc/gen/fixunssfsi_ieee754.c	Sun Aug  5 04:28:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fixunssfsi_ieee754.c,v 1.1 2011/07/09 02:30:27 matt Exp $	*/
+/*	$NetBSD: fixunssfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,7 +31,7 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fixunssfsi_ieee754.c,v 1.1 2011/07/09 02:30:27 matt Exp $");
+__RCSID("$NetBSD: fixunssfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -39,6 +39,10 @@ __RCSID("$NetBSD: fixunssfsi_ieee754.c,v
 #include 
 #include 
 
+#ifdef SOFTFLOAT
+#include "softfloat/softfloat-for-gcc.h"
+#endif
+
 uint32_t __fixunsgen32(int, bool, size_t, size_t, const uint32_t *);
 
 uint32_t __fixunssfsi(float);
Index: src/lib/libc/gen/fixunstfsi_ieee754.c
diff -u src/lib/libc/gen/fixunstfsi_ieee754.c:1.1 src/lib/libc/gen/fixunstfsi_ieee754.c:1.2
--- src/lib/libc/gen/fixunstfsi_ieee754.c:1.1	Sat Jul  9 02:30:27 2011
+++ src/lib/libc/gen/fixunstfsi_ieee754.c	Sun Aug  5 04:28:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fixunstfsi_ieee754.c,v 1.1 2011/07/09 02:30:27 matt Exp $	*/
+/*	$NetBSD: fixunstfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,7 +31,7 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fixunstfsi_ieee754.c,v 1.1 2011/07/09 02:30:27 matt Exp $");
+__RCSID("$NetBSD: fixunstfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -39,6 +39,10 @@ __RCSID("$NetBSD: fixunstfsi_ieee754.c,v
 #include 
 #include 
 
+#ifdef SOFTFLOAT
+#include "softfloat/softfloat-for-gcc.h"
+#endif
+
 #if defined(__x86_64__) || defined(__i486__)
 #define	FIXUNS	__fixunsxfsi
 #else

Index: src/lib/libc/quad/fixdfdi.c
diff -u src/lib/libc/quad/fixdfdi.c:1.5 src/lib/libc/quad/fixdfdi.c:1.6
--- src/lib/libc/quad/fixdfdi.c:1.5	Mon Jul  4 06:23:50 2011
+++ src/lib/libc/quad/fixdfdi.c	Sun Aug  5 04:28:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fixdfdi.c,v 1.5 2011/07/04 06:23:50 matt Exp $	*/
+/*	$NetBSD: fixdfdi.c,v 1.6 2012/08/05 04:28:58 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,10 +38,14 @@
 #if 0
 static char sccsid[] = "@(#)fixdfdi.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: fixdfdi.c

CVS commit: src/lib/libc/softfloat

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:27:42 UTC 2012

Modified Files:
src/lib/libc/softfloat: softfloat-for-gcc.h

Log Message:
ARM EABI (AAPCS) uses different names for the softfloat routines that
the normal GCC ones.  So after we redefine softfloat's to be what (old) GCC
wants, we redefined the old GCC names to what ARM EABI want (but only if we
are using ARM EABI).  We do this for routines not compiled by softfloat so
can just have these redefinitions in one place.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/softfloat/softfloat-for-gcc.h

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/softfloat/softfloat-for-gcc.h
diff -u src/lib/libc/softfloat/softfloat-for-gcc.h:1.8 src/lib/libc/softfloat/softfloat-for-gcc.h:1.9
--- src/lib/libc/softfloat/softfloat-for-gcc.h:1.8	Mon Dec 14 01:07:42 2009
+++ src/lib/libc/softfloat/softfloat-for-gcc.h	Sun Aug  5 04:27:42 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat-for-gcc.h,v 1.8 2009/12/14 01:07:42 matt Exp $ */
+/* $NetBSD: softfloat-for-gcc.h,v 1.9 2012/08/05 04:27:42 matt Exp $ */
 
 /*
  * Move private identifiers with external linkage into implementation
@@ -167,3 +167,60 @@
 #define float128_le			__letf2
 #define float128_gt			__gttf2
 #endif
+
+#ifdef __ARM_EABI__
+#define __addsf3			__aeabi_fadd
+#define __adddf3			__aeabi_dadd
+
+#define __subsf3			__aeabi_fsub
+#define __subdf3			__aeabi_dsub
+
+#define __mulsf3			__aeabi_fmul
+#define __muldf3			__aeabi_dmul
+
+#define __divsf3			__aeabi_fdiv
+#define __divdf3			__aeabi_ddiv
+
+#define __floatsisf			__aeabi_i2f
+#define __floatsidf			__aeabi_i2d
+
+#define __floatdisf			__aeabi_l2f
+#define __floatdidf			__aeabi_l2d
+
+#define __floatunsisf			__aeabi_ui2f
+#define __floatunsidf			__aeabi_ui2d
+
+#define __floatundisf			__aeabi_ul2f
+#define __floatundidf			__aeabi_ul2d
+
+#define __fixsfsi			__aeabi_f2iz
+#define __fixdfsi			__aeabi_d2iz
+
+#define __fixsfdi			__aeabi_f2lz
+#define __fixdfdi			__aeabi_d2lz
+
+#define __fixunssfsi			__aeabi_f2uiz
+#define __fixunsdfsi			__aeabi_d2uiz
+
+#define __fixunssfdi			__aeabi_f2ulz
+#define __fixunsdfdi			__aeabi_d2ulz
+
+#define __extendsfdf2			__aeabi_f2d
+#define __truncdfsf2			__aeabi_d2f
+
+#define __eqsf2__aeabi_fcmpeq
+#define __eqdf2__aeabi_dcmpeq
+
+#define __ltsf2__aeabi_fcmplt
+#define __ltdf2__aeabi_dcmplt
+
+#define __lesf2__aeabi_fcmple
+#define __ledf2__aeabi_dcmple
+
+#define __gtsf2__aeabi_fcmpgt
+#define __gtdf2__aeabi_dcmpgt
+
+#define __gesf2__aeabi_fcmpge
+#define __gedf2__aeabi_dcmpge
+
+#endif /* __ARM_EABI__ */



CVS commit: src/sys/kern

2012-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  5 04:26:10 UTC 2012

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

Log Message:
Force sys_close not to restart by returning ERESTART.

Print a diagnostic message if we ever get ERESTART out of fd_close
and convert it to EINTR instead.

Even if fd_close fails, it has already closed the file descriptor, so
restarting the system call is a mistake, with dangerous consequences
for multithreaded programs.

Should probably turn the message into a kassert eventually, and maybe
add one deeper in fd_close in order to more easily debug it before
all the data structures are destroyed.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/kern/sys_descrip.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/sys_descrip.c
diff -u src/sys/kern/sys_descrip.c:1.26 src/sys/kern/sys_descrip.c:1.27
--- src/sys/kern/sys_descrip.c:1.26	Sat Feb 11 23:16:17 2012
+++ src/sys/kern/sys_descrip.c	Sun Aug  5 04:26:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_descrip.c,v 1.26 2012/02/11 23:16:17 martin Exp $	*/
+/*	$NetBSD: sys_descrip.c,v 1.27 2012/08/05 04:26:10 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_descrip.c,v 1.26 2012/02/11 23:16:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_descrip.c,v 1.27 2012/08/05 04:26:10 riastradh Exp $");
 
 #include 
 #include 
@@ -479,11 +479,22 @@ sys_close(struct lwp *l, const struct sy
 	/* {
 		syscallarg(int)	fd;
 	} */
+	int error;
 
 	if (fd_getfile(SCARG(uap, fd)) == NULL) {
 		return EBADF;
 	}
-	return fd_close(SCARG(uap, fd));
+
+	error = fd_close(SCARG(uap, fd));
+	if (error == ERESTART) {
+#ifdef DIAGNOSTIC
+		printf("pid %d: close returned ERESTART\n",
+		(int)l->l_proc->p_pid);
+#endif
+		error = EINTR;
+	}
+
+	return error;
 }
 
 /*



CVS commit: src/common/lib/libc/arch/arm/quad

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:24:13 UTC 2012

Added Files:
src/common/lib/libc/arch/arm/quad: __aeabi_uldivmod.S

Log Message:
Add a routine for __aeabi_uldivmod which is just a wrapper around __qdivrem
but returns the 64-bit dividend and remainder in r0-r3.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S

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

Added files:

Index: src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S
diff -u /dev/null src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S:1.1
--- /dev/null	Sun Aug  5 04:24:13 2012
+++ src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S	Sun Aug  5 04:24:13 2012
@@ -0,0 +1,45 @@
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * 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.
+ */
+
+#include 
+
+ENTRY(__aeabi_uldivmod)
+	push	{r4,lr}
+	sub	sp, sp, #8
+	mov	r4, sp
+	bl	PLT_SYM(__qdivrem)
+#ifdef _ARM_ARCH_DWORD_OK
+	ldrd	r2, [sp], #8
+#else
+	ldr	r2, [sp], #4
+	ldr	r3, [sp], #4
+#endif
+	pop	{r4,lr}
+	RET
+END(__aeabi_uldivmod)



CVS commit: src/common/lib/libc/arch/arm/gen

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:22:01 UTC 2012

Modified Files:
src/common/lib/libc/arch/arm/gen: divsi3.S

Log Message:
For __udivsi3 and __divsi3, add their EABI aliases as alternate entry
points.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/gen/divsi3.S

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/arch/arm/gen/divsi3.S
diff -u src/common/lib/libc/arch/arm/gen/divsi3.S:1.1 src/common/lib/libc/arch/arm/gen/divsi3.S:1.2
--- src/common/lib/libc/arch/arm/gen/divsi3.S:1.1	Tue Dec 20 19:28:49 2005
+++ src/common/lib/libc/arch/arm/gen/divsi3.S	Sun Aug  5 04:22:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: divsi3.S,v 1.1 2005/12/20 19:28:49 christos Exp $	*/
+/*	$NetBSD: divsi3.S,v 1.2 2012/08/05 04:22:01 matt Exp $	*/
 
 /*
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
@@ -48,6 +48,8 @@ ENTRY(__modsi3)
 #endif
 	RET
 
+ENTRY_NP(__aeabi_uidivmod)
+ENTRY_NP(__aeabi_uidiv)
 ENTRY(__udivsi3)
 .L_udivide:/* r0 = r0 / r1; r1 = r0 % r1 */
 	eor r0, r1, r0 
@@ -70,6 +72,8 @@ ENTRY(__udivsi3)
 	mov	r1, #0
 	RET
 
+ENTRY_NP(__aeabi_idivmod)
+ENTRY_NP(__aeabi_idiv)
 ENTRY(__divsi3)
 .L_divide:/* r0 = r0 / r1; r1 = r0 % r1 */
 	eor r0, r1, r0 



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

2012-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  5 04:17:41 UTC 2012

Modified Files:
src/distrib/sets/lists/modules: md.evbppc

Log Message:
Add hdaudio modules to the md.evbppc set list too.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/distrib/sets/lists/modules/md.evbppc

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/modules/md.evbppc
diff -u src/distrib/sets/lists/modules/md.evbppc:1.24 src/distrib/sets/lists/modules/md.evbppc:1.25
--- src/distrib/sets/lists/modules/md.evbppc:1.24	Sun Aug  5 04:14:40 2012
+++ src/distrib/sets/lists/modules/md.evbppc	Sun Aug  5 04:17:41 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc,v 1.24 2012/08/05 04:14:40 riastradh Exp $
+# $NetBSD: md.evbppc,v 1.25 2012/08/05 04:17:41 riastradh Exp $
 ./stand/powerpc-4xx			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod,compatmodules
@@ -68,6 +68,10 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/gpioow/gpioow.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/gpiosimbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/gpiosim/gpiosim.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/hdafgbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/hdafg/hdafg.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/hdaudiobase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/hdaudio/hdaudio.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/hfsbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/hfs/hfs.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/if_axebase-kernel-modules	kmod,compatmodules
@@ -251,6 +255,10 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/gpioow/gpioow.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/gpiosim			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/gpiosim/gpiosim.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/hdafgbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/hdafg/hdafg.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/hdaudio			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/hdaudio/hdaudio.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/hfsbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/hfs/hfs.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/if_axe			base-kernel-modules	kmod,compatmodules



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

2012-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  5 04:14:40 UTC 2012

Modified Files:
src/distrib/sets/lists/modules: md.evbppc

Log Message:
Add uatp to the md.evbppc modules set list too.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/distrib/sets/lists/modules/md.evbppc

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/modules/md.evbppc
diff -u src/distrib/sets/lists/modules/md.evbppc:1.23 src/distrib/sets/lists/modules/md.evbppc:1.24
--- src/distrib/sets/lists/modules/md.evbppc:1.23	Wed May  9 08:17:33 2012
+++ src/distrib/sets/lists/modules/md.evbppc	Sun Aug  5 04:14:40 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc,v 1.23 2012/05/09 08:17:33 martin Exp $
+# $NetBSD: md.evbppc,v 1.24 2012/08/05 04:14:40 riastradh Exp $
 ./stand/powerpc-4xx			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod,compatmodules
@@ -164,6 +164,8 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/tmpfs/tmpfs.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/tprofbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/tprof/tprof.kmod			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/uatpbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/uatp/uatp.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/udfbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/udf/udf.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/umapbase-kernel-modules	kmod,compatmodules
@@ -345,6 +347,8 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/tmpfs/tmpfs.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/tprofbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/tprof/tprof.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/uatpbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/uatp/uatp.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/udfbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/udf/udf.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/umapbase-kernel-modules	kmod,compatmodules



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

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:13:19 UTC 2012

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

Log Message:
Add a macro for determining whether we can use LDRD/STRD instructions


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/include/cdefs.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/cdefs.h
diff -u src/sys/arch/arm/include/cdefs.h:1.6 src/sys/arch/arm/include/cdefs.h:1.7
--- src/sys/arch/arm/include/cdefs.h:1.6	Tue Jul 31 07:21:06 2012
+++ src/sys/arch/arm/include/cdefs.h	Sun Aug  5 04:13:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.6 2012/07/31 07:21:06 matt Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.7 2012/08/05 04:13:19 matt Exp $	*/
 
 #ifndef	_MACHINE_CDEFS_H_
 #define	_MACHINE_CDEFS_H_
@@ -26,6 +26,11 @@
 #define _ARM_ARCH_4T
 #endif
 
+#if defined(_ARM_ARCH_6) || defined (__ARM_ARCH_5TE__) || \
+defined (__ARM_ARCH_5TEJ__)
+#define	_ARM_ARCH_DWORD_OK
+#endif
+
 #ifdef __ARM_EABI__
 #define __ALIGNBYTES		(8 - 1)
 #else



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

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:12:46 UTC 2012

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

Log Message:
Add ABI version stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/include/elf_machdep.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/elf_machdep.h
diff -u src/sys/arch/arm/include/elf_machdep.h:1.9 src/sys/arch/arm/include/elf_machdep.h:1.10
--- src/sys/arch/arm/include/elf_machdep.h:1.9	Fri Aug  3 07:59:23 2012
+++ src/sys/arch/arm/include/elf_machdep.h	Sun Aug  5 04:12:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_machdep.h,v 1.9 2012/08/03 07:59:23 matt Exp $	*/
+/*	$NetBSD: elf_machdep.h,v 1.10 2012/08/05 04:12:46 matt Exp $	*/
 
 #ifndef _ARM_ELF_MACHDEP_H_
 #define _ARM_ELF_MACHDEP_H_
@@ -28,6 +28,11 @@
 #define EF_ARM_OLD_ABI		0x0100
 #define EF_ARM_SOFT_FLOAT	0x0200
 #define EF_ARM_EABIMASK		0xff00
+#define	EF_ARM_EABI_VER1	0x0100
+#define	EF_ARM_EABI_VER2	0x0200
+#define	EF_ARM_EABI_VER3	0x0300
+#define	EF_ARM_EABI_VER4	0x0400
+#define	EF_ARM_EABI_VER5	0x0500
 
 #define	ELF32_MACHDEP_ID_CASES		\
 		case EM_ARM:		\



CVS commit: src/share/mk

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:11:35 UTC 2012

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

Log Message:
Add the new MACHINE_ARCH of earm and earmeb (arm EABI(AAPCS-LINUX)).


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/share/mk/bsd.endian.mk
cvs rdiff -u -r1.701 -r1.702 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.endian.mk
diff -u src/share/mk/bsd.endian.mk:1.15 src/share/mk/bsd.endian.mk:1.16
--- src/share/mk/bsd.endian.mk:1.15	Wed Jan  9 11:26:14 2008
+++ src/share/mk/bsd.endian.mk	Sun Aug  5 04:11:35 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.endian.mk,v 1.15 2008/01/09 11:26:14 simonb Exp $
+#	$NetBSD: bsd.endian.mk,v 1.16 2012/08/05 04:11:35 matt Exp $
 
 .if !defined(_BSD_ENDIAN_MK_)
 _BSD_ENDIAN_MK_=1
@@ -7,6 +7,7 @@ _BSD_ENDIAN_MK_=1
 
 .if ${MACHINE_ARCH} == "alpha" || \
 ${MACHINE_ARCH} == "arm" || \
+${MACHINE_ARCH} == "earm" || \
 ${MACHINE_ARCH} == "i386" || \
 ${MACHINE_ARCH} == "ia64" || \
 ${MACHINE_ARCH} == "vax" || \

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.701 src/share/mk/bsd.own.mk:1.702
--- src/share/mk/bsd.own.mk:1.701	Thu Jul 19 15:16:31 2012
+++ src/share/mk/bsd.own.mk	Sun Aug  5 04:11:35 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.701 2012/07/19 15:16:31 macallan Exp $
+#	$NetBSD: bsd.own.mk,v 1.702 2012/08/05 04:11:35 matt Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -14,7 +14,7 @@ MAKECONF?=	/etc/mk.conf
 #
 # CPU model, derived from MACHINE_ARCH
 #
-MACHINE_CPU=	${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/:S/powerpc64/powerpc/}
+MACHINE_CPU=	${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/:S/earm/arm/:S/earmeb/arm/:S/powerpc64/powerpc/}
 
 #
 # Subdirectory used below ${RELEASEDIR} when building a release
@@ -654,6 +654,8 @@ SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_ve
 # GNU sources and packages sometimes see architecture names differently.
 #
 GNU_ARCH.coldfire=m68k
+GNU_ARCH.earm=arm
+GNU_ARCH.earmeb=armeb
 GNU_ARCH.i386=i486
 GCC_CONFIG_ARCH.i386=i486
 GCC_CONFIG_TUNE.i386=nocona
@@ -668,7 +670,9 @@ MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_AR
 # In order to identify NetBSD to GNU packages, we sometimes need
 # an "elf" tag for historically a.out platforms.
 #
-.if (${MACHINE_GNU_ARCH} == "arm" || \
+.if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb"
+MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-eabi
+.elif (${MACHINE_GNU_ARCH} == "arm" || \
  ${MACHINE_GNU_ARCH} == "armeb" || \
  ${MACHINE_ARCH} == "i386" || \
  ${MACHINE_CPU} == "m68k" || \



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

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:10:18 UTC 2012

Modified Files:
src/external/gpl3/gcc/dist: config.sub
src/external/gpl3/gcc/dist/gcc: config.gcc
src/external/gpl3/gcc/dist/gcc/config/arm: bpabi.h netbsd-elf.h
Added Files:
src/external/gpl3/gcc/dist/gcc/config/arm: netbsd-eabi.h t-netbsd-eabi

Log Message:
Add arm{,eb}--netbsdelf-eabi support. (still evolving)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/config.sub
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/gcc/config.gcc
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h \
src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h \
src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsd-eabi

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/config.sub
diff -u src/external/gpl3/gcc/dist/config.sub:1.1.1.1 src/external/gpl3/gcc/dist/config.sub:1.2
--- src/external/gpl3/gcc/dist/config.sub:1.1.1.1	Tue Jun 21 01:19:48 2011
+++ src/external/gpl3/gcc/dist/config.sub	Sun Aug  5 04:10:18 2012
@@ -125,7 +125,8 @@ esac
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | \
+  netbsd*-gnu* | netbsd*-eabi* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
 os=-$maybe_os

Index: src/external/gpl3/gcc/dist/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.11 src/external/gpl3/gcc/dist/gcc/config.gcc:1.12
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.11	Thu Dec 15 08:34:11 2011
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Sun Aug  5 04:10:18 2012
@@ -722,11 +722,28 @@ arm*-*-freebsd*)
 	tmake_file="${tmake_file} arm/t-arm arm/t-strongarm-elf"
 	;;
 arm*-*-netbsdelf*)
-	tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
-	tmake_file="${tmake_file} arm/t-arm arm/t-netbsd"
+	tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h"
 	case ${target} in
 	armeb*) tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_END" ;;
 	esac
+	tmake_file="${tmake_file} arm/t-arm"
+	case ${target} in
+	arm*-*-netbsdelf-*eabi)
+	tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
+	tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi"
+	tmake_file="$tmake_file arm/t-netbsd-eabi"
+  	# The BPABI long long divmod functions return a 128-bit value in
+	# registers r0-r3.  Correctly modeling that requires the use of
+	# TImode.
+	need_64bit_hwint=yes
+	# The EABI requires the use of __cxa_atexit.
+	default_use_cxa_atexit=yes
+	;;
+	*)
+	tm_file="$tm_file arm/netbsd-elf.h"
+	tmake_file="$tmake_file arm/t-netbsd"
+	;;
+	esac
 	;;
 arm*-*-netbsd*)
 	tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"

Index: src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.1.1.1 src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.2
--- src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.1.1.1	Tue Jun 21 01:22:19 2011
+++ src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h	Sun Aug  5 04:10:18 2012
@@ -20,9 +20,11 @@
.  */
 
 /* Use the AAPCS ABI by default.  */
+#undef ARM_DEFAULT_ABI
 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS
 
 /* Assume that AAPCS ABIs should adhere to the full BPABI.  */ 
+#undef TARGET_BPABI
 #define TARGET_BPABI (TARGET_AAPCS_BASED)
 
 /* BPABI targets use EABI frame unwinding tables.  */
Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.1.1.1 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.2
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.1.1.1	Tue Jun 21 01:22:19 2011
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h	Sun Aug  5 04:10:18 2012
@@ -40,6 +40,7 @@
 #undef ARM_DEFAULT_ABI
 #define ARM_DEFAULT_ABI ARM_ABI_ATPCS
 
+#undef TARGET_OS_CPP_BUILTINS
 #define TARGET_OS_CPP_BUILTINS()	\
   do	\
 {	\
@@ -52,7 +53,7 @@
 
 #undef SUBTARGET_EXTRA_ASM_SPEC
 #define SUBTARGET_EXTRA_ASM_SPEC	\
-  "-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
+  "-matpcs %{mabi=aapcs*:-meabi=4} %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
 
 /* Default to full VFP if -mhard-float is specified.  */
 #undef SUBTARGET_ASM_FLOAT_SPEC

Added files:

Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.1
--- /dev/null	Sun Aug  5 04:10:19 2012
+

CVS commit: src

2012-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  5 04:03:39 UTC 2012

Modified Files:
src/distrib/sets/lists/modules: mi
src/sys/modules: Makefile

Log Message:
Build hdaudio and hdafg modules.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.108 -r1.109 src/sys/modules/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/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.45 src/distrib/sets/lists/modules/mi:1.46
--- src/distrib/sets/lists/modules/mi:1.45	Sat Aug  4 12:33:23 2012
+++ src/distrib/sets/lists/modules/mi	Sun Aug  5 04:03:39 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.45 2012/08/04 12:33:23 pgoyette Exp $
+# $NetBSD: mi,v 1.46 2012/08/05 04:03:39 riastradh Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -75,6 +75,10 @@
 ./@MODULEDIR@/gpioow/gpioow.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/gpiosimbase-kernel-modules	kmod
 ./@MODULEDIR@/gpiosim/gpiosim.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/hdafgbase-kernel-modules	kmod
+./@MODULEDIR@/hdafg/hdafg.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/hdaudiobase-kernel-modules	kmod
+./@MODULEDIR@/hdaudio/hdaudio.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/hfsbase-kernel-modules	kmod
 ./@MODULEDIR@/hfs/hfs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/if_axebase-kernel-modules	kmod

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.108 src/sys/modules/Makefile:1.109
--- src/sys/modules/Makefile:1.108	Sat Aug  4 04:37:25 2012
+++ src/sys/modules/Makefile	Sun Aug  5 04:03:39 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.108 2012/08/04 04:37:25 riastradh Exp $
+#	$NetBSD: Makefile,v 1.109 2012/08/05 04:03:39 riastradh Exp $
 
 .include 
 
@@ -30,6 +30,8 @@ SUBDIR+=	gpio
 SUBDIR+=	gpioiic
 SUBDIR+=	gpioow
 SUBDIR+=	gpiosim
+SUBDIR+=	hdafg
+SUBDIR+=	hdaudio
 SUBDIR+=	hfs
 SUBDIR+=	if_axe
 SUBDIR+=	iic



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

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 04:03:03 UTC 2012

Modified Files:
src/external/gpl3/binutils/dist: config.sub
src/external/gpl3/binutils/dist/ld: Makefile.am Makefile.in
configure.tgt
Added Files:
src/external/gpl3/binutils/dist/ld/emulparams: armelf_nbsd_eabi.sh
armelfb_nbsd_eabi.sh

Log Message:
Add arm{,eb}--netbsdelf-eabi support.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/dist/config.sub
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/dist/ld/Makefile.am
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/binutils/dist/ld/Makefile.in
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/binutils/dist/ld/configure.tgt
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd_eabi.sh \
src/external/gpl3/binutils/dist/ld/emulparams/armelfb_nbsd_eabi.sh

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/config.sub
diff -u src/external/gpl3/binutils/dist/config.sub:1.3 src/external/gpl3/binutils/dist/config.sub:1.4
--- src/external/gpl3/binutils/dist/config.sub:1.3	Sun Sep 25 04:32:33 2011
+++ src/external/gpl3/binutils/dist/config.sub	Sun Aug  5 04:03:03 2012
@@ -125,7 +125,8 @@ esac
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | \
+  netbsd*-gnu* | netbsd*-eabi* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
 os=-$maybe_os

Index: src/external/gpl3/binutils/dist/ld/Makefile.am
diff -u src/external/gpl3/binutils/dist/ld/Makefile.am:1.3 src/external/gpl3/binutils/dist/ld/Makefile.am:1.4
--- src/external/gpl3/binutils/dist/ld/Makefile.am:1.3	Sun Sep 25 04:32:43 2011
+++ src/external/gpl3/binutils/dist/ld/Makefile.am	Sun Aug  5 04:03:03 2012
@@ -144,11 +144,13 @@ ALL_EMULATION_SOURCES = \
 	earmelf_linux.c \
 	earmelf_linux_eabi.c \
 	earmelf_nbsd.c \
+	earmelf_nbsd_eabi.c \
 	earmelf_vxworks.c \
 	earmelfb.c \
 	earmelfb_linux.c \
 	earmelfb_linux_eabi.c \
 	earmelfb_nbsd.c \
+	earmelfb_nbsd_eabi.c \
 	earmnbsd.c \
 	earmnto.c \
 	earmpe.c \
@@ -684,6 +686,11 @@ earmelf_nbsd.c: $(srcdir)/emulparams/arm
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
+earmelf_nbsd_abi.c: $(srcdir)/emulparams/armelf_nbsd_abi.sh \
+  $(srcdir)/emulparams/armelf.sh \
+  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} armelf_nbsd_abi "$(tdir_armelf_nbsd_abi)"
 earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
   $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
@@ -711,6 +718,12 @@ earmelfb_nbsd.c: $(srcdir)/emulparams/ar
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
+earmelfb_nbsd_abi.c: $(srcdir)/emulparams/armelfb_nbsd_abi.sh \
+  $(srcdir)/emulparams/armelf_nbsd_abi.sh \
+  $(srcdir)/emulparams/armelf.sh \
+  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} armelfb_nbsd_abi "$(tdir_armelfb_nbsd_abi)"
 earmnbsd.c:	$(srcdir)/emulparams/armnbsd.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"

Index: src/external/gpl3/binutils/dist/ld/Makefile.in
diff -u src/external/gpl3/binutils/dist/ld/Makefile.in:1.4 src/external/gpl3/binutils/dist/ld/Makefile.in:1.5
--- src/external/gpl3/binutils/dist/ld/Makefile.in:1.4	Sun Sep 25 04:32:43 2011
+++ src/external/gpl3/binutils/dist/ld/Makefile.in	Sun Aug  5 04:03:03 2012
@@ -449,11 +449,13 @@ ALL_EMULATION_SOURCES = \
 	earmelf_linux.c \
 	earmelf_linux_eabi.c \
 	earmelf_nbsd.c \
+	earmelf_nbsd_eabi.c \
 	earmelf_vxworks.c \
 	earmelfb.c \
 	earmelfb_linux.c \
 	earmelfb_linux_eabi.c \
 	earmelfb_nbsd.c \
+	earmelfb_nbsd_eabi.c \
 	earmnbsd.c \
 	earmnto.c \
 	earmpe.c \
@@ -1031,11 +1033,13 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd_abi.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quot

CVS commit: src/sys/dev/ieee1394

2012-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  5 02:47:52 UTC 2012

Modified Files:
src/sys/dev/ieee1394: firewire.c

Log Message:
...and be sure to config_pending_decr if kthread_create fails.

This error branch looks suspect, though.  Shouldn't we bail at this
point rather than blithely try to proceed?


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/ieee1394/firewire.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/ieee1394/firewire.c
diff -u src/sys/dev/ieee1394/firewire.c:1.41 src/sys/dev/ieee1394/firewire.c:1.42
--- src/sys/dev/ieee1394/firewire.c:1.41	Sun Aug  5 02:36:16 2012
+++ src/sys/dev/ieee1394/firewire.c	Sun Aug  5 02:47:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: firewire.c,v 1.41 2012/08/05 02:36:16 riastradh Exp $	*/
+/*	$NetBSD: firewire.c,v 1.42 2012/08/05 02:47:52 riastradh Exp $	*/
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
  * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.41 2012/08/05 02:36:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.42 2012/08/05 02:47:52 riastradh Exp $");
 
 #include 
 #include 
@@ -260,8 +260,10 @@ firewireattach(device_t parent, device_t
 
 	/* create thread */
 	if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, fw_bus_probe_thread,
-	fc, &fc->probe_thread, "fw%dprobe", device_unit(fc->bdev)))
+	fc, &fc->probe_thread, "fw%dprobe", device_unit(fc->bdev))) {
 		aprint_error_dev(self, "kthread_create failed\n");
+		config_pending_decr();
+	}
 
 	devlist = malloc(sizeof(struct firewire_dev_list), M_DEVBUF, M_NOWAIT);
 	if (devlist == NULL) {



CVS commit: src/sys/dev/ieee1394

2012-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  5 02:36:16 UTC 2012

Modified Files:
src/sys/dev/ieee1394: firewire.c

Log Message:
Restore config pending stuff, adjusted to avoid the race.

Leave a note about what this code probably should look like for
anyone who comes rummaging around with the intent to really fix it.
I would do that myself if I had time and resources to test this at
the moment, and more comfort with our firewire stack, but I don't.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/ieee1394/firewire.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/ieee1394/firewire.c
diff -u src/sys/dev/ieee1394/firewire.c:1.40 src/sys/dev/ieee1394/firewire.c:1.41
--- src/sys/dev/ieee1394/firewire.c:1.40	Sat Aug  4 03:55:43 2012
+++ src/sys/dev/ieee1394/firewire.c	Sun Aug  5 02:36:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: firewire.c,v 1.40 2012/08/04 03:55:43 riastradh Exp $	*/
+/*	$NetBSD: firewire.c,v 1.41 2012/08/05 02:36:16 riastradh Exp $	*/
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
  * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.40 2012/08/04 03:55:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.41 2012/08/05 02:36:16 riastradh Exp $");
 
 #include 
 #include 
@@ -255,6 +255,9 @@ firewireattach(device_t parent, device_t
 
 	callout_schedule(&fc->timeout_callout, hz);
 
+	/* Tell config we will have started a thread to scan the bus.  */
+	config_pending_incr();
+
 	/* create thread */
 	if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, fw_bus_probe_thread,
 	fc, &fc->probe_thread, "fw%dprobe", device_unit(fc->bdev)))
@@ -1943,6 +1946,22 @@ fw_bus_probe_thread(void *arg)
 {
 	struct firewire_comm *fc = (struct firewire_comm *)arg;
 
+	/*
+	 * Tell config we've scanned the bus.
+	 *
+	 * XXX This is not right -- we haven't actually scanned it.  We
+	 * probably ought to call this after the first bus exploration.
+	 *
+	 * bool once = false;
+	 * ...
+	 * 	fw_attach_dev(fc);
+	 * 	if (!once) {
+	 * 		config_pending_decr();
+	 * 		once = true;
+	 * 	}
+	 */
+	config_pending_decr();
+
 	mutex_enter(&fc->wait_lock);
 	while (fc->status != FWBUSDETACH) {
 		if (fc->status == FWBUSEXPLORE) {



CVS commit: src/tests/fs/common

2012-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  5 02:03:05 UTC 2012

Modified Files:
src/tests/fs/common: fstest_ffs.c

Log Message:
Fix ffs_fstest_delfs's error branch for rump_pub_etfs_remove.

rump_pub_etfs_remove returns an error code, rather than setting errno
and returning -1.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/common/fstest_ffs.c

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

Modified files:

Index: src/tests/fs/common/fstest_ffs.c
diff -u src/tests/fs/common/fstest_ffs.c:1.5 src/tests/fs/common/fstest_ffs.c:1.6
--- src/tests/fs/common/fstest_ffs.c:1.5	Sun Jun 26 13:06:00 2011
+++ src/tests/fs/common/fstest_ffs.c	Sun Aug  5 02:03:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstest_ffs.c,v 1.5 2011/06/26 13:06:00 christos Exp $	*/
+/*	$NetBSD: fstest_ffs.c,v 1.6 2012/08/05 02:03:05 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -104,8 +104,10 @@ ffs_fstest_delfs(const atf_tc_t *tc, voi
 	struct ffstestargs *args = buf;
 
 	res = rump_pub_etfs_remove(args->ta_devpath);
-	if (res != 0)
-		return res;
+	if (res != 0) {
+		errno = res;
+		return -1;
+	}
 
 	res = unlink(args->ta_imgpath);
 	if (res != 0)



CVS commit: src/share/man/man9

2012-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  5 01:58:36 UTC 2012

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

Log Message:
Clarify description of ->ucom_read method.

>From when I was trying to figure out what's wrong with uftdi reading
from a beaglebone last month.  (Still haven't figured that out!)


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

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

Modified files:

Index: src/share/man/man9/ucom.9
diff -u src/share/man/man9/ucom.9:1.15 src/share/man/man9/ucom.9:1.16
--- src/share/man/man9/ucom.9:1.15	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/ucom.9	Sun Aug  5 01:58:36 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ucom.9,v 1.15 2008/04/30 13:10:58 martin Exp $
+.\"	$NetBSD: ucom.9,v 1.16 2012/08/05 01:58:36 riastradh Exp $
 .\"
 .\" Copyright (c) 2000 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 December 20, 2005
+.Dd July 9, 2012
 .Dt UCOM 9
 .Os
 .Sh NAME
@@ -169,11 +169,11 @@ called just after the
 driver closes the bulk pipes for the port.
 .It Fn "void (*ucom_read)" "void *sc, int portno, u_char **ptr, uint32_t *count"
 if the data delivered on the bulk pipe is not just the raw input characters
-this routine needs to adjust
+this routine needs to increment
 .Fa ptr
-and
+by as many characters to skip from the start of the raw input and decrement
 .Fa count
-so that they tell where to find the given number of raw characters.
+by as many characters to truncate from the end of the raw input.
 .It Fn "void (*ucom_write)" "void *sc, int portno, u_char *dst, u_char *src, uint32_t *count"
 if the data written to the bulk pipe is not just the raw characters then
 this routine needs to copy



CVS commit: src/lib/csu/arm_elf

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 01:44:44 UTC 2012

Modified Files:
src/lib/csu/arm_elf: dot_init.h

Log Message:
back out elf note changes since we can use e_flags to determine EABI usage


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/csu/arm_elf/dot_init.h

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

Modified files:

Index: src/lib/csu/arm_elf/dot_init.h
diff -u src/lib/csu/arm_elf/dot_init.h:1.8 src/lib/csu/arm_elf/dot_init.h:1.9
--- src/lib/csu/arm_elf/dot_init.h:1.8	Sat Aug  4 14:57:46 2012
+++ src/lib/csu/arm_elf/dot_init.h	Sun Aug  5 01:44:43 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: dot_init.h,v 1.8 2012/08/04 14:57:46 matt Exp $ */
+/* $NetBSD: dot_init.h,v 1.9 2012/08/05 01:44:43 matt Exp $ */
 
 /*-
  * Copyright (c) 2001 Ross Harvey
@@ -36,22 +36,6 @@
 #include 			/* RCS ID & Copyright macro defns */
 #include 
 
-#if defined(__ARM_EABI__) && defined(CRTI)
-__asm(
-	".section\t\".note.netbsd.aeabi\", \"a\"\n"
-	"\t.p2align\t2\n\n"
-
-	"\t.long\t" __S(ELF_NOTE_NETBSD_NAMESZ) "\n"
-	"\t.long\t" __S(ELF_NOTE_ARMEABI_DESCSZ) "\n"
-	"\t.long\t" __S(ELF_NOTE_TYPE_ARMEABI_TAG) "\n"
-	"\t.ascii\t" __S(ELF_NOTE_NETBSD_NAME) "\n"
-	"\t.long\t" __S(ELF_NOTE_ARMEABI_AAPCS) "\n\n"
-
-	"\t.previous\n"
-	"\t.p2align\t2\n"
-);
-#endif /* __ARM_EABI__ */
-
 #define	MD_SECTION_PROLOGUE(sect, entry_pt)		\
 		__asm (	\
 		".section "#sect",\"ax\",%progbits	\n"\



CVS commit: src/sys

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  5 01:43:59 UTC 2012

Modified Files:
src/sys/arch/arm/arm: cpu_exec.c
src/sys/kern: exec_elf.c
src/sys/sys: exec.h exec_elf.h

Log Message:
back out elf note changes and use EF_ARM_ABIVERS to determine EABI usage.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/arm/cpu_exec.c
cvs rdiff -u -r1.42 -r1.43 src/sys/kern/exec_elf.c
cvs rdiff -u -r1.138 -r1.139 src/sys/sys/exec.h
cvs rdiff -u -r1.125 -r1.126 src/sys/sys/exec_elf.h

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

Modified files:

Index: src/sys/arch/arm/arm/cpu_exec.c
diff -u src/sys/arch/arm/arm/cpu_exec.c:1.1 src/sys/arch/arm/arm/cpu_exec.c:1.2
--- src/sys/arch/arm/arm/cpu_exec.c:1.1	Fri Aug  3 07:59:22 2012
+++ src/sys/arch/arm/arm/cpu_exec.c	Sun Aug  5 01:43:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_exec.c,v 1.1 2012/08/03 07:59:22 matt Exp $	*/
+/*	$NetBSD: cpu_exec.c,v 1.2 2012/08/05 01:43:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.1 2012/08/03 07:59:22 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.2 2012/08/05 01:43:59 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_netbsd32.h"
@@ -55,7 +55,9 @@ arm_netbsd_elf32_probe(struct lwp *l, st
 	char *itp, vaddr_t *start_p)
 {
 	const char *itp_suffix = NULL;
-	const bool elf_aapcs_p = (epp->ep_flags & EXEC_ARM_AAPCS) != 0;
+	const Elf_Ehdr * const eh = eh0;
+	const bool elf_aapcs_p =
+	(eh->e_flags & EF_ARM_EABIMASK) >= EF_ARM_EABI_VER4;
 #ifdef COMPAT_NETBSD32
 	const bool netbsd32_p = (epp->ep_esch->es_emul == &emul_netbsd32);
 #else

Index: src/sys/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.42 src/sys/kern/exec_elf.c:1.43
--- src/sys/kern/exec_elf.c:1.42	Fri Aug  3 07:54:14 2012
+++ src/sys/kern/exec_elf.c	Sun Aug  5 01:43:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.42 2012/08/03 07:54:14 matt Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.43 2012/08/05 01:43:58 matt Exp $	*/
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.42 2012/08/03 07:54:14 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.43 2012/08/05 01:43:58 matt Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -948,23 +948,6 @@ bad:
 			sizeof(epp->ep_pax_flags));
 			break;
 
-#ifdef __arm__
-		case ELF_NOTE_TYPE_ARMEABI_TAG:
-			if (np->n_namesz != ELF_NOTE_NETBSD_NAMESZ ||
-			np->n_descsz != ELF_NOTE_ARMEABI_DESCSZ ||
-			memcmp(ndata, ELF_NOTE_NETBSD_NAME,
-			ELF_NOTE_NETBSD_NAMESZ))
-goto bad;
-			{
-int tmp = *(int *)(ndata +
-roundup(ELF_NOTE_NETBSD_NAMESZ,
-	sizeof(int)));
-if (tmp == ELF_NOTE_ARMEABI_AAPCS)
-	epp->ep_flags |= EXEC_ARM_AAPCS;
-			}
-			break;
-#endif
-
 		case ELF_NOTE_TYPE_SUSE_VERSION_TAG:
 			break;
 

Index: src/sys/sys/exec.h
diff -u src/sys/sys/exec.h:1.138 src/sys/sys/exec.h:1.139
--- src/sys/sys/exec.h:1.138	Fri Aug  3 07:54:14 2012
+++ src/sys/sys/exec.h	Sun Aug  5 01:43:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec.h,v 1.138 2012/08/03 07:54:14 matt Exp $	*/
+/*	$NetBSD: exec.h,v 1.139 2012/08/05 01:43:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -225,8 +225,6 @@ struct exec_package {
 #define	EXEC_32		0x0020		/* 32-bit binary emulation */
 #define	EXEC_FORCEAUX	0x0040		/* always use ELF AUX vector */
 
-#define	EXEC_ARM_AAPCS	0x8000		/* ARM MD flag: uses AAPCS ABI */
-
 struct exec_vmcmd {
 	int	(*ev_proc)(struct lwp *, struct exec_vmcmd *);
 /* procedure to run for region of vmspace */

Index: src/sys/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.125 src/sys/sys/exec_elf.h:1.126
--- src/sys/sys/exec_elf.h:1.125	Sat Aug  4 09:24:19 2012
+++ src/sys/sys/exec_elf.h	Sun Aug  5 01:43:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.125 2012/08/04 09:24:19 skrll Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.126 2012/08/05 01:43:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -895,19 +895,6 @@ typedef struct {
 #define ELF_NOTE_PAX_DESCSZ		4
 
 /*
- * NetBSD-specific note type: aeabi.
- * There should be 1 NOTE per executable.
- * name: NetBSD\0
- * namesz: 6
- * desc:
- *	word[0]: ABI bitmask
- * descsz: 4
- */
-#define	ELF_NOTE_TYPE_ARMEABI_TAG	4
-#define	ELF_NOTE_ARMEABI_DESCSZ		4
-#define	ELF_NOTE_ARMEABI_AAPCS		0x01
-
-/*
  * NetBSD-specific core file information.
  *
  * NetBSD ELF core files use notes to provide information about



CVS commit: src/share/man/man4

2012-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug  4 22:31:36 UTC 2012

Modified Files:
src/share/man/man4: bwi.4

Log Message:
Use my @NetBSD.org email address in the bwi(4) man page.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/bwi.4

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/man4/bwi.4
diff -u src/share/man/man4/bwi.4:1.10 src/share/man/man4/bwi.4:1.11
--- src/share/man/man4/bwi.4:1.10	Wed Apr 25 04:14:03 2012
+++ src/share/man/man4/bwi.4	Sat Aug  4 22:31:36 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: bwi.4,v 1.10 2012/04/25 04:14:03 nakayama Exp $
+.\" $NetBSD: bwi.4,v 1.11 2012/08/04 22:31:36 riastradh Exp $
 .\"
 .\" Copyright (c) 2007 The DragonFly Project.  All rights reserved.
 .\"
@@ -125,7 +125,7 @@ for Dragonfly BSD.
 It was ported to
 .Nx
 by
-.An Taylor R. Campbell Aq campb...@mumble.net .
+.An Taylor R. Campbell Aq riastr...@netbsd.org .
 .Pp
 The hardware specification was reverse engineered by the people at
 .Lk http://bcm-specs.sipsolutions.net .



CVS commit: src/games/fortune

2012-08-04 Thread Julian Fagir
Module Name:src
Committed By:   jdf
Date:   Sat Aug  4 22:29:59 UTC 2012

Modified Files:
src/games/fortune/datfiles: fortunes2
src/games/fortune/fortune: fortune.6
src/games/fortune/strfile: strfile.8

Log Message:
src/games/fortune/fortune/fortune.6:
 * reference strfile(8) in `SEE ALSO' section.

src/games/fortune/strfile/strfile.8:
 * remove redundant argument to (successive) `.Nm' macros.

src/games/fortune/datfiles/fortunes2:
 * remove (the least complete variant of a) double fortune.

Patch submitted by Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/games/fortune/datfiles/fortunes2
cvs rdiff -u -r1.12 -r1.13 src/games/fortune/fortune/fortune.6
cvs rdiff -u -r1.13 -r1.14 src/games/fortune/strfile/strfile.8

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

Modified files:

Index: src/games/fortune/datfiles/fortunes2
diff -u src/games/fortune/datfiles/fortunes2:1.43 src/games/fortune/datfiles/fortunes2:1.44
--- src/games/fortune/datfiles/fortunes2:1.43	Mon Jan 24 15:30:55 2011
+++ src/games/fortune/datfiles/fortunes2	Sat Aug  4 22:29:58 2012
@@ -47575,10 +47575,6 @@ Thou hast seen nothing yet.
 %
 Thou shalt not omit adultery.
 %
-Though a program be but three lines long, someday it will have to
-be maintained.
-		-- The Tao of Programming
-%
 Though I respect that a lot
 I'd be fired if that were my job
 After killing Jason off and

Index: src/games/fortune/fortune/fortune.6
diff -u src/games/fortune/fortune/fortune.6:1.12 src/games/fortune/fortune/fortune.6:1.13
--- src/games/fortune/fortune/fortune.6:1.12	Sun Apr 12 16:58:57 2009
+++ src/games/fortune/fortune/fortune.6	Sat Aug  4 22:29:59 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fortune.6,v 1.12 2009/04/12 16:58:57 joerg Exp $
+.\"	$NetBSD: fortune.6,v 1.13 2012/08/04 22:29:59 jdf Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -179,4 +179,5 @@ Fortune files.
 .Sh SEE ALSO
 .Xr regex 3 ,
 .Xr random 6 ,
-.Xr rot13 6
+.Xr rot13 6 ,
+.Xr strfile 8

Index: src/games/fortune/strfile/strfile.8
diff -u src/games/fortune/strfile/strfile.8:1.13 src/games/fortune/strfile/strfile.8:1.14
--- src/games/fortune/strfile/strfile.8:1.13	Sun Jan 17 13:35:00 2010
+++ src/games/fortune/strfile/strfile.8	Sat Aug  4 22:29:59 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: strfile.8,v 1.13 2010/01/17 13:35:00 mbalmer Exp $
+.\"	$NetBSD: strfile.8,v 1.14 2012/08/04 22:29:59 jdf Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -40,7 +40,7 @@
 .Nm unstr
 .Nd "create a random access file for storing strings"
 .Sh SYNOPSIS
-.Nm strfile
+.Nm
 .Op Fl iorsx
 .Op Fl c Ar char
 .Ar source_file
@@ -115,7 +115,7 @@ All fields are written in big-endian byt
 The purpose of
 .Nm unstr
 is to undo the work of
-.Nm strfile .
+.Nm .
 It prints out the strings contained in the file
 .Ar source_file
 in the order that they are listed in the header file
@@ -124,7 +124,7 @@ to standard output.
 It is possible to create sorted versions of input files by using
 .Fl o
 when
-.Nm strfile
+.Nm
 is run and then using
 .Nm unstr
 to dump them out in the table order.
@@ -138,6 +138,6 @@ default output file.
 .Xr fortune 6
 .Sh HISTORY
 The
-.Nm strfile
+.Nm
 utility first appeared in
 .Bx 4.4 .



CVS commit: src/sys/dev/ata

2012-08-04 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug  4 21:21:10 UTC 2012

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

Log Message:
If ch_ndrives is > 0, then ch_drive is not supposed to be NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/dev/ata/ata.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/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.124 src/sys/dev/ata/ata.c:1.125
--- src/sys/dev/ata/ata.c:1.124	Tue Jul 31 15:50:34 2012
+++ src/sys/dev/ata/ata.c	Sat Aug  4 21:21:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata.c,v 1.124 2012/07/31 15:50:34 bouyer Exp $	*/
+/*	$NetBSD: ata.c,v 1.125 2012/08/04 21:21:09 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.124 2012/07/31 15:50:34 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.125 2012/08/04 21:21:09 bouyer Exp $");
 
 #include "opt_ata.h"
 
@@ -212,7 +212,7 @@ atabusconfig(struct atabus_softc *atabus
 	if (chp->ch_satapmp_nports == 0)
 		(*atac->atac_probe)(chp);
 
-	if (chp->ch_drive != NULL && chp->ch_ndrives >= 2) {
+	if (chp->ch_ndrives >= 2) {
 		ATADEBUG_PRINT(("atabusattach: ch_drive_type 0x%x 0x%x\n",
 		chp->ch_drive[0].drive_type, chp->ch_drive[1].drive_type),
 		DEBUG_PROBE);



CVS commit: src/share/man/man4

2012-08-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Aug  4 19:48:24 UTC 2012

Modified Files:
src/share/man/man4: u3g.4

Log Message:
Bump date for more hardware support.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/u3g.4

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/man4/u3g.4
diff -u src/share/man/man4/u3g.4:1.4 src/share/man/man4/u3g.4:1.5
--- src/share/man/man4/u3g.4:1.4	Sat Aug  4 12:58:41 2012
+++ src/share/man/man4/u3g.4	Sat Aug  4 19:48:24 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: u3g.4,v 1.4 2012/08/04 12:58:41 nonaka Exp $
+.\" $NetBSD: u3g.4,v 1.5 2012/08/04 19:48:24 wiz Exp $
 .\"
 .\" Copyright (c) 2008 AnyWi Technologies
 .\" All rights reserved.
@@ -17,7 +17,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd June 28, 2010
+.Dd August 4, 2012
 .Dt U3G 4
 .Os
 .Sh NAME



CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd

2012-08-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Aug  4 19:11:39 UTC 2012

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Workaround libc not exporting in6addr_any when built with MKINET6=no.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile

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

Modified files:

Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.12 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.13
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.12	Thu Jul 12 16:54:14 2012
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile	Sat Aug  4 19:11:39 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2012/07/12 16:54:14 roy Exp $
+# $NetBSD: Makefile,v 1.13 2012/08/04 19:11:39 roy Exp $
 #
 
 PROG=		dhcpcd
@@ -11,10 +11,17 @@ SRCS+=		bpf.c if-bsd.c platform-bsd.c
 .include 
 
 DIST=		${NETBSDSRCDIR}/external/bsd/dhcpcd/dist
-.PATH: ${DIST}
-
 CPPFLAGS+=	-I${DIST}
 
+# Workaround libc not exporting in6addr_any when MKINET6=no
+.if defined(MKINET6) && empty(MKINET6:M[yY][eE][sS])
+LIBC_NET=	${NETBSDSRCDIR}/lib/libc/net
+SRCS+=		vars6.c
+CPPFLAGS+=	-I${NETBSDSRCDIR}/lib/libc/include
+.endif
+
+.PATH: ${DIST} ${LIBC_NET}
+
 SCRIPTS=			dhcpcd-run-hooks
 SCRIPTSDIR_dhcpcd-run-hooks=	/libexec
 



CVS commit: src/sys/arch/mac68k/mac68k

2012-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug  4 17:18:39 UTC 2012

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

Log Message:
No need to statically initialize physmem here, it is set to the correct
value in pmap_bootstrap(), which is early enough.
Tested on my Centris 660AV.


To generate a diff of this commit:
cvs rdiff -u -r1.344 -r1.345 src/sys/arch/mac68k/mac68k/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/mac68k/mac68k/machdep.c
diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.344 src/sys/arch/mac68k/mac68k/machdep.c:1.345
--- src/sys/arch/mac68k/mac68k/machdep.c:1.344	Fri Jul 27 05:36:11 2012
+++ src/sys/arch/mac68k/mac68k/machdep.c	Sat Aug  4 17:18:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.344 2012/07/27 05:36:11 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.345 2012/08/04 17:18:38 martin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.344 2012/07/27 05:36:11 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345 2012/08/04 17:18:38 martin Exp $");
 
 #include "opt_adb.h"
 #include "opt_ddb.h"
@@ -191,7 +191,6 @@ void *	mac68k_bell_cookie;
 struct vm_map *phys_map = NULL;
 
 int	maxmem;			/* max memory per process */
-int	physmem = MAXMEM;	/* max supported memory, changes to actual */
 
 /*
  * Extent maps to manage all memory space, including I/O ranges.  Allocate



CVS commit: src/external/bsd/file/dist/magic/magdir

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Aug  4 15:51:20 UTC 2012

Modified Files:
src/external/bsd/file/dist/magic/magdir: elf

Log Message:
Add EABI4 and EABI5 for arm


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/file/dist/magic/magdir/elf

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

Modified files:

Index: src/external/bsd/file/dist/magic/magdir/elf
diff -u src/external/bsd/file/dist/magic/magdir/elf:1.2 src/external/bsd/file/dist/magic/magdir/elf:1.3
--- src/external/bsd/file/dist/magic/magdir/elf:1.2	Wed Feb 22 18:25:12 2012
+++ src/external/bsd/file/dist/magic/magdir/elf	Sat Aug  4 15:51:20 2012
@@ -101,6 +101,9 @@
 >>18	leshort		38		TRW RH-32,
 >>18	leshort		39		Motorola RCE,
 >>18	leshort		40		ARM,
+>>>4	byte		1
+36  lelong&0xff00	0x0400	EABI4
+36  lelong&0xff00	0x0500	EABI5
 >>18	leshort		41		Alpha,
 >>18	leshort		0xa390		IBM S/390 (obsolete),
 >>18	leshort		42		Renesas SH,
@@ -254,6 +257,9 @@
 >>18	beshort		38		TRW RH-32,
 >>18	beshort		39		Motorola RCE,
 >>18	beshort		40		ARM,
+>>>4	byte		2
+36  belong&0xff00	0x0400	EABI4
+36  belong&0xff00	0x0500	EABI5
 >>18	beshort		41		Alpha,
 >>18	beshort		42		Renesas SH,
 >>18	beshort		43		SPARC V9,



CVS commit: src/usr.bin

2012-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug  4 15:50:16 UTC 2012

Modified Files:
src/usr.bin: Makefile

Log Message:
fix bogus test.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/usr.bin/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.bin/Makefile
diff -u src/usr.bin/Makefile:1.208 src/usr.bin/Makefile:1.209
--- src/usr.bin/Makefile:1.208	Wed Feb 15 23:52:47 2012
+++ src/usr.bin/Makefile	Sat Aug  4 11:50:16 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.208 2012/02/16 04:52:47 jmmv Exp $
+#	$NetBSD: Makefile,v 1.209 2012/08/04 15:50:16 christos Exp $
 #	from: @(#)Makefile	8.3 (Berkeley) 1/7/94
 
 .include 
@@ -36,7 +36,7 @@ SUBDIR= apply asa at audio audiocfg \
 
 SUBDIR+= ../external/zlib/pigz/bin/pigz
 
-.if MKMAKEMANDB == "no"
+.if (${MKMAKEMANDB} == "no")
 SUBDIR+= apropos whatis
 .endif
 



CVS commit: src/libexec/ld.elf_so

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Aug  4 15:17:16 UTC 2012

Modified Files:
src/libexec/ld.elf_so: Makefile

Log Message:
Don't abuse DBG, use COPTS instead.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/libexec/ld.elf_so/Makefile

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

Modified files:

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.111 src/libexec/ld.elf_so/Makefile:1.112
--- src/libexec/ld.elf_so/Makefile:1.111	Thu Mar 15 00:16:07 2012
+++ src/libexec/ld.elf_so/Makefile	Sat Aug  4 15:17:16 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.111 2012/03/15 00:16:07 christos Exp $
+#	$NetBSD: Makefile,v 1.112 2012/08/04 15:17:16 matt Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
@@ -43,7 +43,7 @@ LDFLAGS+=	${${ACTIVE_CC} == "clang":? -W
 LDFLAGS+=	-Wl,-static
 LDFLAGS+=	-Wl,--warn-shared-textrel
 
-CFLAGS+=	-fvisibility=hidden
+COPTS+=		-fvisibility=hidden
 
 # Adds SRCS, CPPFLAGS, LDFLAGS, etc.  Must go first so MD startup source
 # is first.
@@ -92,10 +92,10 @@ CPPFLAGS+=	-DCOMBRELOC
 #CPPFLAGS+=	-DRTLD_DEBUG
 #CPPFLAGS+=	-DRTLD_DEBUG_RELOC
 #DBG=		-g
-DBG=		-O3 -fomit-frame-pointer
+COPTS=		-O3 -fomit-frame-pointer
 
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-DBG+=		-mno-3dnow -mno-mmx -mno-sse -mno-sse2 -mno-sse3
+COPTS+=		-mno-3dnow -mno-mmx -mno-sse -mno-sse2 -mno-sse3
 .endif
 
 



CVS commit: src/lib/libm

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Aug  4 15:16:16 UTC 2012

Modified Files:
src/lib/libm: Makefile

Log Message:
Use COPTS instead of CFLAGS


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.124 src/lib/libm/Makefile:1.125
--- src/lib/libm/Makefile:1.124	Sat May  5 17:54:13 2012
+++ src/lib/libm/Makefile	Sat Aug  4 15:16:16 2012
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.124 2012/05/05 17:54:13 christos Exp $
+#  $NetBSD: Makefile,v 1.125 2012/08/04 15:16:16 matt Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -118,7 +118,7 @@ WARNS?=5
 .PATH:	${.CURDIR}/noieee_src
 
 .if (${MACHINE_ARCH} == "alpha")
-CFLAGS+= -mfp-rounding-mode=d
+COPTS+= -mfp-rounding-mode=d
 .endif
 
 .if (${MACHINE_ARCH} != "vax")



CVS commit: src/lib/libpthread

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Aug  4 15:13:09 UTC 2012

Modified Files:
src/lib/libpthread: Makefile

Log Message:
-Wfoo goes into CWARNFLAGS


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/lib/libpthread/Makefile

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

Modified files:

Index: src/lib/libpthread/Makefile
diff -u src/lib/libpthread/Makefile:1.76 src/lib/libpthread/Makefile:1.77
--- src/lib/libpthread/Makefile:1.76	Wed Apr  4 10:59:46 2012
+++ src/lib/libpthread/Makefile	Sat Aug  4 15:13:09 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.76 2012/04/04 10:59:46 joerg Exp $
+#	$NetBSD: Makefile,v 1.77 2012/08/04 15:13:09 matt Exp $
 #
 
 WARNS?=	5
@@ -217,4 +217,4 @@ MLINKS+=	pthread_testcancel.3 pthread_se
 # pthread_setspecific() and pthread_getspecific(), since the constness
 # of the argument to setspecific() has to be discarded *somewhere*
 # before returning it from getspecific().
-CFLAGS+= -Wno-cast-qual
+CWARNFLAGS+= -Wno-cast-qual



CVS commit: src/lib/csu/common_elf

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Aug  4 14:59:05 UTC 2012

Modified Files:
src/lib/csu/common_elf: Makefile.inc

Log Message:
Use COPTS instead of CFLAGS
When compiling crti.c and crtn.c, add -DCRTI and -DCRTN, respectively.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/csu/common_elf/Makefile.inc

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

Modified files:

Index: src/lib/csu/common_elf/Makefile.inc
diff -u src/lib/csu/common_elf/Makefile.inc:1.34 src/lib/csu/common_elf/Makefile.inc:1.35
--- src/lib/csu/common_elf/Makefile.inc:1.34	Thu Jun 30 20:09:15 2011
+++ src/lib/csu/common_elf/Makefile.inc	Sat Aug  4 14:59:05 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.34 2011/06/30 20:09:15 wiz Exp $
+#	$NetBSD: Makefile.inc,v 1.35 2012/08/04 14:59:05 matt Exp $
 
 .if !defined(ELFSIZE)
 ELFSIZE=32
@@ -15,7 +15,7 @@ CPPFLAGS+=	-DJCR
 CPPFLAGS+=	-DDSO_HANDLE
 
 .if defined(HAVE_GCC)
-CFLAGS+=	-fno-unit-at-a-time
+COPTS+=		-fno-unit-at-a-time
 .endif
 
 .include 
@@ -51,7 +51,7 @@ gcrt0.o: ${.CURDIR}/crt0.c crt0.o
 
 crti.o: crti.c
 	${_MKTARGET_COMPILE}
-	${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
+	${COMPILE.c} -DCRTI ${.IMPSRC} -o ${.TARGET}.o
 	${LD} -X -r -o ${.TARGET} ${.TARGET}.o
 	rm -f ${.TARGET}.o
 .if ${MKSTRIPIDENT} != "no"
@@ -60,7 +60,7 @@ crti.o: crti.c
 
 crtn.o: crtn.c
 	${_MKTARGET_COMPILE}
-	${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
+	${COMPILE.c} -DCRTN ${.IMPSRC} -o ${.TARGET}.o
 	${LD} -X -r -o ${.TARGET} ${.TARGET}.o
 	rm -f ${.TARGET}.o
 .if ${MKSTRIPIDENT} != "no"



CVS commit: src/lib/csu/arm_elf

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Aug  4 14:57:47 UTC 2012

Modified Files:
src/lib/csu/arm_elf: dot_init.h

Log Message:
Use CRTI instead of __S


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/csu/arm_elf/dot_init.h

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

Modified files:

Index: src/lib/csu/arm_elf/dot_init.h
diff -u src/lib/csu/arm_elf/dot_init.h:1.7 src/lib/csu/arm_elf/dot_init.h:1.8
--- src/lib/csu/arm_elf/dot_init.h:1.7	Fri Aug  3 08:01:42 2012
+++ src/lib/csu/arm_elf/dot_init.h	Sat Aug  4 14:57:46 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: dot_init.h,v 1.7 2012/08/03 08:01:42 matt Exp $ */
+/* $NetBSD: dot_init.h,v 1.8 2012/08/04 14:57:46 matt Exp $ */
 
 /*-
  * Copyright (c) 2001 Ross Harvey
@@ -36,7 +36,7 @@
 #include 			/* RCS ID & Copyright macro defns */
 #include 
 
-#if defined(__ARM_EABI__) && defined(__S)
+#if defined(__ARM_EABI__) && defined(CRTI)
 __asm(
 	".section\t\".note.netbsd.aeabi\", \"a\"\n"
 	"\t.p2align\t2\n\n"



CVS commit: src/sys/arch/usermode/usermode

2012-08-04 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Aug  4 14:53:32 UTC 2012

Modified Files:
src/sys/arch/usermode/usermode: trap.c

Log Message:
Fix IO lockups in NetBSD/usermode.

1) Don't block IO signals since the return path is not garanteed to enable the
signal again.
2) Since signals can get dropped, do a 2nd pass over the routines.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/usermode/usermode/trap.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/usermode/usermode/trap.c
diff -u src/sys/arch/usermode/usermode/trap.c:1.65 src/sys/arch/usermode/usermode/trap.c:1.66
--- src/sys/arch/usermode/usermode/trap.c:1.65	Sat Mar  3 21:29:02 2012
+++ src/sys/arch/usermode/usermode/trap.c	Sat Aug  4 14:53:32 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.65 2012/03/03 21:29:02 reinoud Exp $ */
+/* $NetBSD: trap.c,v 1.66 2012/08/04 14:53:32 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.65 2012/03/03 21:29:02 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.66 2012/08/04 14:53:32 reinoud Exp $");
 
 #include 
 #include 
@@ -364,10 +364,6 @@ handle_signal(int sig, siginfo_t *info, 
 	thunk_sigemptyset(&jump_ucp.uc_sigmask);
 	jump_ucp.uc_flags = _UC_STACK | _UC_CPU | _UC_SIGMASK;
 
-	/* prevent recursive IO signals */
-	if (sig == SIGIO)
-		thunk_sigaddset(&jump_ucp.uc_sigmask, SIGIO);
-
 	thunk_makecontext(&jump_ucp,
 			(void (*)(void)) f,
 		4, info, (void *) from_userland, (void *) pc, (void *) va);
@@ -612,13 +608,15 @@ sigio(siginfo_t *info, vaddr_t from_user
 	struct lwp *l = curlwp;
 	struct pcb *pcb = lwp_getpcb(l); KASSERT(pcb);
 	struct intr_handler *sih;
-	unsigned int n;
+	unsigned int n, pass;
 
 //	thunk_printf("%s: l %p, pcb %p\n", __func__, l, pcb);
-	for (n = 0; n < SIGIO_MAX_HANDLERS; n++) {
-		sih = &sigio_intr_handler[n];
-		if (sih->func)
-			sih->func(sih->arg);
+	for (pass = 0; pass < 2; pass++) {
+		for (n = 0; n < SIGIO_MAX_HANDLERS; n++) {
+			sih = &sigio_intr_handler[n];
+			if (sih->func)
+sih->func(sih->arg);
+		}
 	}
 
 	KASSERT(l == curlwp);



CVS commit: src/sys/dev/usb

2012-08-04 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Aug  4 13:03:38 UTC 2012

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.616 -r1.617 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.617 -r1.618 src/sys/dev/usb/usbdevs_data.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/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.616 src/sys/dev/usb/usbdevs.h:1.617
--- src/sys/dev/usb/usbdevs.h:1.616	Wed Jul  4 01:08:57 2012
+++ src/sys/dev/usb/usbdevs.h	Sat Aug  4 13:03:38 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.616 2012/07/04 01:08:57 christos Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.617 2012/08/04 13:03:38 nonaka Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.624 2012/07/04 01:08:26 christos Exp
+ *	NetBSD: usbdevs,v 1.625 2012/08/04 13:03:17 nonaka Exp
  */
 
 /*
@@ -2399,6 +2399,7 @@
 #define	USB_PRODUCT_PLANEX2_GWUSMICRON	0xed14		/* GW-USMicroN */
 #define	USB_PRODUCT_PLANEX2_GWUSMICRON2	0xed16		/* GW-USMicroN2 */
 #define	USB_PRODUCT_PLANEX2_RTL8188CU_2	0xed17		/* RTL8188CU */
+#define	USB_PRODUCT_PLANEX2_GWUSH300N	0xed18		/* GW-USH300N */
 #define	USB_PRODUCT_PLANEX3_GWUS54GZ	0xab10		/* GW-US54GZ */
 #define	USB_PRODUCT_PLANEX3_GU1000T	0xab11		/* GU-1000T */
 #define	USB_PRODUCT_PLANEX3_GWUS54MINI	0xab13		/* GW-US54Mini */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.617 src/sys/dev/usb/usbdevs_data.h:1.618
--- src/sys/dev/usb/usbdevs_data.h:1.617	Wed Jul  4 01:08:58 2012
+++ src/sys/dev/usb/usbdevs_data.h	Sat Aug  4 13:03:38 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.617 2012/07/04 01:08:58 christos Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.618 2012/08/04 13:03:38 nonaka Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.624 2012/07/04 01:08:26 christos Exp
+ *	NetBSD: usbdevs,v 1.625 2012/08/04 13:03:17 nonaka Exp
  */
 
 /*
@@ -7307,6 +7307,10 @@ const struct usb_product usb_products[] 
 	"RTL8188CU",
 	},
 	{
+	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSH300N,
+	"GW-USH300N",
+	},
+	{
 	USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GWUS54GZ,
 	"GW-US54GZ",
 	},
@@ -9535,4 +9539,4 @@ const struct usb_product usb_products[] 
 	"Prestige",
 	},
 };
-const int usb_nproducts = 1861;
+const int usb_nproducts = 1862;



CVS commit: src/sys/dev/usb

2012-08-04 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Aug  4 13:03:18 UTC 2012

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add PLANEX GW-USH300N.


To generate a diff of this commit:
cvs rdiff -u -r1.624 -r1.625 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.624 src/sys/dev/usb/usbdevs:1.625
--- src/sys/dev/usb/usbdevs:1.624	Wed Jul  4 01:08:26 2012
+++ src/sys/dev/usb/usbdevs	Sat Aug  4 13:03:17 2012
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.624 2012/07/04 01:08:26 christos Exp $
+$NetBSD: usbdevs,v 1.625 2012/08/04 13:03:17 nonaka Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2392,6 +2392,7 @@ product PLANEX2 GWUS300MINIX	0xed06	GW-U
 product PLANEX2 GWUSMICRON	0xed14	GW-USMicroN
 product PLANEX2 GWUSMICRON2	0xed16	GW-USMicroN2
 product PLANEX2 RTL8188CU_2	0xed17	RTL8188CU
+product PLANEX2 GWUSH300N	0xed18	GW-USH300N
 product PLANEX3 GWUS54GZ	0xab10	GW-US54GZ
 product PLANEX3 GU1000T		0xab11	GU-1000T
 product PLANEX3 GWUS54MINI	0xab13	GW-US54Mini



CVS commit: src/share/man/man4

2012-08-04 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Aug  4 12:58:41 UTC 2012

Modified Files:
src/share/man/man4: u3g.4

Log Message:
Add NTT DOCOMO L-02C entry at supported hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/u3g.4

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/man4/u3g.4
diff -u src/share/man/man4/u3g.4:1.3 src/share/man/man4/u3g.4:1.4
--- src/share/man/man4/u3g.4:1.3	Mon Jun 28 17:48:54 2010
+++ src/share/man/man4/u3g.4	Sat Aug  4 12:58:41 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: u3g.4,v 1.3 2010/06/28 17:48:54 pooka Exp $
+.\" $NetBSD: u3g.4,v 1.4 2012/08/04 12:58:41 nonaka Exp $
 .\"
 .\" Copyright (c) 2008 AnyWi Technologies
 .\" All rights reserved.
@@ -62,6 +62,8 @@ Huawei Mobile
 .It
 Novatel MC950D
 .It
+NTT DOCOMO L-02C
+.It
 Option Globetrotter 3G
 .It
 Option Globetrotter 3G Fusion (only 3G part, not WLAN)



CVS commit: src/sys/dev/usb

2012-08-04 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Aug  4 12:55:06 UTC 2012

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

Log Message:
Match NTT DOCOMO L-02C.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/usb/u3g.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/u3g.c
diff -u src/sys/dev/usb/u3g.c:1.24 src/sys/dev/usb/u3g.c:1.25
--- src/sys/dev/usb/u3g.c:1.24	Fri Dec 23 00:51:44 2011
+++ src/sys/dev/usb/u3g.c	Sat Aug  4 12:55:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: u3g.c,v 1.24 2011/12/23 00:51:44 jakllsch Exp $	*/
+/*	$NetBSD: u3g.c,v 1.25 2012/08/04 12:55:06 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.24 2011/12/23 00:51:44 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.25 2012/08/04 12:55:06 nonaka Exp $");
 
 #include 
 #include 
@@ -216,6 +216,7 @@ static const struct usb_devno u3g_devs[]
 	/* OEM: Qualcomm, Inc. */
 	{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM },
 	{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_MF626 },
+	{ USB_VENDOR_QUALCOMM, USB_PRODUCT_QUALCOMM_NTT_DOCOMO_L02C_MODEM },
 
 	/* OEM: Sierra Wireless: */
 	{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC595U },
@@ -506,6 +507,11 @@ u3ginit_match(device_t parent, cfdata_t 
 			return u3g_novatel_reinit(uaa->device);
 		break;
 
+	case USB_VENDOR_QUALCOMM:
+		if (uaa->product == USB_PRODUCT_QUALCOMM_NTT_DOCOMO_L02C_STORAGE)
+			return u3g_novatel_reinit(uaa->device);
+		break;
+
 	case USB_VENDOR_4GSYSTEMS:
 		if (uaa->product == USB_PRODUCT_4GSYSTEMS_XSSTICK_P14_INSTALLER)
 			return u3g_4gsystems_reinit(uaa->device);



CVS commit: src/sys/coda

2012-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug  4 12:47:00 UTC 2012

Modified Files:
src/sys/coda: README

Log Message:
mention current status


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/coda/README

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

Modified files:

Index: src/sys/coda/README
diff -u src/sys/coda/README:1.3 src/sys/coda/README:1.4
--- src/sys/coda/README:1.3	Sun Apr  8 09:50:51 2007
+++ src/sys/coda/README	Sat Aug  4 08:47:00 2012
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.3 2007/04/08 13:50:51 gdt Exp $
+$NetBSD: README,v 1.4 2012/08/04 12:47:00 christos Exp $
 
 Coda is a distributed filesystem.  It is derived from AFS, but
 supports disconnected operation, both reading and writing.  This
@@ -11,14 +11,22 @@ Coda servers do not need kernel support.
 For information on Coda, see
   http://www.coda.cs.cmu.edu
 
-As of April 2007, Coda is not quite stable enough for demanding
-production use, but is usable by those who are willing to deal with
-problems.  Help can be obtained via the list codal...@coda.cs.cmu.edu.
-
-As of April 2007, pkgsrc/net/coda\* is old, and gdt recommends running
-code from Coda's CVS.
-
-As of April 2007, the kernel code has not been tested on 64-bit
-architectures.  It runs on i386 and has previously been tested on
-sparc.
+As of Sat Aug  4 15:45:27 EEST 2012
+	- The coda/vcoda modules have been tested for read/write
+	  operations and load/unload on amd64 with a DEBUG/DIAGNOSTIC
+	  kernel and there are no locking errors.
+	- If you find issues with coda, please file a bug report.
+	  Also help can be obtained via the list codal...@coda.cs.cmu.edu.
+	- Pkgsrc/net/coda has the latest source available from cmu and
+	  has been fixed to co-exist with openafs (openafs has been modified)
+
+To test:
+- Install pkgsrc/net/coda
+
+# rm -fr /var/lib/coda			# remove junk if there was a crash
+# /usr/pkg/sbin/venus-setup 	#  the domain name
+# /usr/pkg/sbin/venus
+# clog gu...@testserver.coda.cs.cmu.edu	# password is guest
+# echo foo > /coda/testserver.coda.cs.cmu.edu/playground/nb.test0 
 
+You should be able to access things in /coda



CVS commit: src/sys/kern

2012-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug  4 12:38:20 UTC 2012

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

Log Message:
- fix typo in comment
- Don't call abort1 with NULL ld, after panic(9).


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/kern/subr_lockdebug.c

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

Modified files:

Index: src/sys/kern/subr_lockdebug.c
diff -u src/sys/kern/subr_lockdebug.c:1.45 src/sys/kern/subr_lockdebug.c:1.46
--- src/sys/kern/subr_lockdebug.c:1.45	Tue Jul 26 09:07:20 2011
+++ src/sys/kern/subr_lockdebug.c	Sat Aug  4 08:38:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_lockdebug.c,v 1.45 2011/07/26 13:07:20 yamt Exp $	*/
+/*	$NetBSD: subr_lockdebug.c,v 1.46 2012/08/04 12:38:20 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.45 2011/07/26 13:07:20 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.46 2012/08/04 12:38:20 christos Exp $");
 
 #include "opt_ddb.h"
 
@@ -325,7 +325,6 @@ lockdebug_free(volatile void *lock)
 		__cpu_simple_unlock(&ld_mod_lk);
 		panic("lockdebug_free: destroying uninitialized object %p"
 		"(ld_lock=%p)", lock, ld->ld_lock);
-		lockdebug_abort1(ld, s, __func__, "record follows", true);
 		return;
 	}
 	if ((ld->ld_flags & LD_LOCKED) != 0 || ld->ld_shares != 0) {
@@ -764,7 +763,7 @@ lockdebug_abort1(lockdebug_t *ld, int s,
 {
 
 	/*
-	 * Don't make the situation wose if the system is already going
+	 * Don't make the situation worse if the system is already going
 	 * down in flames.  Once a panic is triggered, lockdebug state
 	 * becomes stale and cannot be trusted.
 	 */



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

2012-08-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Aug  4 12:33:23 UTC 2012

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

Log Message:
Add distrib entries for new uatp module.

Hello, riastradh!


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/distrib/sets/lists/modules/mi

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

Modified files:

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.44 src/distrib/sets/lists/modules/mi:1.45
--- src/distrib/sets/lists/modules/mi:1.44	Thu Apr 26 03:00:22 2012
+++ src/distrib/sets/lists/modules/mi	Sat Aug  4 12:33:23 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.44 2012/04/26 03:00:22 christos Exp $
+# $NetBSD: mi,v 1.45 2012/08/04 12:33:23 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -171,6 +171,8 @@
 ./@MODULEDIR@/tmpfs/tmpfs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/tprofbase-kernel-modules	kmod
 ./@MODULEDIR@/tprof/tprof.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/uatpbase-kernel-modules	kmod
+./@MODULEDIR@/uatp/uatp.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/udfbase-kernel-modules	kmod
 ./@MODULEDIR@/udf/udf.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/umapbase-kernel-modules	kmod



CVS commit: src/sys/coda

2012-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug  4 12:31:57 UTC 2012

Modified Files:
src/sys/coda: coda_psdev.c

Log Message:
Don't increment the mount reference count here. Otherwise we are left with
refcount of one when we unmount, and vfs_destroy does not... Who is expected
to decrement this anyway?!?!


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/coda/coda_psdev.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/coda/coda_psdev.c
diff -u src/sys/coda/coda_psdev.c:1.48 src/sys/coda/coda_psdev.c:1.49
--- src/sys/coda/coda_psdev.c:1.48	Wed Apr 25 23:04:54 2012
+++ src/sys/coda/coda_psdev.c	Sat Aug  4 08:31:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_psdev.c,v 1.48 2012/04/26 03:04:54 christos Exp $	*/
+/*	$NetBSD: coda_psdev.c,v 1.49 2012/08/04 12:31:57 christos Exp $	*/
 
 /*
  *
@@ -54,7 +54,7 @@
 /* These routines are the device entry points for Venus. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.48 2012/04/26 03:04:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.49 2012/08/04 12:31:57 christos Exp $");
 
 extern int coda_nc_initialized;/* Set if cache has been initialized */
 
@@ -202,7 +202,6 @@ vc_nb_close(dev_t dev, int flag, int mod
 }
 
 /* Let unmount know this is for real */
-atomic_inc_uint(&mi->mi_vfsp->mnt_refcnt);
 VTOC(mi->mi_rootvp)->c_flags |= C_UNMOUNTING;
 coda_unmounting(mi->mi_vfsp);
 



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64

2012-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug  4 11:03:35 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64: Makefile
aes-x86_64.S aesni-sha1-x86_64.S aesni-x86_64.S bsaes-x86_64.S
cmll-x86_64.S ghash-x86_64.S md5-x86_64.S modexp512-x86_64.S
rc4-md5-x86_64.S rc4-x86_64.S sha1-x86_64.S sha512-x86_64.S
uplink-x86_64.S vpaes-x86_64.S wp-x86_64.S x86_64cpuid.S

Log Message:
add #include , use PIC_PLT()


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aes-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/rc4-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/sha512-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/wp-x86_64.S
cvs rdiff -u -r1.2 -r1.3 \

src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-sha1-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/bsaes-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/ghash-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/md5-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/vpaes-x86_64.S
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/cmll-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/sha1-x86_64.S
cvs rdiff -u -r1.1 -r1.2 \

src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/modexp512-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/rc4-md5-x86_64.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/uplink-x86_64.S
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64cpuid.S

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile:1.5	Fri Jul 27 14:16:53 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile	Sat Aug  4 07:03:34 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2012/07/27 18:16:53 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2012/08/04 11:03:34 christos Exp $
 
 .include "bsd.own.mk"
 
@@ -8,9 +8,9 @@ CRYPTODIST=${NETBSDSRCDIR}/crypto
 regen:
 	for i in $$(find ${OPENSSLSRC} -name \*${MACHINE_ARCH}.pl) \
 		${OPENSSLSRC}/crypto/${MACHINE_ARCH}cpuid.pl ; do \
-perl $$i elf | sed \
+(echo "#include "; perl $$i elf | sed \
 		-e 's/\(OPENSSL[A-Za-z0-9_+]*\)(%rip)/\1@GOTPCREL(%rip)/' \
 		-e 's/.hidden	OPENSSL_cpuid_setup/.globl	OPENSSL_cpuid_setup/' \
-		-e 's/call	OPENSSL_cpuid_setup/call	OPENSSL_cpuid_setup@GOTPCREL(%rip)/' \
+		-e 's/call	OPENSSL_cpuid_setup/call	PIC_PLT(OPENSSL_cpuid_setup)/') \
 		> $$(basename $$i .pl).S; \
 	done
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aes-x86_64.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aes-x86_64.S:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aes-x86_64.S:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aes-x86_64.S:1.5	Thu Jul 26 17:22:47 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aes-x86_64.S	Sat Aug  4 07:03:34 2012
@@ -1,3 +1,4 @@
+#include 
 .text	
 .type	_x86_64_AES_encrypt,@function
 .align	16
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S:1.5	Thu Jul 26 17:22:47 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S	Sat Aug  4 07:03:34 2012
@@ -1,3 +1,4 @@
+#include 
 .text	
 .globl	aesni_encrypt
 .type	aesni_encrypt,@function
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/rc4-x86_64.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/rc4-x86_64.S:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/rc4-x86_64.S:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/rc4-x86_64.S:1.5	Thu Jul 26 17:22:47 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/rc4-x86_64.S	Sat Aug  4 07:03:35 2012
@@ -1,3 +1,4 @@
+#include 
 .text	
 
 
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/sha512-x86_64.S
diff -u src/crypto/external/bsd/opens

CVS commit: src/sys/sys

2012-08-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug  4 09:24:19 UTC 2012

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

Log Message:
define consistency


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/sys/exec_elf.h

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

Modified files:

Index: src/sys/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.124 src/sys/sys/exec_elf.h:1.125
--- src/sys/sys/exec_elf.h:1.124	Fri Aug  3 07:54:14 2012
+++ src/sys/sys/exec_elf.h	Sat Aug  4 09:24:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.124 2012/08/03 07:54:14 matt Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.125 2012/08/04 09:24:19 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -904,7 +904,7 @@ typedef struct {
  * descsz: 4
  */
 #define	ELF_NOTE_TYPE_ARMEABI_TAG	4
-#define ELF_NOTE_ARMEABI_DESCSZ		4
+#define	ELF_NOTE_ARMEABI_DESCSZ		4
 #define	ELF_NOTE_ARMEABI_AAPCS		0x01
 
 /*



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

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Aug  4 07:20:32 UTC 2012

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: cpu.h mips_param.h pmap.h
pte.h vmparam.h
src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_subr.c genassym.cf
mipsX_subr.S mips_machdep.c pmap.c pmap_segtab.c trap.c
vm_machdep.c

Log Message:
Make MIPS use a multi-level page table for the kernel address space.
(just like the user address does).   XXX fix mips1


To generate a diff of this commit:
cvs rdiff -u -r1.90.16.45 -r1.90.16.46 src/sys/arch/mips/include/cpu.h
cvs rdiff -u -r1.23.78.12 -r1.23.78.13 src/sys/arch/mips/include/mips_param.h
cvs rdiff -u -r1.54.26.26 -r1.54.26.27 src/sys/arch/mips/include/pmap.h
cvs rdiff -u -r1.19.18.4 -r1.19.18.5 src/sys/arch/mips/include/pte.h
cvs rdiff -u -r1.41.28.27 -r1.41.28.28 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/sys/arch/mips/mips/cpu_subr.c
cvs rdiff -u -r1.44.12.33 -r1.44.12.34 src/sys/arch/mips/mips/genassym.cf
cvs rdiff -u -r1.26.36.1.2.57 -r1.26.36.1.2.58 \
src/sys/arch/mips/mips/mipsX_subr.S
cvs rdiff -u -r1.205.4.1.2.1.2.67 -r1.205.4.1.2.1.2.68 \
src/sys/arch/mips/mips/mips_machdep.c
cvs rdiff -u -r1.179.16.45 -r1.179.16.46 src/sys/arch/mips/mips/pmap.c
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/sys/arch/mips/mips/pmap_segtab.c
cvs rdiff -u -r1.217.12.44 -r1.217.12.45 src/sys/arch/mips/mips/trap.c
cvs rdiff -u -r1.121.6.1.2.29 -r1.121.6.1.2.30 \
src/sys/arch/mips/mips/vm_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/mips/include/cpu.h
diff -u src/sys/arch/mips/include/cpu.h:1.90.16.45 src/sys/arch/mips/include/cpu.h:1.90.16.46
--- src/sys/arch/mips/include/cpu.h:1.90.16.45	Mon Jul  9 17:23:37 2012
+++ src/sys/arch/mips/include/cpu.h	Sat Aug  4 07:20:31 2012
@@ -120,9 +120,9 @@ struct cpu_info {
 	int ci_tlb_slot;		/* reserved tlb entry for cpu_info */
 	u_int ci_pmap_asid_cur;		/* current ASID */
 	struct pmap_tlb_info *ci_tlb_info; /* tlb information for this cpu */
-	union pmap_segtab *ci_pmap_seg0tab;
+	union pmap_segtab *ci_pmap_seg0tab[2];
 #ifdef _LP64
-	union pmap_segtab *ci_pmap_segtab;
+	union pmap_segtab *ci_pmap_segtab[2];
 #else
 	vaddr_t ci_pmap_srcbase;	/* starting VA of ephemeral src space */
 	vaddr_t ci_pmap_dstbase;	/* starting VA of ephemeral dst space */

Index: src/sys/arch/mips/include/mips_param.h
diff -u src/sys/arch/mips/include/mips_param.h:1.23.78.12 src/sys/arch/mips/include/mips_param.h:1.23.78.13
--- src/sys/arch/mips/include/mips_param.h:1.23.78.12	Mon Feb 27 16:57:58 2012
+++ src/sys/arch/mips/include/mips_param.h	Sat Aug  4 07:20:31 2012
@@ -87,18 +87,24 @@
 #define	PGSHIFT		PAGE_SHIFT	/* LOG2(NBPG) */
 #define	NBPG		(1 << PGSHIFT)	/* bytes/page */
 #define	PGOFSET		(NBPG-1)	/* byte offset into page */
-#define	NPTEPG		(NBPG/4)
+#define	PTPSHIFT	(2)
+#define	PTPLENGTH	(PGSHIFT-PTPSHIFT)
+#define	NPTEPG		(1 << PTPLENGTH)
 
 #define NBSEG		(NBPG*NPTEPG)	/* bytes/segment */
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
-#define	SEGSHIFT	(PGSHIFT+(PGSHIFT-2))	/* LOG2(NBSEG) */
+#define	SEGSHIFT	(PGSHIFT+PTPLENGTH)	/* LOG2(NBSEG) */
 
 #ifdef _LP64
-#define	NSEGPG		(NBPG/8)
+#define	SEGLENGTH	(PGSHIFT-3)
 #define NBXSEG		((uint64_t)NSEGPG*NBSEG)	/* bytes/xsegment */
 #define	XSEGOFSET	(NBXSEG-1)	/* byte offset into xsegment */
-#define	XSEGSHIFT	(SEGSHIFT+(PGSHIFT-3))	/* LOG2(NBXSEG) */
+#define	XSEGSHIFT	(SEGSHIFT+SEGLENGTH)	/* LOG2(NBXSEG) */
+#define	XSEGLENGTH	(PGSHIFT-3)
+#else
+#define	SEGLENGTH	(31-SEGSHIFT)
 #endif
+#define	NSEGPG		(1 << SEGLENGTH)
 
 /*
  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized

Index: src/sys/arch/mips/include/pmap.h
diff -u src/sys/arch/mips/include/pmap.h:1.54.26.26 src/sys/arch/mips/include/pmap.h:1.54.26.27
--- src/sys/arch/mips/include/pmap.h:1.54.26.26	Mon Jul  9 17:23:37 2012
+++ src/sys/arch/mips/include/pmap.h	Sat Aug  4 07:20:31 2012
@@ -109,17 +109,11 @@
 #define mips_trunc_seg(x)	((vaddr_t)(x) & ~SEGOFSET)
 #define mips_round_seg(x)	(((vaddr_t)(x) + SEGOFSET) & ~SEGOFSET)
 
-#ifdef _LP64
-#define PMAP_SEGTABSIZE		NSEGPG
-#else
-#define PMAP_SEGTABSIZE		(1 << (31 - SEGSHIFT))
-#endif
-
 union pt_entry;
 
 typedef union pmap_segtab {
-	union pmap_segtab *	seg_seg[PMAP_SEGTABSIZE];
-	union pt_entry	*	seg_tab[PMAP_SEGTABSIZE];
+	union pmap_segtab *	seg_seg[NSEGPG];
+	union pt_entry	*	seg_tab[NPTEPG];
 } pmap_segtab_t;
 #else
 /*

Index: src/sys/arch/mips/include/pte.h
diff -u src/sys/arch/mips/include/pte.h:1.19.18.4 src/sys/arch/mips/include/pte.h:1.19.18.5
--- src/sys/arch/mips/include/pte.h:1.19.18.4	Thu Mar 11 08:13:18 2010
+++ src/sys/arch/mips/include/pte.h	Sat Aug  4 07:20:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pte.h,v 1.19.18.4 2010/03/11 08:13:18 matt Exp $	*/
+/*	pte.h,v 1.19.18.4 2010/03/11 08:13:18 matt Exp	*/
 
 /*-
  * Copyright (c) 19

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

2012-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Aug  4 07:17:06 UTC 2012

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: mips_opcode.h
src/sys/arch/mips/mips [matt-nb5-mips64]: db_disasm.c

Log Message:
disasm special2 and special3 opcodes (and ehb and ssnop too).


To generate a diff of this commit:
cvs rdiff -u -r1.12.96.3 -r1.12.96.4 src/sys/arch/mips/include/mips_opcode.h
cvs rdiff -u -r1.19.62.4 -r1.19.62.5 src/sys/arch/mips/mips/db_disasm.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/include/mips_opcode.h
diff -u src/sys/arch/mips/include/mips_opcode.h:1.12.96.3 src/sys/arch/mips/include/mips_opcode.h:1.12.96.4
--- src/sys/arch/mips/include/mips_opcode.h:1.12.96.3	Fri Apr 29 08:26:21 2011
+++ src/sys/arch/mips/include/mips_opcode.h	Sat Aug  4 07:17:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_opcode.h,v 1.12.96.3 2011/04/29 08:26:21 matt Exp $	*/
+/*	mips_opcode.h,v 1.12.96.3 2011/04/29 08:26:21 matt Exp	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -145,9 +145,10 @@ typedef union {
 #define OP_DADDIU	031		/* MIPS-II, for r4000 port */
 #define OP_LDL		032		/* MIPS-II, for r4000 port */
 #define OP_LDR		033		/* MIPS-II, for r4000 port */
-
-#define OP_SPECIAL2	034		/* QED opcodes */
-#define OP_SPECIAL3	037		/* QED opcodes */
+#define OP_SPECIAL2	034		/* QED/MIPS{32,64}R{1,2} opcodes */
+#define	OP_JALX		035
+#define	OP_MDMX		036
+#define OP_SPECIAL3	037		/* QED/MIPS{32,64}R{1,2} opcodes */
 
 #define OP_LB		040
 #define OP_LH		041
@@ -156,8 +157,6 @@ typedef union {
 #define OP_LBU		044
 #define OP_LHU		045
 #define OP_LWR		046
-#define OP_LHU		045
-#define OP_LWR		046
 #define OP_LWU		047		/* MIPS-II, for r4000 port */
 
 #define OP_SB		050
@@ -262,13 +261,27 @@ typedef union {
 #define OP_CLO		041		/* MIPS32/64 */
 #define OP_DCLZ		044		/* MIPS32/64 */
 #define OP_DCLO		045		/* MIPS32/64 */
+#define	OP_SDBBP	077		/* MIPS32/64 */
 
 /*
  * Values for the 'func' field when 'op' == OP_SPECIAL3.
  */
+#define	OP_EXT		000		/* MIPS32/64 r2 */
+#define	OP_DEXTM	001		/* MIPS32/64 r2 */
+#define	OP_DEXTU	002		/* MIPS32/64 r2 */
+#define	OP_DEXT		003		/* MIPS32/64 r2 */
+#define	OP_INS		004		/* MIPS32/64 r2 */
+#define	OP_DINSM	004		/* MIPS32/64 r2 */
+#define	OP_DINSU	006		/* MIPS32/64 r2 */
+#define	OP_DINS		007		/* MIPS32/64 r2 */
+#define	OP_BSHFL	040		/* MIPS32/64 r2 */
+#define	OP_DBSHFL	044		/* MIPS32/64 r2 */
 #define OP_RDHWR	073		/* MIPS32/64 r2 */
 
-
+#define	BSHFL_SBH	002		/* MIPS32/64 r2 */
+#define	BSHFL_SHD	005		/* MIPS32/64 r2 */
+#define	BSHFL_SEB	020		/* MIPS32/64 r2 */
+#define	BSHFL_SEH	030		/* MIPS32/64 r2 */
 /*
  * Values for the 'func' field when 'op' == OP_BCOND.
  */

Index: src/sys/arch/mips/mips/db_disasm.c
diff -u src/sys/arch/mips/mips/db_disasm.c:1.19.62.4 src/sys/arch/mips/mips/db_disasm.c:1.19.62.5
--- src/sys/arch/mips/mips/db_disasm.c:1.19.62.4	Thu Feb 16 10:45:17 2012
+++ src/sys/arch/mips/mips/db_disasm.c	Sat Aug  4 07:17:05 2012
@@ -56,7 +56,7 @@ static const char * const op_name[64] = 
 /* 0 */ "spec", "bcond","j",	"jal",	"beq",	"bne",	"blez", "bgtz",
 /* 8 */ "addi", "addiu","slti", "sltiu","andi", "ori",	"xori", "lui",
 /*16 */ "cop0", "cop1", "cop2", "cop3", "beql", "bnel", "blezl","bgtzl",
-/*24 */ "daddi","daddiu","ldl", "ldr",	"op34", "op35", "op36", "op37",
+/*24 */ "daddi","daddiu","ldl", "ldr",	"spec2", "jalx", "mdmx", "spec3",
 /*32 */ "lb",	"lh",	"lwl",	"lw",	"lbu",	"lhu",	"lwr",	"lwu",
 /*40 */ "sb",	"sh",	"swl",	"sw",	"sdl",	"sdr",	"swr",	"cache",
 /*48 */ "ll",	"lwc1", "lwc2", "lwc3", "lld",	"ldc1", "ldc2", "ld",
@@ -74,8 +74,26 @@ static const char * const spec_name[64] 
 /*56 */ "dsll","spec71","dsrl","dsra","dsll32","spec75","dsrl32","dsra32"
 };
 
-static const char * const spec2_name[4] = {		/* QED RM4650, R5000, etc. */
-/* 0 */ "mad", "madu", "mul", "spec3"
+static const char const spec2_name[64][8] = {	/* MIPSxxR{1,2} */
+/*  0 */ "mad", "madu", "mul", "sp2?3", "msub", "msubu", "sp2?6", "sp2?7",
+/*  8 */ "sp2?8", "sp2?9", "sp2?10", "sp2?11", "sp2?12", "sp2?13", "sp2?14", "sp2?15",
+/* 16 */ "sp2?16", "sp2?17", "sp2?18", "sp2?19", "sp2?20", "sp2?21", "sp2?22", "sp2?23",
+/* 24 */ "sp2?24", "sp2?25", "sp2?26", "sp2?27", "sp2?28", "sp2?29", "sp2?30", "sp2?31",
+/* 32 */ "clz", "clo", "sp2?34", "sp2?35", "dclz", "dclo", "sp2?38", "sp2?39",
+/* 40 */ "sp2?40", "sp2?41", "sp2?42", "sp2?43", "sp2?44", "sp2?45", "sp2?46", "sp2?47",
+/* 48 */ "sp2?48", "sp2?49", "sp2?50", "sp2?51", "sp2?52", "sp2?53", "sp2?54", "sp2?55",
+/* 56 */ "sp2?56", "sp2?57", "sp2?58", "sp2?59", "sp2?60", "sp2?61", "sp2?62", "sdbbp",
+};
+
+static const char const spec3_name[64][8] = {	/* MIPSxxR2 */
+/*  0 */ "ext", "dextm", "dextu", "dext", "ins", "dinsm", "dinsu", "dins",
+/*  8 */ "sp3?8", "sp3?9", "sp3?10", "sp3?11", "sp3?12", "sp3?13", "sp3?14", "sp3?15",
+/* 16 */ "sp3?16", "sp3?17", "sp3?18", "sp3?19", "sp3?20", "sp3?21", "sp3?