CVS commit: othersrc/external/bsd/multigest

2013-08-18 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Sun Aug 18 06:03:14 UTC 2013

Modified Files:
othersrc/external/bsd/multigest/bin: Makefile
othersrc/external/bsd/multigest/dist: libmultigest.3 main.c multigest.1
multigest.c multigest.h
Added Files:
othersrc/external/bsd/multigest/bin: 22.expected 23.expected

Log Message:
Also add an output format argument to multigest(1).

This can take one of three values:

+ digest (meaning print output in digest(1) format)
i.e. ALG (file) = digest

+ openssl (meaning print output in openssl(1) format), or
i.e. ALG(file)= digest

+ multigest (meaning output is in multigest format)
i.e. ALG (file) (substition) = digest

The default is multigest format.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/multigest/bin/22.expected \
othersrc/external/bsd/multigest/bin/23.expected
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/multigest/bin/Makefile
cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/multigest/dist/libmultigest.3 \
othersrc/external/bsd/multigest/dist/main.c \
othersrc/external/bsd/multigest/dist/multigest.c \
othersrc/external/bsd/multigest/dist/multigest.h
cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/multigest/dist/multigest.1

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

Modified files:

Index: othersrc/external/bsd/multigest/bin/Makefile
diff -u othersrc/external/bsd/multigest/bin/Makefile:1.3 othersrc/external/bsd/multigest/bin/Makefile:1.4
--- othersrc/external/bsd/multigest/bin/Makefile:1.3	Sun Aug 18 04:45:26 2013
+++ othersrc/external/bsd/multigest/bin/Makefile	Sun Aug 18 06:03:14 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2013/08/18 04:45:26 agc Exp $
+# $NetBSD: Makefile,v 1.4 2013/08/18 06:03:14 agc Exp $
 
 .include bsd.own.mk
 
@@ -88,3 +88,9 @@ t: ${PROG}
 	env LD_LIBRARY_PATH=${LIB_MULTIGEST_DIR} ./${PROG} -o 21.out -S, -a blake2,crc32c,md5,rmd160,sha1,sha256,sha3-224,sha3-256,sha3-384,sha3-512,sha512,size,tiger2,tiger,whirlpool -r 2.in
 	diff 21.expected 21.out
 	rm -f 21.out
+	env LD_LIBRARY_PATH=${LIB_MULTIGEST_DIR} ./${PROG} -o 22.out -Fopenssl -a blake2,crc32c,md5,rmd160,sha1,sha256,sha3-224,sha3-256,sha3-384,sha3-512,sha512,size,tiger2,tiger,whirlpool -r 2.in
+	diff 22.expected 22.out
+	rm -f 22.out
+	env LD_LIBRARY_PATH=${LIB_MULTIGEST_DIR} ./${PROG} -o 23.out -Fdigest -a blake2,crc32c,md5,rmd160,sha1,sha256,sha3-224,sha3-256,sha3-384,sha3-512,sha512,size,tiger2,tiger,whirlpool -r 2.in
+	diff 23.expected 23.out
+	rm -f 23.out

Index: othersrc/external/bsd/multigest/dist/libmultigest.3
diff -u othersrc/external/bsd/multigest/dist/libmultigest.3:1.4 othersrc/external/bsd/multigest/dist/libmultigest.3:1.5
--- othersrc/external/bsd/multigest/dist/libmultigest.3:1.4	Sun Aug 18 04:45:26 2013
+++ othersrc/external/bsd/multigest/dist/libmultigest.3	Sun Aug 18 06:03:14 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: libmultigest.3,v 1.4 2013/08/18 04:45:26 agc Exp $
+.\ $NetBSD: libmultigest.3,v 1.5 2013/08/18 06:03:14 agc Exp $
 .\
 .\ Copyright (c) 2013 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -78,7 +78,7 @@
 .Fo multigest_print_hex
 .Fa unsigned char *rawinput const char *algorithms
 .Fa const char *outname const char *filename const char *substregex
-.Fa const char *output_separator
+.Fa const char *output_separator const char *output_format
 .Fc
 .Sh DESCRIPTION
 .Nm
