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

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 10 05:03:59 UTC 2015

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

Log Message:
Add entry for MIPS 1074K


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/sys/arch/mips/mips/mips_machdep.c

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

Modified files:

Index: src/sys/arch/mips/mips/mips_machdep.c
diff -u src/sys/arch/mips/mips/mips_machdep.c:1.266 src/sys/arch/mips/mips/mips_machdep.c:1.267
--- src/sys/arch/mips/mips/mips_machdep.c:1.266	Mon Jun  8 18:22:23 2015
+++ src/sys/arch/mips/mips/mips_machdep.c	Wed Jun 10 05:03:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_machdep.c,v 1.266 2015/06/08 18:22:23 macallan Exp $	*/
+/*	$NetBSD: mips_machdep.c,v 1.267 2015/06/10 05:03:59 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -111,7 +111,7 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.266 2015/06/08 18:22:23 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.267 2015/06/10 05:03:59 matt Exp $");
 
 #define __INTR_PRIVATE
 #include "opt_cputype.h"
@@ -489,6 +489,13 @@ static const struct pridtab cputab[] = {
 	  MIPS_CP0FL_CONFIG | MIPS_CP0FL_CONFIG1 | MIPS_CP0FL_CONFIG2 |
 	  MIPS_CP0FL_CONFIG3 | MIPS_CP0FL_CONFIG6 | MIPS_CP0FL_CONFIG7,
 	  0, "1004K" },
+	{ MIPS_PRID_CID_MTI, MIPS_1074K, -1, -1,	-1, 0,
+	  MIPS32_FLAGS | CPU_MIPS_DOUBLE_COUNT,
+	  MIPS_CP0FL_USE |
+	  MIPS_CP0FL_EBASE | MIPS_CP0FL_USERLOCAL | MIPS_CP0FL_HWRENA |
+	  MIPS_CP0FL_CONFIG | MIPS_CP0FL_CONFIG1 | MIPS_CP0FL_CONFIG2 |
+	  MIPS_CP0FL_CONFIG3 | MIPS_CP0FL_CONFIG6 | MIPS_CP0FL_CONFIG7,
+	  0, "1074K" },
 
 	{ MIPS_PRID_CID_BROADCOM, MIPS_BCM3302, -1, -1, -1, 0,
 	  MIPS32_FLAGS | CPU_MIPS_DOUBLE_COUNT, 0, 0, "BCM3302"	},



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

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 10 05:03:42 UTC 2015

Modified Files:
src/sys/arch/mips/include: cpuregs.h

Log Message:
Add MIPS 1074K


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/mips/include/cpuregs.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/mips/include/cpuregs.h
diff -u src/sys/arch/mips/include/cpuregs.h:1.92 src/sys/arch/mips/include/cpuregs.h:1.93
--- src/sys/arch/mips/include/cpuregs.h:1.92	Sun Jun  7 08:03:10 2015
+++ src/sys/arch/mips/include/cpuregs.h	Wed Jun 10 05:03:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuregs.h,v 1.92 2015/06/07 08:03:10 matt Exp $	*/
+/*	$NetBSD: cpuregs.h,v 1.93 2015/06/10 05:03:41 matt Exp $	*/
 
 /*
  * Copyright (c) 2009 Miodrag Vallat.
@@ -939,6 +939,7 @@
 #define	MIPS_24KE	0x96	/* MIPS 24KEc			ISA 32  Rel 2 */
 #define	MIPS_74K	0x97	/* MIPS 74Kc/74Kf		ISA 32  Rel 2 */
 #define	MIPS_1004K	0x99	/* MIPS 1004Kc/1004Kf		ISA 32  Rel 2 */
+#define	MIPS_1074K	0x9a	/* MIPS 1074Kc/1074Kf		ISA 32  Rel 2 */
 
 /*
  * CPU processor revision IDs for company ID == 2 (Broadcom)



CVS commit: src/tests/net/if_bridge

2015-06-09 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jun 10 03:29:37 UTC 2015

Modified Files:
src/tests/net/if_bridge: t_bridge.sh

Log Message:
Add missing cleanup


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/net/if_bridge/t_bridge.sh

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

Modified files:

Index: src/tests/net/if_bridge/t_bridge.sh
diff -u src/tests/net/if_bridge/t_bridge.sh:1.8 src/tests/net/if_bridge/t_bridge.sh:1.9
--- src/tests/net/if_bridge/t_bridge.sh:1.8	Tue Jun  9 00:39:53 2015
+++ src/tests/net/if_bridge/t_bridge.sh	Wed Jun 10 03:29:37 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: t_bridge.sh,v 1.8 2015/06/09 00:39:53 ozaki-r Exp $
+#	$NetBSD: t_bridge.sh,v 1.9 2015/06/10 03:29:37 ozaki-r Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -45,6 +45,8 @@ TIMEOUT=5
 atf_test_case basic cleanup
 atf_test_case basic6 cleanup
 atf_test_case rtable cleanup
+atf_test_case member_ip cleanup
+atf_test_case member_ip6 cleanup
 
 basic_head()
 {



CVS commit: src/sys/arch/mips

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 22:50:50 UTC 2015

Modified Files:
src/sys/arch/mips/adm5120: adm5120_obio_dma.c
src/sys/arch/mips/alchemy: au1000.c au1100.c au1500.c au1550.c
au_chipdep.c
src/sys/arch/mips/alchemy/include: auvar.h
src/sys/arch/mips/atheros: ar5312_board.c ar7100.c ar_conf.c ar_intr.c
src/sys/arch/mips/atheros/dev: athflash.c if_ae.c
src/sys/arch/mips/atheros/include: arbusvar.h
src/sys/arch/mips/bonito: bonitovar.h
src/sys/arch/mips/mips: bds_emul.S

Log Message:
#include  or  as needed


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/adm5120/adm5120_obio_dma.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/alchemy/au1000.c \
src/sys/arch/mips/alchemy/au1100.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/alchemy/au1500.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/alchemy/au1550.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/alchemy/au_chipdep.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/alchemy/include/auvar.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/atheros/ar5312_board.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/atheros/ar7100.c \
src/sys/arch/mips/atheros/ar_conf.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/atheros/ar_intr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/atheros/dev/athflash.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/mips/atheros/dev/if_ae.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/atheros/include/arbusvar.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/bonito/bonitovar.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/bds_emul.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/mips/adm5120/adm5120_obio_dma.c
diff -u src/sys/arch/mips/adm5120/adm5120_obio_dma.c:1.4 src/sys/arch/mips/adm5120/adm5120_obio_dma.c:1.5
--- src/sys/arch/mips/adm5120/adm5120_obio_dma.c:1.4	Fri Jul  1 18:38:49 2011
+++ src/sys/arch/mips/adm5120/adm5120_obio_dma.c	Tue Jun  9 22:50:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: adm5120_obio_dma.c,v 1.4 2011/07/01 18:38:49 dyoung Exp $	*/
+/*	$NetBSD: adm5120_obio_dma.c,v 1.5 2015/06/09 22:50:50 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,13 +64,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: adm5120_obio_dma.c,v 1.4 2011/07/01 18:38:49 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adm5120_obio_dma.c,v 1.5 2015/06/09 22:50:50 matt Exp $");
 
 #include 
 
 #define	_MIPS_BUS_DMA_PRIVATE
 #include 
 
+#include 
+
 #include 
 
 void

Index: src/sys/arch/mips/alchemy/au1000.c
diff -u src/sys/arch/mips/alchemy/au1000.c:1.10 src/sys/arch/mips/alchemy/au1000.c:1.11
--- src/sys/arch/mips/alchemy/au1000.c:1.10	Sun Jul 10 23:13:23 2011
+++ src/sys/arch/mips/alchemy/au1000.c	Tue Jun  9 22:50:50 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: au1000.c,v 1.10 2011/07/10 23:13:23 matt Exp $ */
+/* $NetBSD: au1000.c,v 1.11 2015/06/09 22:50:50 matt Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -101,6 +101,8 @@ __KERNEL_RCSID(0, "$NetBSD");
 
 #include 
 #include 
+#include 
+
 #include 
 #include 
 #include 
Index: src/sys/arch/mips/alchemy/au1100.c
diff -u src/sys/arch/mips/alchemy/au1100.c:1.10 src/sys/arch/mips/alchemy/au1100.c:1.11
--- src/sys/arch/mips/alchemy/au1100.c:1.10	Sun Jul 10 23:13:23 2011
+++ src/sys/arch/mips/alchemy/au1100.c	Tue Jun  9 22:50:50 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: au1100.c,v 1.10 2011/07/10 23:13:23 matt Exp $ */
+/* $NetBSD: au1100.c,v 1.11 2015/06/09 22:50:50 matt Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -97,10 +97,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: au1100.c,v 1.10 2011/07/10 23:13:23 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: au1100.c,v 1.11 2015/06/09 22:50:50 matt Exp $");
 
 #include 
 #include 
+#include 
+
 #include 
 #include 
 #include 

Index: src/sys/arch/mips/alchemy/au1500.c
diff -u src/sys/arch/mips/alchemy/au1500.c:1.11 src/sys/arch/mips/alchemy/au1500.c:1.12
--- src/sys/arch/mips/alchemy/au1500.c:1.11	Sun Jul 10 23:13:23 2011
+++ src/sys/arch/mips/alchemy/au1500.c	Tue Jun  9 22:50:50 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: au1500.c,v 1.11 2011/07/10 23:13:23 matt Exp $ */
+/* $NetBSD: au1500.c,v 1.12 2015/06/09 22:50:50 matt Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -97,10 +97,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: au1500.c,v 1.11 2011/07/10 23:13:23 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: au1500.c,v 1.12 2015/06/09 22:50:50 matt Exp $");
 
 #include 
 #include 
+#include 
+
 #include 
 #include 
 #include 

Index: src/sys/arch/mips/alchemy/au1550.c
diff -u src/sys/arch/mips/alchemy/au1550.c:1.14 src/sys/arch/mips/alchemy/au1550.c:1.15
--- src/sys/arch/mips/alchemy/au1550.c:1.14	Sun Jul 10 23:13:23 2011
+++ src/sys/arch/mips/alchemy/au1550.c	Tue Jun  9 22:50:50 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: au1550.c,v 1.14 2011/07/10 23:13:23 matt Exp $ */
+/* $NetBSD: au1550.c,v 1.15 2015/06/09 22:5

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

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 22:49:55 UTC 2015

Modified Files:
src/sys/arch/evbmips/alchemy: dbau1500.c genericbd.c mtx-1.c omsal400.c

Log Message:
#include  and/or  as needed.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbmips/alchemy/dbau1500.c \
src/sys/arch/evbmips/alchemy/mtx-1.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/alchemy/genericbd.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbmips/alchemy/omsal400.c

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

Modified files:

Index: src/sys/arch/evbmips/alchemy/dbau1500.c
diff -u src/sys/arch/evbmips/alchemy/dbau1500.c:1.7 src/sys/arch/evbmips/alchemy/dbau1500.c:1.8
--- src/sys/arch/evbmips/alchemy/dbau1500.c:1.7	Sun Jul 10 00:03:52 2011
+++ src/sys/arch/evbmips/alchemy/dbau1500.c	Tue Jun  9 22:49:55 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: dbau1500.c,v 1.7 2011/07/10 00:03:52 matt Exp $ */
+/* $NetBSD: dbau1500.c,v 1.8 2015/06/09 22:49:55 matt Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,10 +32,11 @@
  */ 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dbau1500.c,v 1.7 2011/07/10 00:03:52 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbau1500.c,v 1.8 2015/06/09 22:49:55 matt Exp $");
 
 #include 
 #include 
