CVS commit: src/usr.bin/make

2012-08-31 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Fri Aug 31 07:00:36 UTC 2012

Modified Files:
src/usr.bin/make: main.c

Log Message:
Cast sizeof() to int, which is sufficent and consistent with other use
within make.


To generate a diff of this commit:
cvs rdiff -u -r1.202 -r1.203 src/usr.bin/make/main.c

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

Modified files:

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.202 src/usr.bin/make/main.c:1.203
--- src/usr.bin/make/main.c:1.202	Fri Aug 31 02:59:37 2012
+++ src/usr.bin/make/main.c	Fri Aug 31 07:00:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.202 2012/08/31 02:59:37 pgoyette Exp $	*/
+/*	$NetBSD: main.c,v 1.203 2012/08/31 07:00:36 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: main.c,v 1.202 2012/08/31 02:59:37 pgoyette Exp $;
+static char rcsid[] = $NetBSD: main.c,v 1.203 2012/08/31 07:00:36 sjg Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = @(#)main.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: main.c,v 1.202 2012/08/31 02:59:37 pgoyette Exp $);
+__RCSID($NetBSD: main.c,v 1.203 2012/08/31 07:00:36 sjg Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -1235,7 +1235,7 @@ main(int argc, char **argv)
 			} else if (expandVars) {
 char tmp[128];
 
-if (snprintf(tmp, sizeof(tmp), ${%s}, var) = (ssize_t)(sizeof(tmp)))
+if (snprintf(tmp, sizeof(tmp), ${%s}, var) = (int)(sizeof(tmp)))
 	Fatal(%s: variable name too big: %s,
 	  progname, var);
 value = p1 = Var_Subst(NULL, tmp, VAR_GLOBAL, 0);
@@ -2051,7 +2051,7 @@ getBoolean(const char *name, Boolean bf)
 char tmp[64];
 char *cp;
 
-if (snprintf(tmp, sizeof(tmp), ${%s:tl}, name)  (ssize_t)(sizeof(tmp))) {
+if (snprintf(tmp, sizeof(tmp), ${%s:tl}, name)  (int)(sizeof(tmp))) {
 	cp = Var_Subst(NULL, tmp, VAR_GLOBAL, 0);
 
 	if (cp) {



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

2012-08-31 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug 31 11:45:39 UTC 2012

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

Log Message:
DO_AST_AND_RESTORE_ALIGNMENT_FAULTS needs AST_ALIGNMENT_FAULT_LOCALS


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 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.68 src/sys/arch/arm/arm32/cpuswitch.S:1.69
--- src/sys/arch/arm/arm32/cpuswitch.S:1.68	Wed Aug 29 16:45:34 2012
+++ src/sys/arch/arm/arm32/cpuswitch.S	Fri Aug 31 11:45:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuswitch.S,v 1.68 2012/08/29 16:45:34 matt Exp $	*/
+/*	$NetBSD: cpuswitch.S,v 1.69 2012/08/31 11:45:38 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -89,7 +89,7 @@
 #include machine/asm.h
 #include machine/cpu.h
 
-	RCSID($NetBSD: cpuswitch.S,v 1.68 2012/08/29 16:45:34 matt Exp $)
+	RCSID($NetBSD: cpuswitch.S,v 1.69 2012/08/31 11:45:38 skrll Exp $)
 
 /* LINTSTUB: include sys/param.h */
 	
@@ -352,6 +352,8 @@ ENTRY(lwp_trampoline)
 
 	movs	pc, lr			/* Exit */
 
+AST_ALIGNMENT_FAULT_LOCALS
+
 #ifdef __HAVE_FAST_SOFTINTS
 /*
  *	Called at IPL_HIGH



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

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug 31 12:01:15 UTC 2012

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

Log Message:
Use __ASSEMBLER__ to control inline definitions


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

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

Modified files:

Index: src/sys/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.61 src/sys/arch/arm/include/armreg.h:1.62
--- src/sys/arch/arm/include/armreg.h:1.61	Fri Aug 31 11:40:42 2012
+++ src/sys/arch/arm/include/armreg.h	Fri Aug 31 12:01:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.61 2012/08/31 11:40:42 matt Exp $	*/
+/*	$NetBSD: armreg.h,v 1.62 2012/08/31 12:01:15 matt Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -530,7 +530,7 @@
 #define CORTEX_CNTENC_C __BIT(31)	/* Disables the cycle counter */
 #define CORTEX_CNTOFL_C __BIT(31)	/* Cycle counter overflow flag */
 