Index: othersrc/external/bsd/multigest/dist/main.c
diff -u othersrc/external/bsd/multigest/dist/main.c:1.4 othersrc/external/bsd/multigest/dist/main.c:1.5
--- othersrc/external/bsd/multigest/dist/main.c:1.4	Sun Aug 18 04:45:26 2013
+++ othersrc/external/bsd/multigest/dist/main.c	Sun Aug 18 06:03:14 2013
@@ -141,6 +141,7 @@ int
 main(int argc, char **argv)
 {
 	const char	*outname;
+	const char	*format;
 	const char	*check;
 	const char	*alg;
 	const char	*sub;
@@ -152,10 +153,14 @@ main(int argc, char **argv)
 	int		 i;
 
 	alg = sha1;
+	format = multigest;
 	sep = sub = outname = check = NULL;
 	from[0] = to[0] = 0x0;
-	while ((i = getopt(argc, argv, S:a:c:o:rs:)) != -1) {
+	while ((i = getopt(argc, argv, F:S:a:c:o:rs:)) != -1) {
 		switch(i) {
+		case 'F':
+			format = optarg;
+			break;
 		case 'S':
 			sep = optarg;
 			break;
@@ -185,7 +190,7 @@ main(int argc, char **argv)
 		}
 	} else if (optind == argc) {
 		if (do_input(alg, raw, from, to)) {
-			multigest_print_hex(raw, alg, outname, NULL, sub, sep);
+			multigest_print_hex(raw, alg, outname, NULL, sub, sep, format);
 		} else {
 			ok = 0;
 		}
@@ -194,7 +199,7 @@ main(int argc, char **argv)
 			if (multigest_file(alg, argv[i], raw, from, to) == NULL) {
 ok = 0;
 			} else {
-multigest_print_hex(raw, alg, outname, argv[i], sub, sep);
+multigest_print_hex(raw, alg, outname, argv[i], sub, sep, format);
 			}
 		}
 	}
Index: othersrc/external/bsd/multigest/dist/multigest.c
diff -u 

CVS commit: src/sys/arch/arm

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 06:29:29 UTC 2013

Modified Files:
src/sys/arch/arm/arm: blockio.S bus_space_asm_generic.S
bus_space_notimpl.S vectors.S
src/sys/arch/arm/arm32: bcopy_page.S setcpsr.S setstack.S
src/sys/arch/arm/mainbus: mainbus_io_asm.S

Log Message:
Move parts of cpu.h that are not needed by MI code in arm/locore.h
Don't include machine/cpu.h or machine/frame.h, use arm/locore.h
Use arm/asm.h instead of machine/arm.h


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm/blockio.S \
src/sys/arch/arm/arm/vectors.S
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/arm/bus_space_asm_generic.S
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/arm/bus_space_notimpl.S
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm32/bcopy_page.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/arm32/setcpsr.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/arm32/setstack.S
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/mainbus/mainbus_io_asm.S

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

Modified files:

Index: src/sys/arch/arm/arm/blockio.S
diff -u src/sys/arch/arm/arm/blockio.S:1.7 src/sys/arch/arm/arm/blockio.S:1.8
--- src/sys/arch/arm/arm/blockio.S:1.7	Sun Aug 11 03:09:41 2013
+++ src/sys/arch/arm/arm/blockio.S	Sun Aug 18 06:29:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: blockio.S,v 1.7 2013/08/11 03:09:41 matt Exp $	*/
+/*	$NetBSD: blockio.S,v 1.8 2013/08/18 06:29:29 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Ben Harris.
@@ -48,7 +48,7 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: blockio.S,v 1.7 2013/08/11 03:09:41 matt Exp $)
+RCSID($NetBSD: blockio.S,v 1.8 2013/08/18 06:29:29 matt Exp $)
 
 /*
  * Read bytes from an I/O address into a block of memory
@@ -101,6 +101,7 @@ ENTRY(read_multi_1)
 	ldrbgt	r3, [r0]
 	strbgt	r3, [r1], #1
 	ldmdb	fp, {fp, sp, pc}
+END(read_multi_1)
 
 /*
  * Write bytes to an I/O address from a block of memory
@@ -152,6 +153,7 @@ ENTRY(write_multi_1)
 	ldrbgt	r3, [r1], #1
 	strbgt	r3, [r0]
 	ldmdb	fp, {fp, sp, pc}
+END(write_multi_1)
 
 /*
  * Reads short ints (16 bits) from an I/O address into a block of memory
@@ -164,7 +166,7 @@ ENTRY(write_multi_1)
 ENTRY(insw)
 /* Make sure that we have a positive length */
 	cmp	r2, #0x
-	movle	pc, lr
+	RETc(le)
 
 /* If the destination address and the size is word aligned, do it fast */
 
@@ -182,7 +184,7 @@ ENTRY(insw)
 	strb	r3, [r1], #0x0001
 	bgt	.Linswloop
 
-	mov	pc, lr
+	RET
 
 /* Word aligned insw */
 
@@ -198,7 +200,8 @@ ENTRY(insw)
 	subs	r2, r2, #0x0002	/* Next */
 	bgt	.Lfastinswloop
 
-	mov	pc, lr
+	RET
+END(insw)
 
 
 /*
@@ -212,7 +215,7 @@ ENTRY(insw)
 ENTRY(outsw)
 /* Make sure that we have a positive length */
 	cmp	r2, #0x
-	movle	pc, lr
+	RETc(le)
 
 /* If the destination address and the size is word aligned, do it fast */
 
@@ -231,7 +234,7 @@ ENTRY(outsw)
 	str	r3, [r0]
 	bgt	.Loutswloop
 
-	mov	pc, lr
+	RET
 
 /* Word aligned outsw */
 
@@ -259,7 +262,8 @@ ENTRY(outsw)
 
 	bgt	.Lfastoutswloop
 
-	mov	pc, lr
+	RET
+END(outsw)
 
 /*
  * reads short ints (16 bits) from an I/O address into a block of memory
@@ -274,7 +278,7 @@ ENTRY(outsw)
 ENTRY(insw16)
 /* Make sure that we have a positive length */
 	cmp	r2, #0x
-	movle	pc, lr
+	RETc(le)
 
 /* If the destination address is word aligned and the size suitably
aligned, do it fast */
@@ -318,6 +322,7 @@ ENTRY(insw16)
 	bgt	.Linsw16loop
 
 	pop	{r4,r5,pc}		/* Restore regs and go home */
+END(insw16)
 
 
 /*
@@ -331,7 +336,7 @@ ENTRY(insw16)
 ENTRY(outsw16)
 /* Make sure that we have a positive length */
 	cmp	r2, #0x
-	movle	pc, lr
+	RETc(le)
 
 /* If the destination address is word aligned and the size suitably
aligned, do it fast */
@@ -385,6 +390,7 @@ ENTRY(outsw16)
 	bgt	.Loutsw16loop
 
 	pop	{r4,r5,pc}		/* and go home */
+END(outsw16)
 
 /*
  * reads short ints (16 bits) from an I/O address into a block of memory
@@ -400,7 +406,7 @@ ENTRY(outsw16)
 ENTRY(inswm8)
 /* Make sure that we have a positive length */
 	cmp	r2, #0x
-	movle	pc, lr
+	RETc(le)
 
 /* If the destination address is word aligned and the size suitably
aligned, do it fast */
@@ -481,6 +487,7 @@ ENTRY(inswm8)
 
 .Linswm8_l1:
 	pop	{r4-r9,pc}		/* And go home */
+END(inswm8)
 
 /*
  * write short ints (16 bits) to an I/O address from a block of memory
@@ -496,7 +503,7 @@ ENTRY(inswm8)
 ENTRY(outswm8)
 /* Make sure that we have a positive length */
 	cmp	r2, #0x
-	movle	pc, lr
+	RETc(le)
 
 /* If the destination address is word aligned and the size suitably
aligned, do it fast */
@@ -585,3 +592,4 @@ ENTRY(outswm8)
 
 .Loutswm8_l1:
 	pop	{r4-r8,pc}		/* And go home */
+END(outswm8)
Index: src/sys/arch/arm/arm/vectors.S
diff -u src/sys/arch/arm/arm/vectors.S:1.7 src/sys/arch/arm/arm/vectors.S:1.8
--- src/sys/arch/arm/arm/vectors.S:1.7	Wed Jun 12 21:34:12 2013
+++ src/sys/arch/arm/arm/vectors.S	Sun Aug 18 06:29:29 

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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 06:32:15 UTC 2013

Modified Files:
src/sys/arch/arm/arm32: cpuswitch.S

Log Message:
Move parts of cpu.h that are not needed by MI code in arm/locore.h
Don't include machine/cpu.h or machine/frame.h, use arm/locore.h
Use arm/asm.h instead of machine/arm.h


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/arm/arm32/cpuswitch.S

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

Modified files:

Index: src/sys/arch/arm/arm32/cpuswitch.S
diff -u src/sys/arch/arm/arm32/cpuswitch.S:1.78 src/sys/arch/arm/arm32/cpuswitch.S:1.79
--- src/sys/arch/arm/arm32/cpuswitch.S:1.78	Sun Aug 18 06:28:18 2013
+++ src/sys/arch/arm/arm32/cpuswitch.S	Sun Aug 18 06:32:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuswitch.S,v 1.78 2013/08/18 06:28:18 matt Exp $	*/
+/*	$NetBSD: cpuswitch.S,v 1.79 2013/08/18 06:32:15 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -84,11 +84,10 @@
 #include opt_lockdebug.h
 
 #include assym.h
-#include machine/asm.h
-#include machine/cpu.h
-#include machine/frame.h
+#include arm/asm.h
+#include arm/locore.h
 
-	RCSID($NetBSD: cpuswitch.S,v 1.78 2013/08/18 06:28:18 matt Exp $)
+	RCSID($NetBSD: cpuswitch.S,v 1.79 2013/08/18 06:32:15 matt Exp $)
 
 /* LINTSTUB: include sys/param.h */
 	



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 06:34:02 UTC 2013

Modified Files:
src/sys/arch/evbarm/beagle: beagle_start.S

Log Message:
Add END(beagle_start)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/beagle/beagle_start.S

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

Modified files:

Index: src/sys/arch/evbarm/beagle/beagle_start.S
diff -u src/sys/arch/evbarm/beagle/beagle_start.S:1.17 src/sys/arch/evbarm/beagle/beagle_start.S:1.18
--- src/sys/arch/evbarm/beagle/beagle_start.S:1.17	Tue Jun 18 15:28:36 2013
+++ src/sys/arch/evbarm/beagle/beagle_start.S	Sun Aug 18 06:34:02 2013
@@ -99,7 +99,7 @@
 #include arm/cortex/a9tmr_reg.h
 #endif
 
-RCSID($NetBSD: beagle_start.S,v 1.17 2013/06/18 15:28:36 matt Exp $)
+RCSID($NetBSD: beagle_start.S,v 1.18 2013/08/18 06:34:02 matt Exp $)
 
 #if defined(VERBOSE_INIT_ARM)
 #define	XPUTC(n)	mov r0, n; bl xputc
@@ -242,3 +242,5 @@ _C_LABEL(beagle_start):
 
 	/* end of table */
 	MMU_INIT(0, 0, 0, 0)
+
+END(_C_LABEL(beagle_start))



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 06:37:02 UTC 2013

Modified Files:
src/sys/arch/arm/include/arm32: frame.h

Log Message:
Use blx ip if _ARM_ARCH_5
prepare to get of switchframe


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/include/arm32/frame.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/arm32/frame.h
diff -u src/sys/arch/arm/include/arm32/frame.h:1.35 src/sys/arch/arm/include/arm32/frame.h:1.36
--- src/sys/arch/arm/include/arm32/frame.h:1.35	Sun Oct 21 15:46:00 2012
+++ src/sys/arch/arm/include/arm32/frame.h	Sun Aug 18 06:37:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.35 2012/10/21 15:46:00 matt Exp $	*/
+/*	$NetBSD: frame.h,v 1.36 2013/08/18 06:37:02 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -51,14 +51,6 @@
 #ifndef _LOCORE
 
 /*
- * System stack frames.
- */
-
-struct clockframe {
-	struct trapframe cf_tf;
-};
-
-/*
  * Switch frame.
  *
  * Should be a multiple of 8 bytes for dumpsys.
@@ -74,6 +66,14 @@ struct switchframe {
 };
  
 /*
+ * System stack frames.
+ */
+
+struct clockframe {
+	struct trapframe cf_tf;
+};
+
+/*
  * Stack frame. Used during stack traces (db_trace.c)
  */
 struct frame {
@@ -96,16 +96,33 @@ void validate_trapframe(trapframe_t *, i
 #include opt_arm_debug.h
 #include opt_cputypes.h
 
-#include machine/cpu.h
+#include arm/locore.h
 
 /*
  * This macro is used by DO_AST_AND_RESTORE_ALIGNMENT_FAULTS to process
  * any pending softints.
  */
+#ifdef _ARM_ARCH_4T
+#define	B_CF_CONTROL(rX)		;\
+	ldr	ip, [rX, #CF_CONTROL]	/* get function addr */		;\
+	bx	ip			/* branch to cpu_control */
+#else
+#define	B_CF_CONTROL(rX)		;\
+	ldr	pc, [rX, #CF_CONTROL]	/* branch to cpu_control */
+#endif
+#ifdef _ARM_ARCH_5T
+#define	BL_CF_CONTROL(rX)		;\
+	ldr	ip, [rX, #CF_CONTROL]	/* get function addr */		;\
+	blx	ip			/* call cpu_control */
+#else
+#define	BL_CF_CONTROL(rX)		;\
+	mov	lr, pc			;\
+	ldr	pc, [rX, #CF_CONTROL]	/* call cpu_control */
+#endif
 #if defined(__HAVE_FAST_SOFTINTS)  !defined(__HAVE_PIC_FAST_SOFTINTS)
 #define	DO_PENDING_SOFTINTS		\
 	ldr	r0, [r4, #CI_INTR_DEPTH]/* Get current intr depth */	;\
-	teq	r0, #0			/* Test for 0. */		;\
+	cmp	r0, #0			/* Test for 0. */		;\
 	bne	10f			/*   skip softints if != 0 */	;\
 	ldr	r0, [r4, #CI_CPL]	/* Get current priority level */;\
 	ldr	r1, [r4, #CI_SOFTINTS]	/* Get pending softint mask */	;\
@@ -183,8 +200,7 @@ void validate_trapframe(trapframe_t *, i
 	ldr	r2, .Laflt_cpufuncs	;\
 	ldr	r1, [r4, #CI_CTRL]	/* Fetch control register */	;\
 	mov	r0, #-1			;\
-	mov	lr, pc			;\
-	ldr	pc, [r2, #CF_CONTROL]	/* Enable alignment faults */	;\
+	BL_CF_CONTROL(r2)		/* Enable alignment faults */	;\
 1:	KERNEL_LOCK
 
 /*
@@ -211,7 +227,7 @@ void validate_trapframe(trapframe_t *, i
 	mov	r0, #-1			;\
 	bic	r1, r1, #CPU_CONTROL_AFLT_ENABLE  /* Disable AFLTs */	;\
 	adr	lr, 3f			;\
-	ldr	pc, [r2, #CF_CONTROL]	/* Set new CTRL reg value */	;\
+	B_CF_CONTROL(r2)		/* Set new CTRL reg value */	;\
 	/* NOTREACHED */		\
 2:	mov	r1, #0x		;\
 	str	r1, [r4, #CI_ASTPENDING] /* Clear astpending */		;\
@@ -352,6 +368,43 @@ LOCK_CAS_DEBUG_LOCALS
 	str	r0, [sp, #(-TF_R4)]!	/* Push the CPSR on the stack */
 
 /*
+ * Push a trapframe to be used by cpu_switchto
+ */
+#define PUSHSWITCHFRAME(rX)		\
+	mov	ip, sp;			\
+	sub	sp, sp, #(TRAPFRAMESIZE-TF_R12); /* Adjust the stack pointer */ \
+	push	{r4-r11};		/* Push the callee saved registers */ \
+	sub	sp, sp, #TF_R4;		/* reserve rest of trapframe */	\
+	str	ip, [sp, #TF_SVC_SP];	\
+	str	lr, [sp, #TF_SVC_LR];	\
+	str	lr, [sp, #TF_PC];	\
+	mrs	rX, cpsr_all;		/* Get the CPSR */		\
+	str	rX, [sp, #TF_SPSR]	/* save in trapframe */
+
+#define PUSHSWITCHFRAME1		   \
+	mov	ip, sp;			   \
+	sub	sp, sp, #(TRAPFRAMESIZE-TF_R8); /* Adjust the stack pointer */ \
+	push	{r4-r7};		/* Push some of the callee saved registers */ \
+	sub	sp, sp, #TF_R4;		/* reserve rest of trapframe */	\
+	str	ip, [sp, #TF_SVC_SP];	\
+	str	lr, [sp, #TF_SVC_LR];	\
+	str	lr, [sp, #TF_PC]
+
+#if defined(_ARM_ARCH_DWORD_OK)  __ARM_EABI__
+#define	PUSHSWITCHFRAME2		\
+	strd	r10, [sp, #TF_R10];	/* save r10  r11 */		\
+	strd	r8, [sp, #TF_R8];	/* save r8  r9 */		\
+	mrs	r0, cpsr_all;		/* Get the CPSR */		\
+	str	r0, [sp, #TF_SPSR]	/* save in trapframe */
+#else
+#define	PUSHSWITCHFRAME2		\
+	add	r0, sp, #TF_R8;		/* get ptr to r8 and above */	\
+	stmia	r0, {r8-r11};		/* save rest of registers */	\
+	mrs	r0, cpsr_all;		/* Get the CPSR */		\
+	str	r0, [sp, #TF_SPSR]	/* save in trapframe */
+#endif
+
+/*
  * PULLFRAME - macro to pull a trap frame from the stack in the current mode
  * Since the current mode is used, the SVC lr field is ignored.
  */
@@ -371,6 +424,15 @@ LOCK_CAS_DEBUG_LOCALS
  	ldr	lr, [sp], #4		/* Pop the return address */
 
 /*
+ 

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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 06:46:04 UTC 2013

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

Log Message:
There are only 16 faults.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/arm/include/cpu.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/cpu.h
diff -u src/sys/arch/arm/include/cpu.h:1.76 src/sys/arch/arm/include/cpu.h:1.77
--- src/sys/arch/arm/include/cpu.h:1.76	Sun Aug 18 06:28:18 2013
+++ src/sys/arch/arm/include/cpu.h	Sun Aug 18 06:46:04 2013
@@ -154,7 +154,7 @@ struct cpu_info {
 	register_t ci_undefsave[3];
 	uint32_t ci_vfp_id;
 	uint64_t ci_lastintr;
-	struct evcnt ci_abt_evs[FAULT_TYPE_MASK+1];
+	struct evcnt ci_abt_evs[16];
 #if defined(MP_CPU_INFO_MEMBERS)
 	MP_CPU_INFO_MEMBERS
 #endif



CVS commit: src/sys/arch

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 06:50:31 UTC 2013

Modified Files:
src/sys/arch/arm/arm: compat_13_machdep.c compat_16_machdep.c cpufunc.c
src/sys/arch/arm/arm32: pmap.c
src/sys/arch/cats/cats: cats_machdep.c

Log Message:
Include arm/locore.h


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/arm/compat_13_machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/arm/compat_16_machdep.c
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/arm/arm/cpufunc.c
cvs rdiff -u -r1.262 -r1.263 src/sys/arch/arm/arm32/pmap.c
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/cats/cats/cats_machdep.c

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

Modified files:

Index: src/sys/arch/arm/arm/compat_13_machdep.c
diff -u src/sys/arch/arm/arm/compat_13_machdep.c:1.17 src/sys/arch/arm/arm/compat_13_machdep.c:1.18
--- src/sys/arch/arm/arm/compat_13_machdep.c:1.17	Thu Aug 16 17:35:01 2012
+++ src/sys/arch/arm/arm/compat_13_machdep.c	Sun Aug 18 06:50:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_13_machdep.c,v 1.17 2012/08/16 17:35:01 matt Exp $	*/
+/*	$NetBSD: compat_13_machdep.c,v 1.18 2013/08/18 06:50:31 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -38,7 +38,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: compat_13_machdep.c,v 1.17 2012/08/16 17:35:01 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat_13_machdep.c,v 1.18 2013/08/18 06:50:31 matt Exp $);
 
 #include sys/systm.h
 #include sys/signalvar.h
@@ -50,6 +50,8 @@ __KERNEL_RCSID(0, $NetBSD: compat_13_ma
 #include compat/sys/signal.h
 #include compat/sys/signalvar.h
 
+#include arm/locore.h
+
 int
 compat_13_sys_sigreturn(struct lwp *l, const struct compat_13_sys_sigreturn_args *uap, register_t *retval)
 {

Index: src/sys/arch/arm/arm/compat_16_machdep.c
diff -u src/sys/arch/arm/arm/compat_16_machdep.c:1.16 src/sys/arch/arm/arm/compat_16_machdep.c:1.17
--- src/sys/arch/arm/arm/compat_16_machdep.c:1.16	Thu Aug 16 17:35:01 2012
+++ src/sys/arch/arm/arm/compat_16_machdep.c	Sun Aug 18 06:50:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_16_machdep.c,v 1.16 2012/08/16 17:35:01 matt Exp $	*/
+/*	$NetBSD: compat_16_machdep.c,v 1.17 2013/08/18 06:50:31 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: compat_16_machdep.c,v 1.16 2012/08/16 17:35:01 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat_16_machdep.c,v 1.17 2013/08/18 06:50:31 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -59,6 +59,7 @@ __KERNEL_RCSID(0, $NetBSD: compat_16_ma
 #include sys/ucontext.h
 
 #include arm/armreg.h
+#include arm/locore.h
 
 #include machine/cpu.h
 #include machine/frame.h

Index: src/sys/arch/arm/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.123 src/sys/arch/arm/arm/cpufunc.c:1.124
--- src/sys/arch/arm/arm/cpufunc.c:1.123	Tue Jun 18 15:27:05 2013
+++ src/sys/arch/arm/arm/cpufunc.c	Sun Aug 18 06:50:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.123 2013/06/18 15:27:05 matt Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.124 2013/08/18 06:50:31 matt Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.123 2013/06/18 15:27:05 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.124 2013/08/18 06:50:31 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_cpuoptions.h
@@ -67,6 +67,7 @@ __KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 
 
 #include arm/cpuconf.h
 #include arm/cpufunc.h
+#include arm/locore.h
 
 #ifdef CPU_XSCALE_80200
 #include arm/xscale/i80200reg.h

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.262 src/sys/arch/arm/arm32/pmap.c:1.263
--- src/sys/arch/arm/arm32/pmap.c:1.262	Wed Jul  3 21:37:35 2013
+++ src/sys/arch/arm/arm32/pmap.c	Sun Aug 18 06:50:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.262 2013/07/03 21:37:35 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.263 2013/08/18 06:50:31 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -202,17 +202,14 @@
 #include sys/cdefs.h
 #include sys/cpu.h
 #include sys/sysctl.h
+#include sys/bus.h
 
 #include uvm/uvm.h
 
-#include sys/bus.h
-#include machine/pmap.h
-#include machine/pcb.h
-#include machine/param.h
-#include arm/cpuconf.h
+#include arm/locore.h
 #include arm/arm32/katelib.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.262 2013/07/03 21:37:35 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.263 2013/08/18 06:50:31 matt Exp $);
 
 #ifdef PMAP_DEBUG
 

Index: src/sys/arch/cats/cats/cats_machdep.c
diff -u src/sys/arch/cats/cats/cats_machdep.c:1.76 src/sys/arch/cats/cats/cats_machdep.c:1.77
--- src/sys/arch/cats/cats/cats_machdep.c:1.76	Sat Oct 13 17:58:55 2012
+++ src/sys/arch/cats/cats/cats_machdep.c	Sun Aug 18 06:50:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cats_machdep.c,v 1.76 2012/10/13 17:58:55 jdc Exp $	*/
+/*	$NetBSD: 

CVS commit: src/sys

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 07:01:45 UTC 2013

Modified Files:
src/sys/arch/arm/arm: linux_syscall.c
src/sys/arch/shark/ofw: ofw.c
src/sys/arch/shark/shark: shark_machdep.c
src/sys/compat/linux/arch/arm: linux_machdep.c

Log Message:
Use arm/locore.h


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/arm/linux_syscall.c
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/shark/ofw/ofw.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/shark/shark/shark_machdep.c
cvs rdiff -u -r1.30 -r1.31 src/sys/compat/linux/arch/arm/linux_machdep.c

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

Modified files:

Index: src/sys/arch/arm/arm/linux_syscall.c
diff -u src/sys/arch/arm/arm/linux_syscall.c:1.24 src/sys/arch/arm/arm/linux_syscall.c:1.25
--- src/sys/arch/arm/arm/linux_syscall.c:1.24	Mon Nov 12 18:00:35 2012
+++ src/sys/arch/arm/arm/linux_syscall.c	Sun Aug 18 07:01:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_syscall.c,v 1.24 2012/11/12 18:00:35 skrll Exp $	*/
+/*	$NetBSD: linux_syscall.c,v 1.25 2013/08/18 07:01:45 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.24 2012/11/12 18:00:35 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_syscall.c,v 1.25 2013/08/18 07:01:45 matt Exp $);
 
 #include sys/device.h
 #include sys/errno.h
@@ -78,13 +78,12 @@ __KERNEL_RCSID(0, $NetBSD: linux_syscal
 #include sys/signalvar.h
 #include sys/systm.h
 #include sys/syscallvar.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 
-#include machine/cpu.h
-#include machine/frame.h
-#include machine/pcb.h
 #include arm/swi.h
+#include arm/locore.h
 
 #include compat/linux/common/linux_errno.h
 #include compat/linux/linux_syscall.h

Index: src/sys/arch/shark/ofw/ofw.c
diff -u src/sys/arch/shark/ofw/ofw.c:1.60 src/sys/arch/shark/ofw/ofw.c:1.61
--- src/sys/arch/shark/ofw/ofw.c:1.60	Sat Sep 22 00:33:41 2012
+++ src/sys/arch/shark/ofw/ofw.c	Sun Aug 18 07:01:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw.c,v 1.60 2012/09/22 00:33:41 matt Exp $	*/
+/*	$NetBSD: ofw.c,v 1.61 2013/08/18 07:01:45 matt Exp $	*/
 
 /*
  * Copyright 1997
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ofw.c,v 1.60 2012/09/22 00:33:41 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ofw.c,v 1.61 2013/08/18 07:01:45 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -49,6 +49,8 @@ __KERNEL_RCSID(0, $NetBSD: ofw.c,v 1.60
 #include sys/kernel.h
 #include sys/reboot.h
 #include sys/mbuf.h
+#include sys/cpu.h
+#include sys/intr.h
 
 #include uvm/uvm.h
 
@@ -56,10 +58,10 @@ __KERNEL_RCSID(0, $NetBSD: ofw.c,v 1.60
 
 #define	_ARM32_BUS_DMA_PRIVATE
 #include sys/bus.h
-#include machine/frame.h
+
+#include arm/locore.h
+
 #include machine/bootconfig.h
-#include machine/cpu.h
-#include machine/intr.h
 #include machine/irqhandler.h
 
 #include dev/ofw/openfirm.h

Index: src/sys/arch/shark/shark/shark_machdep.c
diff -u src/sys/arch/shark/shark/shark_machdep.c:1.40 src/sys/arch/shark/shark/shark_machdep.c:1.41
--- src/sys/arch/shark/shark/shark_machdep.c:1.40	Sun Jul 29 00:07:06 2012
+++ src/sys/arch/shark/shark/shark_machdep.c	Sun Aug 18 07:01:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: shark_machdep.c,v 1.40 2012/07/29 00:07:06 matt Exp $	*/
+/*	$NetBSD: shark_machdep.c,v 1.41 2013/08/18 07:01:45 matt Exp $	*/
 
 /*
  * Copyright 1997
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: shark_machdep.c,v 1.40 2012/07/29 00:07:06 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: shark_machdep.c,v 1.41 2013/08/18 07:01:45 matt Exp $);
 
 #include opt_ddb.h
 #include opt_modular.h
@@ -53,30 +53,29 @@ __KERNEL_RCSID(0, $NetBSD: shark_machde
 #include sys/exec.h
 #include sys/ksyms.h
 #include sys/device.h
+#include sys/cpu.h
+#include sys/intr.h
 
 #include uvm/uvm_extern.h
 
-#include arm/fiq.h
-
 #include dev/cons.h
+#include dev/ofw/openfirm.h
+#include dev/isa/isavar.h
+#include dev/ofisa/ofisavar.h
 
 #include machine/db_machdep.h
 #include ddb/db_sym.h
 #include ddb/db_extern.h
 
-#include machine/frame.h
-#include machine/bootconfig.h
-#include machine/cpu.h
-#include machine/intr.h
-#include machine/pio.h
-#include arm/arm32/machdep.h
+#include arm/fiq.h
+#include arm/locore.h
 #include arm/undefined.h
+#include arm/arm32/machdep.h
 
-#include dev/ofw/openfirm.h
+#include machine/bootconfig.h
+#include machine/pio.h
 #include machine/ofw.h
 #include machine/isa_machdep.h
-#include dev/isa/isavar.h
-#include dev/ofisa/ofisavar.h
 #include shark/shark/sequoia.h
 
 #include isadma.h

Index: src/sys/compat/linux/arch/arm/linux_machdep.c
diff -u src/sys/compat/linux/arch/arm/linux_machdep.c:1.30 src/sys/compat/linux/arch/arm/linux_machdep.c:1.31
--- src/sys/compat/linux/arch/arm/linux_machdep.c:1.30	Thu Aug 16 16:41:53 2012
+++ src/sys/compat/linux/arch/arm/linux_machdep.c	Sun Aug 18 

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

2013-08-18 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Sun Aug 18 07:09:06 UTC 2013

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

Log Message:
Sort options. Consistency. Serial comma. Describe -F instead of -S twice :)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 othersrc/external/bsd/multigest/dist/multigest.1

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

Modified files:

Index: othersrc/external/bsd/multigest/dist/multigest.1
diff -u othersrc/external/bsd/multigest/dist/multigest.1:1.6 othersrc/external/bsd/multigest/dist/multigest.1:1.7
--- othersrc/external/bsd/multigest/dist/multigest.1:1.6	Sun Aug 18 06:03:14 2013
+++ othersrc/external/bsd/multigest/dist/multigest.1	Sun Aug 18 07:09:06 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: multigest.1,v 1.6 2013/08/18 06:03:14 agc Exp $
+.\ $NetBSD: multigest.1,v 1.7 2013/08/18 07:09:06 wiz Exp $
 .\
 .\ Copyright (c) 2013 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -32,11 +32,11 @@
 .Sh SYNOPSIS
 .Nm
 .Fl r
-.Op Fl F Ar output-format
-.Op Fl S Ar output-separator
 .Op Fl a Ar algorithms
 .Op Fl c Ar digestfile
+.Op Fl F Ar output-format
 .Op Fl o Ar output
+.Op Fl S Ar output-separator
 .Op Fl s Ar /regex/replacement/
 .Op file ...
 .Sh DESCRIPTION
@@ -63,23 +63,20 @@ library.
 .Pp
 The following options are available:
 .Bl -tag -width XregexXreplacementXYYY
-.It Fl S Ar output-separator
+.It Fl a Ar algorithms
+specify a comma-separated list of algorithms to be calculated
+.It Fl c Ar stored-digest-file
+check, or verify, a file containing previously-generated digests
+.It Fl F Ar output-format
 print the output in the format requested.
 Possible values are
 .Dq openssl ,
-.Dq digest
+.Dq digest ,
 and
 .Dq multigest .
 The default is
 .Dq multigest
 which means that any replacement text is printed in a separate field.
-.It Fl S Ar output-separator
-separate each individual digest on output with the provided string.
-The output separator defaults to the null string, i.e. no separator.
-.It Fl a Ar algorithms
-specifies a comma-separated list of algorithms to be calculated
-.It Fl c Ar stored-digest-file
-check, or verify, a file containing previously-generated digests
 .It Fl o Ar output-file
 write the calculated digests to the output file
 .It Fl r
@@ -87,6 +84,9 @@ shorthand for input substitution for the
 .Dq Id
 and
 .Dq NetBSD
+.It Fl S Ar output-separator
+separate each individual digest on output with the provided string.
+The output separator defaults to the null string, i.e. no separator.
 .It Fl s Ar /regex/replacement/
 before calculating digests, run the following transformation on the input
 to normalise any input.



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 07:15:31 UTC 2013

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

Log Message:
Don't use cfi ops in non EABI MCOUNT


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/include/profile.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/profile.h
diff -u src/sys/arch/arm/include/profile.h:1.10 src/sys/arch/arm/include/profile.h:1.11
--- src/sys/arch/arm/include/profile.h:1.10	Fri Aug 16 21:42:48 2013
+++ src/sys/arch/arm/include/profile.h	Sun Aug 18 07:15:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.10 2013/08/16 21:42:48 matt Exp $	*/
+/*	$NetBSD: profile.h,v 1.11 2013/08/18 07:15:31 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Ben Harris
@@ -47,27 +47,18 @@
 #define	PLTSYM
 #endif
 
-#if !defined(__thumb__)  !defined(__ARM_EABI__)
+#if !defined(__ARM_EABI__)
 #define	MCOUNT\
 	__asm(.text);			\
 	__asm(.align	0);		\
+	__asm(.arm);			\
 	__asm(.type	 MCOUNT_ASM_NAME ,%function);		\
 	__asm(.global	 MCOUNT_ASM_NAME);\
 	__asm(MCOUNT_ASM_NAME :);	\
-	__asm(.cfi_startproc);	\
-	__asm(.fnstart);		\
 	/*\
 	 * Preserve registers that are trashed during mcount		\
 	 */\
 	__asm(push	{r0-r3, ip, lr});\
-	__asm(.save {r0-r3, ip, lr});	\
-	__asm(.cfi_def_cfa_offset 24);\
-	__asm(.cfi_offset 14, -4);	\
-	__asm(.cfi_offset 12, -8);	\
-	__asm(.cfi_offset 3, -12);	\
-	__asm(.cfi_offset 2, -16);	\
-	__asm(.cfi_offset 1, -20);	\
-	__asm(.cfi_offset 0, -24);	\
 	/* Check what mode we're in.  EQ = 32, NE = 26 */		\
 	__asm(teq	r0, r0);	\
 	__asm(teq	pc, r15);	\
@@ -92,16 +83,14 @@
 	 * Restore registers that were trashed during mcount		\
 	 */\
 	__asm(pop	{r0-r3, pc});	\
-	__asm(.cfi_endproc);		\
-	__asm(.fnend);		\
 	__asm(.size	 MCOUNT_ASM_NAME , .- MCOUNT_ASM_NAME);
 #else
 #define	MCOUNT\
 	__asm(.text);			\
 	__asm(.align	0);		\
+	__asm(.arm);			\
 	__asm(.type	 MCOUNT_ASM_NAME ,%function);		\
 	__asm(.global	 MCOUNT_ASM_NAME);\
-	__asm(.arm);			\
 	__asm(MCOUNT_ASM_NAME :);	\
 	__asm(.fnstart);		\
 	__asm(.cfi_startproc);	\



CVS commit: src/sys/sys

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 07:36:13 UTC 2013

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

Log Message:
Expose SOFTINT_COUNT for _KMEMUSER


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/sys/intr.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/intr.h
diff -u src/sys/sys/intr.h:1.13 src/sys/sys/intr.h:1.14
--- src/sys/sys/intr.h:1.13	Sat Aug 17 20:20:18 2013
+++ src/sys/sys/intr.h	Sun Aug 18 07:36:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.13 2013/08/17 20:20:18 matt Exp $	*/
+/*	$NetBSD: intr.h,v 1.14 2013/08/18 07:36:13 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -86,8 +86,10 @@ extern u_int	softint_timing;
 #define	splclock()	splsched()
 #define	splserial()	splhigh()
 
-#endif	/* _KERNEL */
-
 #include machine/intr.h
 
+#elif defined(_KMEMUSER)
+#define	SOFTINT_COUNT	0x0004
+#endif	/* _KERNEL */
+
 #endif	/* _SYS_INTR_H_ */



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 07:36:39 UTC 2013

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

Log Message:
If _KMEMUSER, include sys/intr.h


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/arm/include/cpu.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/cpu.h
diff -u src/sys/arch/arm/include/cpu.h:1.77 src/sys/arch/arm/include/cpu.h:1.78
--- src/sys/arch/arm/include/cpu.h:1.77	Sun Aug 18 06:46:04 2013
+++ src/sys/arch/arm/include/cpu.h	Sun Aug 18 07:36:39 2013
@@ -128,6 +128,9 @@ static inline int curcpl(void);
 static inline void set_curcpl(int);
 static inline void cpu_dosoftints(void);
 
+#ifdef _KMEMUSER
+#include sys/intr.h
+#endif
 #include sys/cpu_data.h
 #include sys/device_if.h
 #include sys/evcnt.h



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 07:55:28 UTC 2013

Modified Files:
src/sys/arch/arm/arm32: genassym.cf

Log Message:
include arm/locore.h


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/arm/arm32/genassym.cf

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

Modified files:

Index: src/sys/arch/arm/arm32/genassym.cf
diff -u src/sys/arch/arm/arm32/genassym.cf:1.64 src/sys/arch/arm/arm32/genassym.cf:1.65
--- src/sys/arch/arm/arm32/genassym.cf:1.64	Sun Aug 18 04:52:19 2013
+++ src/sys/arch/arm/arm32/genassym.cf	Sun Aug 18 07:55:28 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.64 2013/08/18 04:52:19 matt Exp $
+#	$NetBSD: genassym.cf,v 1.65 2013/08/18 07:55:28 matt Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -47,10 +47,10 @@ include uvm/uvm_extern.h
 
 include arm/fiq.h
 include arm/vfpreg.h
+include arm/locore.h
 
 include arm/arm32/pte.h
 include machine/pmap.h
-include machine/frame.h
 include machine/pcb.h
 include machine/vmparam.h
 



CVS commit: src/sys/arch/arm

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 07:57:27 UTC 2013

Modified Files:
src/sys/arch/arm/arm: cpufunc.c
src/sys/arch/arm/include: locore.h

Log Message:
Add a CPU_IS_ARMV7_P() macro (nonv7 evals to false, v7 only true, otherwise
cpu_armv7_p is checked (and is set by cpuconf for cortex and pj4b).


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/arm/arm/cpufunc.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/include/locore.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/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.124 src/sys/arch/arm/arm/cpufunc.c:1.125
--- src/sys/arch/arm/arm/cpufunc.c:1.124	Sun Aug 18 06:50:31 2013
+++ src/sys/arch/arm/arm/cpufunc.c	Sun Aug 18 07:57:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.124 2013/08/18 06:50:31 matt Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.125 2013/08/18 07:57:27 matt Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.124 2013/08/18 06:50:31 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.125 2013/08/18 07:57:27 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_cpuoptions.h
@@ -92,6 +92,10 @@ __KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 
 struct arm_pmc_funcs *arm_pmc;
 #endif
 
+#if defined(CPU_ARMV7)  (defined(CPU_ARMV6) || defined(CPU_PRE_ARMV6))
+bool cpu_armv7_p;
+#endif
+
 /* PRIMARY CACHE VARIABLES */
 #if (ARM_MMU_V6 + ARM_MMU_V7) != 0
 u_int	arm_cache_prefer_mask;
@@ -2062,6 +2066,9 @@ set_cpufuncs(void)
 	if (CPU_ID_CORTEX_P(cputype)) {
 		cpufuncs = cortex_cpufuncs;
 		cpu_do_powersave = 1;			/* Enable powersave */
+#if defined(CPU_ARMV6) || defined(CPU_PRE_ARMV6)
+		cpu_armv7_p = true;
+#endif
 		get_cachetype_cp15();
 		pmap_pte_init_armv7();
 		if (arm_cache_prefer_mask)
@@ -2083,6 +2090,9 @@ set_cpufuncs(void)
 	cputype == CPU_ID_ARM_88SV581X_V7) 
 	(armreg_pfr0_read()  ARM_PFR0_THUMBEE_MASK)) {
 			cpufuncs = pj4bv7_cpufuncs;
+#if defined(CPU_ARMV6) || defined(CPU_PRE_ARMV6)
+			cpu_armv7_p = true;
+#endif
 			get_cachetype_cp15();
 			pmap_pte_init_armv7();
 			return 0;

Index: src/sys/arch/arm/include/locore.h
diff -u src/sys/arch/arm/include/locore.h:1.1 src/sys/arch/arm/include/locore.h:1.2
--- src/sys/arch/arm/include/locore.h:1.1	Sun Aug 18 04:32:40 2013
+++ src/sys/arch/arm/include/locore.h	Sun Aug 18 07:57:26 2013
@@ -48,17 +48,16 @@
 #ifndef _ARM_LOCORE_H_
 #define _ARM_LOCORE_H_
 
+#ifdef _KERNEL_OPT
+#include opt_cpuoptions.h
+#include opt_cputypes.h
+#endif
+
 #include arm/cpuconf.h
 #include arm/armreg.h
 
 #include machine/frame.h
 
-#ifndef _LOCORE
-/* 1 == use cpu_sleep(), 0 == don't */
-extern int cpu_do_powersave;
-extern int cpu_fpu_present;
-#endif
-
 #ifdef _LOCORE
 
 #if defined(_ARM_ARCH_6)
@@ -104,10 +103,6 @@ extern int cpu_fpu_present;
 #define IRQenable set_r15(R15_IRQ_DISABLE, 0);
 #endif
 
-#endif /* !_LOCORE */
-
-#ifndef _LOCORE
-
 /*
  * Validate a PC or PSR for a user process.  Used by various system calls
  * that take a context passed by the user and restore it.
@@ -150,6 +145,19 @@ void	arm32_vector_init(vaddr_t, int);
 void	cpu_attach(device_t, cpuid_t);
 #endif
 
+/* 1 == use cpu_sleep(), 0 == don't */
+extern int cpu_do_powersave;
+extern int cpu_fpu_present;
+
+#if !defined(CPU_ARMV7)
+#define	CPU_IS_ARMV7_P()		false
+#elif defined(CPU_ARMV6) || defined(CPU_PRE_ARMV6)
+extern bool cpu_armv7_p;
+#define	CPU_IS_ARMV7_P()		(cpu_armv7_p)
+#else
+#define	CPU_IS_ARMV7_P()		true
+#endif
+
 /*
  * Random cruft
  */



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

2013-08-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Aug 18 07:57:29 UTC 2013

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

Log Message:
Only add in __aeabi_read_tp.S when building for earm.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 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.21 src/lib/libc/arch/arm/Makefile.inc:1.22
--- src/lib/libc/arch/arm/Makefile.inc:1.21	Tue Apr 30 01:42:03 2013
+++ src/lib/libc/arch/arm/Makefile.inc	Sun Aug 18 07:57:29 2013
@@ -1,12 +1,13 @@
-# $NetBSD: Makefile.inc,v 1.21 2013/04/30 01:42:03 matt Exp $
+# $NetBSD: Makefile.inc,v 1.22 2013/08/18 07:57:29 skrll Exp $
 
 .include bsd.own.mk
 
-SRCS+=	__aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S
+SRCS+=	__sigaction14_sigtramp.c __sigtramp2.S
 
 CPPFLAGS += -I.
 
 .if !empty(LIBC_MACHINE_ARCH:Mearm*)
+SRCS+=	__aeabi_read_tp.S
 SRCS+=	__aeabi_ldivmod.S __aeabi_uldivmod.S
 SRCS+=	__aeabi_lcmp.c __aeabi_ulcmp.c
 SRCS+=	fixunsgen_ieee754.c fixunssfsi_ieee754.c



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 08:08:15 UTC 2013

Modified Files:
src/sys/arch/arm/arm: undefined.c

Log Message:
Properly recognize Thumb2 instructions.
(a thumb2 FP programs correctly runs now).


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/arm/arm/undefined.c

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

Modified files:

Index: src/sys/arch/arm/arm/undefined.c
diff -u src/sys/arch/arm/arm/undefined.c:1.49 src/sys/arch/arm/arm/undefined.c:1.50
--- src/sys/arch/arm/arm/undefined.c:1.49	Sun Aug 18 06:28:18 2013
+++ src/sys/arch/arm/arm/undefined.c	Sun Aug 18 08:08:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: undefined.c,v 1.49 2013/08/18 06:28:18 matt Exp $	*/
+/*	$NetBSD: undefined.c,v 1.50 2013/08/18 08:08:15 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Ben Harris.
@@ -54,7 +54,7 @@
 #include sys/kgdb.h
 #endif
 
-__KERNEL_RCSID(0, $NetBSD: undefined.c,v 1.49 2013/08/18 06:28:18 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: undefined.c,v 1.50 2013/08/18 08:08:15 matt Exp $);
 
 #include sys/kmem.h
 #include sys/queue.h
@@ -303,7 +303,7 @@ undefinedinstruction(trapframe_t *frame)
 
 #ifdef THUMB_CODE
 	if (frame-tf_spsr  PSR_T_bit) {
-		const uint16_t *pc = (const uint16_t *)(fault_pc  ~1);
+		const uint16_t * const pc = (const uint16_t *)(fault_pc  ~1);
 		fault_instruction = pc[0];
 #if defined(__ARMEB__)  defined(_ARM_ARCH_7)
 		fault_instruction = le16toh(fault_instruction);
@@ -353,7 +353,7 @@ undefinedinstruction(trapframe_t *frame)
 	curcpu()-ci_data.cpu_ntrap++;
 
 #ifdef THUMB_CODE
-	if (frame-tf_spsr  PSR_T_bit) {
+	if ((frame-tf_spsr  PSR_T_bit)  !CPU_IS_ARMV7_P()) {
 		coprocessor = THUMB_UNKNOWN_HANDLER;
 	}
 	else
@@ -372,10 +372,15 @@ undefinedinstruction(trapframe_t *frame)
 		 */
 
 		if ((fault_instruction  (1  27)) != 0
-		 (fault_instruction  0xf000) != 0xf000)
+		 (fault_instruction  0xf000) != 0xf000) {
 			coprocessor = (fault_instruction  8)  0x0f;
-		else
+#ifdef THUMB_CODE
+		} else if ((frame-tf_spsr  PSR_T_bit)  !CPU_IS_ARMV7_P()) {
+			coprocessor = THUMB_UNKNOWN_HANDLER;
+#endif
+		} else {
 			coprocessor = CORE_UNKNOWN_HANDLER;
+		}
 	}
 
 	if (user) {



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

2013-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 09:31:38 UTC 2013

Modified Files:
src/sys/arch/sparc64/include: psl.h

Log Message:
Remove ancient spl* variants no longer used


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/sparc64/include/psl.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/sparc64/include/psl.h
diff -u src/sys/arch/sparc64/include/psl.h:1.52 src/sys/arch/sparc64/include/psl.h:1.53
--- src/sys/arch/sparc64/include/psl.h:1.52	Fri Nov  9 10:05:59 2012
+++ src/sys/arch/sparc64/include/psl.h	Sun Aug 18 09:31:38 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.52 2012/11/09 10:05:59 nakayama Exp $ */
+/*	$NetBSD: psl.h,v 1.53 2013/08/18 09:31:38 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -486,21 +486,7 @@ SPLHOLD(splfdsoft, PIL_FDSOFT)
  */
 SPLHOLD(splvm, PIL_VM)
 
-/* fd hardware interrupts are at level 11 */
-SPLHOLD(splfd, PIL_FD)
-
-/* zs hardware interrupts are at level 12 */
-SPLHOLD(splzs, PIL_SER)
-SPLHOLD(splserial, PIL_SER)
-
-/* audio hardware interrupts are at level 13 */
-SPLHOLD(splaudio, PIL_AUD)
-
-/* second sparc timer interrupts at level 14 */
-SPLHOLD(splstatclock, PIL_STATCLOCK)
-
 SPLHOLD(splsched, PIL_SCHED)
-SPLHOLD(spllock, PIL_LOCK)
 
 SPLHOLD(splhigh, PIL_HIGH)
 



CVS commit: src/lib/libc/net

2013-08-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug 18 09:57:16 UTC 2013

Modified Files:
src/lib/libc/net: gethnamaddr.c

Log Message:
appease lint.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/lib/libc/net/gethnamaddr.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/net/gethnamaddr.c
diff -u src/lib/libc/net/gethnamaddr.c:1.80 src/lib/libc/net/gethnamaddr.c:1.81
--- src/lib/libc/net/gethnamaddr.c:1.80	Fri Aug 16 11:27:12 2013
+++ src/lib/libc/net/gethnamaddr.c	Sun Aug 18 05:57:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: gethnamaddr.c,v 1.80 2013/08/16 15:27:12 christos Exp $	*/
+/*	$NetBSD: gethnamaddr.c,v 1.81 2013/08/18 09:57:16 christos Exp $	*/
 
 /*
  * ++Copyright++ 1985, 1988, 1993
@@ -57,7 +57,7 @@
 static char sccsid[] = @(#)gethostnamadr.c	8.1 (Berkeley) 6/4/93;
 static char rcsid[] = Id: gethnamaddr.c,v 8.21 1997/06/01 20:34:37 vixie Exp ;
 #else
-__RCSID($NetBSD: gethnamaddr.c,v 1.80 2013/08/16 15:27:12 christos Exp $);
+__RCSID($NetBSD: gethnamaddr.c,v 1.81 2013/08/18 09:57:16 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1030,7 +1030,7 @@ _hf_gethtbyaddr(void *rv, void *cb_data,
 	}
 	while ((hp = gethostent_r(hf, info-hp, info-buf, info-buflen,
 	info-he)) != NULL)
-		if (!memcmp(hp-h_addr_list[0], addr, hp-h_length))
+		if (!memcmp(hp-h_addr_list[0], addr, (size_t)hp-h_length))
 			break;
 	endhostent_r(hf);
 



CVS commit: src/lib/libc/net

2013-08-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug 18 10:00:58 UTC 2013

Modified Files:
src/lib/libc/net: getnameinfo.3

Log Message:
getnameinfo is now thread-safe so remove bugs section.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/lib/libc/net/getnameinfo.3

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/net/getnameinfo.3
diff -u src/lib/libc/net/getnameinfo.3:1.39 src/lib/libc/net/getnameinfo.3:1.40
--- src/lib/libc/net/getnameinfo.3:1.39	Wed Sep 26 19:13:00 2012
+++ src/lib/libc/net/getnameinfo.3	Sun Aug 18 06:00:57 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: getnameinfo.3,v 1.39 2012/09/26 23:13:00 christos Exp $
+.\	$NetBSD: getnameinfo.3,v 1.40 2013/08/18 10:00:57 christos Exp $
 .\	$KAME: getnameinfo.3,v 1.37 2005/01/05 03:23:05 itojun Exp $
 .\	$OpenBSD: getnameinfo.3,v 1.36 2004/12/21 09:48:20 jmc Exp $
 .\
@@ -17,7 +17,7 @@
 .\ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 .\ PERFORMANCE OF THIS SOFTWARE.
 .\
-.Dd September 26, 2012
+.Dd August 18, 2013
 .Dt GETNAMEINFO 3
 .Os
 .Sh NAME
@@ -263,10 +263,6 @@ if (error == 0) {
 	NULL, 0, NI_NUMERICHOST);
 }
 .Ed
-.Sh BUGS
-The implementation of
-.Fn getnameinfo
-is not thread-safe.
 .\.Pp
 .\.Ox
 .\intentionally uses a different



CVS commit: src/lib/libc/net

2013-08-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug 18 10:40:06 UTC 2013

Modified Files:
src/lib/libc/net: getnameinfo.3

Log Message:
Update comment.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/libc/net/getnameinfo.3

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/net/getnameinfo.3
diff -u src/lib/libc/net/getnameinfo.3:1.40 src/lib/libc/net/getnameinfo.3:1.41
--- src/lib/libc/net/getnameinfo.3:1.40	Sun Aug 18 10:00:57 2013
+++ src/lib/libc/net/getnameinfo.3	Sun Aug 18 10:40:06 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: getnameinfo.3,v 1.40 2013/08/18 10:00:57 christos Exp $
+.\	$NetBSD: getnameinfo.3,v 1.41 2013/08/18 10:40:06 wiz Exp $
 .\	$KAME: getnameinfo.3,v 1.37 2005/01/05 03:23:05 itojun Exp $
 .\	$OpenBSD: getnameinfo.3,v 1.36 2004/12/21 09:48:20 jmc Exp $
 .\
@@ -263,7 +263,7 @@ if (error == 0) {
 	NULL, 0, NI_NUMERICHOST);
 }
 .Ed
-.\.Pp
+.\.Sh BUGS
 .\.Ox
 .\intentionally uses a different
 .\.Dv NI_MAXHOST



CVS commit: src/sys/arch

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 15:58:21 UTC 2013

Modified Files:
src/sys/arch/arm/arm: cpu_in_cksum.S
src/sys/arch/arm/at91: at91bus.c
src/sys/arch/arm/ep93xx: ep93xx_intr.c
src/sys/arch/arm/gemini: gemini_pci.c
src/sys/arch/arm/include: cpu.h
src/sys/arch/arm/ixp12x0: ixp12x0_intr.c ixp12x0_pci.c
src/sys/arch/arm/omap: omap_intr.h
src/sys/arch/arm/s3c2xx0: s3c2800_pci.c
src/sys/arch/arm/xscale: becc_pci.c i80312_pci.c i80321_pci.c
src/sys/arch/evbarm/adi_brh: brh_machdep.c
src/sys/arch/evbarm/armadillo: armadillo9_machdep.c
src/sys/arch/evbarm/g42xxeb: g42xxeb_machdep.c
src/sys/arch/evbarm/gemini: gemini_machdep.c
src/sys/arch/evbarm/gumstix: gumstix_machdep.c gumstix_start.S
src/sys/arch/evbarm/hdl_g: hdlg_machdep.c
src/sys/arch/evbarm/ifpga: ifpgavar.h
src/sys/arch/evbarm/imx31: imx31lk_machdep.c
src/sys/arch/evbarm/integrator: integrator_machdep.c
src/sys/arch/evbarm/iq80310: iq80310_machdep.c
src/sys/arch/evbarm/iq80321: iq80321_machdep.c iq80321_pci.c
src/sys/arch/evbarm/ixdp425: ixdp425_machdep.c
src/sys/arch/evbarm/ixm1200: ixm1200_machdep.c
src/sys/arch/evbarm/lubbock: lubbock_machdep.c
src/sys/arch/evbarm/mpcsa: mpcsa_machdep.c
src/sys/arch/evbarm/netwalker: netwalker_machdep.c
src/sys/arch/evbarm/osk5912: osk5912_machdep.c
src/sys/arch/evbarm/smdk2xx0: smdk2410_machdep.c smdk2800_machdep.c
src/sys/arch/evbarm/tisdp24xx: sdp24xx_machdep.c
src/sys/arch/evbarm/tsarm: tsarm_machdep.c
src/sys/arch/evbarm/viper: viper_machdep.c

Log Message:
arm/locore.h fallout (fixes some include ordering errors)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/arm/cpu_in_cksum.S
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/at91/at91bus.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/ep93xx/ep93xx_intr.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/gemini/gemini_pci.c
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/arm/include/cpu.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/ixp12x0/ixp12x0_intr.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/ixp12x0/ixp12x0_pci.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/omap/omap_intr.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/s3c2xx0/s3c2800_pci.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/xscale/becc_pci.c \
src/sys/arch/arm/xscale/i80312_pci.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/xscale/i80321_pci.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/evbarm/adi_brh/brh_machdep.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/armadillo/armadillo9_machdep.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/gemini/gemini_machdep.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/evbarm/gumstix/gumstix_machdep.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/gumstix/gumstix_start.S
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/hdl_g/hdlg_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/ifpga/ifpgavar.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/imx31/imx31lk_machdep.c
cvs rdiff -u -r1.73 -r1.74 \
src/sys/arch/evbarm/integrator/integrator_machdep.c
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/evbarm/iq80310/iq80310_machdep.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/evbarm/iq80321/iq80321_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/iq80321/iq80321_pci.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbarm/ixdp425/ixdp425_machdep.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/lubbock/lubbock_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/mpcsa/mpcsa_machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/netwalker/netwalker_machdep.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/osk5912/osk5912_machdep.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/tisdp24xx/sdp24xx_machdep.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/tsarm/tsarm_machdep.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/evbarm/viper/viper_machdep.c

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

Modified files:

Index: src/sys/arch/arm/arm/cpu_in_cksum.S
diff -u src/sys/arch/arm/arm/cpu_in_cksum.S:1.5 src/sys/arch/arm/arm/cpu_in_cksum.S:1.6
--- src/sys/arch/arm/arm/cpu_in_cksum.S:1.5	Sun Aug 18 05:54:16 2013
+++ src/sys/arch/arm/arm/cpu_in_cksum.S	Sun Aug 18 15:58:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_in_cksum.S,v 1.5 2013/08/18 05:54:16 matt Exp $	*/
+/*	$NetBSD: cpu_in_cksum.S,v 1.6 2013/08/18 15:58:19 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include machine/asm.h
-RCSID($NetBSD: cpu_in_cksum.S,v 1.5 

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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 16:08:02 UTC 2013

Modified Files:
src/sys/arch/arm/arm: disassem.c

Log Message:
Don't include arm/locore.h, just arm/armreg.h


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/arm/disassem.c

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

Modified files:

Index: src/sys/arch/arm/arm/disassem.c
diff -u src/sys/arch/arm/arm/disassem.c:1.21 src/sys/arch/arm/arm/disassem.c:1.22
--- src/sys/arch/arm/arm/disassem.c:1.21	Fri Aug  9 07:11:39 2013
+++ src/sys/arch/arm/arm/disassem.c	Sun Aug 18 16:08:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: disassem.c,v 1.21 2013/08/09 07:11:39 matt Exp $	*/
+/*	$NetBSD: disassem.c,v 1.22 2013/08/18 16:08:02 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Mark Brinicombe.
@@ -49,13 +49,15 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: disassem.c,v 1.21 2013/08/09 07:11:39 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: disassem.c,v 1.22 2013/08/18 16:08:02 matt Exp $);
 
 #include sys/systm.h
+
 #include arch/arm/arm/disassem.h
+#include arm/armreg.h
+
 #ifndef _KERNEL
 #include stdio.h
-#include arm/armreg.h
 #endif
 
 /*



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 16:08:24 UTC 2013

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

Log Message:
Include arm/cpufunc.h if !_LOCORE


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/include/locore.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/locore.h
diff -u src/sys/arch/arm/include/locore.h:1.2 src/sys/arch/arm/include/locore.h:1.3
--- src/sys/arch/arm/include/locore.h:1.2	Sun Aug 18 07:57:26 2013
+++ src/sys/arch/arm/include/locore.h	Sun Aug 18 16:08:24 2013
@@ -95,6 +95,8 @@
 
 #else /* !_LOCORE */
 
+#include arm/cpufunc.h
+
 #ifdef __PROG32
 #define IRQdisable __set_cpsr_c(I32_bit, I32_bit);
 #define IRQenable __set_cpsr_c(I32_bit, 0);



CVS commit: src/sys/arch/acorn26

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 16:08:42 UTC 2013

Modified Files:
src/sys/arch/acorn26/acorn26: autoconf.c except.c start.c
src/sys/arch/acorn26/podulebus: podulebus.c

Log Message:
Fix arm/locore.h lossage.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/acorn26/acorn26/autoconf.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/acorn26/acorn26/except.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/acorn26/acorn26/start.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/acorn26/podulebus/podulebus.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/acorn26/acorn26/autoconf.c
diff -u src/sys/arch/acorn26/acorn26/autoconf.c:1.9 src/sys/arch/acorn26/acorn26/autoconf.c:1.10
--- src/sys/arch/acorn26/acorn26/autoconf.c:1.9	Sun Jul 29 18:05:39 2012
+++ src/sys/arch/acorn26/acorn26/autoconf.c	Sun Aug 18 16:08:42 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.9 2012/07/29 18:05:39 mlelstv Exp $ */
+/* $NetBSD: autoconf.c,v 1.10 2013/08/18 16:08:42 matt Exp $ */
 /*-
  * Copyright (c) 1998, 1999 Ben Harris
  * All rights reserved.
@@ -30,14 +30,16 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.9 2012/07/29 18:05:39 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.10 2013/08/18 16:08:42 matt Exp $);
 
 #include sys/param.h
 #include sys/conf.h
 #include sys/device.h
 #include sys/systm.h
+#include sys/intr.h
+
+#include arm/locore.h
 
-#include machine/intr.h
 #include machine/irq.h
 #include machine/machdep.h
 

Index: src/sys/arch/acorn26/acorn26/except.c
diff -u src/sys/arch/acorn26/acorn26/except.c:1.29 src/sys/arch/acorn26/acorn26/except.c:1.30
--- src/sys/arch/acorn26/acorn26/except.c:1.29	Thu Aug 16 17:35:01 2012
+++ src/sys/arch/acorn26/acorn26/except.c	Sun Aug 18 16:08:42 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: except.c,v 1.29 2012/08/16 17:35:01 matt Exp $ */
+/* $NetBSD: except.c,v 1.30 2013/08/18 16:08:42 matt Exp $ */
 /*-
  * Copyright (c) 1998, 1999, 2000 Ben Harris
  * All rights reserved.
@@ -31,7 +31,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: except.c,v 1.29 2012/08/16 17:35:01 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: except.c,v 1.30 2013/08/18 16:08:42 matt Exp $);
 
 #include opt_ddb.h
 
@@ -43,12 +43,12 @@ __KERNEL_RCSID(0, $NetBSD: except.c,v 1
 #include sys/cpu.h
 #include sys/lwp.h
 #include sys/proc.h
+#include sys/intr.h
 
 #include uvm/uvm_extern.h
 
-#include arm/armreg.h
-#include arm/cpuconf.h
-#include machine/intr.h
+#include arm/locore.h
+
 #include machine/machdep.h
 #include machine/pcb.h
 

Index: src/sys/arch/acorn26/acorn26/start.c
diff -u src/sys/arch/acorn26/acorn26/start.c:1.19 src/sys/arch/acorn26/acorn26/start.c:1.20
--- src/sys/arch/acorn26/acorn26/start.c:1.19	Thu Aug 16 18:15:10 2012
+++ src/sys/arch/acorn26/acorn26/start.c	Sun Aug 18 16:08:42 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: start.c,v 1.19 2012/08/16 18:15:10 matt Exp $ */
+/* $NetBSD: start.c,v 1.20 2013/08/18 16:08:42 matt Exp $ */
 /*-
  * Copyright (c) 1998, 2000 Ben Harris
  * All rights reserved.
@@ -31,7 +31,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: start.c,v 1.19 2012/08/16 18:15:10 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: start.c,v 1.20 2013/08/18 16:08:42 matt Exp $);
 
 #include opt_modular.h
 
@@ -43,7 +43,7 @@ __KERNEL_RCSID(0, $NetBSD: start.c,v 1.
 #include dev/i2c/i2cvar.h
 #include acorn26/ioc/iociicvar.h
 
-#include arm/armreg.h
+#include arm/locore.h
 #include arm/undefined.h
 #include machine/boot.h
 #include machine/machdep.h

Index: src/sys/arch/acorn26/podulebus/podulebus.c
diff -u src/sys/arch/acorn26/podulebus/podulebus.c:1.20 src/sys/arch/acorn26/podulebus/podulebus.c:1.21
--- src/sys/arch/acorn26/podulebus/podulebus.c:1.20	Fri May 11 15:39:18 2012
+++ src/sys/arch/acorn26/podulebus/podulebus.c	Sun Aug 18 16:08:42 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebus.c,v 1.20 2012/05/11 15:39:18 skrll Exp $ */
+/* $NetBSD: podulebus.c,v 1.21 2013/08/18 16:08:42 matt Exp $ */
 
 /*-
  * Copyright (c) 2000 Ben Harris
@@ -28,15 +28,17 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: podulebus.c,v 1.20 2012/05/11 15:39:18 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: podulebus.c,v 1.21 2013/08/18 16:08:42 matt Exp $);
 
 #include sys/param.h
 #include sys/device.h
 #include sys/malloc.h
 #include sys/systm.h
 #include sys/bus.h
+#include sys/intr.h
+
+#include arm/locore.h
 
-#include machine/intr.h
 #include machine/irq.h
 #include machine/machdep.h
 #include machine/memcreg.h



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 16:09:50 UTC 2013

Modified Files:
src/sys/arch/arm/iomd: iomd_fiq.S

Log Message:
Fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/iomd/iomd_fiq.S

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

Modified files:

Index: src/sys/arch/arm/iomd/iomd_fiq.S
diff -u src/sys/arch/arm/iomd/iomd_fiq.S:1.4 src/sys/arch/arm/iomd/iomd_fiq.S:1.5
--- src/sys/arch/arm/iomd/iomd_fiq.S:1.4	Sun Aug 18 06:28:18 2013
+++ src/sys/arch/arm/iomd/iomd_fiq.S	Sun Aug 18 16:09:50 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: iomd_fiq.S,v 1.4 2013/08/18 06:28:18 matt Exp $	*/
+/*	$NetBSD: iomd_fiq.S,v 1.5 2013/08/18 16:09:50 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -76,7 +76,7 @@ ENTRY_NP(floppy_read_fiq)
 	bne	_C_LABEL(floppy_read_fiq)
 #endif
 	subs	pc, lr, #0x0004
-END(_floppy_read_fiq)
+END(floppy_read_fiq)
 
 	.global	_C_LABEL(floppy_read_fiq_end)
 _C_LABEL(floppy_read_fiq_end):



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

2013-08-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Aug 18 16:55:47 UTC 2013

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

Log Message:
Revert previous.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 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.22 src/lib/libc/arch/arm/Makefile.inc:1.23
--- src/lib/libc/arch/arm/Makefile.inc:1.22	Sun Aug 18 07:57:29 2013
+++ src/lib/libc/arch/arm/Makefile.inc	Sun Aug 18 16:55:47 2013
@@ -1,13 +1,12 @@
-# $NetBSD: Makefile.inc,v 1.22 2013/08/18 07:57:29 skrll Exp $
+# $NetBSD: Makefile.inc,v 1.23 2013/08/18 16:55:47 skrll Exp $
 
 .include bsd.own.mk
 
-SRCS+=	__sigaction14_sigtramp.c __sigtramp2.S
+SRCS+=	__aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S
 
 CPPFLAGS += -I.
 
 .if !empty(LIBC_MACHINE_ARCH:Mearm*)
-SRCS+=	__aeabi_read_tp.S
 SRCS+=	__aeabi_ldivmod.S __aeabi_uldivmod.S
 SRCS+=	__aeabi_lcmp.c __aeabi_ulcmp.c
 SRCS+=	fixunsgen_ieee754.c fixunssfsi_ieee754.c



CVS commit: othersrc/external/bsd/multigest

2013-08-18 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Sun Aug 18 18:40:27 UTC 2013

Modified Files:
othersrc/external/bsd/multigest/dist: md5c.c
othersrc/external/bsd/multigest/lib: Makefile

Log Message:
make sure the correct header files are picked up


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/multigest/dist/md5c.c
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/multigest/lib/Makefile

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

Modified files:

Index: othersrc/external/bsd/multigest/dist/md5c.c
diff -u othersrc/external/bsd/multigest/dist/md5c.c:1.1.1.1 othersrc/external/bsd/multigest/dist/md5c.c:1.2
--- othersrc/external/bsd/multigest/dist/md5c.c:1.1.1.1	Fri Aug 16 06:47:53 2013
+++ othersrc/external/bsd/multigest/dist/md5c.c	Sun Aug 18 18:40:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: md5c.c,v 1.1.1.1 2013/08/16 06:47:53 agc Exp $	*/
+/*	$NetBSD: md5c.c,v 1.2 2013/08/18 18:40:27 agc Exp $	*/
 
 /*
  * This file is derived from the RSA Data Security, Inc. MD5 Message-Digest
@@ -32,7 +32,7 @@
 #include assert.h
 #include inttypes.h
 #include string.h
-#include md5.h
+#include md5.h
 
 typedef unsigned char *POINTER;
 typedef uint16_t UINT2;

Index: othersrc/external/bsd/multigest/lib/Makefile
diff -u othersrc/external/bsd/multigest/lib/Makefile:1.1.1.1 othersrc/external/bsd/multigest/lib/Makefile:1.2
--- othersrc/external/bsd/multigest/lib/Makefile:1.1.1.1	Fri Aug 16 06:47:53 2013
+++ othersrc/external/bsd/multigest/lib/Makefile	Sun Aug 18 18:40:27 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2013/08/16 06:47:53 agc Exp $
+# $NetBSD: Makefile,v 1.2 2013/08/18 18:40:27 agc Exp $
 
 LIB=multigest
 
@@ -13,8 +13,6 @@ SRCS+= tiger.c
 SRCS+= whirlpool.c
 SRCS+= multigest.c
 
-CPPFLAGS+=-I${DIST}
-
 MAN=libmultigest.3
 
 WARNS=6



CVS commit: src

2013-08-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Aug 18 20:03:48 UTC 2013

Modified Files:
src/lib/libc/citrus: citrus_lc_ctype.c
src/lib/libc/locale: Makefile.inc global_locale.c multibyte.h
multibyte_amd1.c multibyte_c90.c nb_lc_messages_misc.h
nb_lc_monetary_misc.h nb_lc_numeric_misc.h nb_lc_template.h
nb_lc_template_decl.h nb_lc_time_misc.h runetable.c
runetype_local.h
src/sys/sys: localedef.h
Removed Files:
src/lib/libc/locale: _def_messages.c _def_monetary.c _def_numeric.c
_def_time.c

Log Message:
Rename fixup to update_global to better reflect the purpose.
Remove the various Current pointers, they are implementation internals
that shouldn't be leaked. Remove _CATEGORY_DEFAULT related handling and
directly pick the implemenation pointer from the C locale.
Merge the C locale data into global_locale.c with the exception of
_DefaultRuneLocale. Mark that one hidden. Move _RUNE_LOCALE and
_CITRUS_CTYPE into multibyte.h and pick up the correct rl_citrus_ctype
for non-default locales.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/citrus/citrus_lc_ctype.c
cvs rdiff -u -r1.63 -r1.64 src/lib/libc/locale/Makefile.inc
cvs rdiff -u -r1.6 -r0 src/lib/libc/locale/_def_messages.c \
src/lib/libc/locale/_def_numeric.c
cvs rdiff -u -r1.8 -r0 src/lib/libc/locale/_def_monetary.c
cvs rdiff -u -r1.11 -r0 src/lib/libc/locale/_def_time.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/locale/global_locale.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/locale/multibyte.h
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/locale/multibyte_amd1.c \
src/lib/libc/locale/runetype_local.h
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/locale/multibyte_c90.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/locale/nb_lc_messages_misc.h \
src/lib/libc/locale/nb_lc_monetary_misc.h \
src/lib/libc/locale/nb_lc_numeric_misc.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/locale/nb_lc_template.h
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/locale/nb_lc_template_decl.h
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/locale/nb_lc_time_misc.h
cvs rdiff -u -r1.28 -r1.29 src/lib/libc/locale/runetable.c
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/localedef.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/citrus/citrus_lc_ctype.c
diff -u src/lib/libc/citrus/citrus_lc_ctype.c:1.11 src/lib/libc/citrus/citrus_lc_ctype.c:1.12
--- src/lib/libc/citrus/citrus_lc_ctype.c:1.11	Sat Apr 13 10:21:20 2013
+++ src/lib/libc/citrus/citrus_lc_ctype.c	Sun Aug 18 20:03:48 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_lc_ctype.c,v 1.11 2013/04/13 10:21:20 joerg Exp $ */
+/* $NetBSD: citrus_lc_ctype.c,v 1.12 2013/08/18 20:03:48 joerg Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: citrus_lc_ctype.c,v 1.11 2013/04/13 10:21:20 joerg Exp $);
+__RCSID($NetBSD: citrus_lc_ctype.c,v 1.12 2013/08/18 20:03:48 joerg Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include reentrant.h
@@ -115,7 +115,7 @@ _PREFIX(build_cache)(struct _locale_cach
 }
 
 static __inline void
-_PREFIX(fixup)(_RuneLocale *data)
+_PREFIX(update_global)(_RuneLocale *data)
 {
 	_DIAGASSERT(data != NULL);
 
@@ -123,7 +123,6 @@ _PREFIX(fixup)(_RuneLocale *data)
 	_ctype_tab_ = data-rl_ctype_tab;
 	_tolower_tab_ = data-rl_tolower_tab;
 	_toupper_tab_ = data-rl_toupper_tab;
-	_CurrentRuneLocale = data;
 
 #ifdef __BUILD_LEGACY
 	_ctype_ = data-rl_compat_bsdctype;
@@ -135,6 +134,5 @@ _PREFIX(fixup)(_RuneLocale *data)
  */
 #define _CATEGORY_ID		LC_CTYPE
 #define _CATEGORY_NAME		LC_CTYPE
-#define _CATEGORY_DEFAULT	_DefaultRuneLocale
 
 #include nb_lc_template.h

Index: src/lib/libc/locale/Makefile.inc
diff -u src/lib/libc/locale/Makefile.inc:1.63 src/lib/libc/locale/Makefile.inc:1.64
--- src/lib/libc/locale/Makefile.inc:1.63	Fri May 17 12:55:57 2013
+++ src/lib/libc/locale/Makefile.inc	Sun Aug 18 20:03:48 2013
@@ -1,11 +1,10 @@
 #	from: @(#)Makefile.inc	5.1 (Berkeley) 2/18/91
-#	$NetBSD: Makefile.inc,v 1.63 2013/05/17 12:55:57 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.64 2013/08/18 20:03:48 joerg Exp $
 
 # locale sources
 .PATH: ${ARCHDIR}/locale ${.CURDIR}/locale
 
-SRCS+=	_def_messages.c _def_monetary.c _def_numeric.c _def_time.c \
-	setlocale.c __mb_cur_max.c \
+SRCS+=	setlocale.c __mb_cur_max.c \
 	duplocale.c global_locale.c fix_grouping.c \
 	freelocale.c localeconv.c newlocale.c nl_langinfo.c \
 	generic_lc_all.c dummy_lc_collate.c \

Index: src/lib/libc/locale/global_locale.c
diff -u src/lib/libc/locale/global_locale.c:1.17 src/lib/libc/locale/global_locale.c:1.18
--- src/lib/libc/locale/global_locale.c:1.17	Fri May 17 12:55:57 2013
+++ src/lib/libc/locale/global_locale.c	Sun Aug 18 20:03:48 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: global_locale.c,v 1.17 2013/05/17 12:55:57 joerg Exp $ */
+/* $NetBSD: global_locale.c,v 1.18 

CVS commit: src/tools/compat

2013-08-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Aug 18 20:48:17 UTC 2013

Modified Files:
src/tools/compat: compat_defs.h

Log Message:
Support __format_arg.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/tools/compat/compat_defs.h

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

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.91 src/tools/compat/compat_defs.h:1.92
--- src/tools/compat/compat_defs.h:1.91	Tue Aug  6 21:58:46 2013
+++ src/tools/compat/compat_defs.h	Sun Aug 18 20:48:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.91 2013/08/06 21:58:46 apb Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.92 2013/08/18 20:48:17 joerg Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -125,6 +125,8 @@ struct group;
 #define __dead
 #undef __printflike
 #define __printflike(x,y)
+#undef __format_arg
+#define __format_arg(x)
 #undef __restrict
 #define __restrict
 #undef __unused



CVS commit: src/sys/arch

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 21:42:16 UTC 2013

Modified Files:
src/sys/arch/acorn32/acorn32: rpc_machdep.c
src/sys/arch/acorn32/eb7500atx: eb7500atx_machdep.c
src/sys/arch/netwinder/netwinder: netwinder_machdep.c
src/sys/arch/zaurus/zaurus: machdep.c

Log Message:
Fix more arm/locore.h lossage


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/acorn32/acorn32/rpc_machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c
cvs rdiff -u -r1.80 -r1.81 \
src/sys/arch/netwinder/netwinder/netwinder_machdep.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/zaurus/zaurus/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/acorn32/acorn32/rpc_machdep.c
diff -u src/sys/arch/acorn32/acorn32/rpc_machdep.c:1.86 src/sys/arch/acorn32/acorn32/rpc_machdep.c:1.87
--- src/sys/arch/acorn32/acorn32/rpc_machdep.c:1.86	Sat Sep 22 00:33:36 2012
+++ src/sys/arch/acorn32/acorn32/rpc_machdep.c	Sun Aug 18 21:42:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_machdep.c,v 1.86 2012/09/22 00:33:36 matt Exp $	*/
+/*	$NetBSD: rpc_machdep.c,v 1.87 2013/08/18 21:42:16 matt Exp $	*/
 
 /*
  * Copyright (c) 2000-2002 Reinoud Zandijk.
@@ -55,7 +55,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: rpc_machdep.c,v 1.86 2012/09/22 00:33:36 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: rpc_machdep.c,v 1.87 2013/08/18 21:42:16 matt Exp $);
 
 #include sys/systm.h
 #include sys/kernel.h
@@ -66,39 +66,38 @@ __KERNEL_RCSID(0, $NetBSD: rpc_machdep.
 #include sys/exec_aout.h
 #include sys/ksyms.h
 #include sys/bus.h
+#include sys/cpu.h
+#include sys/intr.h
+#include sys/device.h
 
 #include dev/cons.h
 
+#include dev/ic/pckbcvar.h
+
+#include dev/i2c/i2cvar.h
+#include dev/i2c/pcf8583var.h
+
 #include machine/db_machdep.h
 #include ddb/db_sym.h
 #include ddb/db_extern.h
 
 #include uvm/uvm.h
 
-#include machine/signal.h
-#include machine/frame.h
-#include machine/bootconfig.h
-#include machine/cpu.h
-#include machine/io.h
-#include machine/intr.h
-#include arm/cpuconf.h
+#include arm/locore.h
+#include arm/undefined.h
 #include arm/arm32/katelib.h
 #include arm/arm32/machdep.h
 #include arm/arm32/pmap.h
-#include arm/undefined.h
+
 #include machine/rtc.h
+#include machine/signal.h
+#include machine/bootconfig.h
+#include machine/io.h
 
 #include arm/iomd/vidc.h
 #include arm/iomd/iomdreg.h
 #include arm/iomd/iomdvar.h
-
 #include arm/iomd/vidcvideo.h
-
-#include sys/device.h
-#include dev/ic/pckbcvar.h
-
-#include dev/i2c/i2cvar.h
-#include dev/i2c/pcf8583var.h
 #include arm/iomd/iomdiicvar.h
 
 static i2c_tag_t acorn32_i2c_tag;

Index: src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c
diff -u src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c:1.25 src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c:1.26
--- src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c:1.25	Sat Sep 22 00:33:37 2012
+++ src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c	Sun Aug 18 21:42:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: eb7500atx_machdep.c,v 1.25 2012/09/22 00:33:37 matt Exp $	*/
+/*	$NetBSD: eb7500atx_machdep.c,v 1.26 2013/08/18 21:42:16 matt Exp $	*/
 
 /*
  * Copyright (c) 2000-2002 Reinoud Zandijk.
@@ -55,7 +55,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: eb7500atx_machdep.c,v 1.25 2012/09/22 00:33:37 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: eb7500atx_machdep.c,v 1.26 2013/08/18 21:42:16 matt Exp $);
 
 #include sys/systm.h
 #include sys/kernel.h
@@ -66,38 +66,37 @@ __KERNEL_RCSID(0, $NetBSD: eb7500atx_ma
 #include sys/exec_aout.h
 #include sys/ksyms.h
 #include sys/bus.h
+#include sys/cpu.h
+#include sys/intr.h
+#include sys/device.h
 
 #include dev/cons.h
 
+#include dev/ic/pckbcvar.h
+
+#include dev/i2c/i2cvar.h
+#include dev/i2c/pcf8583var.h
+
 #include machine/db_machdep.h
 #include ddb/db_sym.h
 #include ddb/db_extern.h
 
 #include uvm/uvm.h
 
+#include arm/locore.h
+#include arm/undefined.h
+
 #include machine/signal.h
-#include machine/frame.h
 #include machine/bootconfig.h
-#include machine/cpu.h
 #include machine/io.h
-#include machine/intr.h
-#include arm/cpuconf.h
 #include arm/arm32/katelib.h
 #include arm/arm32/machdep.h
-#include arm/undefined.h
 #include machine/rtc.h
 
 #include arm/iomd/vidc.h
 #include arm/iomd/iomdreg.h
 #include arm/iomd/iomdvar.h
-
 #include arm/iomd/vidcvideo.h
-
-#include sys/device.h
-#include dev/ic/pckbcvar.h
-
-#include dev/i2c/i2cvar.h
-#include dev/i2c/pcf8583var.h
 #include arm/iomd/iomdiicvar.h
 
 /* static i2c_tag_t acorn32_i2c_tag;*/

Index: src/sys/arch/netwinder/netwinder/netwinder_machdep.c
diff -u src/sys/arch/netwinder/netwinder/netwinder_machdep.c:1.80 src/sys/arch/netwinder/netwinder/netwinder_machdep.c:1.81
--- src/sys/arch/netwinder/netwinder/netwinder_machdep.c:1.80	Sat Oct 13 17:58:55 2012
+++ src/sys/arch/netwinder/netwinder/netwinder_machdep.c	Sun Aug 18 21:42:16 2013
@@ 

CVS commit: src/sys/arch/iyonix/iyonix

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 21:50:31 UTC 2013

Modified Files:
src/sys/arch/iyonix/iyonix: iyonix_machdep.c

Log Message:
Fix arm/locore.h lossage


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/iyonix/iyonix/iyonix_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/iyonix/iyonix/iyonix_machdep.c
diff -u src/sys/arch/iyonix/iyonix/iyonix_machdep.c:1.21 src/sys/arch/iyonix/iyonix/iyonix_machdep.c:1.22
--- src/sys/arch/iyonix/iyonix/iyonix_machdep.c:1.21	Sat Sep 22 00:33:41 2012
+++ src/sys/arch/iyonix/iyonix/iyonix_machdep.c	Sun Aug 18 21:50:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: iyonix_machdep.c,v 1.21 2012/09/22 00:33:41 matt Exp $	*/
+/*	$NetBSD: iyonix_machdep.c,v 1.22 2013/08/18 21:50:31 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iyonix_machdep.c,v 1.21 2012/09/22 00:33:41 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: iyonix_machdep.c,v 1.22 2013/08/18 21:50:31 matt Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -89,11 +89,16 @@ __KERNEL_RCSID(0, $NetBSD: iyonix_machd
 #include sys/reboot.h
 #include sys/termios.h
 #include sys/ksyms.h
+#include sys/bus.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 
 #include dev/cons.h
 
+#include dev/pci/ppbreg.h
+#include dev/ic/i8259reg.h
+
 #include net/if.h
 #include net/if_ether.h
 
@@ -102,9 +107,7 @@ __KERNEL_RCSID(0, $NetBSD: iyonix_machd
 #include ddb/db_extern.h
 
 #include acorn32/include/bootconfig.h
-#include sys/bus.h
-#include machine/cpu.h
-#include machine/frame.h
+#include arm/locore.h
 #include arm/undefined.h
 
 #include arm/arm32/machdep.h
@@ -115,9 +118,6 @@ __KERNEL_RCSID(0, $NetBSD: iyonix_machd
 #include iyonix/iyonix/iyonixreg.h
 #include iyonix/iyonix/obiovar.h
 
-#include dev/pci/ppbreg.h
-#include dev/ic/i8259reg.h
-
 #include ksyms.h
 
 #define	KERNEL_TEXT_BASE	KERNEL_BASE



CVS commit: src/sys/arch/epoc32/epoc32

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 21:57:01 UTC 2013

Modified Files:
src/sys/arch/epoc32/epoc32: intr.c machdep.c

Log Message:
Fix arm/locore.h lossage


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/epoc32/intr.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/epoc32/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/epoc32/epoc32/intr.c
diff -u src/sys/arch/epoc32/epoc32/intr.c:1.1 src/sys/arch/epoc32/epoc32/intr.c:1.2
--- src/sys/arch/epoc32/epoc32/intr.c:1.1	Sun Apr 28 12:11:26 2013
+++ src/sys/arch/epoc32/epoc32/intr.c	Sun Aug 18 21:57:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $	*/
+/*	$NetBSD: intr.c,v 1.2 2013/08/18 21:57:01 matt Exp $	*/
 /*
  * Copyright (c) 2012 KIYOHARA Takashi
  * All rights reserved.
@@ -26,11 +26,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.2 2013/08/18 21:57:01 matt Exp $);
 
 #include sys/systm.h
+#include sys/cpu.h
 
-#include machine/cpu.h
+#include arm/locore.h
 
 #include arm/pic/picvar.h
 

Index: src/sys/arch/epoc32/epoc32/machdep.c
diff -u src/sys/arch/epoc32/epoc32/machdep.c:1.2 src/sys/arch/epoc32/epoc32/machdep.c:1.3
--- src/sys/arch/epoc32/epoc32/machdep.c:1.2	Thu Jun 20 13:40:09 2013
+++ src/sys/arch/epoc32/epoc32/machdep.c	Sun Aug 18 21:57:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $	*/
+/*	$NetBSD: machdep.c,v 1.3 2013/08/18 21:57:01 matt Exp $	*/
 /*
  * Copyright (c) 2012, 2013 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.3 2013/08/18 21:57:01 matt Exp $);
 
 #include clpscom.h
 #include clpslcd.h
@@ -50,10 +50,13 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 
 #include uvm/uvm_extern.h
 
+#include dev/cons.h
+#include dev/md.h
+
+#include arm/locore.h
+#include arm/undefined.h
 #include arm/arm32/machdep.h
 #include arm/arm32/pmap.h
-#include arm/cpufunc.h
-#include arm/undefined.h
 
 #include machine/bootconfig.h
 #include machine/bootinfo.h
@@ -64,9 +67,6 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include epoc32/windermere/windermerereg.h
 #include epoc32/dev/epockbdvar.h
 
-#include dev/cons.h
-#include dev/md.h
-
 #include machine/db_machdep.h
 #include ddb/db_extern.h
 



CVS commit: src/sys/arch/hpcarm/hpcarm

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 22:26:51 UTC 2013

Modified Files:
src/sys/arch/hpcarm/hpcarm: hpc_machdep.c sa11x0_hpc_machdep.c

Log Message:
Fix arm/locore.h lossage


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/hpcarm/hpcarm/hpc_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_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/hpcarm/hpcarm/hpc_machdep.c
diff -u src/sys/arch/hpcarm/hpcarm/hpc_machdep.c:1.101 src/sys/arch/hpcarm/hpcarm/hpc_machdep.c:1.102
--- src/sys/arch/hpcarm/hpcarm/hpc_machdep.c:1.101	Sun Jul 29 00:07:06 2012
+++ src/sys/arch/hpcarm/hpcarm/hpc_machdep.c	Sun Aug 18 22:26:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: hpc_machdep.c,v 1.101 2012/07/29 00:07:06 matt Exp $	*/
+/*	$NetBSD: hpc_machdep.c,v 1.102 2013/08/18 22:26:51 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hpc_machdep.c,v 1.101 2012/07/29 00:07:06 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: hpc_machdep.c,v 1.102 2013/08/18 22:26:51 matt Exp $);
 
 #include opt_cputypes.h
 #include opt_kloader.h
@@ -54,10 +54,11 @@ __KERNEL_RCSID(0, $NetBSD: hpc_machdep.
 #include sys/mount.h
 #include sys/pmf.h
 #include sys/reboot.h
+#include sys/cpu.h
 
 #include uvm/uvm.h
 
-#include arm/cpufunc.h
+#include arm/locore.h
 
 #include machine/bootconfig.h
 #include machine/bootinfo.h

Index: src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c
diff -u src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c:1.7 src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c:1.8
--- src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c:1.7	Sat Sep 22 00:33:41 2012
+++ src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c	Sun Aug 18 22:26:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sa11x0_hpc_machdep.c,v 1.7 2012/09/22 00:33:41 matt Exp $	*/
+/*	$NetBSD: sa11x0_hpc_machdep.c,v 1.8 2013/08/18 22:26:51 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sa11x0_hpc_machdep.c,v 1.7 2012/09/22 00:33:41 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sa11x0_hpc_machdep.c,v 1.8 2013/08/18 22:26:51 matt Exp $);
 
 #include opt_ddb.h
 #include opt_dram_pages.h
@@ -60,6 +60,8 @@ __KERNEL_RCSID(0, $NetBSD: sa11x0_hpc_m
 #include sys/device.h
 #include sys/termios.h
 #include sys/bus.h
+#include sys/cpu.h
+#include sys/intr.h
 
 #if NKSYMS || defined(DDB) || defined(MODULAR)
 #include machine/db_machdep.h
@@ -76,14 +78,11 @@ __KERNEL_RCSID(0, $NetBSD: sa11x0_hpc_m
 
 #include arm/arm32/machdep.h
 #include arm/sa11x0/sa11x0_reg.h
-#include arm/cpuconf.h
+#include arm/locore.h
 #include arm/undefined.h
 
 #include machine/bootconfig.h
 #include machine/bootinfo.h
-#include machine/cpu.h
-#include machine/frame.h
-#include machine/intr.h
 #include machine/io.h
 #include machine/platid.h
 #include machine/platid_mask.h



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 18 23:14:27 UTC 2013

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

Log Message:
Fix CLKF_INTR for EABI to (void) its argument so it isn't mark unused by the
optimizer.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/arm/include/cpu.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/cpu.h
diff -u src/sys/arch/arm/include/cpu.h:1.79 src/sys/arch/arm/include/cpu.h:1.80
--- src/sys/arch/arm/include/cpu.h:1.79	Sun Aug 18 15:58:19 2013
+++ src/sys/arch/arm/include/cpu.h	Sun Aug 18 23:14:27 2013
@@ -104,7 +104,7 @@ extern int cpu_fpu_present;
 	((curcpu()-ci_intr_depth  1) ||			\
 	((cf)-cf_tf.tf_spsr  PSR_MODE) == PSR_UND32_MODE)
 #else
-#define CLKF_INTR(frame)	(curcpu()-ci_intr_depth  1) 
+#define CLKF_INTR(cf)	((void)(cf), curcpu()-ci_intr_depth  1) 
 #endif
 
 /*



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 00:35:07 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/atomic: atomic_cas_up.S

Log Message:
Thumbify


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/atomic/atomic_cas_up.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/atomic/atomic_cas_up.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_cas_up.S:1.3 src/common/lib/libc/arch/arm/atomic/atomic_cas_up.S:1.4
--- src/common/lib/libc/arch/arm/atomic/atomic_cas_up.S:1.3	Sat Aug 10 19:59:21 2013
+++ src/common/lib/libc/arch/arm/atomic/atomic_cas_up.S	Mon Aug 19 00:35:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_cas_up.S,v 1.3 2013/08/10 19:59:21 matt Exp $	*/
+/*	$NetBSD: atomic_cas_up.S,v 1.4 2013/08/19 00:35:06 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -35,10 +35,16 @@
 ENTRY(_atomic_cas_up)
 	.hidden	_C_LABEL(_atomic_cas_up)
 	mov	r3, r0
+	.align	0
 RAS_START_ASM_HIDDEN(_atomic_cas)
 	ldr	r0, [r3]
 	cmp	r0, r1
+#if defined(__thumb__)
+	beq	1f
+#else
 	streq	r2, [r3]
+#endif
+	.align	0
 RAS_END_ASM_HIDDEN(_atomic_cas)
-	RET
+1:	RET
 END(_atomic_cas_up)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 00:36:29 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strcat_arm.S

Log Message:
Add .cfi ops if EABI.
Thumbify.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strcat_arm.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/string/strcat_arm.S
diff -u src/common/lib/libc/arch/arm/string/strcat_arm.S:1.2 src/common/lib/libc/arch/arm/string/strcat_arm.S:1.3
--- src/common/lib/libc/arch/arm/string/strcat_arm.S:1.2	Tue Jan 15 04:48:14 2013
+++ src/common/lib/libc/arch/arm/string/strcat_arm.S	Mon Aug 19 00:36:29 2013
@@ -33,20 +33,33 @@
  * Implementation of strcat using strlen/strcpy.
  */
 ENTRY(strcat)
-	str	lr, [sp, #-8]!		/* save return address */
-	push	{r4, r5}		/* save registers */
+#ifdef __ARM_EABI__
+	.fnstart
+	.cfi_startproc
+#endif
+	push	{r3-r5, lr}		/* save registers */
+#ifdef __ARM_EABI__
+	.save	{r3-r5, lr}
+	.cfi_def_cfa_offset 16
+	.cfi_offset 14, -4
+	.cfi_offset 5, -8
+	.cfi_offset 4, -12
+	.cfi_offset 3, -16
+#endif
 
 	mov	r4, r0			/* save dst */
 	mov	r5, r1			/* save append */
 
 	bl	PLT_SYM(strlen)		/* find length of dst */
 
-	add	r0, r0, r4		/* add to dst pointer */
+	adds	r0, r0, r4		/* add to dst pointer */
 	mov	r1, r5			/* fetch append */
 	bl	PLT_SYM(strcpy)		/* append string */
 
 	mov	r0, r4			/* restore dst as return value */
-	pop	{r4, r5}		/* restore registers */
-	ldr	lr, [sp], #8		/* restore return address */
-	RET
+	pop	{r3-r5, pc}		/* restore registers */
+#ifdef __ARM_EABI__
+	.cfi_endproc
+	.fnend
+#endif
 END(strcat)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 00:56:12 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strcmp.S

Log Message:
Thumbify


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strcmp.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/string/strcmp.S
diff -u src/common/lib/libc/arch/arm/string/strcmp.S:1.1 src/common/lib/libc/arch/arm/string/strcmp.S:1.2
--- src/common/lib/libc/arch/arm/string/strcmp.S:1.1	Tue Dec 20 19:28:49 2005
+++ src/common/lib/libc/arch/arm/string/strcmp.S	Mon Aug 19 00:56:12 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: strcmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */
+/*  $NetBSD: strcmp.S,v 1.2 2013/08/19 00:56:12 matt Exp $ */
 
 /*
  * Copyright (c) 2002 ARM Ltd
@@ -30,14 +30,24 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: strcmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $)
+RCSID($NetBSD: strcmp.S,v 1.2 2013/08/19 00:56:12 matt Exp $)
 
 ENTRY(strcmp)
-1:
-	ldrb	r2, [r0], #1
+#if !defined(__thumb__)
+1:	ldrb	r2, [r0], #1
 	ldrb	r3, [r1], #1
 	cmp	r2, #1
 	cmpcs	r2, r3
+#else
+	subs	r1, r1, r0	/* this allows us to only one increment */
+1:	ldrb	r2, [r0]
+	ldrb	r3, [r1, r0]
+	adds	r0, r0, #1	/* increment */
+	cmp	r2, #1
+	bcc	2f
+	cmp	r2, r3
+#endif
 	beq	1b
-	sub	r0, r2, r3
+2:	subs	r0, r2, r3
 	RET
+END(strcmp)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 00:57:25 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strncmp.S

Log Message:
Thumbify


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strncmp.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/string/strncmp.S
diff -u src/common/lib/libc/arch/arm/string/strncmp.S:1.1 src/common/lib/libc/arch/arm/string/strncmp.S:1.2
--- src/common/lib/libc/arch/arm/string/strncmp.S:1.1	Tue Dec 20 19:28:49 2005
+++ src/common/lib/libc/arch/arm/string/strncmp.S	Mon Aug 19 00:57:25 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: strncmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */
+/*  $NetBSD: strncmp.S,v 1.2 2013/08/19 00:57:25 matt Exp $ */
 
 /*
  * Copyright (c) 2002 ARM Ltd
@@ -30,22 +30,48 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: strncmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $)
+RCSID($NetBSD: strncmp.S,v 1.2 2013/08/19 00:57:25 matt Exp $)
 
 ENTRY(strncmp)
 /* if ((len - 1)  0) return 0 */
 	subs	r2, r2, #1
+#ifdef __thumb__
+	bmi	5f
+#else
 	movmi	r0, #0
 	RETc(mi)
+#endif
 
 /* ip == last src address to compare */
+#ifdef __thumb__
+	adds	r3, r0, r2
+	mov	ip, r3
+	subs	r1, r1, r0
+#else
 	add	ip, r0, r2
+#endif
 1:
+#ifdef __thumb__
+	ldrb	r2, [r0]
+	ldrb	r3, [r1, r0]
+	adds	r0, r0, #1
+	cmp	ip, r0		/* exhausted length? */
+	bcc	4f		/*   yes, we're done */
+	cmp	r2, #1		/* NUL? */
+	bcc	4f		/*   yes, we're done */
+	cmp	r2, r3		/* different? */
+#else
 	ldrb	r2, [r0], #1
 	ldrb	r3, [r1], #1
 	cmp	ip, r0
 	cmpcs	r2, #1
 	cmpcs	r2, r3
+#endif
 	beq	1b
-	sub	r0, r2, r3
+4:	subs	r0, r2, r3
 	RET
+#ifdef __thumb__
+5:	movs	r0, #0
+	RET
+#endif
+END(strncmp)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 01:08:29 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strchr.S strlen.S strnlen.S
strrchr.S

Log Message:
For Thumb, use naive version


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strchr.S \
src/common/lib/libc/arch/arm/string/strlen.S \
src/common/lib/libc/arch/arm/string/strrchr.S
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strnlen.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/string/strchr.S
diff -u src/common/lib/libc/arch/arm/string/strchr.S:1.2 src/common/lib/libc/arch/arm/string/strchr.S:1.3
--- src/common/lib/libc/arch/arm/string/strchr.S:1.2	Wed Jan 23 07:45:46 2013
+++ src/common/lib/libc/arch/arm/string/strchr.S	Mon Aug 19 01:08:29 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: strchr.S,v 1.2 2013/01/23 07:45:46 matt Exp $ */
+/* $NetBSD: strchr.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */
 
 #include machine/asm.h
 
 STRONG_ALIAS(index, strchr)
 
-#if defined(_STANDALONE)
+#if defined(_STANDALONE) || defined(__thumb__)
 #include strchr_naive.S
 #else
 #include strchr_arm.S
Index: src/common/lib/libc/arch/arm/string/strlen.S
diff -u src/common/lib/libc/arch/arm/string/strlen.S:1.2 src/common/lib/libc/arch/arm/string/strlen.S:1.3
--- src/common/lib/libc/arch/arm/string/strlen.S:1.2	Tue Jan  8 13:21:05 2013
+++ src/common/lib/libc/arch/arm/string/strlen.S	Mon Aug 19 01:08:29 2013
@@ -1,6 +1,6 @@
-/* $NetBSD: strlen.S,v 1.2 2013/01/08 13:21:05 matt Exp $ */
+/* $NetBSD: strlen.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */
 
-#ifdef _STANDALONE
+#if defined(_STANDALONE) || defined(__thumb__)
 #include strlen_naive.S
 #else
 #include strlen_arm.S
Index: src/common/lib/libc/arch/arm/string/strrchr.S
diff -u src/common/lib/libc/arch/arm/string/strrchr.S:1.2 src/common/lib/libc/arch/arm/string/strrchr.S:1.3
--- src/common/lib/libc/arch/arm/string/strrchr.S:1.2	Wed Jan 23 07:45:46 2013
+++ src/common/lib/libc/arch/arm/string/strrchr.S	Mon Aug 19 01:08:29 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: strrchr.S,v 1.2 2013/01/23 07:45:46 matt Exp $ */
+/* $NetBSD: strrchr.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */
 
 #include machine/asm.h
 
 STRONG_ALIAS(rindex, strrchr)  
 
-#if defined(_STANDALONE)
+#if defined(_STANDALONE) || defined(__thumb__)
 #include strrchr_naive.S
 #else
 #include strrchr_arm.S

Index: src/common/lib/libc/arch/arm/string/strnlen.S
diff -u src/common/lib/libc/arch/arm/string/strnlen.S:1.1 src/common/lib/libc/arch/arm/string/strnlen.S:1.2
--- src/common/lib/libc/arch/arm/string/strnlen.S:1.1	Wed Jan 23 07:56:09 2013
+++ src/common/lib/libc/arch/arm/string/strnlen.S	Mon Aug 19 01:08:29 2013
@@ -1,8 +1,8 @@
-/* $NetBSD: strnlen.S,v 1.1 2013/01/23 07:56:09 matt Exp $ */
+/* $NetBSD: strnlen.S,v 1.2 2013/08/19 01:08:29 matt Exp $ */
 
 #define	STRNLEN
 
-#ifdef _STANDALONE
+#if defined(_STANDALONE) || defined(__thumb__)
 #include strlen_naive.S
 #else
 #include strlen_arm.S



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 01:08:53 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: memcpy_xscale.S

Log Message:
Add END(memcpy)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/memcpy_xscale.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/string/memcpy_xscale.S
diff -u src/common/lib/libc/arch/arm/string/memcpy_xscale.S:1.3 src/common/lib/libc/arch/arm/string/memcpy_xscale.S:1.4
--- src/common/lib/libc/arch/arm/string/memcpy_xscale.S:1.3	Sun Aug 11 04:56:32 2013
+++ src/common/lib/libc/arch/arm/string/memcpy_xscale.S	Mon Aug 19 01:08:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: memcpy_xscale.S,v 1.3 2013/08/11 04:56:32 matt Exp $	*/
+/*	$NetBSD: memcpy_xscale.S,v 1.4 2013/08/19 01:08:53 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -1890,4 +1890,5 @@ ENTRY(memcpy)
 	strh	r2, [r0, #0x09]
 	strb	r1, [r0, #0x0b]
 	RET
+END(memcpy)
 #endif	/* !_STANDALONE */



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 01:12:08 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strlcat_arm.S

Log Message:
Add .cfi for __ARM_EABI__
Thumbify


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlcat_arm.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/string/strlcat_arm.S
diff -u src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.1 src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.2
--- src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.1	Wed Jan 23 07:02:45 2013
+++ src/common/lib/libc/arch/arm/string/strlcat_arm.S	Mon Aug 19 01:12:08 2013
@@ -29,11 +29,23 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: strlcat_arm.S,v 1.1 2013/01/23 07:02:45 matt Exp $)
+RCSID($NetBSD: strlcat_arm.S,v 1.2 2013/08/19 01:12:08 matt Exp $)
 
 /* LINTSTUB: size_t strlcat(char *, const char *, size_t) */
 ENTRY(strlcat)
+#ifdef __ARM_EABI__
+	.fnstart
+	.cfi_startproc
+#endif
 	push	{r4-r6, lr}
+#ifdef __ARM_EABI__
+	.save	{r4-r6, lr}
+	.cfi_def_cfa_offset 16
+	.cfi_register 14, -4
+	.cfi_register 6, -8
+	.cfi_register 5, -12
+	.cfi_register 4, -16
+#endif
 	mov	r4, r0			/* save dst */
 	mov	r5, r1			/* save src */
 	mov	r6, r2			/* save siz */
@@ -41,12 +53,15 @@ ENTRY(strlcat)
 	mov	r1, r6			/* get siz */
 	bl	PLT_SYM(strnlen)	/* find length of dst (up to siz) */
 
-	sub	r2, r6, r0		/* get remaining space in dst */
+	subs	r2, r6, r0		/* get remaining space in dst */
 	mov	r1, r5			/* restore src */
 	mov	r5, r0			/* save remaining space */
-	add	r0, r0, r4		/* set start to end of dst */
+	adds	r0, r0, r4		/* set start to end of dst */
 	bl	PLT_SYM(strlcpy)	/* attempt to copy src */
-	add	r0, r0, r5		/* add remaining to strlcpy return */
-	pop	{r4-r6, lr}		/* restore registers */
-	RET/* return */
+	adds	r0, r0, r5		/* add remaining to strlcpy return */
+	pop	{r4-r6, pc}		/* restore registers and return */
+#ifdef __ARM_EABI__
+	.cfi_endproc
+	.fnend
+#endif
 END(strlcat)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 01:17:32 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strlen_arm.S

Log Message:
For EABI, add .cfi ops


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlen_arm.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/string/strlen_arm.S
diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.3 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.4
--- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.3	Wed Jan 23 06:59:55 2013
+++ src/common/lib/libc/arch/arm/string/strlen_arm.S	Mon Aug 19 01:17:32 2013
@@ -29,7 +29,7 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: strlen_arm.S,v 1.3 2013/01/23 06:59:55 matt Exp $)
+RCSID($NetBSD: strlen_arm.S,v 1.4 2013/08/19 01:17:32 matt Exp $)
 
 #ifdef __ARMEL__
 #define	BYTE0	0x00ff
@@ -51,8 +51,18 @@ RCSID($NetBSD: strlen_arm.S,v 1.3 2013/
 
 	.text
 ENTRY(FUNCNAME)
+#ifdef __ARM_EABI__
+	.fnstart
+	.cfi_startproc
+#endif
 #ifdef STRNLEN
 	push	{r4,r5}			/* save some registers */
+#ifdef __ARM_EABI__
+	.save	{r4,r5}
+	.cfi_def_cfa_offset 8
+	.cfi_offset 5, -4
+	.cfi_offset 4, -8
+#endif
 	add	r5, r0, r1		/* get ptr to end of string */
 	mov	r4, r1			/* save maxlen */
 #endif
@@ -151,4 +161,8 @@ ENTRY(FUNCNAME)
 	pop	{r4, r5}		/* restore registers */
 	RET/* return */
 #endif
+#ifdef __ARM_EABI__
+	.cfi_endproc
+	.fnend
+#endif
 END(FUNCNAME)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:07:22 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strlen_naive.S

Log Message:
teq - cmp
ip - r2
add/sub - adds/subs
(thumbify part 1)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlen_naive.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/string/strlen_naive.S
diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.3 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.4
--- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.3	Wed Jan 23 06:59:55 2013
+++ src/common/lib/libc/arch/arm/string/strlen_naive.S	Mon Aug 19 02:07:22 2013
@@ -28,19 +28,19 @@
  */
 #include machine/asm.h
 
-RCSID($NetBSD: strlen_naive.S,v 1.3 2013/01/23 06:59:55 matt Exp $)
+RCSID($NetBSD: strlen_naive.S,v 1.4 2013/08/19 02:07:22 matt Exp $)
 
 #ifdef STRNLEN
 /* LINTSTUB: size_t strnlen(const char *, size_t) */
 ENTRY(strnlen)
-	add	ip, r0, #1	/* start of src + NUL */
-	add	r2, r0, r1	/* src[maxlen] */
+	adds	r2, r0, #1	/* start of src + NUL */
+	adds	r2, r0, r1	/* src[maxlen] */
 1:	cmp	r0, r2		/* is this of string? */
 	beq	2f		/*   yes it is */
 	ldrb	r3, [r0], #1	/* read a byte */
-	teq	r3, #0		/* is it a NUL? */
+	cmp	r3, #0		/* is it a NUL? */
 	bne	1b		/*   no, get next byte */
-	sub	r0, r0, ip	/* get difference between start and end */
+	subs	r0, r0, r2	/* get difference between start and end */
 	RET			/* return */
 2:	mov	r0, r1		/* get maxlen */
 	RET			/* return */
@@ -48,11 +48,12 @@ END(strnlen)
 #else /* STRNLEN */
 /* LINTSTUB: size_t strlen(const char *) */
 ENTRY(strlen)
-	add	ip, r0, #1	/* start of src + NUL */
-1:	ldrb	r3, [r0], #1	/* read a byte */
-	teq	r3, #0		/* is it a NUL? */
+	adds	r2, r0, #1	/* start of src + NUL */
+1:
+	ldrb	r3, [r0], #1	/* read a byte */
+	cmp	r3, #0		/* is it a NUL? */
 	bne	1b		/*   no, get next byte */
-	sub	r0, r0, ip	/* return difference between start and end */
+	subs	r0, r0, r2	/* return difference between start and end */
 	RET
 END(strlen)
 #endif /* !STRNLEN */



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:08:41 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strlen_naive.S

Log Message:
Change previous use of r2 to r3


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strlen_naive.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/string/strlen_naive.S
diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.4 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.5
--- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.4	Mon Aug 19 02:07:22 2013
+++ src/common/lib/libc/arch/arm/string/strlen_naive.S	Mon Aug 19 02:08:41 2013
@@ -28,19 +28,19 @@
  */
 #include machine/asm.h
 
-RCSID($NetBSD: strlen_naive.S,v 1.4 2013/08/19 02:07:22 matt Exp $)
+RCSID($NetBSD: strlen_naive.S,v 1.5 2013/08/19 02:08:41 matt Exp $)
 
 #ifdef STRNLEN
 /* LINTSTUB: size_t strnlen(const char *, size_t) */
 ENTRY(strnlen)
-	adds	r2, r0, #1	/* start of src + NUL */
+	adds	r3, r0, #1	/* start of src + NUL */
 	adds	r2, r0, r1	/* src[maxlen] */
 1:	cmp	r0, r2		/* is this of string? */
 	beq	2f		/*   yes it is */
 	ldrb	r3, [r0], #1	/* read a byte */
 	cmp	r3, #0		/* is it a NUL? */
 	bne	1b		/*   no, get next byte */
-	subs	r0, r0, r2	/* get difference between start and end */
+	subs	r0, r0, r3	/* get difference between start and end */
 	RET			/* return */
 2:	mov	r0, r1		/* get maxlen */
 	RET			/* return */



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:11:03 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strlen_naive.S

Log Message:
Use ip as a temporary


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strlen_naive.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/string/strlen_naive.S
diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.5 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.6
--- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.5	Mon Aug 19 02:08:41 2013
+++ src/common/lib/libc/arch/arm/string/strlen_naive.S	Mon Aug 19 02:11:03 2013
@@ -28,17 +28,17 @@
  */
 #include machine/asm.h
 
-RCSID($NetBSD: strlen_naive.S,v 1.5 2013/08/19 02:08:41 matt Exp $)
+RCSID($NetBSD: strlen_naive.S,v 1.6 2013/08/19 02:11:03 matt Exp $)
 
 #ifdef STRNLEN
 /* LINTSTUB: size_t strnlen(const char *, size_t) */
 ENTRY(strnlen)
 	adds	r3, r0, #1	/* start of src + NUL */
-	adds	r2, r0, r1	/* src[maxlen] */
-1:	cmp	r0, r2		/* is this of string? */
+	adds	ip, r0, r1	/* src[maxlen] */
+1:	cmp	r0, ip		/* is this of string? */
 	beq	2f		/*   yes it is */
-	ldrb	r3, [r0], #1	/* read a byte */
-	cmp	r3, #0		/* is it a NUL? */
+	ldrb	r2, [r0], #1	/* read a byte */
+	cmp	r2, #0		/* is it a NUL? */
 	bne	1b		/*   no, get next byte */
 	subs	r0, r0, r3	/* get difference between start and end */
 	RET			/* return */



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:13:14 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strlen_naive.S

Log Message:
Thumbify


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/strlen_naive.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/string/strlen_naive.S
diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.6 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.7
--- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.6	Mon Aug 19 02:11:03 2013
+++ src/common/lib/libc/arch/arm/string/strlen_naive.S	Mon Aug 19 02:13:13 2013
@@ -28,16 +28,26 @@
  */
 #include machine/asm.h
 
-RCSID($NetBSD: strlen_naive.S,v 1.6 2013/08/19 02:11:03 matt Exp $)
+RCSID($NetBSD: strlen_naive.S,v 1.7 2013/08/19 02:13:13 matt Exp $)
 
 #ifdef STRNLEN
 /* LINTSTUB: size_t strnlen(const char *, size_t) */
 ENTRY(strnlen)
 	adds	r3, r0, #1	/* start of src + NUL */
+#ifdef __thumb__
+	adds	r2, r0, r1	/* src[maxlen] */
+	mov	ip, r2
+#else
 	adds	ip, r0, r1	/* src[maxlen] */
+#endif
 1:	cmp	r0, ip		/* is this of string? */
 	beq	2f		/*   yes it is */
+#ifdef __thumb__
+	ldrb	r2, [r0]	/* read a byte */
+	adds	r0, r0, #1	/* advance to next byte */
+#else
 	ldrb	r2, [r0], #1	/* read a byte */
+#endif
 	cmp	r2, #0		/* is it a NUL? */
 	bne	1b		/*   no, get next byte */
 	subs	r0, r0, r3	/* get difference between start and end */
@@ -50,7 +60,12 @@ END(strnlen)
 ENTRY(strlen)
 	adds	r2, r0, #1	/* start of src + NUL */
 1:
+#ifdef __thumb__
+	ldrb	r3, [r0]	/* read a byte */
+	adds	r0, r0, #1
+#else
 	ldrb	r3, [r0], #1	/* read a byte */
+#endif
 	cmp	r3, #0		/* is it a NUL? */
 	bne	1b		/*   no, get next byte */
 	subs	r0, r0, r2	/* return difference between start and end */



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:20:06 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strchr_naive.S

Log Message:
ip - r2
teq - cmp


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strchr_naive.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/string/strchr_naive.S
diff -u src/common/lib/libc/arch/arm/string/strchr_naive.S:1.1 src/common/lib/libc/arch/arm/string/strchr_naive.S:1.2
--- src/common/lib/libc/arch/arm/string/strchr_naive.S:1.1	Tue Jan 15 02:03:30 2013
+++ src/common/lib/libc/arch/arm/string/strchr_naive.S	Mon Aug 19 02:20:06 2013
@@ -28,17 +28,17 @@
  */
 #include machine/asm.h
 
-RCSID($NetBSD: strchr_naive.S,v 1.1 2013/01/15 02:03:30 matt Exp $)
+RCSID($NetBSD: strchr_naive.S,v 1.2 2013/08/19 02:20:06 matt Exp $)
 
 /* LINTSTUB: char * strchr(const char *, int) */
 ENTRY(strchr)
-	mov	ip, r0		/* using r0 as return value */
+	mov	r2, r0		/* using r0 as return value */
 	mov	r0, #0		/* default to no match */
 	and	r1, r1, #0xff	/* restrict to a byte value */
-1:	ldrb	r3, [ip], #1	/* read a byte */
+1:	ldrb	r3, [r2], #1	/* read a byte */
 	cmp	r3, r1		/* does it match? */
-	subeq	r0, ip, #1	/*   yes, set return value to point to it */
-	teqne	r3, #0		/*   no, was it a NUL? */
+	subeq	r0, r2, #1	/*   yes, set return value to point to it */
+	cmpne	r3, #0		/*   no, was it a NUL? */
 	bne	1b		/* no, get next byte */
 	RET
 END(strchr)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:22:25 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strchr_naive.S

Log Message:
Thumbify


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strchr_naive.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/string/strchr_naive.S
diff -u src/common/lib/libc/arch/arm/string/strchr_naive.S:1.2 src/common/lib/libc/arch/arm/string/strchr_naive.S:1.3
--- src/common/lib/libc/arch/arm/string/strchr_naive.S:1.2	Mon Aug 19 02:20:06 2013
+++ src/common/lib/libc/arch/arm/string/strchr_naive.S	Mon Aug 19 02:22:25 2013
@@ -28,10 +28,26 @@
  */
 #include machine/asm.h
 
-RCSID($NetBSD: strchr_naive.S,v 1.2 2013/08/19 02:20:06 matt Exp $)
+RCSID($NetBSD: strchr_naive.S,v 1.3 2013/08/19 02:22:25 matt Exp $)
 
 /* LINTSTUB: char * strchr(const char *, int) */
 ENTRY(strchr)
+#ifdef __thumb__
+	movs	r3, #0xff
+	ands	r1, r1, r3	/* restrict to a byte value */
+1:	ldrb	r3, [r0]	/* read a byte */
+	cmp	r3, r1		/* does it match? */
+	beq	2f		/*   yes, set return value */
+	adds	r0, r0, #1	/* advance to next byte */
+#ifdef _ARM_ARCH_T2
+	cbnz	r3, 1b		/* was it a NUL?  no, get next byte */
+#else
+	cmp	r3, #0		/* was it a NUL? */
+	bne	1b		/*   no, get next byte */
+#endif
+	movs	r0, #0		/* set return to NULL */
+2:	RET			/* return */
+#else
 	mov	r2, r0		/* using r0 as return value */
 	mov	r0, #0		/* default to no match */
 	and	r1, r1, #0xff	/* restrict to a byte value */
@@ -41,4 +57,5 @@ ENTRY(strchr)
 	cmpne	r3, #0		/*   no, was it a NUL? */
 	bne	1b		/* no, get next byte */
 	RET
+#endif
 END(strchr)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:24:09 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strrchr_naive.S

Log Message:
ip - r2
teq - cmp


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strrchr_naive.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/string/strrchr_naive.S
diff -u src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.1 src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.2
--- src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.1	Tue Jan 15 02:03:30 2013
+++ src/common/lib/libc/arch/arm/string/strrchr_naive.S	Mon Aug 19 02:24:09 2013
@@ -28,17 +28,17 @@
  */
 #include machine/asm.h
 
-RCSID($NetBSD: strrchr_naive.S,v 1.1 2013/01/15 02:03:30 matt Exp $)
+RCSID($NetBSD: strrchr_naive.S,v 1.2 2013/08/19 02:24:09 matt Exp $)
 
 /* LINTSTUB: char * strrchr(const char *, int) */
 ENTRY(strrchr)
-	mov	ip, r0		/* using r0 as return value */
+	mov	r2, r0		/* using r0 as return value */
 	mov	r0, #0		/* default to no match */
 	and	r1, r1, #0xff	/* restrict to a byte value */
-1:	ldrb	r3, [ip], #1	/* read a byte */
+1:	ldrb	r3, [r2], #1	/* read a byte */
 	cmp	r3, r1		/* does it match? */
-	subeq	r0, ip, #1	/*   yes, set return value to point to it */
-	teq	r3, #0		/* was it a NUL? */
+	subeq	r0, r2, #1	/*   yes, set return value to point to it */
+	cmp	r3, #0		/* was it a NUL? */
 	bne	1b		/*   no, get next byte */
 	RET
 END(strrchr)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:36:27 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strrchr_naive.S

Log Message:
Thumbify


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strrchr_naive.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/string/strrchr_naive.S
diff -u src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.2 src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.3
--- src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.2	Mon Aug 19 02:24:09 2013
+++ src/common/lib/libc/arch/arm/string/strrchr_naive.S	Mon Aug 19 02:36:27 2013
@@ -28,17 +28,33 @@
  */
 #include machine/asm.h
 
-RCSID($NetBSD: strrchr_naive.S,v 1.2 2013/08/19 02:24:09 matt Exp $)
+RCSID($NetBSD: strrchr_naive.S,v 1.3 2013/08/19 02:36:27 matt Exp $)
 
 /* LINTSTUB: char * strrchr(const char *, int) */
 ENTRY(strrchr)
 	mov	r2, r0		/* using r0 as return value */
-	mov	r0, #0		/* default to no match */
+	movs	r0, #0		/* default to no match */
+#ifdef __thumb__
+	movs	r3, #0xff
+	ands	r1, r1, r3	/* restrict to a byte value */
+1:	ldrb	r3, [r2]	/* read a byte */
+	cmp	r3, r1		/* does it match? */
+	bne	2f		/*   no, go and advance */
+	mov	r0, r2		/*   yes, set return value to point to it */
+2:	adds	r2, r2, #1	/* advance to next byte */
+#ifdef _ARM_ARCH_T2
+	cbnz	r3, 1b		/* was it a NUL?  no, get next byte */
+#else
+	cmp	r3, #0		/* was it a NUL? */
+	bne	1b		/*   no, get next byte */
+#endif
+#else
 	and	r1, r1, #0xff	/* restrict to a byte value */
 1:	ldrb	r3, [r2], #1	/* read a byte */
 	cmp	r3, r1		/* does it match? */
 	subeq	r0, r2, #1	/*   yes, set return value to point to it */
 	cmp	r3, #0		/* was it a NUL? */
 	bne	1b		/*   no, get next byte */
+#endif
 	RET
 END(strrchr)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:37:12 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: memmove.S

Log Message:
Add END()


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/memmove.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/string/memmove.S
diff -u src/common/lib/libc/arch/arm/string/memmove.S:1.5 src/common/lib/libc/arch/arm/string/memmove.S:1.6
--- src/common/lib/libc/arch/arm/string/memmove.S:1.5	Sun Aug 11 04:56:32 2013
+++ src/common/lib/libc/arch/arm/string/memmove.S	Mon Aug 19 02:37:12 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: memmove.S,v 1.5 2013/08/11 04:56:32 matt Exp $	*/
+/*	$NetBSD: memmove.S,v 1.6 2013/08/19 02:37:12 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,10 +31,6 @@
 
 #include machine/asm.h
 
-#if defined(__ARM_EABI__)  !defined(BCOPY)
-STRONG_ALIAS(__aeabi_memmove, memmove)
-#endif
-
 #ifndef _BCOPY
 /* LINTSTUB: Func: void *memmove(void *, const void *, size_t) */
 ENTRY(memmove)
@@ -583,3 +579,12 @@ ENTRY(bcopy)
 .Lmemmove_bsrcul1l4:
 	add	r1, r1, #1
 	b	.Lmemmove_bl4
+#ifndef _BCOPY
+END(memmove)
+#else
+END(bcopy)
+#endif
+
+#if defined(__ARM_EABI__)  !defined(BCOPY)
+STRONG_ALIAS(__aeabi_memmove, memmove)
+#endif



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:54:02 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strcat_naive.S

Log Message:
Thumbify


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strcat_naive.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/string/strcat_naive.S
diff -u src/common/lib/libc/arch/arm/string/strcat_naive.S:1.1 src/common/lib/libc/arch/arm/string/strcat_naive.S:1.2
--- src/common/lib/libc/arch/arm/string/strcat_naive.S:1.1	Mon Jan 14 16:36:15 2013
+++ src/common/lib/libc/arch/arm/string/strcat_naive.S	Mon Aug 19 02:54:02 2013
@@ -29,10 +29,34 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: strcat_naive.S,v 1.1 2013/01/14 16:36:15 matt Exp $)
+RCSID($NetBSD: strcat_naive.S,v 1.2 2013/08/19 02:54:02 matt Exp $)
 
 ENTRY(strcat)
 	mov	ip, r0			/* need to preserve r0 */
+#if defined(__thumb__)
+1:	ldrb	r2, [r0]		/* load next byte */
+	adds	r0, r0, #1		/* advance */
+#if defined(_ARM_ARCH_T2)
+	cbnz	r2, 1b			/* was it a NUL?  no, get next byte */
+#else
+	cmp	r2, #0			/* was it a NUL? */
+	bne	1b			/*   no, get next byte */
+#endif
+	subs	r0, r0, #1		/* back up one to the NUL */
+	subs	r1, r1, r0		/* save one increment */
+2:	ldrb	r2, [r1, r0]		/* load next byte from append */
+	strb	r2, [r0]		/* store it */
+	adds	r0, r0, #1		/* advance */
+#if defined(_ARM_ARCH_T2)
+	cbnz	r2, 1b			/* was it a NUL?  no, get next byte */
+#else
+	cmp	r2, #0			/* was it a NUL? */
+	bne	2b			/*   no, get next byte */
+#endif
+	mov	r0, ip			/* restore dst address */
+	RET/* return */
+#else /* !__thumb__ */
+	mov	ip, r0			/* need to preserve r0 */
 1:	ldrb	r2, [ip], #1		/* load next byte */
 	teq	r2, #0			/* was it a NUL? */
 	bne	1b			/*   no, get next byte */
@@ -42,4 +66,5 @@ ENTRY(strcat)
 	teq	r2, #0			/* was it a NUL? */
 	bne	2b			/*   no, get next byte */
 	RET/* return */
+#endif
 END(strcat)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 02:55:19 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: ffs.S

Log Message:
Add END() and clarify thumb/arm


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/ffs.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/string/ffs.S
diff -u src/common/lib/libc/arch/arm/string/ffs.S:1.3 src/common/lib/libc/arch/arm/string/ffs.S:1.4
--- src/common/lib/libc/arch/arm/string/ffs.S:1.3	Sun Aug 11 05:02:35 2013
+++ src/common/lib/libc/arch/arm/string/ffs.S	Mon Aug 19 02:55:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs.S,v 1.3 2013/08/11 05:02:35 matt Exp $	*/
+/*	$NetBSD: ffs.S,v 1.4 2013/08/19 02:55:19 matt Exp $	*/
 /*
  * Copyright (c) 2001 Christopher Gilbert
  * All rights reserved.
@@ -30,7 +30,7 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: ffs.S,v 1.3 2013/08/11 05:02:35 matt Exp $)
+RCSID($NetBSD: ffs.S,v 1.4 2013/08/19 02:55:19 matt Exp $)
 
 /*
  * ffs - find first set bit, this algorithm isolates the first set
@@ -45,17 +45,23 @@ RCSID($NetBSD: ffs.S,v 1.3 2013/08/11 0
  * 16 Feb 1994.
  */
 WEAK_ALIAS(__ffssi2,ffs)
+#if (defined(_ARM_ARCH_5)  !defined(__thumb__)) || defined(_ARM_ARCH_T2)
+#if defined(_ARM_ARCH_T2)
 ENTRY(ffs)
-#ifdef _ARM_ARCH_5
+#else
+ARM_ENTRY(ffs)
+#endif
 	/* (X  -X) gives LSB or zero.  */
- 	rsb	r1, r0, #0
+ 	neg	r1, r0
  	and	r0, r0, r1
 	clz	r0, r0
 	rsb	r0, r0, #32
 	RET
+END(ffs)
 #else
+ARM_ENTRY(ffs)
 	/* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */
- 	rsb r1, r0, #0
+ 	neg r1, r0
  	andsr0, r0, r1
 	/*
 	 * now r0 has at most one set bit, call this X
@@ -82,4 +88,5 @@ ENTRY(ffs)
 	.byte	10,  0,  0, 25,  0,  0, 21, 27  /* 40-47 */
 	.byte	31,  0,  0,  0,  0, 24,  0, 20  /* 48-55 */
 	.byte   30,  0, 23, 19, 29, 18, 17,  0  /* 56-63 */
+END(ffs)
 #endif



CVS commit: src/sys/sys

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 03:05:17 UTC 2013

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

Log Message:
make sure u_int is defined


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/sys/intr.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/intr.h
diff -u src/sys/sys/intr.h:1.14 src/sys/sys/intr.h:1.15
--- src/sys/sys/intr.h:1.14	Sun Aug 18 07:36:13 2013
+++ src/sys/sys/intr.h	Mon Aug 19 03:05:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.14 2013/08/18 07:36:13 matt Exp $	*/
+/*	$NetBSD: intr.h,v 1.15 2013/08/19 03:05:17 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -34,6 +34,8 @@
 
 #ifdef _KERNEL
 
+#include sys/types.h
+
 struct cpu_info;
 
 /* Public interface. */



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 03:27:34 UTC 2013

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

Log Message:
Add cfi ops.
Thumbify


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

Modified files:

Index: src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S
diff -u src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.11 src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.12
--- src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.11	Tue Aug 13 15:52:00 2013
+++ src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S	Mon Aug 19 03:27:34 2013
@@ -29,17 +29,7 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: __aeabi_ldivmod.S,v 1.11 2013/08/13 15:52:00 matt Exp $)
-
-ENTRY(__aeabi_ldivmod)
-#if !defined(_KERNEL)  !defined(_STANDALONE)
-	orrs	ip, r2, r3
-	beq	.Ldivbyzero
-#endif
-
-	push	{r4-r5, sl, lr}
-#define	NEG	r5
-	mov	NEG, #0
+RCSID($NetBSD: __aeabi_ldivmod.S,v 1.12 2013/08/19 03:27:34 matt Exp $)
 
 #ifdef __ARMEB__
 #define	ALO	r1	/* incoming numerator, outgoing quotient */
@@ -53,54 +43,135 @@ ENTRY(__aeabi_ldivmod)
 #define	BHI	r3	/* incoming denominator, outgoing remainder */
 #endif
 
+ENTRY(__aeabi_ldivmod)
+#ifdef __ARM_EABI__
+	.fnstart
+	.cfi_startproc
+#endif
+#if !defined(_KERNEL)  !defined(_STANDALONE)
+#if !defined(__thumb__)
+	orrs	ip, BLO, BHI
+	beq	.Ldivbyzero
+#elif defined(_ARM_ARCH_T2)
+	cbnz	BLO, 1f
+	cbz	BHI, .Ldivbyzero
+#else
+	cmp	BLO, #0
+	bne	1f
+	cmp	BHI, #0
+	beq	.Ldivbyzero
+#endif
+1:
+#endif
+
+	push	{r4-r6, lr}
+#ifdef __ARM_EABI__
+	.cfi_def_cfa_offset 16
+	.cfi_offset 14, -4
+	.cfi_offset 6, -8
+	.cfi_offset 5, -12
+	.cfi_offset 4, -16
+#endif
+#define	NEG	r5
+	movs	NEG, #0
+
 	cmp	BHI, #0
 	bge	2f
-	eor	NEG, NEG, #1	/* flip quotient sign */
+	movs	NEG, #1		/* flip quotient sign */
 	bl	.Lnegate_b
 	bcs	.Lmaxdenom
 
 2:
 	cmp	AHI, #0
-	/* bge	3f */
+#ifdef __thumb__
+	bge	3f
+	movs	r4, #3
+	eors	NEG, NEG, r4	/* flip quotient sign, flip remainder sign */
+	bl	.Lnegate_a
+3:
+#else
 	eorlt	NEG, NEG, #3	/* flip quotient sign, flip remainder sign */
 	bllt	.Lnegate_a
-3:
+#endif
+
 	/*
 	 * Arguments are setup, allocate some stack for the remainder
 	 * and call __qdivrem for the heavy lifting.
 	 */
+#ifdef __ARM_EABI__
+	.cfi_def_cfa_offset 32
+#endif
 	sub	sp, sp, #16
-	add	ip, sp, #8
-	str	ip, [sp]
+#if !defined(__thumb__) || defined(_ARM_ARCH_T2)
+	adds	r4, sp, #8
+#else
+	mov	r4, sp
+	adds	r4, r4, #8
+#endif
+	str	r4, [sp]
 	bl	PLT_SYM(__qdivrem)
 	add	sp, sp, #8
+#ifdef __ARM_EABI__
+	.cfi_def_cfa_offset 24
+	.cfi_offset 3, -20
+	.cfi_offset 2, -24
+#endif
 
-	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)
+#if defined(__thumb__)  defined(_ARM_ARCH_T2)
+	cbz	NEG, .Lnegate_neither
+#else
+	cmp	NEG, #0		/* any signs to flip? */
+	beq	.Lnegate_neither
+#endif
 
-	pop	{r2, r3}
-	tst	NEG, #2		/* does remainder need to be negative? */
-	blne	.Lnegate_b
-	tst	NEG, #1		/* does quotient need to be negative? */
-	blne	.Lnegate_a
-	pop	{r4-r5, sl, lr}
-	RET
+	cmp	NEG, #2		/* does remainder need to be negative? */
+	beq	.Lnegate_b_only	/* 2 means b only */
+	bgt	.Lnegate_both	/* 3 means both */
+.Lnegate_a_only:
+	bl	.Lnegate_a	/* 1 means a only */
+.Lnegate_neither:
+	pop	{r2-r6, pc}	/* grab b from stack */
+.Lnegate_both:
+	bl	.Lnegate_a
+.Lnegate_b_only:
+	pop	{r2-r3}		/* get remainder */
+#ifdef __ARM_EABI__
+	.cfi_def_cfa_offset 16
+#endif
+	bl	.Lnegate_b	/* negate it */
+	pop	{r4-r6, pc}
 
+	.align	0
 .Lnegate_a:
-rsbs	ALO, ALO, #0
-rsc	AHI, AHI, #0
+#ifdef __thumb__
+	movs	r4, AHI
+	movs	AHI, #0
+	negs	ALO, ALO
+	sbcs	AHI, AHI, r4
+#else
+	negs	ALO, ALO
+	rsc	AHI, AHI, #0
+#endif
 	RET
 
+	.align	0
 .Lnegate_b:
-rsbs	BLO, BLO, #0
-rsc	BHI, BHI, #0
+#ifdef __thumb__
+	movs	r4, BHI
+	movs	BHI, #0
+	negs	BLO, BLO
+	sbcs	BHI, BHI, r4
+#else
+	negs	BLO, BLO
+	rsc	BHI, BHI, #0
+#endif
 	RET
 
+	.align	0
 .Lmaxdenom:
 	/*
 	 * We had a carry so the denominator must have INT64_MIN
@@ -108,40 +179,71 @@ ENTRY(__aeabi_ldivmod)
 	 * them to see if the numerator has the same value.  We
 	 * don't have to worry about sign.
 	 */
-	teq	BHI, AHI
-	teqeq	BLO, ALO
+	cmp	BHI, AHI
+#ifdef __thumb__
+	bne	1f
+	cmp	BLO, ALO
+#else
+	cmpeq	BLO, ALO
+#endif
 	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
+	movs	ALO, #1
+	movs	AHI, #0
+	movs	BLO, #0
+	movs	BHI, #0
+	pop	{r4-r6, pc}
 
 	/*
 	 * 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
+	.align	0
+1:	

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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 03:43:07 UTC 2013

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

Log Message:
Add .cfi ops
Thumbify


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.6 src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S:1.7
--- src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S:1.6	Thu May  9 15:03:40 2013
+++ src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S	Mon Aug 19 03:43:07 2013
@@ -29,7 +29,7 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: __aeabi_uldivmod.S,v 1.6 2013/05/09 15:03:40 matt Exp $)
+RCSID($NetBSD: __aeabi_uldivmod.S,v 1.7 2013/08/19 03:43:07 matt Exp $)
 
 /*
  * typedef struct { unsigned long long quo, rem } ulldiv_t;
@@ -38,31 +38,79 @@ RCSID($NetBSD: __aeabi_uldivmod.S,v 1.6
  */
 
 ENTRY(__aeabi_uldivmod)
+#ifdef __ARM_EABI__
+	.fnstart
+	.cfi_startproc
+#endif
 #if !defined(_KERNEL)  !defined(_STANDALONE)
+#if !defined(__thumb__)
 	orrs	ip, r2, r3
 	beq	.Ldivbyzero
+#elif defined(_ARM_ARCH_T2)
+	cbnz	r2, 1f
+	cbz	r3, .Ldivbyzero
+1:
+#else
+	cmp	r2, #0
+	bne	1f
+	cmp	r3, #0
+	beq	.Ldivbyzero
+1:
+#endif
 #endif
 
 	push	{r4,lr}
+#ifdef __ARM_EABI__
+	.save	{r4,lr}
+	.cfi_def_cfa_offset 8
+	.cfi_offset 14, -4
+	.cfi_offset 4, -8
+#endif
 	sub	sp, sp, #16
-	add	ip, sp, #8
-	str	ip, [sp]
+#ifdef __ARM_EABI__
+	.cfi_def_cfa_offset 24
+#endif
+#if !defined(__thumb__) || defined(_ARM_ARCH_T2)
+	add	r4, sp, #8
+#else
+	mov	r4, sp
+	adds	r4, r4, #8
+#endif
+	str	r4, [sp]
 	bl	PLT_SYM(__qdivrem)
 	add	sp, sp, #8
+#ifdef __ARM_EABI__
+	.cfi_def_cfa_offset 16
+	.cfi_offset 3, -12
+	.cfi_offset 2, -16
+#endif
 	/*
 	 * The remainder is already on the stack just waiting to be popped
 	 * into r2/r3.
 	 */
-	pop	{r2-r4,lr}
-	RET
+	pop	{r2-r4,pc}
 
 #if !defined(_KERNEL)  !defined(_STANDALONE)
 .Ldivbyzero:
-	push	{r0-r1,ip,lr}
+	push	{r0-r1,r4,lr}
+#ifdef __ARM_EABI__
+	.save	{r0-r1,r4,lr}
+	.cfi_def_cfa_offset 16
+	.cfi_offset 14, -4
+	.cfi_offset 4, -8
+#endif
+#ifdef __thumb__
+	movs	r0, #0
+	mvns	r0, r0
+#else
 	mvn	r0, #0
-	mvn	r1, #0
+#endif
+	mvns	r1, r0
 	bl	PLT_SYM(__aeabi_ldiv0)
-	pop	{r2-r3,ip,lr}
-	RET
+	pop	{r2-r4,pc}
+#endif
+#ifdef __ARM_EABI__
+	.cfi_endproc
+	.fnend
 #endif
 END(__aeabi_uldivmod)



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 03:44:47 UTC 2013

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

Log Message:
Add thumb version
Use STRONG_ALIAS


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/gen/byte_swap_4.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/byte_swap_4.S
diff -u src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.6 src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.7
--- src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.6	Wed Jan 16 21:48:56 2013
+++ src/common/lib/libc/arch/arm/gen/byte_swap_4.S	Mon Aug 19 03:44:47 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: byte_swap_4.S,v 1.6 2013/01/16 21:48:56 matt Exp $	*/
+/*	$NetBSD: byte_swap_4.S,v 1.7 2013/08/19 03:44:47 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -32,21 +32,34 @@
 #include machine/asm.h
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-_ENTRY(_C_LABEL(bswap32))
+#define	FUNC	_C_LABEL(bswap32)
 #else
-_ENTRY(_C_LABEL(__bswap32))
+#define	FUNC	_C_LABEL(__bswap32)
 #endif
-#if BYTE_ORDER == LITTLE_ENDIAN
-_ENTRY(_C_LABEL(ntohl))
-_ENTRY(_C_LABEL(htonl))
-#endif
-_PROF_PROLOGUE
+ENTRY(FUNC)
 #ifdef _ARM_ARCH_6
 	rev	r0, r0
-#else
+#elif !defined(__thumb__)
 	eor	r1, r0, r0, ror #16	/* 4.3.2.1 - 42.31.42.31 */
 	bic	r1, r1, #0x00FF	/* 42.31.42.31 - 42.0.42.31 */
 	mov	r0, r0, ror #8		/* 4.3.2.1 - 1.4.3.2 */
 	eor	r0, r0, r1, lsr #8	/* 1.4.3.2 ^ 0.42.0.42 - 1.2.3.4 */
+#else
+	movs	r3, #16
+	lsls	r1, r0, #8		/* 4.3.2.1 - 3.2.1.0 /*
+	lsrs	r0, r0, #8		/* 4.3.2.1 - 0.4.3.2 */
+	rors	r1, r3			/* 3.2.1.0 - 1.0.3.2 */
+	rors	r0, r3			/* 0.4.3.2 - 3.2.0.4 */
+	lsrs	r1, r1, #8		/* 1.0.3.2 - 0.1.0.3 */
+	lsls	r1, r1, #8		/* 0.1.0.3 - 1.0.3.0 */
+	lsls	r0, r0, #8		/* 3.2.0.4 - 2.0.4.0 */
+	lsrs	r0, r0, #8		/* 2.0.4.0 - 0.2.0.4 */
+	orrs	r0, r0, r1		/* 1.0.3.0 | 0.2.0.4 - 1.2.3.4 */
 #endif
 	RET
+END(FUNC)
+
+#if BYTE_ORDER == LITTLE_ENDIAN
+STRONG_ALIAS(_C_LABEL(ntohl), FUNC)
+STRONG_ALIAS(_C_LABEL(htonl), FUNC)
+#endif



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 03:44:18 UTC 2013

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

Log Message:
Use STRONG_ALIAS
Add thumb variation


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/gen/byte_swap_2.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/byte_swap_2.S
diff -u src/common/lib/libc/arch/arm/gen/byte_swap_2.S:1.5 src/common/lib/libc/arch/arm/gen/byte_swap_2.S:1.6
--- src/common/lib/libc/arch/arm/gen/byte_swap_2.S:1.5	Tue Nov 27 23:57:07 2012
+++ src/common/lib/libc/arch/arm/gen/byte_swap_2.S	Mon Aug 19 03:44:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: byte_swap_2.S,v 1.5 2012/11/27 23:57:07 matt Exp $	*/
+/*	$NetBSD: byte_swap_2.S,v 1.6 2013/08/19 03:44:18 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -32,20 +32,30 @@
 #include machine/asm.h
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-_ENTRY(_C_LABEL(bswap16))
+#define FUNC _C_LABEL(bswap16)
 #else
-_ENTRY(_C_LABEL(__bswap16))
+#define FUNC _C_LABEL(__bswap16)
 #endif
-#if BYTE_ORDER == LITTLE_ENDIAN
-_ENTRY(_C_LABEL(ntohs))
-_ENTRY(_C_LABEL(htons))
-#endif
-_PROF_PROLOGUE
+
+ENTRY(FUNC)
 #ifdef _ARM_ARCH_6
 	rev16		r0, r0
-#else
+#elif !defined(__thumb__)
 	and		r1, r0, #0xff
 	mov		r0, r0, lsr #8
 	orr		r0, r0, r1, lsl #8
+#else
+	movs		r2, #0xff
+	movs		r1, r0
+	ands		r1, r1, r2
+	lsls		r1, r1, #8
+	lsrs		r0, r0, #8
+	ands		r0, r0, r2
+	orrs		r0, r0, r1
 #endif
 	RET
+END(FUNC)
+#if BYTE_ORDER == LITTLE_ENDIAN
+STRONG_ALIAS(_C_LABEL(ntohs), FUNC)
+STRONG_ALIAS(_C_LABEL(htons), FUNC)
+#endif



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 03:47:06 UTC 2013

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

Log Message:
This is ARM only


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/gen/divide.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/divide.S
diff -u src/common/lib/libc/arch/arm/gen/divide.S:1.3 src/common/lib/libc/arch/arm/gen/divide.S:1.4
--- src/common/lib/libc/arch/arm/gen/divide.S:1.3	Thu Jun 20 07:16:23 2013
+++ src/common/lib/libc/arch/arm/gen/divide.S	Mon Aug 19 03:47:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: divide.S,v 1.3 2013/06/20 07:16:23 matt Exp $	*/
+/*	$NetBSD: divide.S,v 1.4 2013/08/19 03:47:06 matt Exp $	*/
 
 /*
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
@@ -23,25 +23,7 @@
  * which makes a C call
  */
 
-.L_overflow:
-#if !defined(_KERNEL)  !defined(_STANDALONE)
-#ifdef __ARM_EABI__
-	mov	r0, r1/* return quotient */
-	b	PLT_SYM(__aeabi_idiv0)
-#else
-	mov	r0, #8			/* SIGFPE */
-	bl	PLT_SYM(_C_LABEL(raise))	/* raise it */
-	mov	r0, #0
-	RET
-#endif
-#else
-	/* XXX should cause a fatal error */
-	mvn	r0, #0
-	RET
-#endif
-
-	.globl	__udivide
-__udivide:/* r0 = r0 / r1; r1 = r0 % r1 */
+_ARM_ENTRY(__udivide)			/* r0 = r0 / r1; r1 = r0 % r1 */
 	eor r0, r1, r0 
 	eor r1, r0, r1 
 	eor r0, r1, r0 
@@ -61,9 +43,9 @@ __udivide:/* r0 = r0 / r1; r1 = r0 %
 	mov	r0, r1
 	mov	r1, #0
 	RET
+END(__udivide)
 
-	.globl	__divide
-__divide:/* r0 = r0 / r1; r1 = r0 % r1 */
+_ARM_ENTRY(__divide)			/* r0 = r0 / r1; r1 = r0 % r1 */
 	eor r0, r1, r0 
 	eor r1, r0, r1 
 	eor r0, r1, r0 
@@ -377,4 +359,23 @@ __divide:/* r0 = r0 / r1; r1 = r0 % 
 	mov	r0, r3
 	RET
 
+.L_overflow:
+#if !defined(_KERNEL)  !defined(_STANDALONE)
+#ifdef __ARM_EABI__
+	mov	r0, r1/* return quotient */
+	b	PLT_SYM(__aeabi_idiv0)
+#else
+	mov	r0, #8			/* SIGFPE */
+	bl	PLT_SYM(_C_LABEL(raise))	/* raise it */
+	mov	r0, #0
+	RET
+#endif
+#else
+	/* XXX should cause a fatal error */
+	mvn	r0, #0
+	RET
+#endif
+
+END(__divide)
+
 #endif /* __ARM_ARCH_EXT_IDIV__ */



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 03:51:04 UTC 2013

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

Log Message:
thumbify
add .cfi ops (for thumb)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/gen/udivsi3.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/udivsi3.S
diff -u src/common/lib/libc/arch/arm/gen/udivsi3.S:1.2 src/common/lib/libc/arch/arm/gen/udivsi3.S:1.3
--- src/common/lib/libc/arch/arm/gen/udivsi3.S:1.2	Thu Jun 20 07:16:23 2013
+++ src/common/lib/libc/arch/arm/gen/udivsi3.S	Mon Aug 19 03:51:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: udivsi3.S,v 1.2 2013/06/20 07:16:23 matt Exp $	*/
+/*	$NetBSD: udivsi3.S,v 1.3 2013/08/19 03:51:04 matt Exp $	*/
 
 /*
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
@@ -16,9 +16,6 @@
 
 #include machine/asm.h
 
-
-ENTRY_NP(__aeabi_uidivmod)
-ENTRY_NP(__aeabi_uidiv)
 ENTRY(__udivsi3)
 #if defined(__ARM_ARCH_EXT_IDIV__)
 # if defined(__ARM_EABI__)
@@ -29,6 +26,30 @@ ENTRY(__udivsi3)
 	mls	r1, r0, r1, r3	@ return modulus in r1
 # endif
 	RET
-#else
+#elif !defined(__thumb__) || defined(_ARM_ARCH_T2)
 	b	__udivide
+#else
+#ifdef __ARM_EABI__
+	.fnstart
+	.cfi_startproc
+#endif
+	push	{r4, lr}
+#ifdef __ARM_EABI__
+	.save	{r4, lr}
+	.cfi_def_cfa_offset 8
+	.cfi_offset 14, -4
+	.cfi_offset 4, -8
+#endif
+	bl	__udivide
+	pop	{r4, pc}
+#ifdef __ARM_EABI__
+	.cfi_endproc
+	.fnend
+#endif
+#endif
+END(__udivsi3)
+
+#ifdef __ARM_EABI__
+STRONG_ALIAS(__aeabi_uidivmod, __udivsi3)
+STRONG_ALIAS(__aeabi_uidiv, __udivsi3)
 #endif



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 03:54:15 UTC 2013

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

Log Message:
Thumbify (and use .cfi ops)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.6 src/common/lib/libc/arch/arm/gen/divsi3.S:1.7
--- src/common/lib/libc/arch/arm/gen/divsi3.S:1.6	Thu Jun 20 07:16:23 2013
+++ src/common/lib/libc/arch/arm/gen/divsi3.S	Mon Aug 19 03:54:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: divsi3.S,v 1.6 2013/06/20 07:16:23 matt Exp $	*/
+/*	$NetBSD: divsi3.S,v 1.7 2013/08/19 03:54:15 matt Exp $	*/
 
 /*
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
@@ -16,12 +16,6 @@
 
 #include machine/asm.h
 
-ENTRY_NP(__aeabi_idivmod)
-ENTRY_NP(__aeabi_idiv)
-#if defined(__ARM_EABI__)  defined(PIC_SYMVER)
-	.symver	__aeabi_idiv,__aeabi_idiv@@GCC_3.5
-	.symver	__aeabi_idivmod,__aeabi_idivmod@@GCC_3.5
-#endif
 ENTRY(__divsi3)
 #if defined(__ARM_ARCH_EXT_IDIV__)
 # if defined(__ARM_EABI__)
@@ -32,6 +26,33 @@ ENTRY(__divsi3)
 	mls	r1, r0, r1, r3	@ return modulus in r1
 # endif
 	RET
-#else
+#elif !defined(__thumb__) || defined(_ARM_ARCH_T2)
 	b	__divide
+#else
+#ifdef __ARM_EABI__
+	.fnstart
+	.cfi_startproc
+#endif
+	push	{r4, lr}
+#ifdef __ARM_EABI__
+	.cfi_def_cfa_offset 8
+	.cfi_offset 14, -4
+	.cfi_offset 4, -8
+#endif
+	bl	__divide
+	pop	{r4, pc}
+#ifdef __ARM_EABI__
+	.cfi_endproc
+	.fnend
+#endif
+#endif
+END(__divsi3)
+
+#if defined(__ARM_EABI__)
+STRONG_ALIAS(__aeabi_idivmod, __divsi3)
+STRONG_ALIAS(__aeabi_idiv, __divsi3)
+#if defined(PIC_SYMVER)
+	.symver	__aeabi_idiv,__aeabi_idiv@@GCC_3.5
+	.symver	__aeabi_idivmod,__aeabi_idivmod@@GCC_3.5
+#endif
 #endif



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

2013-08-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 19 03:55:12 UTC 2013

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

Log Message:
Rework to allow thumb armv7 compilation.
Add atomic_simplelock.c for thumb


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/common/lib/libc/arch/arm/atomic/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/common/lib/libc/arch/arm/atomic/Makefile.inc
diff -u src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.12 src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.13
--- src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.12	Tue Aug  6 20:49:15 2013
+++ src/common/lib/libc/arch/arm/atomic/Makefile.inc	Mon Aug 19 03:55:12 2013
@@ -1,22 +1,23 @@
-#	$NetBSD: Makefile.inc,v 1.12 2013/08/06 20:49:15 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.13 2013/08/19 03:55:12 matt Exp $
 
-ARMV6= ${CPUFLAGS:M-march=armv7*} ${CPUFLAGS:M-mcpu=cortex*}
-ARMV6+= ${CPUFLAGS:M-march=armv6*} ${CPUFLAGS:M-mcpu=arm11*}
-ARMV6+= ${CFLAGS:M-march=armv7*:} ${CFLAGS:M-mcpu=cortex*}
+ARMV6= ${CPUFLAGS:M-march=armv6*} ${CPUFLAGS:M-mcpu=arm11*}
 ARMV6+= ${CFLAGS:M-march=armv6*:} ${CFLAGS:M-mcpu=arm11*}
-ARMV6+= ${CPPFLAGS:M-march=armv7*:} ${CPPFLAGS:M-mcpu=cortex*}
 ARMV6+= ${CPPFLAGS:M-march=armv6*:} ${CPPFLAGS:M-mcpu=arm11*}
+ARMV7= ${CPUFLAGS:M-march=armv7*} ${CPUFLAGS:M-mcpu=cortex*}
+ARMV7+= ${CFLAGS:M-march=armv7*:} ${CFLAGS:M-mcpu=cortex*}
+ARMV7+= ${CPPFLAGS:M-march=armv7*:} ${CPPFLAGS:M-mcpu=cortex*}
 .if empty(CPPFLAGS:M-D_STANDALONE) \
  empty(CFLAGS:M-march=*)  empty(CFLAGS:M-mcpu=*) \
  empty(CPPFLAGS:M-march=*)  empty(CPPFLAGS:M-mcpu=*) \
  empty(CPUFLAGS:M-march=*)  empty(CPUFLAGS:M-mcpu=*)
-ARMV6+= ${MACHINE_ARCH:Mearmv[67]*}
+ARMV6+= ${MACHINE_ARCH:Mearmv6*}
+ARMV7+= ${MACHINE_ARCH:Mearmv7*}
 .endif
 
 .if defined(LIB)  (${LIB} == kern || ${LIB} == c || ${LIB} == pthread \
 	|| ${LIB} == rump)
 
-.if empty(ARMV6)
+.if empty(ARMV6)  empty(ARMV7)
 SRCS.atomic+=	atomic_add_32_cas.c atomic_add_32_nv_cas.c \
 		atomic_and_32_cas.c atomic_and_32_nv_cas.c \
 		atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
@@ -34,9 +35,18 @@ SRCS.atomic+=	atomic_swap_64.S
 
 .endif
 
+.if defined(LIB)  (${LIB} == c || ${LIB} == pthread || ${LIB} == rump)
+
+SRCS.atomic+=	atomic_simplelock.c
+.if empty(ARMV7)
+CPUFLAGS.atomic_simplelock.c+=	-marm
+.endif
+
+.endif
+
 .if defined(LIB)  (${LIB} == c || ${LIB} == pthread)
 
-.if empty(ARMV6)
+.if empty(ARMV6)  empty(ARMV7)
 SRCS.atomic+=	atomic_init_testset.c
 SRCS.atomic+=	atomic_cas_up.S
 CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP
@@ -46,4 +56,10 @@ SRCS.atomic+=	atomic_init_cas.c
 
 .endif
 
+.if !empty(ARMV6)
+.for f in ${SRCS.atomic:M*.S}
+CPUFLAGS.$f+=	-marm
+.endfor
+.endif
+
 SRCS+=	${SRCS.atomic}



CVS commit: src

2013-08-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug 19 04:27:22 UTC 2013

Modified Files:
src/distrib/utils/embedded/conf: beagleboard.conf
src/etc/etc.evbarm: Makefile.inc

Log Message:
Instead of trying to pass two kernels to beagleboard.conf, pass one and
derive the path to the second from the first.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/utils/embedded/conf/beagleboard.conf
cvs rdiff -u -r1.57 -r1.58 src/etc/etc.evbarm/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/distrib/utils/embedded/conf/beagleboard.conf
diff -u src/distrib/utils/embedded/conf/beagleboard.conf:1.13 src/distrib/utils/embedded/conf/beagleboard.conf:1.14
--- src/distrib/utils/embedded/conf/beagleboard.conf:1.13	Sat Aug 17 13:08:16 2013
+++ src/distrib/utils/embedded/conf/beagleboard.conf	Mon Aug 19 04:27:22 2013
@@ -1,13 +1,12 @@
-# $NetBSD: beagleboard.conf,v 1.13 2013/08/17 13:08:16 jmcneill Exp $
+# $NetBSD: beagleboard.conf,v 1.14 2013/08/19 04:27:22 jmcneill Exp $
 # BeagleBoard customization script used by mkimage
 #
 board=beagleboard
 
-kernel=$src/sys/arch/evbarm/compile/obj/BEAGLEBOARD/netbsd.ub $src/sys/arch/evbarm/compile/obj/BEAGLEBONE/netbsd.ub
+kernel=$src/sys/arch/evbarm/compile/obj/BEAGLEBOARD/netbsd.ub
 
-set -- $kernel
-bboard_kernel=$1
-bbone_kernel=$2
+bboard_kernel=$kernel
+bbone_kernel=$(echo $bboard_kernel | sed 's/BEAGLEBOARD/BEAGLEBONE/g')
 
 . ${DIR}/conf/evbarm.conf
 

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.57 src/etc/etc.evbarm/Makefile.inc:1.58
--- src/etc/etc.evbarm/Makefile.inc:1.57	Sat Aug 17 13:08:16 2013
+++ src/etc/etc.evbarm/Makefile.inc	Mon Aug 19 04:27:22 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.57 2013/08/17 13:08:16 jmcneill Exp $
+#	$NetBSD: Makefile.inc,v 1.58 2013/08/19 04:27:22 jmcneill Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -93,7 +93,7 @@ __mkimage: .USE
 	TOOL_MTREE=${TOOL_MTREE} \
 	HOST_SH=${HOST_SH} \
 	${HOST_SH} ${MKIMAGE} -x -h ${.TARGET:S/smp_//} -D ${DESTDIR} \
-	-K ${.ALLSRC} -S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \
+	-K ${.ALLSRC} -S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \
 	${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz
 
 ARCHES.arm=		armv4 xscale armv5t armv6 armv7
@@ -122,8 +122,9 @@ BUILD_KERNELS+=		${board}_INSTALL
 KERNEL_SETS+=		${KERNEL_SETS.${arch}}
 .endfor
 
-.if !empty(KERNEL_SETS:MBEAGLEBOARD)
-smp_beagleboard: ${IMAGE.kern}/netbsd-BEAGLEBOARD.ub.gz ${IMAGE.kern}/netbsd-BEAGLEBONE.ub.gz __mkimage
+.if !empty(KERNEL_SETS:MBEAGLEBOARD)  !empty(KERNEL_SETS:MBEAGLEBONE)
+smp_beagleboard: ${IMAGE.kern}/netbsd-BEAGLEBOARD.ub.gz __mkimage
+#XXX ${IMAGE.kern}/netbsd-BEAGLEBONE.ub.gz
 .if empty(ALL_KERNELS) || (!empty(ALL_KERNELS:MBEAGLEBOARD)  !empty(ALL_KERNELS:MBEAGLEBONE))
 SNAP_MD_POST_DEPS+=	smp_beagleboard
 .endif