+#include 
 
 #include 
 
Index: src/sys/arch/evbmips/alchemy/mtx-1.c
diff -u src/sys/arch/evbmips/alchemy/mtx-1.c:1.7 src/sys/arch/evbmips/alchemy/mtx-1.c:1.8
--- src/sys/arch/evbmips/alchemy/mtx-1.c:1.7	Sun Jul 10 00:03:52 2011
+++ src/sys/arch/evbmips/alchemy/mtx-1.c	Tue Jun  9 22:49:55 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: mtx-1.c,v 1.7 2011/07/10 00:03:52 matt Exp $ */
+/* $NetBSD: mtx-1.c,v 1.8 2015/06/09 22:49:55 matt Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,10 +32,11 @@
  */ 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mtx-1.c,v 1.7 2011/07/10 00:03:52 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mtx-1.c,v 1.8 2015/06/09 22:49:55 matt Exp $");
 
 #include 
 #include 
+#include 
 
 #include 
 

Index: src/sys/arch/evbmips/alchemy/genericbd.c
diff -u src/sys/arch/evbmips/alchemy/genericbd.c:1.5 src/sys/arch/evbmips/alchemy/genericbd.c:1.6
--- src/sys/arch/evbmips/alchemy/genericbd.c:1.5	Mon Mar 24 20:06:31 2014
+++ src/sys/arch/evbmips/alchemy/genericbd.c	Tue Jun  9 22:49:55 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: genericbd.c,v 1.5 2014/03/24 20:06:31 christos Exp $ */
+/* $NetBSD: genericbd.c,v 1.6 2015/06/09 22:49:55 matt Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,10 +32,11 @@
  */ 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genericbd.c,v 1.5 2014/03/24 20:06:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genericbd.c,v 1.6 2015/06/09 22:49:55 matt Exp $");
 
 #include 
 #include 
+#include 
 
 #include 
 