-#if !defined(_LOCORE)  !defined(_STANDALONE)
+#if !defined(__ASSEMBLER__)
 #define	ARMREG_READ_INLINE(name, __insnstring)			\
 static inline uint32_t armreg_##name##_read(void)		\
 {\
@@ -589,7 +589,7 @@ ARMREG_WRITE_INLINE(pmcrv6, p15,0,%0,c1
 ARMREG_READ_INLINE(pmccntrv6, p15,0,%0,c15,c12,1) /* PMC Cycle Counter (armv6) */
 ARMREG_WRITE_INLINE(pmccntrv6, p15,0,%0,c15,c12,1) /* PMC Cycle Counter (armv6) */
 
-#endif /* !_LOCORE  !_STANDALONE */
+#endif /* !__ASSEMBLER__ */
 
 
 #define	MPIDR_31		0x8000



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

2012-08-31 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Aug 31 13:12:52 UTC 2012

Modified Files:
src/sys/arch/powerpc/pic: intr.c

Log Message:
when calculating per-IPL virq masks, take into account that shared IRQs may
request different IPLs
fixes vr(4)-related problems seen on ofppc


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/pic/intr.c

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

Modified files:

Index: src/sys/arch/powerpc/pic/intr.c
diff -u src/sys/arch/powerpc/pic/intr.c:1.22 src/sys/arch/powerpc/pic/intr.c:1.23
--- src/sys/arch/powerpc/pic/intr.c:1.22	Thu Jun  7 04:37:09 2012
+++ src/sys/arch/powerpc/pic/intr.c	Fri Aug 31 13:12:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.22 2012/06/07 04:37:09 macallan Exp $ */
+/*	$NetBSD: intr.c,v 1.23 2012/08/31 13:12:52 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.22 2012/06/07 04:37:09 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.23 2012/08/31 13:12:52 macallan Exp $);
 
 #include opt_interrupt.h
 #include opt_multiprocessor.h
@@ -352,8 +352,9 @@ intr_typename(int type)
 static void
 intr_calculatemasks(void)
 {
-	imask_t newmask[NIPL] = { [IPL_NONE...IPL_HIGH] = 0 };
+	imask_t newmask[NIPL];
 	struct intr_source *is;
+	struct intrhand *ih;
 	int irq;
 
 	for (u_int ipl = IPL_NONE; ipl  NIPL; ipl++) {
@@ -362,7 +363,9 @@ intr_calculatemasks(void)
 
 	/* First, figure out which ipl each IRQ uses. */
 	for (irq = 0, is = intrsources; irq  NVIRQ; irq++, is++) {
-		newmask[is-is_ipl] |= PIC_VIRQ_TO_MASK(irq);
+		for (ih = is-is_hand; ih != NULL; ih = ih-ih_next) {
+			newmask[ih-ih_ipl] |= PIC_VIRQ_TO_MASK(irq);
+		}
 	}
 
 	/*
@@ -379,7 +382,7 @@ intr_calculatemasks(void)
 		newmask[ipl] |= newmask[ipl - 1];
 	}
 
-#ifdef DEBUG_IPL
+#ifdef PIC_DEBUG
 	for (u_int ipl = 0; ipl  NIPL; ipl++) {
 		printf(%u: %08x - %08x\n, ipl, imask[ipl], newmask[ipl]);
 	}
@@ -661,10 +664,10 @@ spllower(int ncpl)
 void
 genppc_cpu_configure(void)
 {
-	aprint_normal(biomask %x netmask %x ttymask %x\n,
-	(u_int)imask[IPL_BIO]  0x1fff,
-	(u_int)imask[IPL_NET]  0x1fff,
-	(u_int)imask[IPL_TTY]  0x1fff);
+	aprint_normal(vmmask %x schedmask %x highmask %x\n,
+	(u_int)imask[IPL_VM]  0x7fff,
+	(u_int)imask[IPL_SCHED]  0x7fff,
+	(u_int)imask[IPL_HIGH]  0x7fff);
 
 	spl0();
 }



CVS commit: src/sys/arch/ia64/ia64

2012-08-31 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Aug 31 14:31:46 UTC 2012

Modified Files:
src/sys/arch/ia64/ia64: pmap.c

Log Message:
fix some confusion about PG_FAKE.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/ia64/ia64/pmap.c

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

Modified files:

Index: src/sys/arch/ia64/ia64/pmap.c
diff -u src/sys/arch/ia64/ia64/pmap.c:1.27 src/sys/arch/ia64/ia64/pmap.c:1.28
--- src/sys/arch/ia64/ia64/pmap.c:1.27	Fri Nov 12 07:59:26 2010
+++ src/sys/arch/ia64/ia64/pmap.c	Fri Aug 31 14:31:46 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.27 2010/11/12 07:59:26 uebayasi Exp $ */
+/* $NetBSD: pmap.c,v 1.28 2012/08/31 14:31:46 chs Exp $ */
 
 
 /*-
@@ -85,7 +85,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.27 2010/11/12 07:59:26 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.28 2012/08/31 14:31:46 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1239,9 +1239,6 @@ pmap_clear_modify(struct vm_page *pg)
 	pmap_t oldpmap;
 	pv_entry_t pv;
 
-	if (pg-flags  PG_FAKE)
-		return rv;
-
 	TAILQ_FOREACH(pv, md-pv_list, pv_list) {
 		PMAP_LOCK(pv-pv_pmap);
 		oldpmap = pmap_install(pv-pv_pmap);
@@ -1448,7 +1445,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd
  * Enter on the PV list if part of our managed memory.
  */
 
-if ((flags  (PG_FAKE)) == 0) {
+if (pg != NULL) {
 pmap_insert_entry(pmap, va, pg);
 managed = true;
 }
@@ -1478,7 +1475,7 @@ validate:
 
 
 /*
- *	Routine:	pmap_page_purge: = was: pmap_remove_all
+ *	Routine:	pmap_page_purge
  *	Function:
  *		Removes this physical page from
  *		all physical maps in which it resides.
@@ -1497,15 +1494,6 @@ pmap_page_purge(struct vm_page *pg)
 	pmap_t oldpmap;
 	pv_entry_t pv;
 
-#if defined(DIAGNOSTIC)
-	/*
-	 * XXX this makes pmap_page_protect(NONE) illegal for non-managed
-	 * pages!
-	 */
-	if (pg-flags  PG_FAKE) {
-		panic(pmap_page_protect: illegal for unmanaged page, va: 0x%lx, VM_PAGE_TO_PHYS(pg));
-	}
-#endif
 	//UVM_LOCK_ASSERT_PAGEQ();
 
 	while ((pv = TAILQ_FIRST(md-pv_list)) != NULL) {



CVS commit: src/tests/fs

2012-08-31 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Aug 31 14:46:54 UTC 2012

Modified Files:
src/tests/fs/common: Makefile
src/tests/fs/vfs: Makefile

Log Message:
Hook ZFS tests to MKZFS instead of a homegrown variable.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/common/Makefile
cvs rdiff -u -r1.17 -r1.18 src/tests/fs/vfs/Makefile

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

Modified files:

Index: src/tests/fs/common/Makefile
diff -u src/tests/fs/common/Makefile:1.8 src/tests/fs/common/Makefile:1.9
--- src/tests/fs/common/Makefile:1.8	Mon Aug 20 16:37:35 2012
+++ src/tests/fs/common/Makefile	Fri Aug 31 14:46:54 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2012/08/20 16:37:35 pooka Exp $
+#	$NetBSD: Makefile,v 1.9 2012/08/31 14:46:54 pooka Exp $
 #
 
 .include bsd.own.mk
@@ -8,7 +8,7 @@ SRCS=	fstest_ext2fs.c fstest_ffs.c fstes
 	fstest_nfs.c fstest_puffs.c fstest_rumpfs.c fstest_sysvbfs.c	\
 	fstest_tmpfs.c fstest_v7fs.c
 
-.ifdef WANT_ZFS_TESTS
+.if (${MKZFS} != no)
 SRCS+=	fstest_zfs.c
 CPPFLAGS+=-DWANT_ZFS_TESTS
 .endif

Index: src/tests/fs/vfs/Makefile
diff -u src/tests/fs/vfs/Makefile:1.17 src/tests/fs/vfs/Makefile:1.18
--- src/tests/fs/vfs/Makefile:1.17	Mon Aug 20 16:37:35 2012
+++ src/tests/fs/vfs/Makefile	Fri Aug 31 14:46:53 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2012/08/20 16:37:35 pooka Exp $
+#	$NetBSD: Makefile,v 1.18 2012/08/31 14:46:53 pooka Exp $
 #
 
 .include bsd.own.mk
@@ -38,7 +38,7 @@ LDADD+=-lrumpvfs -lrump -lrumpuser -lpth
 
 LDADD+=-lutil
 
-.ifdef WANT_ZFS_TESTS
+.if (${MKZFS} != no)
 LDADD+=-lrumpfs_zfs -lrumpkern_solaris -lrumpdev_rnd
 CPPFLAGS+=-DWANT_ZFS_TESTS
 .endif



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

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug 31 17:29:08 UTC 2012

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

Log Message:
The arm11 barriers are mcr (write), not mrc (read)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/include/lock.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/lock.h
diff -u src/sys/arch/arm/include/lock.h:1.20 src/sys/arch/arm/include/lock.h:1.21
--- src/sys/arch/arm/include/lock.h:1.20	Wed Aug 29 07:04:14 2012
+++ src/sys/arch/arm/include/lock.h	Fri Aug 31 17:29:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock.h,v 1.20 2012/08/29 07:04:14 matt Exp $	*/
+/*	$NetBSD: lock.h,v 1.21 2012/08/31 17:29:08 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@ __swp(__cpu_simple_lock_t __val, volatil
 #ifdef _ARM_ARCH_7
 			dmb
 #else
-			mrc p15, 0, %[__tmp], c7, c10, 5
+			mcr\tp15, 0, %[__tmp], c7, c10, 5
 #endif
 		: [__rv] =r (__rv), [__tmp] =r(__tmp)
 		: [__val] r (__val), [__ptr] r (__ptr) : cc, memory);
@@ -105,7 +105,7 @@ __swp(__cpu_simple_lock_t __val, volatil
 #ifdef _ARM_ARCH_7
 			nop
 #else
-			mrc p15, 0, %[__tmp], c7, c10, 5
+			mcr\tp15, 0, %[__tmp], c7, c10, 5
 #endif
 		: [__rv] =r (__rv), [__tmp] =r(__tmp)
 		: [__val] r (__val), [__ptr] r (__ptr) : cc, memory);
@@ -146,7 +146,7 @@ __swp(int __val, volatile int *__ptr)
 #ifdef _ARM_ARCH_7
 		dmb
 #elif defined(_ARM_ARCH_6)
-		mrc p15, 0, %[__tmp], c7, c10, 5
+		mcr\tp15, 0, %[__tmp], c7, c10, 5
 #else
 		nop
 #endif



CVS commit: src/usr.sbin/ac

2012-08-31 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Aug 31 19:55:23 UTC 2012

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

Log Message:
cgd and sjg relicensed this under 2-clause-BSD.
Reported by Ed Schouten e...@freebsd.org to tech-userlevel.

Adapt license to match FreeBSD's version, leaving Ed out
since according to CVS logs, he didn't touch NetBSD's version.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/ac/ac.c

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

Modified files:

Index: src/usr.sbin/ac/ac.c
diff -u src/usr.sbin/ac/ac.c:1.24 src/usr.sbin/ac/ac.c:1.25
--- src/usr.sbin/ac/ac.c:1.24	Mon Aug 29 20:38:53 2011
+++ src/usr.sbin/ac/ac.c	Fri Aug 31 19:55:23 2012
@@ -1,9 +1,10 @@
-/* $NetBSD: ac.c,v 1.24 2011/08/29 20:38:53 joerg Exp $ */
+/* $NetBSD: ac.c,v 1.25 2012/08/31 19:55:23 wiz Exp $ */
 
-/*
+/*-
  * Copyright (c) 1994 Christopher G. Demetriou
+ * Copyright (c) 1994 Simon J. Gerraty
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -12,44 +13,23 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *  This product includes software developed for the
- *  NetBSD Project.  See http://www.NetBSD.org/ for
- *  information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- *derived from this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * 
- * Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp
- *
  *
- *  @(#)Copyright (c) 1994, Simon J. Gerraty.
- *  
- *  This is free software.  It comes with NO WARRANTY.
- *  Permission to use, modify and distribute this source code 
- *  is granted subject to the following conditions.
- *  1/ that the above copyright notice and this notice 
- *  are preserved in all copies and that due credit be given 
- *  to the author.  
- *  2/ that any changes to this code are clearly commented 
- *  as such so that the author does not get blamed for bugs 
- *  other than his own.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
  */
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: ac.c,v 1.24 2011/08/29 20:38:53 joerg Exp $);
+__RCSID($NetBSD: ac.c,v 1.25 2012/08/31 19:55:23 wiz Exp $);
 #endif
 
 #include sys/types.h



CVS commit: src/doc

2012-08-31 Thread Ignatios Souvatzis
Module Name:src
Committed By:   is
Date:   Fri Aug 31 20:23:33 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
Note OpenSSH 6.1. Thanks for heads-up to Snader_LB.


To generate a diff of this commit:
cvs rdiff -u -r1.964 -r1.965 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.964 src/doc/3RDPARTY:1.965
--- src/doc/3RDPARTY:1.964	Tue Aug 28 07:55:01 2012
+++ src/doc/3RDPARTY	Fri Aug 31 20:23:33 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.964 2012/08/28 07:55:01 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.965 2012/08/31 20:23:33 is Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -848,7 +848,7 @@ Patch applied after OpenSSH import.
 
 Package:	OpenSSH
 Version:	6.0
-Current Vers:	6.0 / portable 6.0p1
+Current Vers:	6.1 / portable 6.1p1
 Maintainer:	OpenSSH
 Archive Site:	http://www.openssh.com/ftp.html
 Home Page:	http://www.openssh.com/portable.html



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

2012-08-31 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Aug 31 20:57:24 UTC 2012

Modified Files:
src/lib/libc/arch/i386/gen: _lwp.c

Log Message:
Align the stack to a 16-byte boundary on LWP creation.
This is more than required by the ABI, but it makes programs using SSE
in a thread work without extra compiler flags or performance hit.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/i386/gen/_lwp.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/arch/i386/gen/_lwp.c
diff -u src/lib/libc/arch/i386/gen/_lwp.c:1.7 src/lib/libc/arch/i386/gen/_lwp.c:1.8
--- src/lib/libc/arch/i386/gen/_lwp.c:1.7	Thu Feb 24 04:28:42 2011
+++ src/lib/libc/arch/i386/gen/_lwp.c	Fri Aug 31 20:57:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: _lwp.c,v 1.7 2011/02/24 04:28:42 joerg Exp $	*/
+/*	$NetBSD: _lwp.c,v 1.8 2012/08/31 20:57:24 drochner Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: _lwp.c,v 1.7 2011/02/24 04:28:42 joerg Exp $);
+__RCSID($NetBSD: _lwp.c,v 1.8 2012/08/31 20:57:24 drochner Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -56,9 +56,9 @@ _lwp_makecontext(ucontext_t *u, void (*s
 	/* LINTED uintptr_t is safe */
 	u-uc_mcontext.__gregs[_REG_EIP] = (uintptr_t)start;
 	
-	/* Align to a word */
+	/* Align to a 16-byte boundary for SSE */
 	/* LINTED uintptr_t is safe */
-	sp = (void **) ((uintptr_t)(stack_base + stack_size)  ~0x3);
+	sp = (void **) (((uintptr_t)(stack_base + stack_size - 4)  ~0xf) + 4);
 	
 	*--sp = arg;
 	*--sp = (void *) _lwp_exit;



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

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug 31 23:41:52 UTC 2012

Modified Files:
src/common/lib/libc/arch/arm/atomic: atomic_add_32.S atomic_and_32.S
atomic_cas_32.S atomic_cas_8.S atomic_dec_32.S atomic_inc_32.S
atomic_or_32.S atomic_swap.S

Log Message:
Add dmb/dsb instructions as required by the armv7 arch man.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/atomic/atomic_add_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_and_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_dec_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_or_32.S
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/atomic/atomic_swap.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_add_32.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_add_32.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_add_32.S:1.3
--- src/common/lib/libc/arch/arm/atomic/atomic_add_32.S:1.2	Sat Aug 16 07:12:39 2008
+++ src/common/lib/libc/arch/arm/atomic/atomic_add_32.S	Fri Aug 31 23:41:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_add_32.S,v 1.2 2008/08/16 07:12:39 matt Exp $	*/
+/*	$NetBSD: atomic_add_32.S,v 1.3 2012/08/31 23:41:52 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -40,6 +40,11 @@ ENTRY_NP(_atomic_add_32)
 	strex	ip, r2, [r3]		/* try to store */
 	cmp	ip, #0			/*   succeed? */
 	bne	1b			/* no, try again */
+#ifdef _ARM_ARCH_7
+	dmb
+#else
+	mcr	p15, 0, ip, c7, c10, 5	/* data memory barrier */
+#endif
 	RET/* return old value */
 	END(_atomic_add_32)
 ATOMIC_OP_ALIAS(atomic_add_32,_atomic_add_32)
@@ -57,6 +62,11 @@ ENTRY_NP(_atomic_add_32_nv)
 	strex	r2, r0, [r3]		/* try to store */
 	cmp	r2, #0			/*   succeed? */
 	bne	1b			/* no, try again? */
+#ifdef _ARM_ARCH_7
+	dmb
+#else
+	mcr	p15, 0, ip, c7, c10, 5	/* data memory barrier */
+#endif
 	RET/* return new value */
 	END(_atomic_add_32_nv)
 ATOMIC_OP_ALIAS(atomic_add_32_nv,_atomic_add_32_nv)
Index: src/common/lib/libc/arch/arm/atomic/atomic_and_32.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_and_32.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_and_32.S:1.3
--- src/common/lib/libc/arch/arm/atomic/atomic_and_32.S:1.2	Sat Aug 16 07:12:39 2008
+++ src/common/lib/libc/arch/arm/atomic/atomic_and_32.S	Fri Aug 31 23:41:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_and_32.S,v 1.2 2008/08/16 07:12:39 matt Exp $	*/
+/*	$NetBSD: atomic_and_32.S,v 1.3 2012/08/31 23:41:52 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -40,6 +40,11 @@ ENTRY_NP(_atomic_and_32)
 	strex	ip, r2, [r3]		/* try to store */
 	cmp	ip, #0			/*   succeed? */
 	bne	1b			/* no, try again */
+#ifdef _ARM_ARCH_7
+	dmb
+#else
+	mcr	p15, 0, ip, c7, c10, 5	/* data memory barrier */
+#endif
 	RET/* return old value */
 	END(_atomic_and_32)
 ATOMIC_OP_ALIAS(atomic_and_32,_atomic_and_32)
@@ -55,6 +60,11 @@ ENTRY_NP(_atomic_and_32_nv)
 	strex	r2, r0, [r3]		/* try to store */
 	cmp	r2, #0			/*   succeed? */
 	bne	1b			/* no, try again? */
+#ifdef _ARM_ARCH_7
+	dmb
+#else
+	mcr	p15, 0, ip, c7, c10, 5	/* data memory barrier */
+#endif
 	RET/* return new value */
 	END(_atomic_and_32_nv)
 ATOMIC_OP_ALIAS(atomic_and_32_nv,_atomic_and_32_nv)
Index: src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S:1.3
--- src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S:1.2	Sat Aug 16 07:12:39 2008
+++ src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S	Fri Aug 31 23:41:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_cas_32.S,v 1.2 2008/08/16 07:12:39 matt Exp $	*/
+/*	$NetBSD: atomic_cas_32.S,v 1.3 2012/08/31 23:41:52 matt Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -44,15 +44,28 @@ ENTRY_NP(_atomic_cas_32)
 	strex	ip, r2, [r3]		/* store new value */
 	cmp	ip, #0			/*   succeed? */
 	bne	1b			/* nope, try again. */
-	RET/*yes, return. */
+#ifdef _ARM_ARCH_7
+	dsb
+#else
+	mcr	p15, 0, ip, c7, c10, 4	/* data synchronization barrier */
+#endif
+	RET/* return. */
 	END(_atomic_cas_32)
 
 ATOMIC_OP_ALIAS(atomic_cas_32,_atomic_cas_32)
 ATOMIC_OP_ALIAS(atomic_cas_uint,_atomic_cas_32)
 ATOMIC_OP_ALIAS(atomic_cas_ulong,_atomic_cas_32)
 ATOMIC_OP_ALIAS(atomic_cas_ptr,_atomic_cas_32)
+ATOMIC_OP_ALIAS(atomic_cas_32_ni,_atomic_cas_32)
+ATOMIC_OP_ALIAS(atomic_cas_uint_ni,_atomic_cas_32)
+ATOMIC_OP_ALIAS(atomic_cas_ulong_ni,_atomic_cas_32)
+ATOMIC_OP_ALIAS(atomic_cas_ptr_ni,_atomic_cas_32)
 STRONG_ALIAS(_atomic_cas_uint,_atomic_cas_32)
 STRONG_ALIAS(_atomic_cas_ulong,_atomic_cas_32)

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

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug 31 23:42:34 UTC 2012

Modified Files:
src/sys/arch/arm/arm: lock_cas.S

Log Message:
Add ucas32 for SMP.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm/lock_cas.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/lock_cas.S
diff -u src/sys/arch/arm/arm/lock_cas.S:1.8 src/sys/arch/arm/arm/lock_cas.S:1.9
--- src/sys/arch/arm/arm/lock_cas.S:1.8	Thu Aug 16 16:49:10 2012
+++ src/sys/arch/arm/arm/lock_cas.S	Fri Aug 31 23:42:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_cas.S,v 1.8 2012/08/16 16:49:10 matt Exp $	*/
+/*	$NetBSD: lock_cas.S,v 1.9 2012/08/31 23:42:34 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,16 +30,16 @@
  */
 
 #include opt_multiprocessor.h
-#if defined(MULTIPROCESSOR)
-#error need to write MP support for ucas_* functions
-#endif
-
 #include opt_arm_debug.h
 
 #include assym.h
 #include machine/asm.h
 #include machine/cpu.h
 
+#if defined(MULTIPROCESSOR)  !defined(_ARM_ARCH_6)
+#error need to write MP support for ucas_* functions
+#endif
+
 	.text
 	.align	0
 
@@ -108,8 +108,8 @@ STRONG_ALIAS(atomic_cas_ptr_ni,_lock_cas
 #endif /* !_ARM_ARCH_6 */
 
 #ifdef __PROG32
-#define SAVE_REGS	stmfd	sp!, {r4-r6}
-#define RESTORE_REGS	ldmfd	sp!, {r4-r6}
+#define SAVE_REGS	stmfd	sp!, {r4-r5}
+#define RESTORE_REGS	ldmfd	sp!, {r4-r5}
 #else
 /* Need to save R14_svc because it'll get trampled if we take a page fault. */
 #define SAVE_REGS	stmfd	sp!, {r4-r6, r14}
@@ -127,9 +127,19 @@ ENTRY(ucas_32)
 
 	.globl	_C_LABEL(ucas_32_ras_start)
 _C_LABEL(ucas_32_ras_start):
+#ifdef MULTIPROCESSOR
+1:	ldrex	r5, [r0]		/* we should have access */
+	cmp	r1, r5
+	bne	2f
+	strex	ip, r2, [r0]
+	cmp	ip, #0
+	bne	1b
+2:
+#else
 	ldrt	r5, [r0]
 	cmp	r1, r5
 	streqt	r2, [r0]
+#endif
 	.globl _C_LABEL(ucas_32_ras_end)
 _C_LABEL(ucas_32_ras_end):
 



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

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug 31 23:56:15 UTC 2012

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

Log Message:
Move the __cpu_simple_lock to the last byte so it's easier to read in dumps


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/mutex.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/mutex.h
diff -u src/sys/arch/arm/include/mutex.h:1.11 src/sys/arch/arm/include/mutex.h:1.12
--- src/sys/arch/arm/include/mutex.h:1.11	Thu Aug 16 16:49:10 2012
+++ src/sys/arch/arm/include/mutex.h	Fri Aug 31 23:56:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mutex.h,v 1.11 2012/08/16 16:49:10 matt Exp $	*/
+/*	$NetBSD: mutex.h,v 1.12 2012/08/31 23:56:15 matt Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -63,8 +63,8 @@ struct kmutex {
 		struct {
 			volatile uint8_t	mtxs_dummy;
 			ipl_cookie_t		mtxs_ipl;
-			__cpu_simple_lock_t	mtxs_lock;
 			volatile uint8_t	mtxs_unused;
+			__cpu_simple_lock_t	mtxs_lock;
 		} s;
 	} u;
 };



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

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 00:00:42 UTC 2012

Modified Files:
src/sys/arch/arm/pic: files.pic pic.c pic_splfuncs.c picvar.h

Log Message:
Add PIC hooks for MP and for the ARM Generic Interrupt Controller.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/pic/files.pic \
src/sys/arch/arm/pic/pic_splfuncs.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/pic/pic.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/pic/picvar.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/pic/files.pic
diff -u src/sys/arch/arm/pic/files.pic:1.3 src/sys/arch/arm/pic/files.pic:1.4
--- src/sys/arch/arm/pic/files.pic:1.3	Fri Mar 11 03:16:14 2011
+++ src/sys/arch/arm/pic/files.pic	Sat Sep  1 00:00:42 2012
@@ -1,9 +1,11 @@
-#	$NetBSD: files.pic,v 1.3 2011/03/11 03:16:14 bsh Exp $
+#	$NetBSD: files.pic,v 1.4 2012/09/01 00:00:42 matt Exp $
 #
 # Configuration info for the common PIC code.
 #
 define	pic
 define	pic_splfuncs
+defflag opt_arm_intr_impl.h		__HAVE_PIC_SET_PRIORITY
+defflag opt_arm_intr_impl.h		__HAVE_PIC_SOFTINT
 
 file	arch/arm/pic/pic.c		pic
 file	arch/arm/pic/pic_splfuncs.c	pic  pic_splfuncs
Index: src/sys/arch/arm/pic/pic_splfuncs.c
diff -u src/sys/arch/arm/pic/pic_splfuncs.c:1.3 src/sys/arch/arm/pic/pic_splfuncs.c:1.4
--- src/sys/arch/arm/pic/pic_splfuncs.c:1.3	Sat Jul 14 07:52:53 2012
+++ src/sys/arch/arm/pic/pic_splfuncs.c	Sat Sep  1 00:00:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_splfuncs.c,v 1.3 2012/07/14 07:52:53 matt Exp $	*/
+/*	$NetBSD: pic_splfuncs.c,v 1.4 2012/09/01 00:00:42 matt Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -28,15 +28,15 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pic_splfuncs.c,v 1.3 2012/07/14 07:52:53 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pic_splfuncs.c,v 1.4 2012/09/01 00:00:42 matt Exp $);
 
 #define _INTR_PRIVATE
 #include sys/param.h
-#include sys/evcnt.h
-#include sys/atomic.h
-#include sys/malloc.h
-#include sys/mallocvar.h
 #include sys/atomic.h
+#include sys/evcnt.h
+#include sys/kernel.h
+
+#include dev/cons.h
 
 #include arm/armreg.h
 #include arm/cpu.h
@@ -63,11 +63,13 @@ _spllower(int newipl)
 	const int oldipl = ci-ci_cpl;
 	KASSERT(panicstr || newipl = ci-ci_cpl);
 	if (newipl  ci-ci_cpl) {
-		register_t psw = disable_interrupts(I32_bit);
+		register_t psw = cpsid(I32_bit);
 		ci-ci_intr_depth++;
 		pic_do_pending_ints(psw, newipl, NULL);
 		ci-ci_intr_depth--;
-		restore_interrupts(psw);
+		if ((psw  I32_bit) == 0)
+			cpsie(I32_bit);
+		cpu_dosoftints();
 	}
 	return oldipl;
 }
@@ -77,12 +79,26 @@ splx(int savedipl)
 {
 	struct cpu_info * const ci = curcpu();
 	KASSERT(savedipl  NIPL);
-	if (savedipl  ci-ci_cpl) {
-		register_t psw = disable_interrupts(I32_bit);
-		ci-ci_intr_depth++;
-		pic_do_pending_ints(psw, savedipl, NULL);
-		ci-ci_intr_depth--;
-		restore_interrupts(psw);
+
+	if (__predict_false(savedipl == ci-ci_cpl)) {
+		return;
 	}
-	ci-ci_cpl = savedipl;
+
+	register_t psw = cpsid(I32_bit);
+	KASSERTMSG(panicstr != NULL || savedipl  ci-ci_cpl,
+	splx(%d) to a higher ipl than %d, savedipl, ci-ci_cpl);
+
+	ci-ci_intr_depth++;
+	pic_do_pending_ints(psw, savedipl, NULL);
+	ci-ci_intr_depth--;
+	KASSERTMSG(ci-ci_cpl == savedipl, cpl %d savedipl %d,
+	ci-ci_cpl, savedipl);
+	cpu_dosoftints();
+	KASSERTMSG(ci-ci_cpl == savedipl, cpl %d savedipl %d,
+	ci-ci_cpl, savedipl);
+	if ((psw  I32_bit) == 0)
+		cpsie(I32_bit);
+
+	KASSERTMSG(ci-ci_cpl == savedipl, cpl %d savedipl %d,
+	ci-ci_cpl, savedipl);
 }

Index: src/sys/arch/arm/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.12 src/sys/arch/arm/pic/pic.c:1.13
--- src/sys/arch/arm/pic/pic.c:1.12	Fri Jul 20 21:53:57 2012
+++ src/sys/arch/arm/pic/pic.c	Sat Sep  1 00:00:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.12 2012/07/20 21:53:57 matt Exp $	*/
+/*	$NetBSD: pic.c,v 1.13 2012/09/01 00:00:42 matt Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -28,15 +28,17 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pic.c,v 1.12 2012/07/20 21:53:57 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pic.c,v 1.13 2012/09/01 00:00:42 matt Exp $);
 
 #define _INTR_PRIVATE
 #include sys/param.h
-#include sys/evcnt.h
-#include sys/atomic.h
-#include sys/kmem.h
 #include sys/atomic.h
 #include sys/cpu.h
+#include sys/evcnt.h
+#include sys/intr.h
+#include sys/kernel.h
+#include sys/kmem.h
+#include sys/xcall.h
 
 #include arm/armreg.h
 #include arm/cpufunc.h
@@ -74,10 +76,80 @@ EVCNT_ATTACH_STATIC(pic_deferral_ev);
 void
 pic_set_priority(struct cpu_info *ci, int newipl)
 {
-	register_t psw = disable_interrupts(I32_bit);
+	register_t psw = cpsid(I32_bit);
+	if (pic_list[0] != NULL)
+		(pic_list[0]-pic_ops-pic_set_priority)(pic_list[0], newipl);
 	ci-ci_cpl = newipl;
-	

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

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 00:01:43 UTC 2012

Modified Files:
src/sys/arch/arm/fpe-arm: armfpe_init.c

Log Message:
XXX this can not have worked for a long time.
Move this to the world of lwps.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/fpe-arm/armfpe_init.c

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

Modified files:

Index: src/sys/arch/arm/fpe-arm/armfpe_init.c
diff -u src/sys/arch/arm/fpe-arm/armfpe_init.c:1.16 src/sys/arch/arm/fpe-arm/armfpe_init.c:1.17
--- src/sys/arch/arm/fpe-arm/armfpe_init.c:1.16	Sat Nov 21 20:32:27 2009
+++ src/sys/arch/arm/fpe-arm/armfpe_init.c	Sat Sep  1 00:01:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: armfpe_init.c,v 1.16 2009/11/21 20:32:27 rmind Exp $	*/
+/*	$NetBSD: armfpe_init.c,v 1.17 2012/09/01 00:01:43 matt Exp $	*/
 
 /*
  * Copyright (C) 1996 Mark Brinicombe
@@ -43,7 +43,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: armfpe_init.c,v 1.16 2009/11/21 20:32:27 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: armfpe_init.c,v 1.17 2012/09/01 00:01:43 matt Exp $);
 
 #include sys/systm.h
 #include sys/proc.h
@@ -69,7 +69,7 @@ u_int arm_fpe_core_workspace;
  * Error messages for the various exceptions, numbered 0-5
  */
  
-static const char *exception_errors[] = {
+static const char * const exception_errors[] = {
 	invalid operation,
 	division by zero (0),
 	overflow,
@@ -172,11 +172,11 @@ arm_fpe_boot(void)
 void
 arm_fpe_postproc(u_int fpframe, struct trapframe *frame)
 {
-	register int sig;
-	register struct proc *p;
+	struct lwp * const l = curlwp;
+	struct proc * const p = l-l_proc;
+	int sig;
 
-	p = curproc;
-	p-p_addr-u_pcb.pcb_tf = frame;
+	l-l_md.md_tf = frame;
 
 	/* take pending signals */
 



CVS commit: src/sys

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 00:24:44 UTC 2012

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

Log Message:
Add a kcpuset_t which just includes ourself.
Add a ci_cpuname for convenience


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/kern/kern_cpu.c
cvs rdiff -u -r1.34 -r1.35 src/sys/sys/cpu_data.h

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

Modified files:

Index: src/sys/kern/kern_cpu.c
diff -u src/sys/kern/kern_cpu.c:1.57 src/sys/kern/kern_cpu.c:1.58
--- src/sys/kern/kern_cpu.c:1.57	Wed Aug 29 17:13:21 2012
+++ src/sys/kern/kern_cpu.c	Sat Sep  1 00:24:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_cpu.c,v 1.57 2012/08/29 17:13:21 drochner Exp $	*/
+/*	$NetBSD: kern_cpu.c,v 1.58 2012/09/01 00:24:43 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010, 2012 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.57 2012/08/29 17:13:21 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.58 2012/09/01 00:24:43 matt Exp $);
 
 #include opt_cpu_ucode.h
 #include opt_compat_netbsd.h
@@ -146,6 +146,12 @@ mi_cpu_attach(struct cpu_info *ci)
 	ci-ci_index = ncpu;
 	kcpuset_set(kcpuset_attached, cpu_index(ci));
 
+	/*
+	 * Create a convenience cpuset of just ourselves.
+	 */
+	kcpuset_create(ci-ci_data.cpu_kcpuset, true);
+	kcpuset_set(ci-ci_data.cpu_kcpuset, cpu_index(ci));
+
 	CIRCLEQ_INSERT_TAIL(cpu_queue, ci, ci_data.cpu_qchain);
 	TAILQ_INIT(ci-ci_data.cpu_ld_locks);
 	__cpu_simple_lock_init(ci-ci_data.cpu_ld_lock);

Index: src/sys/sys/cpu_data.h
diff -u src/sys/sys/cpu_data.h:1.34 src/sys/sys/cpu_data.h:1.35
--- src/sys/sys/cpu_data.h:1.34	Sun Jan 29 22:55:40 2012
+++ src/sys/sys/cpu_data.h	Sat Sep  1 00:24:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_data.h,v 1.34 2012/01/29 22:55:40 rmind Exp $	*/
+/*	$NetBSD: cpu_data.h,v 1.35 2012/09/01 00:24:44 matt Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -42,6 +42,7 @@ struct lwp;
 #include sys/pcu.h
 #include sys/percpu_types.h
 #include sys/queue.h
+#include sys/kcpuset.h
 
 /*
  * MI per-cpu data
@@ -107,6 +108,7 @@ struct cpu_data {
 	uint64_t	cpu_cc_freq;		/* cycle counter frequency */
 	int64_t		cpu_cc_skew;		/* counter skew vs cpu0 */
 	char		cpu_name[8];		/* eg, cpu4 */
+	kcpuset_t	*cpu_kcpuset;		/* kcpuset_t of this cpu only */
 };
 
 /* compat definitions */
@@ -114,12 +116,14 @@ struct cpu_data {
 #define	ci_index		ci_data.cpu_index
 #define	ci_biglock_count	ci_data.cpu_biglock_count
 #define	ci_biglock_wanted	ci_data.cpu_biglock_wanted
+#define	ci_cpuname		ci_data.cpu_name
 #define	ci_spin_locks		ci_data.cpu_spin_locks
 #define	ci_simple_locks		ci_data.cpu_simple_locks
 #define	ci_lockstat		ci_data.cpu_lockstat
 #define	ci_spin_locks2		ci_data.cpu_spin_locks2
 #define	ci_lkdebug_recurse	ci_data.cpu_lkdebug_recurse
 #define	ci_pcu_curlwp		ci_data.cpu_pcu_curlwp
+#define	ci_kcpuset		ci_data.cpu_kcpuset
 
 #define	ci_package_id		ci_data.cpu_package_id
 #define	ci_core_id		ci_data.cpu_core_id



CVS commit: src/sys

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 00:26:38 UTC 2012

Modified Files:
src/sys/kern: kern_kthread.c
src/sys/uvm: uvm_extern.h uvm_glue.c

Log Message:
Add a __HAVE_CPU_UAREA_IDLELWP hook so that the MD code can allocate
special UAREAs for idle lwp's.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/kern_kthread.c
cvs rdiff -u -r1.183 -r1.184 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.159 -r1.160 src/sys/uvm/uvm_glue.c

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

Modified files:

Index: src/sys/kern/kern_kthread.c
diff -u src/sys/kern/kern_kthread.c:1.38 src/sys/kern/kern_kthread.c:1.39
--- src/sys/kern/kern_kthread.c:1.38	Tue Nov  1 15:39:37 2011
+++ src/sys/kern/kern_kthread.c	Sat Sep  1 00:26:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_kthread.c,v 1.38 2011/11/01 15:39:37 jym Exp $	*/
+/*	$NetBSD: kern_kthread.c,v 1.39 2012/09/01 00:26:37 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_kthread.c,v 1.38 2011/11/01 15:39:37 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_kthread.c,v 1.39 2012/09/01 00:26:37 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -70,7 +70,8 @@ kthread_create(pri_t pri, int flag, stru
 
 	KASSERT((flag  KTHREAD_INTR) == 0 || (flag  KTHREAD_MPSAFE) != 0);
 
-	uaddr = uvm_uarea_system_alloc();
+	uaddr = uvm_uarea_system_alloc(
+	   (flag  (KTHREAD_INTR|KTHREAD_IDLE)) == KTHREAD_IDLE ? ci : NULL);
 	if (uaddr == 0) {
 		return ENOMEM;
 	}

Index: src/sys/uvm/uvm_extern.h
diff -u src/sys/uvm/uvm_extern.h:1.183 src/sys/uvm/uvm_extern.h:1.184
--- src/sys/uvm/uvm_extern.h:1.183	Sun Apr  8 11:27:45 2012
+++ src/sys/uvm/uvm_extern.h	Sat Sep  1 00:26:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_extern.h,v 1.183 2012/04/08 11:27:45 martin Exp $	*/
+/*	$NetBSD: uvm_extern.h,v 1.184 2012/09/01 00:26:37 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -601,7 +601,7 @@ bool			uvm_kernacc(void *, size_t, vm_pr
 __dead void		uvm_scheduler(void);
 vaddr_t			uvm_uarea_alloc(void);
 void			uvm_uarea_free(vaddr_t);
-vaddr_t			uvm_uarea_system_alloc(void);
+vaddr_t			uvm_uarea_system_alloc(struct cpu_info *);
 void			uvm_uarea_system_free(vaddr_t);
 vaddr_t			uvm_lwp_getuarea(lwp_t *);
 void			uvm_lwp_setuarea(lwp_t *, vaddr_t);

Index: src/sys/uvm/uvm_glue.c
diff -u src/sys/uvm/uvm_glue.c:1.159 src/sys/uvm/uvm_glue.c:1.160
--- src/sys/uvm/uvm_glue.c:1.159	Sun Apr  8 11:27:45 2012
+++ src/sys/uvm/uvm_glue.c	Sat Sep  1 00:26:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_glue.c,v 1.159 2012/04/08 11:27:45 martin Exp $	*/
+/*	$NetBSD: uvm_glue.c,v 1.160 2012/09/01 00:26:37 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_glue.c,v 1.159 2012/04/08 11:27:45 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_glue.c,v 1.160 2012/09/01 00:26:37 matt Exp $);
 
 #include opt_kgdb.h
 #include opt_kstack.h
@@ -366,8 +366,12 @@ uvm_uarea_alloc(void)
 }
 
 vaddr_t
-uvm_uarea_system_alloc(void)
+uvm_uarea_system_alloc(struct cpu_info *ci)
 {
+#ifdef __HAVE_CPU_UAREA_ALLOC_IDLELWP
+	if (__predict_false(ci != NULL))
+		return cpu_uarea_alloc_idlelwp(ci);
+#endif
 
 	return (vaddr_t)pool_cache_get(uvm_uarea_system_cache, PR_WAITOK);
 }



CVS commit: src/sys/sys

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 00:27:12 UTC 2012

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

Log Message:
Welcome to 6.99.11!


To generate a diff of this commit:
cvs rdiff -u -r1.418 -r1.419 src/sys/sys/param.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/param.h
diff -u src/sys/sys/param.h:1.418 src/sys/sys/param.h:1.419
--- src/sys/sys/param.h:1.418	Sun Jul 22 22:44:28 2012
+++ src/sys/sys/param.h	Sat Sep  1 00:27:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.418 2012/07/22 22:44:28 rmind Exp $	*/
+/*	$NetBSD: param.h,v 1.419 2012/09/01 00:27:12 matt Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	699001000	/* NetBSD 6.99.10 */
+#define	__NetBSD_Version__	699001100	/* NetBSD 6.99.11 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)



CVS commit: src/sys/ddb

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 00:28:12 UTC 2012

Modified Files:
src/sys/ddb: db_output.c files.ddb

Log Message:
Make DB_MAX_LINES a kernel option


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/ddb/db_output.c
cvs rdiff -u -r1.7 -r1.8 src/sys/ddb/files.ddb

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

Modified files:

Index: src/sys/ddb/db_output.c
diff -u src/sys/ddb/db_output.c:1.31 src/sys/ddb/db_output.c:1.32
--- src/sys/ddb/db_output.c:1.31	Sun Jul 17 20:54:50 2011
+++ src/sys/ddb/db_output.c	Sat Sep  1 00:28:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_output.c,v 1.31 2011/07/17 20:54:50 joerg Exp $	*/
+/*	$NetBSD: db_output.c,v 1.32 2012/09/01 00:28:12 matt Exp $	*/
 
 /*
  * Mach Operating System
@@ -30,8 +30,10 @@
  * Printf and character output for debugger.
  */
 
+#include opt_ddbparam.h
+
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_output.c,v 1.31 2011/07/17 20:54:50 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_output.c,v 1.32 2012/09/01 00:28:12 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h

Index: src/sys/ddb/files.ddb
diff -u src/sys/ddb/files.ddb:1.7 src/sys/ddb/files.ddb:1.8
--- src/sys/ddb/files.ddb:1.7	Thu Jul 28 13:42:16 2011
+++ src/sys/ddb/files.ddb	Sat Sep  1 00:28:12 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.ddb,v 1.7 2011/07/28 13:42:16 uebayasi Exp $
+#	$NetBSD: files.ddb,v 1.8 2012/09/01 00:28:12 matt Exp $
 
 #
 # DDB options
@@ -6,7 +6,7 @@
 defflag opt_ddb.h		DDB DDB_VERBOSE_HELP
 defparam opt_ddbparam.h		DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE
 DDB_BREAK_CHAR DDB_KEYCODE
-DDB_COMMANDONENTER 
+DDB_COMMANDONENTER DB_MAX_LINE
 
 file	ddb/db_access.c			ddb | kgdb
 file	ddb/db_break.c			ddb



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

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 00:29:01 UTC 2012

Modified Files:
src/sys/arch/bebox/stand/boot: Makefile

Log Message:
Add ${_MKTARGET_LINK}


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/bebox/stand/boot/Makefile

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/bebox/stand/boot/Makefile
diff -u src/sys/arch/bebox/stand/boot/Makefile:1.31 src/sys/arch/bebox/stand/boot/Makefile:1.32
--- src/sys/arch/bebox/stand/boot/Makefile:1.31	Sat Jan 22 19:19:16 2011
+++ src/sys/arch/bebox/stand/boot/Makefile	Sat Sep  1 00:29:00 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2011/01/22 19:19:16 joerg Exp $
+#	$NetBSD: Makefile,v 1.32 2012/09/01 00:29:00 matt Exp $
 
 NOMAN= # defined
 
@@ -78,6 +78,7 @@ vers.c: ${.CURDIR}/../boot/version
 	${.CURDIR}/../boot/version bebox ${NEWVERSWHAT}
 
 ${PROG}: ${OBJS} ${LIBS}
+	${_MKTARGET_LINK}
 	${LD} -o ${PROG}.elf -N -T ${.CURDIR}/../boot/ld.script \
 		-Ttext ${RELOC} ${OBJS} ${LIBS}
 	${STRIP} -o ${PROG} ${PROG}.elf



CVS commit: src/doc

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 00:49:03 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Note new ARM changes.


To generate a diff of this commit:
cvs rdiff -u -r1.1740 -r1.1741 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1740 src/doc/CHANGES:1.1741
--- src/doc/CHANGES:1.1740	Sun Aug 26 23:03:20 2012
+++ src/doc/CHANGES	Sat Sep  1 00:49:02 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1740 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1741 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -109,3 +109,9 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	mkdep(1): Add -P option.  [jmmv 20120826]
 	share/mk: Add placeholder test programs (with some very basic test
 		cases within) for common bsd.*.mk modules.  [jmmv 20120826]
+	arm: Add Cortex-A9 support (a9tmr, a9wdt, armgic, armperiph).  Add
+		initial MP support (can boot 2nd cpu but dies quickly).  Add
+		L1 SuperSection support for ARMv6/ARMv7.  Add support for 
+		BCM5301X SoC.  Add initial support for OMAP4430 and partial
+		support for Freescale i.MX6.  Add new common boot/kvminit
+		code.  [matt 20120831]



CVS commit: src/sys/ddb

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 01:13:52 UTC 2012

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

Log Message:
Use _KERNEL_OPT


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/ddb/db_output.c

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

Modified files:

Index: src/sys/ddb/db_output.c
diff -u src/sys/ddb/db_output.c:1.32 src/sys/ddb/db_output.c:1.33
--- src/sys/ddb/db_output.c:1.32	Sat Sep  1 00:28:12 2012
+++ src/sys/ddb/db_output.c	Sat Sep  1 01:13:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_output.c,v 1.32 2012/09/01 00:28:12 matt Exp $	*/
+/*	$NetBSD: db_output.c,v 1.33 2012/09/01 01:13:51 matt Exp $	*/
 
 /*
  * Mach Operating System
@@ -30,10 +30,12 @@
  * Printf and character output for debugger.
  */
 
+#ifdef _KERNEL_OPT
 #include opt_ddbparam.h
+#endif
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_output.c,v 1.32 2012/09/01 00:28:12 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_output.c,v 1.33 2012/09/01 01:13:51 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h



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

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 01:44:17 UTC 2012

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

Log Message:
Add #ifdef DIAGNOSTIC / #endif


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/pic/pic.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/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.13 src/sys/arch/arm/pic/pic.c:1.14
--- src/sys/arch/arm/pic/pic.c:1.13	Sat Sep  1 00:00:42 2012
+++ src/sys/arch/arm/pic/pic.c	Sat Sep  1 01:44:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.13 2012/09/01 00:00:42 matt Exp $	*/
+/*	$NetBSD: pic.c,v 1.14 2012/09/01 01:44:16 matt Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -28,7 +28,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pic.c,v 1.13 2012/09/01 00:00:42 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pic.c,v 1.14 2012/09/01 01:44:16 matt Exp $);
 
 #define _INTR_PRIVATE
 #include sys/param.h
@@ -476,7 +476,9 @@ pic_percpu_allocate(void *v0, void *v1, 
 	KASSERT(pcpu-pcpu_evs != NULL);
 
 #define	PCPU_NAMELEN	32
+#ifdef DIAGNOSTIC
 	const size_t namelen = strlen(pic-pic_name) + 4 + strlen(ci-ci_data.cpu_name);
+#endif
 
 	KASSERT(namelen  PCPU_NAMELEN);
 	pcpu-pcpu_name = kmem_alloc(PCPU_NAMELEN, KM_SLEEP);



CVS commit: src/etc/etc.evbarm

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 01:45:17 UTC 2012

Modified Files:
src/etc/etc.evbarm: MAKEDEV.conf

Log Message:
Add lots more ldN dkN
Add drvctl to md


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.evbarm/MAKEDEV.conf

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

Modified files:

Index: src/etc/etc.evbarm/MAKEDEV.conf
diff -u src/etc/etc.evbarm/MAKEDEV.conf:1.6 src/etc/etc.evbarm/MAKEDEV.conf:1.7
--- src/etc/etc.evbarm/MAKEDEV.conf:1.6	Thu Aug 16 13:31:24 2012
+++ src/etc/etc.evbarm/MAKEDEV.conf	Sat Sep  1 01:45:17 2012
@@ -1,7 +1,8 @@
-# $NetBSD: MAKEDEV.conf,v 1.6 2012/08/16 13:31:24 abs Exp $
+# $NetBSD: MAKEDEV.conf,v 1.7 2012/09/01 01:45:17 matt Exp $
 
 all_md)
-	makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3 ld0
+	makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
+	makedev ld0 ld1 ld2 ld3 dk0 dk1 dk2 dk3 dk4 dk5 dk6 dk7
 	makedev flash0 flash1 flash2 flash3 flash4 flash5 flash6 flash7
 	makedev tty0 tty1 st0 st1 ch0 cd0 cd1
 	makedev uk0 uk1 ss0
@@ -17,8 +18,10 @@ all_md)
 	;;
 
 ramdisk|floppy)
-	makedev std bpf fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3 ld0
+	makedev std bpf fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3
+	makedev ld0 ld1 ld2 ld3 dk0 dk1 dk2 dk3 dk4 dk5 dk6 dk7
 	makedev flash0 flash1 flash2 flash3 flash4 flash5 flash6 flash7
 	makedev tty0 tty1 opty
 	makedev st0 st1 cd0 cd1
+	makedev drvctl
 	;;



CVS commit: src/etc/etc.evbarm

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 02:03:35 UTC 2012

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Add BCM5301X


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 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/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.30 src/etc/etc.evbarm/Makefile.inc:1.31
--- src/etc/etc.evbarm/Makefile.inc:1.30	Mon Aug  6 07:51:13 2012
+++ src/etc/etc.evbarm/Makefile.inc	Sat Sep  1 02:03:35 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.30 2012/08/06 07:51:13 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.31 2012/09/01 02:03:35 matt Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -9,7 +9,7 @@ EVBARM_BOARDS=
 
 .if ${MACHINE_ARCH} == arm
 # Little endian platforms (armv4 or pre-armv5t)
-EVBARM_BOARDS+=		ADI_BRH CP3100 GEMINI GUMSTIX INTEGRATOR \
+EVBARM_BOARDS+=		ADI_BRH BCM5301X CP3100 GEMINI GUMSTIX INTEGRATOR \
 			IQ80310 IQ80321 MINI2440 MV2120 SMDK2410 \
 			SMDK2800 TEAMASA_NPWR TS7200 TWINTAIL
 .endif



CVS commit: src/distrib/evbarm/instkernel/instkernel

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 02:05:02 UTC 2012

Modified Files:
src/distrib/evbarm/instkernel/instkernel: Makefile

Log Message:
Add BCM5301X_INSTALL


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/distrib/evbarm/instkernel/instkernel/Makefile

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

Modified files:

Index: src/distrib/evbarm/instkernel/instkernel/Makefile
diff -u src/distrib/evbarm/instkernel/instkernel/Makefile:1.15 src/distrib/evbarm/instkernel/instkernel/Makefile:1.16
--- src/distrib/evbarm/instkernel/instkernel/Makefile:1.15	Wed Feb  1 03:35:14 2012
+++ src/distrib/evbarm/instkernel/instkernel/Makefile	Sat Sep  1 02:05:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2012/02/01 03:35:14 nisimura Exp $
+#	$NetBSD: Makefile,v 1.16 2012/09/01 02:05:02 matt Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -9,6 +9,7 @@ RAMDISK=	${RAMDISKDIR}/ramdisk.fs
 .if ${MACHINE_ARCH} == arm
 # Little endian platforms.
 MDSETTARGETS=		ADI_BRH_INSTALL		${RAMDISK}	-	\
+			BCM5301X_INSTALL	${RAMDISK}	-	\
 			CP3100_INSTALL		${RAMDISK}	-	\
 			GEMINI_INSTALL		${RAMDISK}	-	\
 			GUMSTIX_INSTALL		${RAMDISK}	-	\



CVS commit: src/sys/dev/pci

2012-08-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Sep  1 02:08:28 UTC 2012

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

Log Message:
Shut up gcc about some uninitialized variables.


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

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.233 src/sys/dev/pci/if_wm.c:1.234
--- src/sys/dev/pci/if_wm.c:1.233	Thu Aug 30 23:14:20 2012
+++ src/sys/dev/pci/if_wm.c	Sat Sep  1 02:08:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.233 2012/08/30 23:14:20 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.234 2012/09/01 02:08:28 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.233 2012/08/30 23:14:20 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.234 2012/09/01 02:08:28 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -2786,6 +2786,8 @@ wm_nq_tx_offload(struct wm_softc *sc, st
 	 * XXX It would be nice if the mbuf pkthdr had offset
 	 * fields for the protocol headers.
 	 */
+	*cmdlenp = 0;
+	*fieldsp = 0;
 
 	eh = mtod(m0, struct ether_header *);
 	switch (htons(eh-ether_type)) {
@@ -2827,7 +2829,6 @@ wm_nq_tx_offload(struct wm_softc *sc, st
 		*cmdlenp |= NQTX_CMD_VLE;
 	}
 
-	*fieldsp = 0;
 	mssidx = 0;
 
 	if ((m0-m_pkthdr.csum_flags  (M_CSUM_TSOv4 | M_CSUM_TSOv6)) != 0) {
@@ -2980,7 +2981,6 @@ wm_nq_start(struct ifnet *ifp)
 	bus_dmamap_t dmamap;
 	int error, nexttx, lasttx = -1, seg, segs_needed;
 	bool do_csum, sent;
-	uint32_t cmdlen, fields, dcmdlen;
 
 	if ((ifp-if_flags  (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING)
 		return;
@@ -3100,6 +3100,7 @@ wm_nq_start(struct ifnet *ifp)
 		txs-txs_ndesc = segs_needed;
 
 		/* Set up offload parameters for this packet. */
+		uint32_t cmdlen, fields, dcmdlen;
 		if (m0-m_pkthdr.csum_flags 
 		(M_CSUM_TSOv4|M_CSUM_TSOv6|
 		M_CSUM_IPv4|M_CSUM_TCPv4|M_CSUM_UDPv4|
@@ -3112,6 +3113,8 @@ wm_nq_start(struct ifnet *ifp)
 			}
 		} else {
 			do_csum = false;
+			cmdlen = 0;
+			fields = 0;
 		}
 
 		/* Sync the DMA map. */