Index: src/sys/arch/evbmips/alchemy/omsal400.c
diff -u src/sys/arch/evbmips/alchemy/omsal400.c:1.9 src/sys/arch/evbmips/alchemy/omsal400.c:1.10
--- src/sys/arch/evbmips/alchemy/omsal400.c:1.9	Sun Jul 10 00:03:52 2011
+++ src/sys/arch/evbmips/alchemy/omsal400.c	Tue Jun  9 22:49:55 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: omsal400.c,v 1.9 2011/07/10 00:03:52 matt Exp $ */
+/* $NetBSD: omsal400.c,v 1.10 2015/06/09 22:49:55 matt Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -36,12 +36,14 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omsal400.c,v 1.9 2011/07/10 00:03:52 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omsal400.c,v 1.10 2015/06/09 22:49:55 matt Exp $");
 
 #include 
 #include 
+#include 
 
 #include 
+#include 
 
 #include 
 #include 



CVS commit: src/sys/arch/cobalt

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 22:47:59 UTC 2015

Modified Files:
src/sys/arch/cobalt/dev: com_mainbus.c zs.c
src/sys/arch/cobalt/pci: pci_machdep.c

Log Message:
#include  or  as needed


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cobalt/dev/com_mainbus.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/cobalt/dev/zs.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/cobalt/pci/pci_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/cobalt/dev/com_mainbus.c
diff -u src/sys/arch/cobalt/dev/com_mainbus.c:1.19 src/sys/arch/cobalt/dev/com_mainbus.c:1.20
--- src/sys/arch/cobalt/dev/com_mainbus.c:1.19	Sat Jul  9 16:09:01 2011
+++ src/sys/arch/cobalt/dev/com_mainbus.c	Tue Jun  9 22:47:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: com_mainbus.c,v 1.19 2011/07/09 16:09:01 matt Exp $	*/
+/*	$NetBSD: com_mainbus.c,v 1.20 2015/06/09 22:47:59 matt Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang.  All rights reserved.
@@ -26,10 +26,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: com_mainbus.c,v 1.19 2011/07/09 16:09:01 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_mainbus.c,v 1.20 2015/06/09 22:47:59 matt Exp $");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 

Index: src/sys/arch/cobalt/dev/zs.c
diff -u src/sys/arch/cobalt/dev/zs.c:1.3 src/sys/arch/cobalt/dev/zs.c:1.4
--- src/sys/arch/cobalt/dev/zs.c:1.3	Mon Apr 28 20:23:16 2008
+++ src/sys/arch/cobalt/dev/zs.c	Tue Jun  9 22:47:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.3 2008/04/28 20:23:16 martin Exp $	*/
+/*	$NetBSD: zs.c,v 1.4 2015/06/09 22:47:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,20 +37,23 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.3 2008/04/28 20:23:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.4 2015/06/09 22:47:59 matt Exp $");
 
 #include "opt_ddb.h"
 
 #include 
-#include 
 #include 
+#include 
 #include 
-#include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 

Index: src/sys/arch/cobalt/pci/pci_machdep.c
diff -u src/sys/arch/cobalt/pci/pci_machdep.c:1.36 src/sys/arch/cobalt/pci/pci_machdep.c:1.37
--- src/sys/arch/cobalt/pci/pci_machdep.c:1.36	Tue Jul 29 21:21:44 2014
+++ src/sys/arch/cobalt/pci/pci_machdep.c	Tue Jun  9 22:47:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.36 2014/07/29 21:21:44 skrll Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.37 2015/06/09 22:47:59 matt Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang.  All rights reserved.
@@ -26,14 +26,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.36 2014/07/29 21:21:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.37 2015/06/09 22:47:59 matt Exp $");
 
 #define _MIPS_BUS_DMA_PRIVATE
 
 #include 
 #include 
-#include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/arch/emips/emips

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 22:48:54 UTC 2015

Modified Files:
src/sys/arch/emips/emips: cpu.c

Log Message:
#include 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/emips/emips/cpu.c

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

Modified files:

Index: src/sys/arch/emips/emips/cpu.c
diff -u src/sys/arch/emips/emips/cpu.c:1.2 src/sys/arch/emips/emips/cpu.c:1.3
--- src/sys/arch/emips/emips/cpu.c:1.2	Tue Feb 22 08:20:20 2011
+++ src/sys/arch/emips/emips/cpu.c	Tue Jun  9 22:48:54 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.2 2011/02/22 08:20:20 matt Exp $ */
+/* $NetBSD: cpu.c,v 1.3 2015/06/09 22:48:54 matt Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,11 +28,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2011/02/22 08:20:20 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.3 2015/06/09 22:48:54 matt Exp $");
 
 #include "ioconf.h"
 
 #include 
+#include 
 #include 
 #include 
 



CVS commit: src/sys/arch/algor

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 22:47:12 UTC 2015

Modified Files:
src/sys/arch/algor/algor: led.c
src/sys/arch/algor/dev: bonito_mainbus.c

Log Message:
#include 


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/algor/algor/led.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/algor/dev/bonito_mainbus.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/algor/algor/led.c
diff -u src/sys/arch/algor/algor/led.c:1.7 src/sys/arch/algor/algor/led.c:1.8
--- src/sys/arch/algor/algor/led.c:1.7	Sat Jul  9 16:03:00 2011
+++ src/sys/arch/algor/algor/led.c	Tue Jun  9 22:47:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: led.c,v 1.7 2011/07/09 16:03:00 matt Exp $	*/
+/*	$NetBSD: led.c,v 1.8 2015/06/09 22:47:12 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: led.c,v 1.7 2011/07/09 16:03:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: led.c,v 1.8 2015/06/09 22:47:12 matt Exp $");
 
 #include "opt_algor_p4032.h"
 #include "opt_algor_p5064.h" 
@@ -38,6 +38,8 @@ __KERNEL_RCSID(0, "$NetBSD: led.c,v 1.7 
 
 #include 
 
+#include 
+
 #include 
 
 #ifdef ALGOR_P4032

Index: src/sys/arch/algor/dev/bonito_mainbus.c
diff -u src/sys/arch/algor/dev/bonito_mainbus.c:1.15 src/sys/arch/algor/dev/bonito_mainbus.c:1.16
--- src/sys/arch/algor/dev/bonito_mainbus.c:1.15	Sat Oct 27 17:17:24 2012
+++ src/sys/arch/algor/dev/bonito_mainbus.c	Tue Jun  9 22:47:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bonito_mainbus.c,v 1.15 2012/10/27 17:17:24 chs Exp $	*/
+/*	$NetBSD: bonito_mainbus.c,v 1.16 2015/06/09 22:47:12 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.15 2012/10/27 17:17:24 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.16 2015/06/09 22:47:12 matt Exp $");
 
 #include "opt_algor_p6032.h"
 
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: bonito_mainb
 
 #include 
 
+#include 
 #include 
 
 #ifdef ALGOR_P6032



CVS commit: src/sys/arch/hpcmips

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 22:46:36 UTC 2015

Modified Files:
src/sys/arch/hpcmips/dev: tc5165buf.c
src/sys/arch/hpcmips/hpcmips: interrupt.c kloader_machdep.c
src/sys/arch/hpcmips/vr: vrdmaau.c vrdsu.c

Log Message:
#include  and/or  + other include fixes


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hpcmips/dev/tc5165buf.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hpcmips/hpcmips/interrupt.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hpcmips/hpcmips/kloader_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hpcmips/vr/vrdmaau.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hpcmips/vr/vrdsu.c

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

Modified files:

Index: src/sys/arch/hpcmips/dev/tc5165buf.c
diff -u src/sys/arch/hpcmips/dev/tc5165buf.c:1.17 src/sys/arch/hpcmips/dev/tc5165buf.c:1.18
--- src/sys/arch/hpcmips/dev/tc5165buf.c:1.17	Sat Oct 27 17:17:53 2012
+++ src/sys/arch/hpcmips/dev/tc5165buf.c	Tue Jun  9 22:46:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tc5165buf.c,v 1.17 2012/10/27 17:17:53 chs Exp $ */
+/*	$NetBSD: tc5165buf.c,v 1.18 2015/06/09 22:46:36 matt Exp $ */
 
 /*-
  * Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
@@ -35,20 +35,21 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tc5165buf.c,v 1.17 2012/10/27 17:17:53 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tc5165buf.c,v 1.18 2015/06/09 22:46:36 matt Exp $");
 
 #include "opt_use_poll.h"
 
 #include 
-#include 
+#include 
 #include 
 #include 
-
-#include 
-#include 
+#include 
+#include 
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 

Index: src/sys/arch/hpcmips/hpcmips/interrupt.c
diff -u src/sys/arch/hpcmips/hpcmips/interrupt.c:1.18 src/sys/arch/hpcmips/hpcmips/interrupt.c:1.19
--- src/sys/arch/hpcmips/hpcmips/interrupt.c:1.18	Sun Feb 20 07:58:14 2011
+++ src/sys/arch/hpcmips/hpcmips/interrupt.c	Tue Jun  9 22:46:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: interrupt.c,v 1.18 2011/02/20 07:58:14 matt Exp $	*/
+/*	$NetBSD: interrupt.c,v 1.19 2015/06/09 22:46:36 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.18 2011/02/20 07:58:14 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.19 2015/06/09 22:46:36 matt Exp $");
 
 #include "opt_vr41xx.h"
 #include "opt_tx39xx.h"
@@ -38,6 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: interrupt.c,
 #define __INTR_PRIVATE
 
 #include 
+#include 
 #include 
 #include 
 

Index: src/sys/arch/hpcmips/hpcmips/kloader_machdep.c
diff -u src/sys/arch/hpcmips/hpcmips/kloader_machdep.c:1.7 src/sys/arch/hpcmips/hpcmips/kloader_machdep.c:1.8
--- src/sys/arch/hpcmips/hpcmips/kloader_machdep.c:1.7	Wed Mar 18 10:22:29 2009
+++ src/sys/arch/hpcmips/hpcmips/kloader_machdep.c	Tue Jun  9 22:46:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kloader_machdep.c,v 1.7 2009/03/18 10:22:29 cegger Exp $	*/
+/*	$NetBSD: kloader_machdep.c,v 1.8 2015/06/09 22:46:36 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc.
@@ -27,10 +27,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kloader_machdep.c,v 1.7 2009/03/18 10:22:29 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kloader_machdep.c,v 1.8 2015/06/09 22:46:36 matt Exp $");
 
 #include 
+#include 
 #include 
+
 #include 
 
 #include 

Index: src/sys/arch/hpcmips/vr/vrdmaau.c
diff -u src/sys/arch/hpcmips/vr/vrdmaau.c:1.6 src/sys/arch/hpcmips/vr/vrdmaau.c:1.7
--- src/sys/arch/hpcmips/vr/vrdmaau.c:1.6	Sat Oct 27 17:17:56 2012
+++ src/sys/arch/hpcmips/vr/vrdmaau.c	Tue Jun  9 22:46:36 2015
@@ -24,13 +24,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vrdmaau.c,v 1.6 2012/10/27 17:17:56 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vrdmaau.c,v 1.7 2015/06/09 22:46:36 matt Exp $");
 
 #include 
-#include 
+#include 
 #include 
+#include 
 
-#include 
+#include 
 
 #include 
 #include 

Index: src/sys/arch/hpcmips/vr/vrdsu.c
diff -u src/sys/arch/hpcmips/vr/vrdsu.c:1.11 src/sys/arch/hpcmips/vr/vrdsu.c:1.12
--- src/sys/arch/hpcmips/vr/vrdsu.c:1.11	Sat Oct 27 17:17:56 2012
+++ src/sys/arch/hpcmips/vr/vrdsu.c	Tue Jun  9 22:46:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vrdsu.c,v 1.11 2012/10/27 17:17:56 chs Exp $	*/
+/*	$NetBSD: vrdsu.c,v 1.12 2015/06/09 22:46:36 matt Exp $	*/
 
 /*
  * Copyright (c) 1999 Shin Takemura All rights reserved.
@@ -27,14 +27,16 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vrdsu.c,v 1.11 2012/10/27 17:17:56 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vrdsu.c,v 1.12 2015/06/09 22:46:36 matt Exp $");
 
 #include 
-#include 
+#include 
 #include 
-#include 
+#include 
+
+#include 
 
-#include 
+#include 
 
 #include 
 #include 



CVS commit: src/sys/dev/nor

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 21:42:21 UTC 2015

Modified Files:
src/sys/dev/nor: cfi_0002.c

Log Message:
#include  for yield();


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nor/cfi_0002.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/nor/cfi_0002.c
diff -u src/sys/dev/nor/cfi_0002.c:1.7 src/sys/dev/nor/cfi_0002.c:1.8
--- src/sys/dev/nor/cfi_0002.c:1.7	Thu Jul 24 23:25:53 2014
+++ src/sys/dev/nor/cfi_0002.c	Tue Jun  9 21:42:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cfi_0002.c,v 1.7 2014/07/24 23:25:53 joerg Exp $	*/
+/*	$NetBSD: cfi_0002.c,v 1.8 2015/06/09 21:42:21 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,13 +31,14 @@
 #include "opt_flash.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cfi_0002.c,v 1.7 2014/07/24 23:25:53 joerg Exp $"); 
+__KERNEL_RCSID(0, "$NetBSD: cfi_0002.c,v 1.8 2015/06/09 21:42:21 matt Exp $"); 
 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 



CVS commit: src/sys/dev/mii

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 21:41:55 UTC 2015

Modified Files:
src/sys/dev/mii: miidevs.h miidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/mii/miidevs_data.h

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

Modified files:

Index: src/sys/dev/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.125 src/sys/dev/mii/miidevs.h:1.126
--- src/sys/dev/mii/miidevs.h:1.125	Sun Nov  9 18:40:19 2014
+++ src/sys/dev/mii/miidevs.h	Tue Jun  9 21:41:55 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.125 2014/11/09 18:40:19 riz Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.126 2015/06/09 21:41:55 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.122 2014/11/09 17:53:37 nonaka Exp
+ *	NetBSD: miidevs,v 1.123 2015/06/09 21:41:23 matt Exp
  */
 
 /*-
@@ -383,6 +383,8 @@
 #define	MII_STR_xxMARVELL_E	"Marvell 88E Gigabit PHY"
 #define	MII_MODEL_xxMARVELL_E1145	0x000d
 #define	MII_STR_xxMARVELL_E1145	"Marvell 88E1145 Quad Gigabit PHY"
+#define	MII_MODEL_xxMARVELL_E6060	0x0010
+#define	MII_STR_xxMARVELL_E6060	"Marvell 88E6060 6-Port 10/100 Fast Ethernet Switch"
 #define	MII_MODEL_xxMARVELL_E1116	0x0021
 #define	MII_STR_xxMARVELL_E1116	"Marvell 88E1116 Gigabit PHY"
 #define	MII_MODEL_xxMARVELL_E1118	0x0022

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.113 src/sys/dev/mii/miidevs_data.h:1.114
--- src/sys/dev/mii/miidevs_data.h:1.113	Sun Nov  9 17:54:02 2014
+++ src/sys/dev/mii/miidevs_data.h	Tue Jun  9 21:41:55 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs_data.h,v 1.113 2014/11/09 17:54:02 nonaka Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.114 2015/06/09 21:41:55 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.122 2014/11/09 17:53:37 nonaka Exp
+ *	NetBSD: miidevs,v 1.123 2015/06/09 21:41:23 matt Exp
  */
 
 /*-
@@ -152,6 +152,7 @@ struct mii_knowndev mii_knowndevs[] = {
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1149, MII_STR_xxMARVELL_E1149 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E, MII_STR_xxMARVELL_E },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1145, MII_STR_xxMARVELL_E1145 },
+ { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E6060, MII_STR_xxMARVELL_E6060 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116, MII_STR_xxMARVELL_E1116 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1118, MII_STR_xxMARVELL_E1118 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R, MII_STR_xxMARVELL_E1116R },



CVS commit: src/sys/dev/mii

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 21:41:23 UTC 2015

Modified Files:
src/sys/dev/mii: miidevs

Log Message:
Add xxMarvell E6060 6-port 10/100 Fast Ethernet Switch


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/dev/mii/miidevs

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/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.122 src/sys/dev/mii/miidevs:1.123
--- src/sys/dev/mii/miidevs:1.122	Sun Nov  9 17:53:37 2014
+++ src/sys/dev/mii/miidevs	Tue Jun  9 21:41:23 2015
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.122 2014/11/09 17:53:37 nonaka Exp $
+$NetBSD: miidevs,v 1.123 2015/06/09 21:41:23 matt Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -261,6 +261,7 @@ model xxMARVELL E1112		0x0009 Marvell 88
 model xxMARVELL E1149		0x000b Marvell 88E1149 Gigabit PHY
 model xxMARVELL E		0x000c Marvell 88E Gigabit PHY
 model xxMARVELL E1145		0x000d Marvell 88E1145 Quad Gigabit PHY
+model xxMARVELL E6060		0x0010 Marvell 88E6060 6-Port 10/100 Fast Ethernet Switch
 model xxMARVELL E1116		0x0021 Marvell 88E1116 Gigabit PHY
 model xxMARVELL E1118		0x0022 Marvell 88E1118 Gigabit PHY
 model xxMARVELL E1116R		0x0024 Marvell 88E1116R Gigabit PHY



CVS commit: [netbsd-7] src/doc

2015-06-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jun  9 20:50:58 UTC 2015

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

Log Message:
update 827


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

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.326 src/doc/CHANGES-7.0:1.1.2.327
--- src/doc/CHANGES-7.0:1.1.2.326	Mon Jun  8 20:55:23 2015
+++ src/doc/CHANGES-7.0	Tue Jun  9 20:50:57 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.326 2015/06/08 20:55:23 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.327 2015/06/09 20:50:57 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -32052,10 +32052,10 @@ sys/arch/amiga/amiga/autoconf.c			1.117
 	busy due to discovered wedges.
 	[mlelstv, ticket #832]
 
-sbin/raidctl/raidctl.c1.58
+sbin/raidctl/raidctl.c1.58, 1.59
 
 	Better sanity checks on numbers given to raidctl(8).
-	[manu, ticket #827]
+	[manu/martin, ticket #827]
 
 lib/libperfuse/ops.c1.84
 



CVS commit: [netbsd-7] src/sbin/raidctl

2015-06-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jun  9 20:49:28 UTC 2015

Modified Files:
src/sbin/raidctl [netbsd-7]: raidctl.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #827):
sbin/raidctl/raidctl.c: revision 1.59
use strtou


To generate a diff of this commit:
cvs rdiff -u -r1.57.4.1 -r1.57.4.2 src/sbin/raidctl/raidctl.c

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

Modified files:

Index: src/sbin/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.57.4.1 src/sbin/raidctl/raidctl.c:1.57.4.2
--- src/sbin/raidctl/raidctl.c:1.57.4.1	Mon Jun  8 20:48:01 2015
+++ src/sbin/raidctl/raidctl.c	Tue Jun  9 20:49:28 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: raidctl.c,v 1.57.4.1 2015/06/08 20:48:01 snj Exp $   */
+/*  $NetBSD: raidctl.c,v 1.57.4.2 2015/06/09 20:49:28 snj Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: raidctl.c,v 1.57.4.1 2015/06/08 20:48:01 snj Exp $");
+__RCSID("$NetBSD: raidctl.c,v 1.57.4.2 2015/06/09 20:49:28 snj Exp $");
 #endif
 
 
@@ -55,6 +55,7 @@ __RCSID("$NetBSD: raidctl.c,v 1.57.4.1 2
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -85,7 +86,7 @@ static  void get_bar(char *, double, int
 static  void get_time_string(char *, int);
 static  void rf_output_pmstat(int, int);
 static  void rf_pm_configure(int, int, char *, int[]);
-static  unsigned int _strtoud(char *);
+static  unsigned int xstrtouint(const char *);
 
 int verbose;
 
@@ -184,7 +185,7 @@ main(int argc,char *argv[])
 			break;
 		case 'I':
 			action = RAIDFRAME_INIT_LABELS;
-			serial_number = _strtoud(optarg);
+			serial_number = xstrtouint(optarg);
 			num_options++;
 			break;
 		case 'm':
@@ -200,7 +201,7 @@ main(int argc,char *argv[])
 			i = 0;
 			while (i < 3 && optind < argc &&
 			isdigit((int)argv[optind][0]))
-parityparams[i++] = _strtoud(argv[optind++]);
+parityparams[i++] = xstrtouint(argv[optind++]);
 			while (i < 3)
 parityparams[i++] = 0;
 			break;
@@ -1161,24 +1162,11 @@ usage(void)
 }
 
 static unsigned int
-_strtoud(char *str)
+xstrtouint(const char *str)
 {
-	long num;
-	char *ep;
-
-	errno = 0;
-	num = strtol(str, &ep, 10);
-	if (str[0] == '\0' || *ep != '\0')
-		errx(1, "Not a number: %s", str);
-
-	if (errno)
-		err(1, "Inavlid number %s", str);
-
-	if (num < 0)
-		errx(1, "Negative number: %s", str);
-
-	if (num > INT_MAX)
-		errx(1, "Number too large: %s", str);
-
-	return (unsigned int)num;
+	int e;
+	unsigned int num = (unsigned int)strtou(str, NULL, 10, 0, INT_MAX, &e);
+	if (e)
+		errc(EXIT_FAILURE, e, "Bad number `%s'", str);
+	return num;
 }



CVS commit: src/sys/arch/pmax

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 20:23:53 UTC 2015

Modified Files:
src/sys/arch/pmax/ibus: ibus.c mcclock_ibus.c sii_ds.c
src/sys/arch/pmax/tc: mcclock_ioasic.c tcbus.c

Log Message:
#include either  or  as needed


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/pmax/ibus/ibus.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/pmax/ibus/mcclock_ibus.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/pmax/ibus/sii_ds.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/pmax/tc/mcclock_ioasic.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/pmax/tc/tcbus.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/pmax/ibus/ibus.c
diff -u src/sys/arch/pmax/ibus/ibus.c:1.20 src/sys/arch/pmax/ibus/ibus.c:1.21
--- src/sys/arch/pmax/ibus/ibus.c:1.20	Sat Jul  9 17:32:29 2011
+++ src/sys/arch/pmax/ibus/ibus.c	Tue Jun  9 20:23:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ibus.c,v 1.20 2011/07/09 17:32:29 matt Exp $	*/
+/*	$NetBSD: ibus.c,v 1.21 2015/06/09 20:23:53 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -31,9 +31,10 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: ibus.c,v 1.20 2011/07/09 17:32:29 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibus.c,v 1.21 2015/06/09 20:23:53 matt Exp $");
 
 #include 
+#include 
 #include 
 #include 
 

Index: src/sys/arch/pmax/ibus/mcclock_ibus.c
diff -u src/sys/arch/pmax/ibus/mcclock_ibus.c:1.18 src/sys/arch/pmax/ibus/mcclock_ibus.c:1.19
--- src/sys/arch/pmax/ibus/mcclock_ibus.c:1.18	Sat Jun  4 01:43:56 2011
+++ src/sys/arch/pmax/ibus/mcclock_ibus.c	Tue Jun  9 20:23:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcclock_ibus.c,v 1.18 2011/06/04 01:43:56 tsutsui Exp $	*/
+/*	$NetBSD: mcclock_ibus.c,v 1.19 2015/06/09 20:23:53 matt Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -28,12 +28,14 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mcclock_ibus.c,v 1.18 2011/06/04 01:43:56 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcclock_ibus.c,v 1.19 2015/06/09 20:23:53 matt Exp $");
 
 #include 
-#include 
+#include 
 #include 
+#include 
 #include 
+
 #include 
 
 #include 

Index: src/sys/arch/pmax/ibus/sii_ds.c
diff -u src/sys/arch/pmax/ibus/sii_ds.c:1.9 src/sys/arch/pmax/ibus/sii_ds.c:1.10
--- src/sys/arch/pmax/ibus/sii_ds.c:1.9	Sat Jul  9 17:32:30 2011
+++ src/sys/arch/pmax/ibus/sii_ds.c	Tue Jun  9 20:23:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sii_ds.c,v 1.9 2011/07/09 17:32:30 matt Exp $	*/
+/*	$NetBSD: sii_ds.c,v 1.10 2015/06/09 20:23:53 matt Exp $	*/
 
 /*
  * Copyright 1996 The Board of Trustees of The Leland Stanford
@@ -16,13 +16,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sii_ds.c,v 1.9 2011/07/09 17:32:30 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sii_ds.c,v 1.10 2015/06/09 20:23:53 matt Exp $");
 
 #include "sii.h"
 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 

Index: src/sys/arch/pmax/tc/mcclock_ioasic.c
diff -u src/sys/arch/pmax/tc/mcclock_ioasic.c:1.23 src/sys/arch/pmax/tc/mcclock_ioasic.c:1.24
--- src/sys/arch/pmax/tc/mcclock_ioasic.c:1.23	Sat Jun  4 01:43:56 2011
+++ src/sys/arch/pmax/tc/mcclock_ioasic.c	Tue Jun  9 20:23:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcclock_ioasic.c,v 1.23 2011/06/04 01:43:56 tsutsui Exp $ */
+/*	$NetBSD: mcclock_ioasic.c,v 1.24 2015/06/09 20:23:53 matt Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -28,9 +28,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.23 2011/06/04 01:43:56 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.24 2015/06/09 20:23:53 matt Exp $");
 
 #include 
+#include 
 #include 
 #include 
 #include 

Index: src/sys/arch/pmax/tc/tcbus.c
diff -u src/sys/arch/pmax/tc/tcbus.c:1.29 src/sys/arch/pmax/tc/tcbus.c:1.30
--- src/sys/arch/pmax/tc/tcbus.c:1.29	Sat Oct 13 06:51:23 2012
+++ src/sys/arch/pmax/tc/tcbus.c	Tue Jun  9 20:23:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcbus.c,v 1.29 2012/10/13 06:51:23 tsutsui Exp $	*/
+/*	$NetBSD: tcbus.c,v 1.30 2015/06/09 20:23:53 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcbus.c,v 1.29 2012/10/13 06:51:23 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcbus.c,v 1.30 2015/06/09 20:23:53 matt Exp $");
 
 #define	_PMAX_BUS_DMA_PRIVATE
 /*
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: tcbus.c,v 1.
 
 #include 
 #include 
+#include 
 #include 
 #include 
 



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

2015-06-09 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jun  9 18:15:47 UTC 2015

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

Log Message:
yet another cpuregs.h


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/mips/cache_r3k.c

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

Modified files:

Index: src/sys/arch/mips/mips/cache_r3k.c
diff -u src/sys/arch/mips/mips/cache_r3k.c:1.5 src/sys/arch/mips/mips/cache_r3k.c:1.6
--- src/sys/arch/mips/mips/cache_r3k.c:1.5	Sun Feb 20 07:45:47 2011
+++ src/sys/arch/mips/mips/cache_r3k.c	Tue Jun  9 18:15:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache_r3k.c,v 1.5 2011/02/20 07:45:47 matt Exp $	*/
+/*	$NetBSD: cache_r3k.c,v 1.6 2015/06/09 18:15:47 macallan Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,10 +36,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cache_r3k.c,v 1.5 2011/02/20 07:45:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cache_r3k.c,v 1.6 2015/06/09 18:15:47 macallan Exp $");
 
 #include 
 
+#include 
 #include 
 #include 
 



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

2015-06-09 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jun  9 17:53:25 UTC 2015

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

Log Message:
yet another cpuregs.h


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/mips/cache_r10k.c

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

Modified files:

Index: src/sys/arch/mips/mips/cache_r10k.c
diff -u src/sys/arch/mips/mips/cache_r10k.c:1.5 src/sys/arch/mips/mips/cache_r10k.c:1.6
--- src/sys/arch/mips/mips/cache_r10k.c:1.5	Sun Feb 20 07:45:47 2011
+++ src/sys/arch/mips/mips/cache_r10k.c	Tue Jun  9 17:53:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache_r10k.c,v 1.5 2011/02/20 07:45:47 matt Exp $	*/
+/*	$NetBSD: cache_r10k.c,v 1.6 2015/06/09 17:53:25 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2003 Takao Shinohara.
@@ -61,6 +61,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 



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

2015-06-09 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jun  9 16:29:01 UTC 2015

Modified Files:
src/sys/arch/evbmips/loongson: yeeloong_machdep.c

Log Message:
another cpuregs.h


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/loongson/yeeloong_machdep.c

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

Modified files:

Index: src/sys/arch/evbmips/loongson/yeeloong_machdep.c
diff -u src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.6 src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.7
--- src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.6	Sat Mar 29 19:28:28 2014
+++ src/sys/arch/evbmips/loongson/yeeloong_machdep.c	Tue Jun  9 16:29:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: yeeloong_machdep.c,v 1.6 2014/03/29 19:28:28 christos Exp $	*/
+/*	$NetBSD: yeeloong_machdep.c,v 1.7 2015/06/09 16:29:01 macallan Exp $	*/
 /*	$OpenBSD: yeeloong_machdep.c,v 1.16 2011/04/15 20:40:06 deraadt Exp $	*/
 
 /*
@@ -23,13 +23,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: yeeloong_machdep.c,v 1.6 2014/03/29 19:28:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: yeeloong_machdep.c,v 1.7 2015/06/09 16:29:01 macallan Exp $");
 
 #include 
 #include 
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 



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

2015-06-09 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jun  9 16:10:48 UTC 2015

Modified Files:
src/sys/arch/evbmips/loongson: gdium_machdep.c generic2e_machdep.c
isa_machdep.c

Log Message:
more cpuregs.h


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/loongson/gdium_machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/loongson/generic2e_machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbmips/loongson/isa_machdep.c

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

Modified files:

Index: src/sys/arch/evbmips/loongson/gdium_machdep.c
diff -u src/sys/arch/evbmips/loongson/gdium_machdep.c:1.6 src/sys/arch/evbmips/loongson/gdium_machdep.c:1.7
--- src/sys/arch/evbmips/loongson/gdium_machdep.c:1.6	Wed Mar 13 21:18:35 2013
+++ src/sys/arch/evbmips/loongson/gdium_machdep.c	Tue Jun  9 16:10:48 2015
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 

Index: src/sys/arch/evbmips/loongson/generic2e_machdep.c
diff -u src/sys/arch/evbmips/loongson/generic2e_machdep.c:1.4 src/sys/arch/evbmips/loongson/generic2e_machdep.c:1.5
--- src/sys/arch/evbmips/loongson/generic2e_machdep.c:1.4	Sat Mar 29 19:28:28 2014
+++ src/sys/arch/evbmips/loongson/generic2e_machdep.c	Tue Jun  9 16:10:48 2015
@@ -48,7 +48,7 @@
  * Generic Loongson 2E code and configuration data.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: generic2e_machdep.c,v 1.4 2014/03/29 19:28:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: generic2e_machdep.c,v 1.5 2015/06/09 16:10:48 macallan Exp $");
 
 #include 
 #include 
@@ -65,6 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: generic2e_ma
 #include 
 #include 
 
+#include 
 #include 
 #include 
 

Index: src/sys/arch/evbmips/loongson/isa_machdep.c
diff -u src/sys/arch/evbmips/loongson/isa_machdep.c:1.1 src/sys/arch/evbmips/loongson/isa_machdep.c:1.2
--- src/sys/arch/evbmips/loongson/isa_machdep.c:1.1	Sat Aug 27 13:42:45 2011
+++ src/sys/arch/evbmips/loongson/isa_machdep.c	Tue Jun  9 16:10:48 2015
@@ -24,6 +24,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 



CVS commit: src/sys/arch

2015-06-09 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jun  9 15:58:38 UTC 2015

Modified Files:
src/sys/arch/evbmips/loongson: bonito_mainbus.c
src/sys/arch/mips/mips: cache_r4k.c

Log Message:
include cpuregs.h


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/loongson/bonito_mainbus.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/mips/cache_r4k.c

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

Modified files:

Index: src/sys/arch/evbmips/loongson/bonito_mainbus.c
diff -u src/sys/arch/evbmips/loongson/bonito_mainbus.c:1.2 src/sys/arch/evbmips/loongson/bonito_mainbus.c:1.3
--- src/sys/arch/evbmips/loongson/bonito_mainbus.c:1.2	Fri Mar  2 13:20:57 2012
+++ src/sys/arch/evbmips/loongson/bonito_mainbus.c	Tue Jun  9 15:58:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bonito_mainbus.c,v 1.2 2012/03/02 13:20:57 nonaka Exp $	*/
+/*	$NetBSD: bonito_mainbus.c,v 1.3 2015/06/09 15:58:38 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.2 2012/03/02 13:20:57 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bonito_mainbus.c,v 1.3 2015/06/09 15:58:38 macallan Exp $");
 
 #include 
 #include 
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: bonito_mainb
 
 #include 
 
+#include 
 #include 
 
 #include 

Index: src/sys/arch/mips/mips/cache_r4k.c
diff -u src/sys/arch/mips/mips/cache_r4k.c:1.11 src/sys/arch/mips/mips/cache_r4k.c:1.12
--- src/sys/arch/mips/mips/cache_r4k.c:1.11	Sun Feb 20 07:45:47 2011
+++ src/sys/arch/mips/mips/cache_r4k.c	Tue Jun  9 15:58:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache_r4k.c,v 1.11 2011/02/20 07:45:47 matt Exp $	*/
+/*	$NetBSD: cache_r4k.c,v 1.12 2015/06/09 15:58:38 macallan Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,10 +36,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cache_r4k.c,v 1.11 2011/02/20 07:45:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cache_r4k.c,v 1.12 2015/06/09 15:58:38 macallan Exp $");
 
 #include 
 
+#include 
 #include 
 #include 
 



CVS commit: src/sys/arch/mips

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 15:01:05 UTC 2015

Modified Files:
src/sys/arch/mips/include: locore.h
src/sys/arch/mips/mips: mips_fixup.c

Log Message:
Fix mips_fixup_zero_relative to have a third argument (ignored).
When reading COP0 EBASE, verify that the fixed bits have the right value.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/mips/include/locore.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/mips/mips_fixup.c

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

Modified files:

Index: src/sys/arch/mips/include/locore.h
diff -u src/sys/arch/mips/include/locore.h:1.98 src/sys/arch/mips/include/locore.h:1.99
--- src/sys/arch/mips/include/locore.h:1.98	Mon Jun  1 22:55:13 2015
+++ src/sys/arch/mips/include/locore.h	Tue Jun  9 15:01:05 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.h,v 1.98 2015/06/01 22:55:13 matt Exp $ */
+/* $NetBSD: locore.h,v 1.99 2015/06/09 15:01:05 matt Exp $ */
 
 /*
  * This file should not be included by MI code!!!
@@ -110,7 +110,7 @@ struct mips_jump_fixup_info {
  
 void	fixup_splcalls(void);/* splstubs.c */
 bool	mips_fixup_exceptions(mips_fixup_callback_t, void *);
-bool	mips_fixup_zero_relative(int32_t, uint32_t [2]);
+bool	mips_fixup_zero_relative(int32_t, uint32_t [2], void *);
 intptr_t
 	mips_fixup_addr(const uint32_t *);
 void	mips_fixup_stubs(uint32_t *, uint32_t *);

Index: src/sys/arch/mips/mips/mips_fixup.c
diff -u src/sys/arch/mips/mips/mips_fixup.c:1.12 src/sys/arch/mips/mips/mips_fixup.c:1.13
--- src/sys/arch/mips/mips/mips_fixup.c:1.12	Tue Jun  2 05:08:21 2015
+++ src/sys/arch/mips/mips/mips_fixup.c	Tue Jun  9 15:01:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_fixup.c,v 1.12 2015/06/02 05:08:21 matt Exp $	*/
+/*	$NetBSD: mips_fixup.c,v 1.13 2015/06/09 15:01:05 matt Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.12 2015/06/02 05:08:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.13 2015/06/09 15:01:05 matt Exp $");
 
 #include "opt_mips3_wired.h"
 #include "opt_multiprocessor.h"
@@ -48,8 +48,14 @@ bool
 mips_fixup_exceptions(mips_fixup_callback_t callback, void *arg)
 {
 #if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) > 0
-	uint32_t * const start =
-	(uint32_t *)(intptr_t)(mipsNN_cp0_ebase_read() & ~MIPS_EBASE_CPUNUM);
+	int32_t ebase = mipsNN_cp0_ebase_read();
+	uint32_t *start;
+	if (ebase == mips_options.mips_cpu_id
+	|| (ebase & __BITS(31,30)) != __BIT(31)) {
+		start = (uint32_t *)MIPS_KSEG0_START;
+	} else {
+		start = (uint32_t *)(intptr_t)(ebase & ~MIPS_EBASE_CPUNUM);
+	}
 #else
 	uint32_t * const start = (uint32_t *)MIPS_KSEG0_START;
 #endif
@@ -61,6 +67,9 @@ mips_fixup_exceptions(mips_fixup_callbac
 	int32_t lui_offset = 0;
 	bool fixed = false;
 	size_t lui_reg = 0;
+#ifdef DEBUG_VERBOSE
+	printf("%s: fixing %p..%p\n", __func__, start, end);
+#endif
 	/*
 	 * If this was allocated so that bit 15 of the value/address is 1, then
 	 * %hi will add 1 to the immediate (or 0x1 to the value loaded)
@@ -148,7 +157,7 @@ mips_fixup_exceptions(mips_fixup_callbac
 
 #ifdef MIPS3_PLUS
 bool
-mips_fixup_zero_relative(int32_t load_addr, uint32_t new_insns[2])
+mips_fixup_zero_relative(int32_t load_addr, uint32_t new_insns[2], void *arg)
 {
 	struct cpu_info * const ci = curcpu();
 	struct pmap_tlb_info * const ti = ci->ci_tlb_info;



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

2015-06-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun  9 14:40:42 UTC 2015

Modified Files:
src/sys/arch/mips/mips: mipsX_subr.S

Log Message:
Fix corruption of EntryHi (restored from wrong register).


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.60 src/sys/arch/mips/mips/mipsX_subr.S:1.61
--- src/sys/arch/mips/mips/mipsX_subr.S:1.60	Sun Jun  7 08:03:10 2015
+++ src/sys/arch/mips/mips/mipsX_subr.S	Tue Jun  9 14:40:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.60 2015/06/07 08:03:10 matt Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.61 2015/06/09 14:40:42 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -2482,7 +2482,7 @@ LEAF(MIPSX(tlb_enter))
 	tlbwi	# enter it into the TLB
 	COP0_SYNC
 
-	_MTC0	ta1, MIPS_COP_0_TLB_HI		# restore EntryHi
+	_MTC0	ta0, MIPS_COP_0_TLB_HI		# restore EntryHi
 #ifdef MIPS3_LOONGSON2
 	li	v0, MIPS_DIAG_ITLB_CLEAR
 	mtc0	v0, MIPS_COP_0_DIAG		# invalidate ITLB



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

2015-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun  9 12:46:38 UTC 2015

Modified Files:
src/sys/arch/arm/allwinner: awin_wdt.c

Log Message:
Fix period handling


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/awin_wdt.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/allwinner/awin_wdt.c
diff -u src/sys/arch/arm/allwinner/awin_wdt.c:1.7 src/sys/arch/arm/allwinner/awin_wdt.c:1.8
--- src/sys/arch/arm/allwinner/awin_wdt.c:1.7	Mon Apr 20 01:33:22 2015
+++ src/sys/arch/arm/allwinner/awin_wdt.c	Tue Jun  9 12:46:37 2015
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: awin_wdt.c,v 1.7 2015/04/20 01:33:22 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_wdt.c,v 1.8 2015/06/09 12:46:37 martin Exp $");
 
 #include 
 #include 
@@ -164,12 +164,14 @@ awin_wdt_setmode(struct sysmon_wdog *smw
 		awin_wdt_tickle(smw);
 		return 0;
 	}
-	if (smw->smw_period > mapsize) {
-		return EINVAL;
-	}
 	if (smw->smw_period == WDOG_PERIOD_DEFAULT) {
 		smw->smw_period = AWIN_WDT_PERIOD_DEFAULT;
 		sc->sc_wdog_period = AWIN_WDT_PERIOD_DEFAULT;
+	} else {
+		if (smw->smw_period > mapsize) {
+			return EINVAL;
+		}
+		sc->sc_wdog_period = smw->smw_period;
 	}
 	sc->sc_wdog_mode = AWIN_WDOG_MODE_EN | map[sc->sc_wdog_period];
 	if (awin_chip_id() == AWIN_CHIP_ID_A20 ||



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

2015-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun  9 12:10:08 UTC 2015

Modified Files:
src/sys/arch/mips/cavium: octeon_cpunode.c

Log Message:
Reenable preemption before returning an error when trying to set the
watchdog to an invalid period.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/cavium/octeon_cpunode.c

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

Modified files:

Index: src/sys/arch/mips/cavium/octeon_cpunode.c
diff -u src/sys/arch/mips/cavium/octeon_cpunode.c:1.3 src/sys/arch/mips/cavium/octeon_cpunode.c:1.4
--- src/sys/arch/mips/cavium/octeon_cpunode.c:1.3	Sat Jun  6 21:44:16 2015
+++ src/sys/arch/mips/cavium/octeon_cpunode.c	Tue Jun  9 12:10:08 2015
@@ -373,6 +373,7 @@ wdog_cpunode_setmode(struct sysmon_wdog 
 		// doesn't overflow a 32-bit value, we are fine.  We write the
 		// 16-bits of the 32-bit period.
 		if ((wdog_len >> 32) != 0) {
+			kpreempt_enable();
 			return EINVAL;
 		}
 		sc->sc_wdog_period = smw->smw_period;



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

2015-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun  9 10:44:55 UTC 2015

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

Log Message:
Use armreg_auxctl_{read,write} instead of inline asm.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.325 src/sys/arch/arm/arm32/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/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.324 src/sys/arch/arm/arm32/pmap.c:1.325
--- src/sys/arch/arm/arm32/pmap.c:1.324	Mon Jun  1 19:16:44 2015
+++ src/sys/arch/arm/arm32/pmap.c	Tue Jun  9 10:44:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.324 2015/06/01 19:16:44 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.325 2015/06/09 10:44:55 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -216,7 +216,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.324 2015/06/01 19:16:44 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.325 2015/06/09 10:44:55 skrll Exp $");
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -7206,9 +7206,9 @@ pmap_pte_init_xscale(void)
 	/*
 	 * Disable ECC protection of page table access, for now.
 	 */
-	__asm volatile("mrc p15, 0, %0, c1, c0, 1" : "=r" (auxctl));
+	auxctl = armreg_auxctl_read();
 	auxctl &= ~XSCALE_AUXCTL_P;
-	__asm volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl));
+	armreg_auxctl_write(auxctl);
 }
 
 /*
@@ -7261,9 +7261,9 @@ xscale_setup_minidata(vaddr_t l1pt, vadd
 
 	/* Invalidate data and mini-data. */
 	__asm volatile("mcr p15, 0, %0, c7, c6, 0" : : "r" (0));
-	__asm volatile("mrc p15, 0, %0, c1, c0, 1" : "=r" (auxctl));
+	auxctl = armreg_auxctl_read();
 	auxctl = (auxctl & ~XSCALE_AUXCTL_MD_MASK) | XSCALE_AUXCTL_MD_WB_RWA;
-	__asm volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl));
+	armreg_auxctl_write(auxctl);
 }
 
 /*



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

2015-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun  9 10:22:15 UTC 2015

Modified Files:
src/sys/arch/arm/cortex: gic_reg.h

Log Message:
Correct a comment


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/cortex/gic_reg.h

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

Modified files:

Index: src/sys/arch/arm/cortex/gic_reg.h
diff -u src/sys/arch/arm/cortex/gic_reg.h:1.4 src/sys/arch/arm/cortex/gic_reg.h:1.5
--- src/sys/arch/arm/cortex/gic_reg.h:1.4	Fri Jun  5 06:46:00 2015
+++ src/sys/arch/arm/cortex/gic_reg.h	Tue Jun  9 10:22:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic_reg.h,v 1.4 2015/06/05 06:46:00 skrll Exp $	*/
+/*	$NetBSD: gic_reg.h,v 1.5 2015/06/09 10:22:15 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -48,7 +48,7 @@
 
 #define	GICC_CTRL	0x	// CPU Interface Control Register
 #define	GICC_PMR	0x0004	// Interrupt Priority Mask Register
-#define	GICC_BPR	0x0008	// Aliased Binary Point Register
+#define	GICC_BPR	0x0008	// Binary Point Register
 #define	GICC_IAR	0x000C	// Interrupt Acknowledge Register
 #define	GICC_EOIR	0x0010	// End Of Interrupt Register (WO)
 #define	GICC_RPR	0x0014	// Running Priority Register



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

2015-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun  9 09:18:37 UTC 2015

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

Log Message:
Fix printf formats for db_expr_t on 32bit kernels


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/mips/mips/db_interface.c

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

Modified files:

Index: src/sys/arch/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.77 src/sys/arch/mips/mips/db_interface.c:1.78
--- src/sys/arch/mips/mips/db_interface.c:1.77	Sat Jun  6 22:19:07 2015
+++ src/sys/arch/mips/mips/db_interface.c	Tue Jun  9 09:18:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.77 2015/06/06 22:19:07 matt Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.78 2015/06/09 09:18:37 martin Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.77 2015/06/06 22:19:07 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.78 2015/06/09 09:18:37 martin Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_cputype.h"	/* which mips CPUs do we support? */
@@ -696,7 +696,8 @@ db_mfcr_cmd(db_expr_t addr, bool have_ad
 		".set pop 			\n\t"			\
 	: "=r"(value) : "r"(addr));
 	
-	db_printf("control reg 0x%lx = 0x%" PRIx64 "\n", addr, value);
+	db_printf("control reg 0x%" DDB_EXPR_FMT "x = 0x%" PRIx64 "\n",
+	addr, value);
 }
 
 void
@@ -726,7 +727,8 @@ db_mtcr_cmd(db_expr_t addr, bool have_ad
 		".set pop 			\n\t"			\
 	:: "r"(value), "r"(addr));
 
-	db_printf("control reg 0x%lx = 0x%lx\n", addr, value);
+	db_printf("control reg 0x%" DDB_EXPR_FMT "x = 0x%" DDB_EXPR_FMT "x\n",
+	addr, value);
 }
 #endif /* MIPS64_XLS */
 



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

2015-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun  9 08:13:17 UTC 2015

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

Log Message:
KNF a comment


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 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.25 src/sys/arch/arm/include/locore.h:1.26
--- src/sys/arch/arm/include/locore.h:1.25	Tue Jun  9 08:09:24 2015
+++ src/sys/arch/arm/include/locore.h	Tue Jun  9 08:13:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.h,v 1.25 2015/06/09 08:09:24 skrll Exp $	*/
+/*	$NetBSD: locore.h,v 1.26 2015/06/09 08:13:17 skrll Exp $	*/
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -134,7 +134,8 @@
 #endif
 
 /*
- * Translation Table Base Register Share/Cache settings */
+ * Translation Table Base Register Share/Cache settings
+ */
 #define	TTBR_UPATTR	(TTBR_S | TTBR_RGN_WBNWA | TTBR_C)
 #define	TTBR_MPATTR	(TTBR_S | TTBR_RGN_WBNWA /* | TTBR_NOS */ | TTBR_IRGN_WBNWA)
 



CVS commit: src/sys/arch/arm

2015-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun  9 08:09:24 UTC 2015

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

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/arm/arm32/genassym.cf
cvs rdiff -u -r1.24 -r1.25 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/arm32/genassym.cf
diff -u src/sys/arch/arm/arm32/genassym.cf:1.73 src/sys/arch/arm/arm32/genassym.cf:1.74
--- src/sys/arch/arm/arm32/genassym.cf:1.73	Tue Jun  9 08:08:14 2015
+++ src/sys/arch/arm/arm32/genassym.cf	Tue Jun  9 08:09:24 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.73 2015/06/09 08:08:14 skrll Exp $
+#	$NetBSD: genassym.cf,v 1.74 2015/06/09 08:09:24 skrll Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -101,7 +101,7 @@ define	PMAP_DOMAIN_KERNEL	PMAP_DOMAIN_KE
 define	DOMAIN_CLIENT		DOMAIN_CLIENT
 ifdef ARM_MMU_EXTENDED
 define	DOMAIN_DEFAULT		((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | (DOMAIN_CLIENT << (PMAP_DOMAIN_USER*2)))
-else 
+else
 define	DOMAIN_DEFAULT		((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT)
 endif
 

Index: src/sys/arch/arm/include/locore.h
diff -u src/sys/arch/arm/include/locore.h:1.24 src/sys/arch/arm/include/locore.h:1.25
--- src/sys/arch/arm/include/locore.h:1.24	Tue Jun  9 08:08:14 2015
+++ src/sys/arch/arm/include/locore.h	Tue Jun  9 08:09:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.h,v 1.24 2015/06/09 08:08:14 skrll Exp $	*/
+/*	$NetBSD: locore.h,v 1.25 2015/06/09 08:09:24 skrll Exp $	*/
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -79,7 +79,7 @@
 	mrs	r0, cpsr ; \
 	bic	r0, r0, #(I32_bit) ; \
 	msr	cpsr_c, r0 ; \
-	ldmfd	sp!, {r0}		
+	ldmfd	sp!, {r0}
 #else
 /* Not yet used in 26-bit code */
 #endif
@@ -93,7 +93,7 @@
 #define GET_CURCPU(rX)		GET_CURLWP(rX); ldr rX, [rX, #L_CPU]
 #elif defined(_ARM_ARCH_7)
 #define GET_CURCPU(rX)		movw rX, #:lower16:cpu_info_store; movt rX, #:upper16:cpu_info_store
-#else 
+#else
 #define GET_CURCPU(rX)		ldr rX, =_C_LABEL(cpu_info_store)
 #endif
 #elif !defined(MULTIPROCESSOR)



CVS commit: src/sys/arch/arm

2015-06-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun  9 08:08:14 UTC 2015

Modified Files:
src/sys/arch/arm/arm: cpufunc_asm_armv7.S
src/sys/arch/arm/arm32: genassym.cf
src/sys/arch/arm/cortex: a9_mpsubr.S
src/sys/arch/arm/include: armreg.h locore.h

Log Message:
Use TTBR_[UM]PATTR in a9_mpsubr.S as well as cpufunc_asm_armv7

Prompted by matt@


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/arm/cpufunc_asm_armv7.S
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/arm/arm32/genassym.cf
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arm/cortex/a9_mpsubr.S
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/arm/include/armreg.h
cvs rdiff -u -r1.23 -r1.24 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_asm_armv7.S
diff -u src/sys/arch/arm/arm/cpufunc_asm_armv7.S:1.25 src/sys/arch/arm/arm/cpufunc_asm_armv7.S:1.26
--- src/sys/arch/arm/arm/cpufunc_asm_armv7.S:1.25	Sun Jun  7 12:01:41 2015
+++ src/sys/arch/arm/arm/cpufunc_asm_armv7.S	Tue Jun  9 08:08:14 2015
@@ -45,25 +45,6 @@ ENTRY(armv7_wait)
 	bx	lr
 END(armv7_wait)
 
-
-#define	TTBR_C			(1 << 0)
-#define	TTBR_S			(1 << 1)
-#define	TTBR_IMP		(1 << 2)
-#define	TTBR_RGN_MASK		(3 << 3)
-#define	 TTBR_RGN_NC		(0 << 3)
-#define	 TTBR_RGN_WBWA		(1 << 3)
-#define	 TTBR_RGN_WT		(2 << 3)
-#define	 TTBR_RGN_WBNWA		(3 << 3)
-#define	TTBR_NOS		(1 << 5)
-#define	TTBR_IRGN_MASK		((1 << 6) | (1 << 0))
-#define	 TTBR_IRGN_NC		((0 << 6) | (0 << 0))
-#define	 TTBR_IRGN_WBWA		((0 << 6) | (1 << 0))
-#define	 TTBR_IRGN_WT		((1 << 6) | (0 << 0))
-#define	 TTBR_IRGN_WBNWA	((1 << 6) | (1 << 0))
-
-#define	TTBR_UPATTR		(TTBR_S | TTBR_RGN_WBNWA | TTBR_C)
-#define	TTBR_MPATTR		(TTBR_S | TTBR_RGN_WBNWA /* | TTBR_NOS */ | TTBR_IRGN_WBNWA)
-
 ENTRY(armv7_context_switch)
 	dsb@ data synchronization barrier
 	mrc	p15, 0, ip, c0, c0, 5	@ get MPIDR

Index: src/sys/arch/arm/arm32/genassym.cf
diff -u src/sys/arch/arm/arm32/genassym.cf:1.72 src/sys/arch/arm/arm32/genassym.cf:1.73
--- src/sys/arch/arm/arm32/genassym.cf:1.72	Wed Apr 15 15:44:19 2015
+++ src/sys/arch/arm/arm32/genassym.cf	Tue Jun  9 08:08:14 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.72 2015/04/15 15:44:19 matt Exp $
+#	$NetBSD: genassym.cf,v 1.73 2015/06/09 08:08:14 skrll Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -138,6 +138,9 @@ define	L2_AP_KRW		L2_AP(AP_KRW)
 
 define	TTBCR_S_N_1		__SHIFTIN(1, TTBCR_S_N)
 
+define	TTBR_UPATTR		TTBR_UPATTR
+define	TTBR_MPATTR		TTBR_MPATTR
+
 ifdef PMAP_INCLUDE_PTE_SYNC
 define	PMAP_INCLUDE_PTE_SYNC	1
 endif

Index: src/sys/arch/arm/cortex/a9_mpsubr.S
diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.41 src/sys/arch/arm/cortex/a9_mpsubr.S:1.42
--- src/sys/arch/arm/cortex/a9_mpsubr.S:1.41	Sun May 31 00:02:16 2015
+++ src/sys/arch/arm/cortex/a9_mpsubr.S	Tue Jun  9 08:08:14 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9_mpsubr.S,v 1.41 2015/05/31 00:02:16 matt Exp $	*/
+/*	$NetBSD: a9_mpsubr.S,v 1.42 2015/06/09 08:08:14 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -198,8 +198,8 @@ arm_cpuinit:
 	XPUTC(#'G')
 	mrc	p15, 0, r1, c0, c0, 5	// MPIDR read
 	cmp	r1, #0
-	orrlt	r10, r10, #0x5b		// MP, cachable (Normal WB)
-	orrge	r10, r10, #0x1b		// Non-MP, cacheable, normal WB
+	orrlt	r10, r10, #TTBR_MPATTR	// MP, cachable (Normal WB)
+	orrge	r10, r10, #TTBR_UPATTR	// Non-MP, cacheable, normal WB
 	XPUTC(#'0')
 	mcr	p15, 0, r10, c2, c0, 0	// TTBR0 write
 #if defined(ARM_MMU_EXTENDED)

Index: src/sys/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.106 src/sys/arch/arm/include/armreg.h:1.107
--- src/sys/arch/arm/include/armreg.h:1.106	Sat May 30 20:39:56 2015
+++ src/sys/arch/arm/include/armreg.h	Tue Jun  9 08:08:14 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.106 2015/05/30 20:39:56 skrll Exp $	*/
+/*	$NetBSD: armreg.h,v 1.107 2015/06/09 08:08:14 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -645,6 +645,22 @@
 #define L2CTRL_NUMCPU	__BITS(25,24)	// numcpus - 1
 #define L2CTRL_ICPRES	__BIT(23)	// Interrupt Controller is present
 
+/* Translation Table Base Register */
+#define	TTBR_C			__BIT(0)	/* without MPE */
+#define	TTBR_S			__BIT(1)
+#define	TTBR_IMP		__BIT(2)
+#define	TTBR_RGN_MASK		__BITS(4,3)
+#define	 TTBR_RGN_NC		__SHIFTIN(0, TTBR_RGN_MASK)
+#define	 TTBR_RGN_WBWA		__SHIFTIN(1, TTBR_RGN_MASK)
+#define	 TTBR_RGN_WT		__SHIFTIN(2, TTBR_RGN_MASK)
+#define	 TTBR_RGN_WBNWA		__SHIFTIN(3, TTBR_RGN_MASK)
+#define	TTBR_NOS		__BIT(5)
+#define	TTBR_IRGN_MASK		(__BIT(6) | __BIT(0))
+#define	 TTBR_IRGN_NC		0
+#define	 TTBR_IRGN_WBWA		__BIT(6)
+#define	 TTBR_IRGN_WT		__BIT(0)
+#define	 TTBR_IRGN_WBNWA	(__BIT(0) | __BIT(6))
+
 /* Translate Table Base Control Register */
 #define TTBCR_S_EAE	__BIT(31)	// Extended Address Extension
 #define TTBCR_S_PD1	__BIT(5)	//