CVS commit: src/doc

2014-03-24 Thread Fredrik Pettai
Module Name:src
Committed By:   pettai
Date:   Mon Mar 24 06:27:56 UTC 2014

Modified Files:
src/doc: CHANGES

Log Message:
fix date timestamp


To generate a diff of this commit:
cvs rdiff -u -r1.1906 -r1.1907 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.1906 src/doc/CHANGES:1.1907
--- src/doc/CHANGES:1.1906	Mon Mar 24 01:04:37 2014
+++ src/doc/CHANGES	Mon Mar 24 06:27:56 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1906 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1907 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -376,4 +376,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	rtsx(4): Add a driver for Realtek RTS5209/RTS5229 Card Reader.
 		Ported from OpenBSD. [nonaka 20140319]
 	mdnsd(8), dns-sd(1), libdns_sd: import mDNSResponder 258.14
-[pettai 20090929]
+		[pettai 20140324]



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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 07:36:48 UTC 2014

Modified Files:
src/sys/kern [matt-nb5-mips64]: subr_evcnt.c

Log Message:
Fix infinite recursion.


To generate a diff of this commit:
cvs rdiff -u -r1.4.94.3 -r1.4.94.4 src/sys/kern/subr_evcnt.c

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

Modified files:

Index: src/sys/kern/subr_evcnt.c
diff -u src/sys/kern/subr_evcnt.c:1.4.94.3 src/sys/kern/subr_evcnt.c:1.4.94.4
--- src/sys/kern/subr_evcnt.c:1.4.94.3	Sat Feb 15 10:13:24 2014
+++ src/sys/kern/subr_evcnt.c	Mon Mar 24 07:36:48 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_evcnt.c,v 1.4.94.3 2014/02/15 10:13:24 matt Exp $ */
+/* $NetBSD: subr_evcnt.c,v 1.4.94.4 2014/03/24 07:36:48 matt Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_evcnt.c,v 1.4.94.3 2014/02/15 10:13:24 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_evcnt.c,v 1.4.94.4 2014/03/24 07:36:48 matt Exp $);
 
 #include opt_ddb.h
 
@@ -153,7 +153,7 @@ evcnt_attach_dynamic(struct evcnt *ev, i
 const char *group, const char *name)
 {
 	memset(ev, 0, sizeof *ev);
-	evcnt_attach_dynamic(ev, type, parent, group, name);
+	evcnt_attach_dynamic_nozero(ev, type, parent, group, name);
 }
 
 void



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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 07:37:39 UTC 2014

Modified Files:
src/sys/arch/arm/arm32 [matt-nb5-mips64]: arm32_kvminit.c

Log Message:
Make sure kernel starts on a page boundary.


To generate a diff of this commit:
cvs rdiff -u -r1.22.2.2 -r1.22.2.3 src/sys/arch/arm/arm32/arm32_kvminit.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/arm32_kvminit.c
diff -u src/sys/arch/arm/arm32/arm32_kvminit.c:1.22.2.2 src/sys/arch/arm/arm32/arm32_kvminit.c:1.22.2.3
--- src/sys/arch/arm/arm32/arm32_kvminit.c:1.22.2.2	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/arm32/arm32_kvminit.c	Mon Mar 24 07:37:39 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_kvminit.c,v 1.22.2.2 2014/02/15 16:18:36 matt Exp $	*/
+/*	$NetBSD: arm32_kvminit.c,v 1.22.2.3 2014/03/24 07:37:39 matt Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -122,7 +122,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.22.2.2 2014/02/15 16:18:36 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.22.2.3 2014/03/24 07:37:39 matt Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -182,7 +182,7 @@ arm32_bootmem_init(paddr_t memstart, psi
 	/*
 	 * Let's record where the kernel lives.
 	 */
-	bmi-bmi_kernelstart = kernelstart;
+	bmi-bmi_kernelstart = trunc_page(kernelstart);
 	bmi-bmi_kernelend = KERN_VTOPHYS(bmi, round_page((vaddr_t)_end));
 
 #ifdef VERBOSE_INIT_ARM



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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 07:37:14 UTC 2014

Modified Files:
src/sys/uvm [matt-nb5-mips64]: uvm_page.c

Log Message:
Make sure the hint is initialized to NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.140.6.3.4.11 -r1.140.6.3.4.12 src/sys/uvm/uvm_page.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/uvm/uvm_page.c
diff -u src/sys/uvm/uvm_page.c:1.140.6.3.4.11 src/sys/uvm/uvm_page.c:1.140.6.3.4.12
--- src/sys/uvm/uvm_page.c:1.140.6.3.4.11	Sat Feb 15 10:19:14 2014
+++ src/sys/uvm/uvm_page.c	Mon Mar 24 07:37:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.140.6.3.4.11 2014/02/15 10:19:14 matt Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.140.6.3.4.12 2014/03/24 07:37:14 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.140.6.3.4.11 2014/02/15 10:19:14 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.140.6.3.4.12 2014/03/24 07:37:14 matt Exp $);
 
 #include opt_uvmhist.h
 #include opt_readahead.h
@@ -328,6 +328,7 @@ uvm_page_init_freelist(struct pgfreelist
 		for (size_t queue = 0; queue  PGFL_NQUEUES; queue++) {
 			LIST_INIT(pgfl-pgfl_queues[free_list][queue]);
 		}
+		pgfl-pgfl_hint = NULL;
 		pgfl-pgfl_pggroups[free_list] =
 		pggroups[free_list * uvmexp.ncolors + color];
 		pgfl-pgfl_pggroups[free_list]-pgrp_free_list = free_list;



CVS commit: [matt-nb5-mips64] src/share/mk

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 07:38:23 UTC 2014

Modified Files:
src/share/mk [matt-nb5-mips64]: bsd.endian.mk

Log Message:
Add armv7


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.16.1 src/share/mk/bsd.endian.mk

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

Modified files:

Index: src/share/mk/bsd.endian.mk
diff -u src/share/mk/bsd.endian.mk:1.15 src/share/mk/bsd.endian.mk:1.15.16.1
--- src/share/mk/bsd.endian.mk:1.15	Wed Jan  9 11:26:14 2008
+++ src/share/mk/bsd.endian.mk	Mon Mar 24 07:38:23 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.endian.mk,v 1.15 2008/01/09 11:26:14 simonb Exp $
+#	$NetBSD: bsd.endian.mk,v 1.15.16.1 2014/03/24 07:38:23 matt Exp $
 
 .if !defined(_BSD_ENDIAN_MK_)
 _BSD_ENDIAN_MK_=1
@@ -7,6 +7,7 @@ _BSD_ENDIAN_MK_=1
 
 .if ${MACHINE_ARCH} == alpha || \
 ${MACHINE_ARCH} == arm || \
+${MACHINE_ARCH} == armv7 || \
 ${MACHINE_ARCH} == i386 || \
 ${MACHINE_ARCH} == ia64 || \
 ${MACHINE_ARCH} == vax || \



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

2014-03-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 24 10:46:58 UTC 2014

Modified Files:
src/sys/arch/luna68k/stand/boot: disklabel.c locore.S preset.h

Log Message:
PR port-luna68k/48677: fix some typos.
From shinnashi takeshi.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/luna68k/stand/boot/disklabel.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/luna68k/stand/boot/locore.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/luna68k/stand/boot/preset.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/luna68k/stand/boot/disklabel.c
diff -u src/sys/arch/luna68k/stand/boot/disklabel.c:1.4 src/sys/arch/luna68k/stand/boot/disklabel.c:1.5
--- src/sys/arch/luna68k/stand/boot/disklabel.c:1.4	Sat Jan 11 15:51:02 2014
+++ src/sys/arch/luna68k/stand/boot/disklabel.c	Mon Mar 24 10:46:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.c,v 1.4 2014/01/11 15:51:02 tsutsui Exp $	*/
+/*	$NetBSD: disklabel.c,v 1.5 2014/03/24 10:46:58 martin Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -129,12 +129,12 @@ disklabel(int argc, char *argv[])
 		printf(\thelp:\t\tthis command\n);
 		printf(\tread:\t\tread disklabel from scsi_device\n);
 		printf(\twrite:\t\twrite disklabel to scsi_device\n);
-		printf(\tomron:\t\tshow OMRON disklabel infomation\n);
-		printf(\tbsd:\t\tshow BSD disklabel infomation\n);
-		printf(\tcopy:\t\tcopy disklabel infomation from OMRON
+		printf(\tomron:\t\tshow OMRON disklabel information\n);
+		printf(\tbsd:\t\tshow BSD disklabel information\n);
+		printf(\tcopy:\t\tcopy disklabel information from OMRON
 		 to BSD\n);
 		printf(\tchecksum:\tdoing checksum\n);
-		printf(\tset:\t\tchange BSD disklabel infomation\n);
+		printf(\tset:\t\tchange BSD disklabel information\n);
 		printf(\n\n);
 	} else if (!strcmp(argv[1], read)) {
 		if (scsi_read( 0, lbl_buff, LABEL_SIZE)) {

Index: src/sys/arch/luna68k/stand/boot/locore.S
diff -u src/sys/arch/luna68k/stand/boot/locore.S:1.10 src/sys/arch/luna68k/stand/boot/locore.S:1.11
--- src/sys/arch/luna68k/stand/boot/locore.S:1.10	Sat Jan 11 15:51:02 2014
+++ src/sys/arch/luna68k/stand/boot/locore.S	Mon Mar 24 10:46:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.10 2014/01/11 15:51:02 tsutsui Exp $	*/
+/*	$NetBSD: locore.S,v 1.11 2014/03/24 10:46:58 martin Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -762,7 +762,7 @@ ENTRY(spl7)
 	.data
 
 /*
- * Memory Infomation Field for secondary booter memory allocator
+ * Memory Information Field for secondary booter memory allocator
  */
 
 GLOBAL(prgcore)

Index: src/sys/arch/luna68k/stand/boot/preset.h
diff -u src/sys/arch/luna68k/stand/boot/preset.h:1.2 src/sys/arch/luna68k/stand/boot/preset.h:1.3
--- src/sys/arch/luna68k/stand/boot/preset.h:1.2	Sat Jan 11 15:51:02 2014
+++ src/sys/arch/luna68k/stand/boot/preset.h	Mon Mar 24 10:46:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: preset.h,v 1.2 2014/01/11 15:51:02 tsutsui Exp $	*/
+/*	$NetBSD: preset.h,v 1.3 2014/03/24 10:46:58 martin Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -71,7 +71,7 @@
  */
 
 /*
- * preset.h -- preset infomation
+ * preset.h -- preset information
  *   by A.Fujita, Dec-12-1992
  */
 



CVS commit: src

2014-03-24 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Mar 24 13:42:41 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile vnode.9
src/sys/fs/puffs: puffs_vnops.c
src/sys/fs/union: union_vnops.c
src/sys/kern: vfs_vnode.c
src/sys/miscfs/genfs: genfs_vnops.c layer_vnops.c
src/sys/miscfs/specfs: spec_vnops.c
src/sys/sys: param.h vnode.h
src/sys/ufs/ext2fs: ext2fs_vnops.c
src/sys/ufs/ffs: ffs_vnops.c
src/sys/ufs/lfs: lfs_segment.c lfs_syscalls.c lfs_vfsops.c lfs_vnops.c
src/usr.sbin/pstat: pstat.8 pstat.c

Log Message:
- Make VI_XLOCK, VI_CLEAN and VI_LOCKSHARE private to kern/vfs_*.c.
- Make vwait() static.
- Add  vdead_check() to check a vnode for being or becoming dead.

Discussed on tech-kern.

Welcome to 6.99.38


To generate a diff of this commit:
cvs rdiff -u -r1.1885 -r1.1886 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.376 -r1.377 src/share/man/man9/Makefile
cvs rdiff -u -r1.60 -r1.61 src/share/man/man9/vnode.9
cvs rdiff -u -r1.180 -r1.181 src/sys/fs/puffs/puffs_vnops.c
cvs rdiff -u -r1.58 -r1.59 src/sys/fs/union/union_vnops.c
cvs rdiff -u -r1.34 -r1.35 src/sys/kern/vfs_vnode.c
cvs rdiff -u -r1.191 -r1.192 src/sys/miscfs/genfs/genfs_vnops.c
cvs rdiff -u -r1.56 -r1.57 src/sys/miscfs/genfs/layer_vnops.c
cvs rdiff -u -r1.142 -r1.143 src/sys/miscfs/specfs/spec_vnops.c
cvs rdiff -u -r1.446 -r1.447 src/sys/sys/param.h
cvs rdiff -u -r1.245 -r1.246 src/sys/sys/vnode.h
cvs rdiff -u -r1.110 -r1.111 src/sys/ufs/ext2fs/ext2fs_vnops.c
cvs rdiff -u -r1.123 -r1.124 src/sys/ufs/ffs/ffs_vnops.c
cvs rdiff -u -r1.235 -r1.236 src/sys/ufs/lfs/lfs_segment.c
cvs rdiff -u -r1.151 -r1.152 src/sys/ufs/lfs/lfs_syscalls.c
cvs rdiff -u -r1.319 -r1.320 src/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -u -r1.261 -r1.262 src/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/pstat/pstat.8
cvs rdiff -u -r1.122 -r1.123 src/usr.sbin/pstat/pstat.c

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1885 src/distrib/sets/lists/comp/mi:1.1886
--- src/distrib/sets/lists/comp/mi:1.1885	Sat Mar 22 11:24:35 2014
+++ src/distrib/sets/lists/comp/mi	Mon Mar 24 13:42:40 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1885 2014/03/22 11:24:35 skrll Exp $
+#	$NetBSD: mi,v 1.1886 2014/03/24 13:42:40 hannken Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -10977,6 +10977,7 @@
 ./usr/share/man/cat9/vdevgone.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/veriexec.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/vfinddev.0			comp-sys-catman		.cat
+./usr/share/man/cat9/vdead_check.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/vflush.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/vflushbuf.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/vfs.0			comp-sys-catman		.cat
@@ -17630,6 +17631,7 @@
 ./usr/share/man/html9/vdevgone.html		comp-sys-htmlman	html
 ./usr/share/man/html9/veriexec.html		comp-sys-htmlman	html
 ./usr/share/man/html9/vfinddev.html		comp-sys-htmlman	html
+./usr/share/man/html9/vdead_check.html		comp-sys-htmlman	html
 ./usr/share/man/html9/vflush.html		comp-sys-htmlman	html
 ./usr/share/man/html9/vflushbuf.html		comp-sys-htmlman	html
 ./usr/share/man/html9/vfs.html			comp-sys-htmlman	html
@@ -24522,6 +24524,7 @@
 ./usr/share/man/man9/vdevgone.9			comp-sys-man		.man
 ./usr/share/man/man9/veriexec.9			comp-sys-man		.man
 ./usr/share/man/man9/vfinddev.9			comp-sys-man		.man
+./usr/share/man/man9/vdead_check.9		comp-sys-man		.man
 ./usr/share/man/man9/vflush.9			comp-sys-man		.man
 ./usr/share/man/man9/vflushbuf.9		comp-sys-man		.man
 ./usr/share/man/man9/vfs.9			comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.376 src/share/man/man9/Makefile:1.377
--- src/share/man/man9/Makefile:1.376	Sat Mar 22 11:24:36 2014
+++ src/share/man/man9/Makefile	Mon Mar 24 13:42:40 2014
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.376 2014/03/22 11:24:36 skrll Exp $
+#   $NetBSD: Makefile,v 1.377 2014/03/24 13:42:40 hannken Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -898,6 +898,7 @@ MLINKS+=vnode.9 vref.9 \
 	vnode.9 vrecycle.9 \
 	vnode.9 vgone.9 \
 	vnode.9 vgonel.9 \
+	vnode.9 vdead_check.9 \
 	vnode.9 vflush.9 \
 	vnode.9 vaccess.9 \
 	vnode.9 bdevvp.9 \

Index: src/share/man/man9/vnode.9
diff -u src/share/man/man9/vnode.9:1.60 src/share/man/man9/vnode.9:1.61
--- src/share/man/man9/vnode.9:1.60	Wed Mar  5 09:37:29 2014
+++ src/share/man/man9/vnode.9	Mon Mar 24 13:42:40 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: vnode.9,v 1.60 2014/03/05 09:37:29 hannken Exp $
+.\ $NetBSD: vnode.9,v 1.61 2014/03/24 13:42:40 hannken Exp $
 .\
 .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY 

CVS commit: src/sys/arch

2014-03-24 Thread Ryosuke Moro
Module Name:src
Committed By:   szptvlfn
Date:   Mon Mar 24 14:15:38 UTC 2014

Modified Files:
src/sys/arch/amd64/conf: ALL GENERIC XEN3_DOM0 XEN3_DOMU
src/sys/arch/amigappc/conf: GENERIC NULL
src/sys/arch/bebox/conf: GENERIC
src/sys/arch/evbarm/conf: MMNET_GENERIC MPCSA_GENERIC NETWALKER
src/sys/arch/evbmips/conf: CPMBR1400
src/sys/arch/evbsh3/conf: AP_MS104_SH4 T_SH7706LAN T_SH7706LSR
src/sys/arch/ews4800mips/conf: GENERIC
src/sys/arch/hpcsh/conf: GENERIC
src/sys/arch/i386/conf: ALL GENERIC GENERIC_PS2TINY GENERIC_TINY
INSTALL_FLOPPY INSTALL_TINY NET4501 XEN3_DOM0 XEN3_DOMU
src/sys/arch/ia64/conf: GENERIC GENERIC.SKI
src/sys/arch/iyonix/conf: GENERIC
src/sys/arch/landisk/conf: GENERIC
src/sys/arch/news68k/conf: GENERIC GENERIC_TINY NEWS1200
src/sys/arch/sparc/conf: GENERIC INSTALL KRUPS MRCOFFEE TADPOLE3GX
src/sys/arch/sparc64/conf: GENERIC NONPLUS64
src/sys/arch/x68k/conf: GENERIC INSTALL

Log Message:
fix manual section numbering of sysctl.
  thanks wiz@


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.382 -r1.383 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amd64/conf/XEN3_DOMU
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amigappc/conf/GENERIC
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amigappc/conf/NULL
cvs rdiff -u -r1.140 -r1.141 src/sys/arch/bebox/conf/GENERIC
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/conf/MMNET_GENERIC
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/evbarm/conf/MPCSA_GENERIC
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbarm/conf/NETWALKER
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbmips/conf/CPMBR1400
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbsh3/conf/AP_MS104_SH4
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbsh3/conf/T_SH7706LAN
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbsh3/conf/T_SH7706LSR
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/ews4800mips/conf/GENERIC
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/hpcsh/conf/GENERIC
cvs rdiff -u -r1.369 -r1.370 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1100 -r1.1101 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/i386/conf/GENERIC_PS2TINY
cvs rdiff -u -r1.137 -r1.138 src/sys/arch/i386/conf/GENERIC_TINY
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/i386/conf/INSTALL_FLOPPY
cvs rdiff -u -r1.139 -r1.140 src/sys/arch/i386/conf/INSTALL_TINY
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/i386/conf/NET4501
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/i386/conf/XEN3_DOM0
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/i386/conf/XEN3_DOMU
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/conf/GENERIC
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/conf/GENERIC.SKI
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/iyonix/conf/GENERIC
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/landisk/conf/GENERIC
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/news68k/conf/GENERIC
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/news68k/conf/GENERIC_TINY
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/news68k/conf/NEWS1200
cvs rdiff -u -r1.242 -r1.243 src/sys/arch/sparc/conf/GENERIC
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/sparc/conf/INSTALL
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/sparc/conf/KRUPS
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sparc/conf/MRCOFFEE
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/sparc/conf/TADPOLE3GX
cvs rdiff -u -r1.170 -r1.171 src/sys/arch/sparc64/conf/GENERIC
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/sparc64/conf/NONPLUS64
cvs rdiff -u -r1.171 -r1.172 src/sys/arch/x68k/conf/GENERIC
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/x68k/conf/INSTALL

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/amd64/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.1 src/sys/arch/amd64/conf/ALL:1.2
--- src/sys/arch/amd64/conf/ALL:1.1	Thu Mar 20 20:40:09 2014
+++ src/sys/arch/amd64/conf/ALL	Mon Mar 24 14:15:37 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.1 2014/03/20 20:40:09 christos Exp $
+# $NetBSD: ALL,v 1.2 2014/03/24 14:15:37 szptvlfn Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	arch/amd64/conf/std.amd64
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		ALL-$Revision: 1.1 $
+#ident 		ALL-$Revision: 1.2 $
 
 maxusers	64		# estimated number of users
 
@@ -113,7 +113,7 @@ options 	DEBUG		# expensive debugging ch
 options 	LOCKDEBUG	# expensive locking checks/support
 options 	KMEMSTATS	# kernel memory statistics (vmstat -m)
 options 	DDB		# in-kernel debugger
-options 	DDB_ONPANIC=1	# see also sysctl(8): `ddb.onpanic'
+options 	DDB_ONPANIC=1	# see also sysctl(7): `ddb.onpanic'
 options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
 options 	DDB_VERBOSE_HELP
 options 	KGDB		# remote debugger

Index: src/sys/arch/amd64/conf/GENERIC

CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include/arm32

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 16:50:57 UTC 2014

Modified Files:
src/sys/arch/arm/include/arm32 [matt-nb5-mips64]: pmap.h

Log Message:
Define PMAP_KMPAGE


To generate a diff of this commit:
cvs rdiff -u -r1.88.10.1 -r1.88.10.2 src/sys/arch/arm/include/arm32/pmap.h

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

Modified files:

Index: src/sys/arch/arm/include/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.88.10.1 src/sys/arch/arm/include/arm32/pmap.h:1.88.10.2
--- src/sys/arch/arm/include/arm32/pmap.h:1.88.10.1	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/include/arm32/pmap.h	Mon Mar 24 16:50:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.88.10.1 2014/02/15 16:18:36 matt Exp $	*/
+/*	$NetBSD: pmap.h,v 1.88.10.2 2014/03/24 16:50:56 matt Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -305,8 +305,8 @@ void	pmap_remove_all(struct pmap *);
 bool	pmap_extract(struct pmap *, vaddr_t, paddr_t *);
 
 #define	PMAP_NEED_PROCWR
-#define PMAP_GROWKERNEL		/* turn on pmap_growkernel interface */
-#define	PMAP_ENABLE_PMAP_KMPAGE	/* enable the PMAP_KMPAGE flag */
+#define PMAP_GROWKERNEL			/* turn on pmap_growkernel interface */
+#define	PMAP_KMPAGE	0x0800	/* enable the PMAP_KMPAGE flag */
 
 #if (ARM_MMU_V6 + ARM_MMU_V7)  0
 #define	PMAP_PREFER(hint, vap, sz, td)	pmap_prefer((hint), (vap), (td))



CVS commit: src/sys/arch/atari

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 18:39:57 UTC 2014

Modified Files:
src/sys/arch/atari/atari: autoconf.c machdep.c
src/sys/arch/atari/dev: atari5380.c clock.c ite.c kbd.c ncr5380.c ser.c
zs.c

Log Message:
- remove unused
- use cpu_{g,s}etmodel() (not committed yet)


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/atari/atari/autoconf.c
cvs rdiff -u -r1.175 -r1.176 src/sys/arch/atari/atari/machdep.c
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/atari/dev/atari5380.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/atari/dev/clock.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/atari/dev/kbd.c
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/atari/dev/ncr5380.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/atari/dev/ser.c
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/atari/dev/zs.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/atari/atari/autoconf.c
diff -u src/sys/arch/atari/atari/autoconf.c:1.64 src/sys/arch/atari/atari/autoconf.c:1.65
--- src/sys/arch/atari/atari/autoconf.c:1.64	Sat Oct 27 13:17:42 2012
+++ src/sys/arch/atari/atari/autoconf.c	Mon Mar 24 14:39:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.64 2012/10/27 17:17:42 chs Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.65 2014/03/24 18:39:57 christos Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.64 2012/10/27 17:17:42 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.65 2014/03/24 18:39:57 christos Exp $);
 
 #include opt_md.h
 
@@ -95,14 +95,12 @@ cpu_rootconf(void)
 
 	if ((boothowto  RB_ASKNAME) != 0) {
 		int md_major, i;
-		dev_t md_dev;
 		cfdata_t cf;
 		struct md_softc *sc;
 
 		md_major = devsw_name2blk(md, NULL, 0);
 		if (md_major = 0) {
 			for (i = 0; i  RAMD_NDEV; i++) {
-md_dev = MAKEDISKDEV(md_major, i, RAW_PART);
 cf = malloc(sizeof(*cf), M_DEVBUF,
 M_ZERO|M_WAITOK);
 if (cf == NULL)

Index: src/sys/arch/atari/atari/machdep.c
diff -u src/sys/arch/atari/atari/machdep.c:1.175 src/sys/arch/atari/atari/machdep.c:1.176
--- src/sys/arch/atari/atari/machdep.c:1.175	Fri Aug 10 13:43:32 2012
+++ src/sys/arch/atari/atari/machdep.c	Mon Mar 24 14:39:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.175 2012/08/10 17:43:32 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.176 2014/03/24 18:39:57 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.175 2012/08/10 17:43:32 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.176 2014/03/24 18:39:57 christos Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -232,8 +232,6 @@ cpu_startup(void)
 /*
  * Info for CTL_HW
  */
-char cpu_model[120];
- 
 static void
 identifycpu(void)
 {
@@ -288,8 +286,8 @@ identifycpu(void)
 		cpu = m68020;
 		mmu =  m68851 MMU;
 	}
-	sprintf(cpu_model, %s (%s CPU%s%sFPU), mach, cpu, mmu, fpu);
-	printf(%s\n, cpu_model);
+	cpu_setmodel(%s (%s CPU%s%sFPU), mach, cpu, mmu, fpu);
+	printf(%s\n, cpu_getmodel());
 }
 
 /*
@@ -570,12 +568,9 @@ int	*nofault;
 int
 badbaddr(void *addr, int size)
 {
-	register int i;
+	int i;
 	label_t	faultbuf;
 
-#ifdef lint
-	i = *addr; if (i) return(0);
-#endif
 	nofault = (int *) faultbuf;
 	if (setjmp((label_t *)nofault)) {
 		nofault = (int *) 0;
@@ -594,6 +589,7 @@ badbaddr(void *addr, int size)
 	default:
 		panic(badbaddr: unknown size);
 	}
+	__USE(i);
 	nofault = (int *)0;
 	return 0;
 }

Index: src/sys/arch/atari/dev/atari5380.c
diff -u src/sys/arch/atari/dev/atari5380.c:1.59 src/sys/arch/atari/dev/atari5380.c:1.60
--- src/sys/arch/atari/dev/atari5380.c:1.59	Sun Feb 12 11:34:07 2012
+++ src/sys/arch/atari/dev/atari5380.c	Mon Mar 24 14:39:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: atari5380.c,v 1.59 2012/02/12 16:34:07 matt Exp $	*/
+/*	$NetBSD: atari5380.c,v 1.60 2014/03/24 18:39:57 christos Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: atari5380.c,v 1.59 2012/02/12 16:34:07 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: atari5380.c,v 1.60 2014/03/24 18:39:57 christos Exp $);
 
 #include opt_atariscsi.h
 
@@ -325,10 +325,8 @@ scsi_tt_idisable(void)
 static inline void
 scsi_tt_clr_ipend(void)
 {
-	int tmp;
-
 	SCSI_DMA-s_dma_ctrl = 0;
-	tmp = GET_TT_REG(NCR5380_IRCV);
+	GET_TT_REG(NCR5380_IRCV);
 	if (machineid  ATARI_TT)
 		MFP2-mf_iprb = (uint8_t)~IB_SCDM;
 	MFP2-mf_ipra = (uint8_t)~IA_SCSI;

Index: src/sys/arch/atari/dev/clock.c
diff -u src/sys/arch/atari/dev/clock.c:1.56 src/sys/arch/atari/dev/clock.c:1.57
--- src/sys/arch/atari/dev/clock.c:1.56	Sun Mar 16 01:20:23 2014
+++ src/sys/arch/atari/dev/clock.c	Mon Mar 24 14:39:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.56 2014/03/16 05:20:23 dholland Exp $	*/
+/*	$NetBSD: 

CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include/arm32

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:42:50 UTC 2014

Modified Files:
src/sys/arch/arm/include/arm32 [matt-nb5-mips64]: vmparam.h

Log Message:
Deal with those arms who only need one type of freelist.


To generate a diff of this commit:
cvs rdiff -u -r1.23.12.1 -r1.23.12.2 src/sys/arch/arm/include/arm32/vmparam.h

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

Modified files:

Index: src/sys/arch/arm/include/arm32/vmparam.h
diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.23.12.1 src/sys/arch/arm/include/arm32/vmparam.h:1.23.12.2
--- src/sys/arch/arm/include/arm32/vmparam.h:1.23.12.1	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/include/arm32/vmparam.h	Mon Mar 24 18:42:50 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.23.12.1 2014/02/15 16:18:36 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.23.12.2 2014/03/24 18:42:50 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -112,8 +112,12 @@ extern vaddr_t virtual_end;
 	(VM_NFREELIST == 1 \
 	? VM_PGCOLOR_BUCKET(pg) : (*arm_page_to_pggroup)((pg), (ncolors)))
 
+#ifdef PMAP_NEED_ALLOC_POOLPAGE
 #define VM_FREELIST_NORMALOK_P(lcv) \
 	((lcv) == VM_FREELIST_DEFAULT || (lcv) != arm_poolpage_vmfreelist)
+#else
+#define VM_FREELIST_NORMALOK_P(lcv)	true
+#endif
 
 struct vm_page;
 extern size_t	(*arm_page_to_pggroup)(struct vm_page *, size_t);



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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:43:40 UTC 2014

Modified Files:
src/sys/arch/arm/include [matt-nb5-mips64]: armreg.h

Log Message:
merge l2ctrl from head


To generate a diff of this commit:
cvs rdiff -u -r1.41.12.1 -r1.41.12.2 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.41.12.1 src/sys/arch/arm/include/armreg.h:1.41.12.2
--- src/sys/arch/arm/include/armreg.h:1.41.12.1	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/include/armreg.h	Mon Mar 24 18:43:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.41.12.1 2014/02/15 16:18:36 matt Exp $	*/
+/*	$NetBSD: armreg.h,v 1.41.12.2 2014/03/24 18:43:40 matt Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -597,6 +597,10 @@
 #define CORTEX_CNTENC_C __BIT(31)	/* Disables the cycle counter */
 #define CORTEX_CNTOFL_C __BIT(31)	/* Cycle counter overflow flag */
 
+/* Defines for ARM Cortex A7/A15 L2CTRL */
+#define L2CTRL_NUMCPU	__BITS(25,24)	// numcpus - 1
+#define L2CTRL_ICPRES	__BIT(23)	// Interrupt Controller is present
+
 /* Translate Table Base Control Register */
 #define TTBCR_S_EAE	__BIT(31)	// Extended Address Extension
 #define TTBCR_S_PD1	__BIT(5)	// Don't use TTBR1
@@ -765,6 +769,8 @@ ARMREG_WRITE_INLINE(tlbimva, p15,0,%0,c
 ARMREG_WRITE_INLINE(tlbiasid, p15,0,%0,c8,c7,2) /* Invalidate unified TLB by ASID */
 ARMREG_WRITE_INLINE(tlbimvaa, p15,0,%0,c8,c7,3) /* Invalidate unified TLB by MVA, all ASID */
 /* cp15 c9 registers */
+ARMREG_READ_INLINE(l2ctrl, p15,1,%0,c9,c0,2) /* A7/A15 L2 Control Register */
+ARMREG_WRITE_INLINE(l2ctrl, p15,1,%0,c9,c0,2) /* A7/A15 L2 Control Register */
 ARMREG_READ_INLINE(pmcr, p15,0,%0,c9,c12,0) /* PMC Control Register */
 ARMREG_WRITE_INLINE(pmcr, p15,0,%0,c9,c12,0) /* PMC Control Register */
 ARMREG_READ_INLINE(pmcntenset, p15,0,%0,c9,c12,1) /* PMC Count Enable Set */



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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:44:44 UTC 2014

Modified Files:
src/sys/arch/arm/arm32 [matt-nb5-mips64]: arm32_boot.c

Log Message:
Need to deal with proc0paddr.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/arm/arm32/arm32_boot.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/arm32_boot.c
diff -u src/sys/arch/arm/arm32/arm32_boot.c:1.5.2.2 src/sys/arch/arm/arm32/arm32_boot.c:1.5.2.3
--- src/sys/arch/arm/arm32/arm32_boot.c:1.5.2.2	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/arm32/arm32_boot.c	Mon Mar 24 18:44:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_boot.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $	*/
+/*	$NetBSD: arm32_boot.c,v 1.5.2.3 2014/03/24 18:44:43 matt Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -123,7 +123,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: arm32_boot.c,v 1.5.2.2 2014/02/15 16:18:36 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: arm32_boot.c,v 1.5.2.3 2014/03/24 18:44:43 matt Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -165,7 +165,8 @@ initarm_common(vaddr_t kvm_base, vsize_t
 	 * this during uvm init.
 	 */
 	//uvm_lwp_setuarea(lwp0, kernelstack.pv_va);
-	lwp0.l_addr = (void *)kernelstack.pv_va;
+	extern struct user *proc0paddr;
+	lwp0.l_addr = proc0paddr = (void *)kernelstack.pv_va;
 
 #ifdef VERBOSE_INIT_ARM
 	printf(bootstrap done.\n);



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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:45:16 UTC 2014

Modified Files:
src/sys/arch/arm/arm32 [matt-nb5-mips64]: exception.S

Log Message:
Use the improved undefined method from HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.16.18.1 -r1.16.18.2 src/sys/arch/arm/arm32/exception.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/exception.S
diff -u src/sys/arch/arm/arm32/exception.S:1.16.18.1 src/sys/arch/arm/arm32/exception.S:1.16.18.2
--- src/sys/arch/arm/arm32/exception.S:1.16.18.1	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/arm32/exception.S	Mon Mar 24 18:45:16 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exception.S,v 1.16.18.1 2014/02/15 16:18:36 matt Exp $	*/
+/*	$NetBSD: exception.S,v 1.16.18.2 2014/03/24 18:45:16 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -51,7 +51,7 @@
 
 #include arm/locore.h
 
-	RCSID($NetBSD: exception.S,v 1.16.18.1 2014/02/15 16:18:36 matt Exp $)
+	RCSID($NetBSD: exception.S,v 1.16.18.2 2014/03/24 18:45:16 matt Exp $)
 
 	.text	
 	.align	0
@@ -218,13 +218,11 @@ ASEND(address_exception_entry)
  *	look like direct entry from the vector.
  */
 ASENTRY_NP(undefined_entry)
-	stmfd	sp!, {r0, r1}
+	str	r0, [sp, #-8]!
 	GET_CURCPU(r0)
-	ldr	r1, [sp], #0x0004
-	str	r1, [r0, #CI_UNDEFSAVE]!
-	ldr	r1, [sp], #0x0004
-	str	r1, [r0, #0x0004]
-	ldmia	r0, {r0, r1, pc}
+	ldr	r0, [r0, #CI_UNDEFSAVE+8]
+	str	r0, [sp, #4]
+	pop	{r0, pc}
 ASEND(undefined_entry)
 
 /*



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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:46:38 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf [matt-nb5-mips64]: Makefile.evbarm.inc
Added Files:
src/sys/arch/evbarm/conf [matt-nb5-mips64]: CUBIEBOARD
CUBIEBOARD_INSTALL files.cubie mk.cubie std.cubie
src/sys/arch/evbarm/cubie [matt-nb5-mips64]: cubie_machdep.c
cubie_start.S genassym.cf platform.h

Log Message:
Add cubie from HEAD


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.10.2.2 src/sys/arch/evbarm/conf/CUBIEBOARD
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/evbarm/conf/CUBIEBOARD_INSTALL \
src/sys/arch/evbarm/conf/files.cubie
cvs rdiff -u -r1.19.12.1 -r1.19.12.2 \
src/sys/arch/evbarm/conf/Makefile.evbarm.inc
cvs rdiff -u -r0 -r1.3.2.2 src/sys/arch/evbarm/conf/mk.cubie \
src/sys/arch/evbarm/conf/std.cubie
cvs rdiff -u -r0 -r1.14.2.2 src/sys/arch/evbarm/cubie/cubie_machdep.c
cvs rdiff -u -r0 -r1.6.2.2 src/sys/arch/evbarm/cubie/cubie_start.S
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/evbarm/cubie/genassym.cf
cvs rdiff -u -r0 -r1.2.2.2 src/sys/arch/evbarm/cubie/platform.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/evbarm/conf/Makefile.evbarm.inc
diff -u src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.19.12.1 src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.19.12.2
--- src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.19.12.1	Sat Feb 15 16:18:37 2014
+++ src/sys/arch/evbarm/conf/Makefile.evbarm.inc	Mon Mar 24 18:46:38 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.evbarm.inc,v 1.19.12.1 2014/02/15 16:18:37 matt Exp $
+#	$NetBSD: Makefile.evbarm.inc,v 1.19.12.2 2014/03/24 18:46:38 matt Exp $
 
 #
 # If this is a install kernel and the ramdisk image exists in the object
@@ -22,6 +22,11 @@ SYSTEM_LD_TAIL_EXTRA+=; \
 
 EXTRA_CLEAN+= ldscript tmp ${KERNELS:=.map}
 
+.if defined(KERNEL_BASE_PHYS)  defined(KERNEL_BASE_VIRT) \
+ ${KERNEL_BASE_PHYS} == ${KERNEL_BASE_VIRT}
+CPPFLAGS+=-DKERNEL_BASES_EQUAL
+.endif
+
 .if defined(KERNEL_BASE_PHYS)
 LINKTEXT=
 KERNLDSCRIPT=	ldscript

Added files:

Index: src/sys/arch/evbarm/conf/CUBIEBOARD
diff -u /dev/null src/sys/arch/evbarm/conf/CUBIEBOARD:1.10.2.2
--- /dev/null	Mon Mar 24 18:46:38 2014
+++ src/sys/arch/evbarm/conf/CUBIEBOARD	Mon Mar 24 18:46:38 2014
@@ -0,0 +1,297 @@
+#
+#	$NetBSD: CUBIEBOARD,v 1.10.2.2 2014/03/24 18:46:38 matt Exp $
+#
+#	CUBIEBOARD -- Allwinner A10/A20 Eval Board Kernel
+#
+
+include	arch/evbarm/conf/std.cubie
+
+# estimated number of users
+
+maxusers	32
+
+# Standard system options
+
+options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
+#options 	NTP		# NTP phase/frequency locked loop
+
+# CPU options
+
+#options 	UVMHIST,UVMHIST_PRINT
+options 	CPU_CORTEXA8
+options 	CPU_CORTEXA7
+options 	ALLWINNER_A10
+options 	ALLWINNER_A20
+options 	PMAPCOUNTERS
+options 	AWIN_CONSOLE_EARLY
+
+# Architecture options
+
+# File systems
+
+file-system	FFS		# UFS
+#file-system	LFS		# log-structured file system
+file-system	MFS		# memory file system
+file-system	NFS		# Network file system
+#file-system 	ADOSFS		# AmigaDOS-compatible file system
+#file-system 	EXT2FS		# second extended file system (linux)
+#file-system	CD9660		# ISO 9660 + Rock Ridge file system
+file-system	MSDOSFS		# MS-DOS file system
+#file-system	FDESC		# /dev/fd
+file-system	KERNFS		# /kern
+#file-system	NULLFS		# loopback file system
+file-system	PROCFS		# /proc
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+#file-system	UNION		# union file system
+file-system	TMPFS		# memory file system
+file-system	PTYFS		# /dev/pts/N support
+
+# File system options
+#options 	QUOTA		# legacy UFS quotas
+#options 	QUOTA2		# new, in-filesystem UFS quotas
+#options 	FFS_EI		# FFS Endian Independent support
+#options 	NFSSERVER
+options 	WAPBL		# File system journaling support
+#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
+
+# Networking options
+
+#options 	GATEWAY		# packet forwarding
+options 	INET		# IP + ICMP + TCP + UDP
+options 	INET6		# IPV6
+#options 	IPSEC		# IP security
+#options 	IPSEC_DEBUG	# debug for IP security
+#options 	MROUTING	# IP multicast routing
+#options 	PIM		# Protocol Independent Multicast
+#options 	NETATALK	# AppleTalk networking
+#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
+#options 	PPP_DEFLATE	# Deflate compression support for PPP
+#options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
+#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
+
+options 	NFS_BOOT_BOOTP
+options 	NFS_BOOT_DHCP
+#options		NFS_BOOT_BOOTSTATIC
+#options		NFS_BOOTSTATIC_MYIP=\192.168.1.4\
+#options		NFS_BOOTSTATIC_GWIP=\192.168.1.1\
+#options		NFS_BOOTSTATIC_MASK=\255.255.255.0\
+#options		NFS_BOOTSTATIC_SERVADDR=\192.168.1.1\
+#options		NFS_BOOTSTATIC_SERVER=\192.168.1.1:/nfs/sdp2430\
+
+options		

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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:44:13 UTC 2014

Modified Files:
src/sys/arch/arm/cortex [matt-nb5-mips64]: a9_mpsubr.S

Log Message:
Allow A7 to use this.


To generate a diff of this commit:
cvs rdiff -u -r1.12.2.3 -r1.12.2.4 src/sys/arch/arm/cortex/a9_mpsubr.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/cortex/a9_mpsubr.S
diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.3 src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.4
--- src/sys/arch/arm/cortex/a9_mpsubr.S:1.12.2.3	Thu Feb 20 20:36:29 2014
+++ src/sys/arch/arm/cortex/a9_mpsubr.S	Mon Mar 24 18:44:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9_mpsubr.S,v 1.12.2.3 2014/02/20 20:36:29 matt Exp $	*/
+/*	$NetBSD: a9_mpsubr.S,v 1.12.2.4 2014/03/24 18:44:13 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -330,15 +330,23 @@ comlock:
 #endif /* MULTIPROCESSOR */
 #endif /* VERBOSE_INIT_ARM */
 
-#ifdef CPU_CORTEXA9
 a9_start:
+cortex_init:
 	mov	r10, lr@ save lr
 
 	cpsid	if, #PSR_SVC32_MODE
 
 	XPUTC(#64)
+#ifdef KERNEL_BASES_EQUAL
 	bl	_C_LABEL(armv7_icache_inv_all)	@ invalidate i-cache
+#else
+	adr	ip, cortex_init
+	ldr	r0, =armv7_icache_inv_all
+	bfi	ip, r0, #0, #28
+	blx	ip
+#endif
 
+#ifdef CPU_CORTEXA9
 	/*
 	 * Step 1a, invalidate the all cache tags in all ways on the SCU.
 	 */
@@ -352,14 +360,23 @@ a9_start:
 	str	r1, [r3, #SCU_INV_ALL_REG]	@ write scu invalidate all
 	dsb
 	isb
+#endif
 
 	/*
 	 * Step 1b, invalidate the data cache
 	 */
 	XPUTC(#66)
+#ifdef KERNEL_BASES_EQUAL
 	bl	_C_LABEL(armv7_dcache_wbinv_all)	@ writeback/invalidate d-cache
+#else
+	adr	ip, cortex_init
+	ldr	r0, =armv7_dcache_wbinv_all
+	bfi	ip, r0, #0, #28
+	blx	ip
+#endif
 	XPUTC(#67)
 
+#ifdef CPU_CORTEXA9
 	/*
 	 * Step 2, disable the data cache
 	 */
@@ -387,8 +404,8 @@ a9_start:
 	mcr	p15, 0, r2, c1, c0, 0		@ reenable caches
 	isb
 	XPUTC(#51)
+#endif
 
-#ifdef MULTIPROCESSOR
 	/*
 	 * Step 4b, set ACTLR.SMP=1 (and ACTRL.FX=1)
 	 */
@@ -396,6 +413,8 @@ a9_start:
 	orr	r0, r0, #CORTEXA9_AUXCTL_SMP	@ enable SMP
 	mcr	p15, 0, r0, c1, c0, 1		@ write aux ctl
 	isb
+#ifdef CPU_CORTEXA9
+	mrc	p15, 0, r0, c1, c0, 1		@ read aux ctl
 	orr	r0, r0, #CORTEXA9_AUXCTL_FW	@ enable cache/tlb/coherency
 	mcr	p15, 0, r0, c1, c0, 1		@ write aux ctl
 	isb
@@ -526,4 +545,3 @@ ASEND(a9_mpstart)
 .Lbcm53xx_cpu_hatch:
 	.word	_C_LABEL(bcm53xx_cpu_hatch)
 #endif /* MULTIPROCESSOR */
-#endif /* CPU_CORTEXA9 */



CVS commit: [matt-nb5-mips64] src/sys/dev/i2c

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:48:52 UTC 2014

Modified Files:
src/sys/dev/i2c [matt-nb5-mips64]: files.i2c
Added Files:
src/sys/dev/i2c [matt-nb5-mips64]: gttwsi_core.c gttwsireg.h
gttwsivar.h

Log Message:
Merge mvi2c from HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.23.10.1 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/i2c/gttwsi_core.c \
src/sys/dev/i2c/gttwsireg.h src/sys/dev/i2c/gttwsivar.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/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.23 src/sys/dev/i2c/files.i2c:1.23.10.1
--- src/sys/dev/i2c/files.i2c:1.23	Thu Oct 30 12:52:46 2008
+++ src/sys/dev/i2c/files.i2c	Mon Mar 24 18:48:52 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.23 2008/10/30 12:52:46 nakayama Exp $
+#	$NetBSD: files.i2c,v 1.23.10.1 2014/03/24 18:48:52 matt Exp $
 
 defflag	opt_i2cbus.hI2C_SCAN
 define	i2cbus { }
@@ -14,6 +14,12 @@ define	i2c_bitbang
 file	dev/i2c/i2c_bitbang.c			i2c_bitbang
 
 #
+# I2C master devices
+#
+define	mvi2c
+file	dev/i2c/gttwsi_core.c			mvi2c
+
+#
 # I2C client devices
 #
 

Added files:

Index: src/sys/dev/i2c/gttwsi_core.c
diff -u /dev/null src/sys/dev/i2c/gttwsi_core.c:1.1.2.2
--- /dev/null	Mon Mar 24 18:48:52 2014
+++ src/sys/dev/i2c/gttwsi_core.c	Mon Mar 24 18:48:52 2014
@@ -0,0 +1,353 @@
+/*	$NetBSD: gttwsi_core.c,v 1.1.2.2 2014/03/24 18:48:52 matt Exp $	*/
+/*
+ * Copyright (c) 2008 Eiji Kawauchi.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 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 by
+ *  Eiji Kawauchi.
+ * 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.
+ */
+/*
+ * Copyright (c) 2005 Brocade Communcations, inc.
+ * All rights reserved.
+ *
+ * Written by Matt Thomas for Brocade Communcations, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. The name of Brocade Communications, Inc. may not be used to endorse
+ *or promote products derived from this software without specific prior
+ *written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BROCADE COMMUNICATIONS, INC. ``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 EITHER BROCADE COMMUNICATIONS, INC. 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.
+ */
+//#define TWSI_DEBUG
+
+/*
+ * Marvell Two-Wire Serial Interface (aka I2C) 

CVS commit: [matt-nb5-mips64] src/sys/dev/ata

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:49:53 UTC 2014

Modified Files:
src/sys/dev/ata [matt-nb5-mips64]: satafis_subr.c satafisreg.h
satafisvar.h

Log Message:
Merge satafis changes from HEAD for ahcisata


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/dev/ata/satafis_subr.c
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/ata/satafisreg.h
cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/sys/dev/ata/satafisvar.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/ata/satafis_subr.c
diff -u src/sys/dev/ata/satafis_subr.c:1.5.2.2 src/sys/dev/ata/satafis_subr.c:1.5.2.3
--- src/sys/dev/ata/satafis_subr.c:1.5.2.2	Wed Apr 21 00:27:34 2010
+++ src/sys/dev/ata/satafis_subr.c	Mon Mar 24 18:49:53 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: satafis_subr.c,v 1.5.2.2 2010/04/21 00:27:34 matt Exp $ */
+/* $NetBSD: satafis_subr.c,v 1.5.2.3 2014/03/24 18:49:53 matt Exp $ */
 
 /*-
  * Copyright (c) 2009 Jonathan A. Kollasch.
@@ -56,7 +56,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: satafis_subr.c,v 1.5.2.2 2010/04/21 00:27:34 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: satafis_subr.c,v 1.5.2.3 2014/03/24 18:49:53 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -69,8 +69,6 @@ __KERNEL_RCSID(0, $NetBSD: satafis_subr
 #include dev/ata/satafisreg.h
 #include dev/ata/satafisvar.h
 
-#include dev/ic/wdcreg.h /* for WDCTL_4BIT */
-
 #include atapibus.h
 
 void
@@ -79,7 +77,7 @@ satafis_rhd_construct_cmd(struct ata_com
 	memset(fis, 0, RHD_FISLEN);
 
 	fis[fis_type] = RHD_FISTYPE;
-	fis[rhd_cdpmp] = 0x80; /* xxx magic */
+	fis[rhd_c] = RHD_C;
 	fis[rhd_command] = ata_c-r_command;
 	fis[rhd_features] = ata_c-r_features;
 	fis[rhd_sector] = ata_c-r_sector;
@@ -87,9 +85,6 @@ satafis_rhd_construct_cmd(struct ata_com
 	fis[rhd_cyl_hi] = (ata_c-r_cyl  8)  0xff;
 	fis[rhd_dh] = ata_c-r_head  0x0f;
 	fis[rhd_seccnt] = ata_c-r_count;
-	fis[rhd_control] = WDCTL_4BIT;
-
-	return;
 }
 
 void
@@ -103,7 +98,7 @@ satafis_rhd_construct_bio(struct ata_xfe
 	memset(fis, 0, RHD_FISLEN);
 
 	fis[fis_type] = RHD_FISTYPE;
-	fis[rhd_cdpmp] = 0x80; /* xxx magic */
+	fis[rhd_c] = RHD_C;
 	if (ata_bio-flags  ATA_LBA48) {
 		fis[rhd_command] = (ata_bio-flags  ATA_READ) ?
 		WDCC_READDMA_EXT : WDCC_WRITEDMA_EXT;
@@ -125,8 +120,6 @@ satafis_rhd_construct_bio(struct ata_xfe
 	fis[rhd_seccnt] = nblks  0xff;
 	fis[rhd_seccnt_exp] = (ata_bio-flags  ATA_LBA48) ?
 	((nblks  8)  0xff) : 0;
-	fis[rhd_control] = WDCTL_4BIT;
-	return;
 }
 
 #if NATAPIBUS  0
@@ -136,26 +129,30 @@ satafis_rhd_construct_atapi(struct ata_x
 	memset(fis, 0, RHD_FISLEN);
 
 	fis[fis_type] = RHD_FISTYPE;
-	fis[rhd_cdpmp] = 0x80; /* xxx magic */
+	fis[rhd_c] = RHD_C;
 	fis[rhd_command] = ATAPI_PKT_CMD;
 	fis[rhd_features] = (xfer-c_flags  C_DMA) ?
 	ATAPI_PKT_CMD_FTRE_DMA : 0;
-	fis[rhd_dh] = WDSD_IBM; /* XXX or WDSD_LBA? */
-	fis[rhd_control] = WDCTL_4BIT;
 
 	return;
 }
 #endif /* NATAPIBUS */
 
 void
-satafis_rdh_parse(struct ata_channel *chp, uint8_t *fis)
+satafis_rdh_parse(struct ata_channel *chp, const uint8_t *fis)
 {
-#if 0
-	/* siisata doesn't do enough for this to work */
-	KASSERT(fis[fis_type] == RDH_FISTYPE);
-#endif
 	chp-ch_status = fis[rdh_status];
 	chp-ch_error = fis[rdh_error];
+}
 
-	return;
+void
+satafis_rdh_cmd_readreg(struct ata_command *ata_c, const uint8_t *fis)
+{
+	ata_c-r_command = fis[rdh_status];
+	ata_c-r_features = fis[rdh_error];
+	ata_c-r_error = fis[rdh_error];
+	ata_c-r_sector = fis[rdh_sector];
+	ata_c-r_cyl = fis[rdh_cyl_hi]  8 | fis[rdh_cyl_lo];
+	ata_c-r_head = fis[rdh_dh];
+	ata_c-r_count = fis[rdh_seccnt];
 }

Index: src/sys/dev/ata/satafisreg.h
diff -u src/sys/dev/ata/satafisreg.h:1.2.2.2 src/sys/dev/ata/satafisreg.h:1.2.2.3
--- src/sys/dev/ata/satafisreg.h:1.2.2.2	Wed Apr 21 00:27:34 2010
+++ src/sys/dev/ata/satafisreg.h	Mon Mar 24 18:49:53 2014
@@ -1,7 +1,7 @@
-/* $NetBSD: satafisreg.h,v 1.2.2.2 2010/04/21 00:27:34 matt Exp $ */
+/* $NetBSD: satafisreg.h,v 1.2.2.3 2014/03/24 18:49:53 matt Exp $ */
 
-/*-
- * Copyright (c) 2009 Jonathan A. Kollasch.
+/*
+ * Copyright (c) 2009, 2010 Jonathan A. Kollasch.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,8 @@
 
 #define RHD_FISTYPE 0x27
 #define RHD_FISLEN 20
-#define rhd_cdpmp 1 /* Command bit and PM port */
+#define rhd_c 1 /* Command bit and PM port */
+#define RHD_C 0x80
 #define rhd_command 2 /* wd_command */
 #define rhd_features 3 /* wd_precomp */
 #define rhd_sector 4 /* wd_sector */
@@ -50,17 +51,18 @@
 #define RDH_FISTYPE 0x34
 #define RDH_FISLEN 20
 #define rdh_i 1
+#define RDH_I 0x40
 #define rdh_status 2
 #define rdh_error 3
 #define rdh_sector 4 /* wd_sector */
 #define rdh_cyl_lo 5 /* wd_cyl_lo */
 #define rdh_cyl_hi 6 /* wd_cyl_hi */
 #define rdh_dh 7 /* wd_sdh */
-#define rhd_sector_exp 8
-#define rhd_cyl_lo_exp 9
-#define 

CVS commit: [matt-nb5-mips64] src/sys/dev/ic

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:47:17 UTC 2014

Modified Files:
src/sys/dev/ic [matt-nb5-mips64]: ahcisata_core.c ahcisatareg.h
ahcisatavar.h

Log Message:
Merge needed changes from HEAD for cubie


To generate a diff of this commit:
cvs rdiff -u -r1.18.4.1.4.1 -r1.18.4.1.4.2 src/sys/dev/ic/ahcisata_core.c
cvs rdiff -u -r1.4 -r1.4.28.1 src/sys/dev/ic/ahcisatareg.h
cvs rdiff -u -r1.4 -r1.4.22.1 src/sys/dev/ic/ahcisatavar.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/ic/ahcisata_core.c
diff -u src/sys/dev/ic/ahcisata_core.c:1.18.4.1.4.1 src/sys/dev/ic/ahcisata_core.c:1.18.4.1.4.2
--- src/sys/dev/ic/ahcisata_core.c:1.18.4.1.4.1	Wed Apr 21 00:27:35 2010
+++ src/sys/dev/ic/ahcisata_core.c	Mon Mar 24 18:47:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_core.c,v 1.18.4.1.4.1 2010/04/21 00:27:35 matt Exp $	*/
+/*	$NetBSD: ahcisata_core.c,v 1.18.4.1.4.2 2014/03/24 18:47:17 matt Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -11,11 +11,6 @@
  * 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 by Manuel Bouyer.
- * 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
@@ -31,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ahcisata_core.c,v 1.18.4.1.4.1 2010/04/21 00:27:35 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ahcisata_core.c,v 1.18.4.1.4.2 2014/03/24 18:47:17 matt Exp $);
 
 #include sys/types.h
 #include sys/malloc.h
@@ -44,10 +39,11 @@ __KERNEL_RCSID(0, $NetBSD: ahcisata_cor
 
 #include uvm/uvm_extern.h
 
-#include dev/ic/wdcreg.h
 #include dev/ata/atareg.h
 #include dev/ata/satavar.h
 #include dev/ata/satareg.h
+#include dev/ata/satafisvar.h
+#include dev/ata/satafisreg.h
 #include dev/ic/ahcisatavar.h
 
 #include dev/scsipi/scsi_all.h /* for SCSI status */
@@ -58,39 +54,39 @@ __KERNEL_RCSID(0, $NetBSD: ahcisata_cor
 int ahcidebug_mask = 0x0;
 #endif
 
-void ahci_probe_drive(struct ata_channel *);
-void ahci_setup_channel(struct ata_channel *);
+static void ahci_probe_drive(struct ata_channel *);
+static void ahci_setup_channel(struct ata_channel *);
 
-int  ahci_ata_bio(struct ata_drive_datas *, struct ata_bio *);
-void ahci_reset_drive(struct ata_drive_datas *, int);
-void ahci_reset_channel(struct ata_channel *, int);
-int  ahci_exec_command(struct ata_drive_datas *, struct ata_command *);
-int  ahci_ata_addref(struct ata_drive_datas *);
-void ahci_ata_delref(struct ata_drive_datas *);
-void ahci_killpending(struct ata_drive_datas *);
-
-void ahci_cmd_start(struct ata_channel *, struct ata_xfer *);
-int  ahci_cmd_complete(struct ata_channel *, struct ata_xfer *, int);
-void ahci_cmd_done(struct ata_channel *, struct ata_xfer *, int);
-void ahci_cmd_kill_xfer(struct ata_channel *, struct ata_xfer *, int) ;
-void ahci_bio_start(struct ata_channel *, struct ata_xfer *);
-int  ahci_bio_complete(struct ata_channel *, struct ata_xfer *, int);
-void ahci_bio_kill_xfer(struct ata_channel *, struct ata_xfer *, int) ;
-void ahci_channel_stop(struct ahci_softc *, struct ata_channel *, int);
-void ahci_channel_start(struct ahci_softc *, struct ata_channel *);
-void ahci_timeout(void *);
-int  ahci_dma_setup(struct ata_channel *, int, void *, size_t, int);
+static int  ahci_ata_bio(struct ata_drive_datas *, struct ata_bio *);
+static void ahci_reset_drive(struct ata_drive_datas *, int);
+static void ahci_reset_channel(struct ata_channel *, int);
+static int  ahci_exec_command(struct ata_drive_datas *, struct ata_command *);
+static int  ahci_ata_addref(struct ata_drive_datas *);
+static void ahci_ata_delref(struct ata_drive_datas *);
+static void ahci_killpending(struct ata_drive_datas *);
+
+static void ahci_cmd_start(struct ata_channel *, struct ata_xfer *);
+static int  ahci_cmd_complete(struct ata_channel *, struct ata_xfer *, int);
+static void ahci_cmd_done(struct ata_channel *, struct ata_xfer *, int);
+static void ahci_cmd_kill_xfer(struct ata_channel *, struct ata_xfer *, int) ;
+static void ahci_bio_start(struct ata_channel *, struct ata_xfer *);
+static int  ahci_bio_complete(struct ata_channel *, struct ata_xfer *, int);
+static void ahci_bio_kill_xfer(struct ata_channel *, struct ata_xfer *, int) ;
+static void ahci_channel_stop(struct ahci_softc *, struct ata_channel *, int);
+static void ahci_channel_start(struct ahci_softc *, struct 

CVS commit: src/sys/arch/sun2/sun2

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 18:50:08 UTC 2014

Modified Files:
src/sys/arch/sun2/sun2: locore.s

Log Message:
avoid local redefinitions


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sun2/sun2/locore.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/sun2/sun2/locore.s
diff -u src/sys/arch/sun2/sun2/locore.s:1.24 src/sys/arch/sun2/sun2/locore.s:1.25
--- src/sys/arch/sun2/sun2/locore.s:1.24	Tue Nov 15 05:57:04 2011
+++ src/sys/arch/sun2/sun2/locore.s	Mon Mar 24 14:50:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.24 2011/11/15 10:57:04 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.25 2014/03/24 18:50:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -400,12 +400,6 @@ Lbrkpt2:
  *   %d0,%d1,%a0,%a1, sr, pc, vo
  */
 
-#define INTERRUPT_SAVEREG \
-	moveml	#0xC0C0,%sp@-
-
-#define INTERRUPT_RESTORE \
-	moveml	%sp@+,#0x0303
-
 /*
  * This is the common auto-vector interrupt handler,
  * for which the CPU provides the vector=0x18+level.
@@ -419,7 +413,7 @@ Lbrkpt2:
 GLOBAL(_isr_autovec)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(isr_autovec)
-	INTERRUPT_RESTORE
+	INTERRUPT_RESTOREREG
 	jra	_ASM_LABEL(rei)
 
 /* clock: see clock.c */
@@ -431,7 +425,7 @@ GLOBAL(_isr_autovec)
 GLOBAL(_isr_clock)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(clock_intr)
-	INTERRUPT_RESTORE
+	INTERRUPT_RESTOREREG
 	jra	_ASM_LABEL(rei)
 
 | Handler for all vectored interrupts (i.e. VME interrupts)
@@ -443,12 +437,9 @@ GLOBAL(_isr_clock)
 GLOBAL(_isr_vectored)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(isr_vectored)
-	INTERRUPT_RESTORE
+	INTERRUPT_RESTOREREG
 	jra	_ASM_LABEL(rei)
 
-#undef	INTERRUPT_SAVEREG
-#undef	INTERRUPT_RESTORE
-
 /* interrupt counters (needed by vmstat) */
 GLOBAL(intrnames)
 	.asciz	spur	| 0



CVS commit: src/sys/arch/cesfic

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 18:56:43 UTC 2014

Modified Files:
src/sys/arch/cesfic/cesfic: machdep.c
src/sys/arch/cesfic/dev: zs.c

Log Message:
- use cpu_{g,s}etmodel
- remove unused


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/cesfic/cesfic/machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cesfic/dev/zs.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/cesfic/cesfic/machdep.c
diff -u src/sys/arch/cesfic/cesfic/machdep.c:1.64 src/sys/arch/cesfic/cesfic/machdep.c:1.65
--- src/sys/arch/cesfic/cesfic/machdep.c:1.64	Wed Aug  8 12:29:50 2012
+++ src/sys/arch/cesfic/cesfic/machdep.c	Mon Mar 24 14:56:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.64 2012/08/08 16:29:50 drochner Exp $	*/
+/*	$NetBSD: machdep.c,v 1.65 2014/03/24 18:56:43 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.64 2012/08/08 16:29:50 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.65 2014/03/24 18:56:43 christos Exp $);
 
 #include opt_bufcache.h
 #include opt_ddb.h
@@ -71,6 +71,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include sys/vnode.h
 #include sys/ksyms.h
 #include sys/module.h
+#include sys/cpu.h
 #ifdef SYSVMSG
 #include sys/msg.h
 #endif
@@ -247,6 +248,7 @@ cpu_startup(void)
 	pmapdebug = 0;
 #endif
 
+	cpu_setmodel(FIC8234);
 	if (fputype != FPU_NONE)
 		m68k_make_fpu_idle_frame();
 
@@ -274,12 +276,11 @@ cpu_startup(void)
 /*
  * Info for CTL_HW
  */
-char	cpu_model[] = FIC8234;
 
 void
 identifycpu(void)
 {
-	printf(%s\n, cpu_model);
+	printf(%s\n, cpu_getmodel());
 	printf(delay constant: %d\n, delay_divisor);
 }
 
@@ -510,6 +511,7 @@ badaddr(void *addr)
 		return (1);
 	}
 	i = *(volatile short *)addr;
+	__USE(i);
 	nofault = (int *) 0;
 	return (0);
 }
@@ -526,6 +528,7 @@ badbaddr(void *addr)
 		return (1);
 	}
 	i = *(volatile char *)addr;
+	__USE(i);
 	nofault = (int *) 0;
 	return (0);
 }

Index: src/sys/arch/cesfic/dev/zs.c
diff -u src/sys/arch/cesfic/dev/zs.c:1.18 src/sys/arch/cesfic/dev/zs.c:1.19
--- src/sys/arch/cesfic/dev/zs.c:1.18	Mon Oct 26 15:16:55 2009
+++ src/sys/arch/cesfic/dev/zs.c	Mon Mar 24 14:56:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.18 2009/10/26 19:16:55 cegger Exp $	*/
+/*	$NetBSD: zs.c,v 1.19 2014/03/24 18:56:43 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.18 2009/10/26 19:16:55 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.19 2014/03/24 18:56:43 christos Exp $);
 
 #include opt_ddb.h
 
@@ -271,16 +271,16 @@ zs_write_data(struct zs_chanstate *cs, u
 int
 zs_set_speed(struct zs_chanstate *cs, int bps)
 {
-	int tconst, real_bps;
+	int tconst;
 
 	tconst = BPS_TO_TCONST(cs-cs_brg_clk, bps);
 
 	if (tconst  0)
 		return (EINVAL);
 
-	/* Convert back to make sure we can do it. */
-	real_bps = TCONST_TO_BPS(cs-cs_brg_clk, tconst);
 #if 0
+	/* Convert back to make sure we can do it. */
+	int real_bps = TCONST_TO_BPS(cs-cs_brg_clk, tconst);
 	/* XXX - Allow some tolerance here? */
 	if (real_bps != bps)
 		return (EINVAL);



CVS commit: src/sys/arch/sun2

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 18:50:31 UTC 2014

Modified Files:
src/sys/arch/sun2/dev: if_ie_obio.c
src/sys/arch/sun2/sun2: machdep.c pmap.c promlib.c

Log Message:
- remove unused
- use cpu_{g,s}etmodel


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sun2/dev/if_ie_obio.c
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/sun2/sun2/machdep.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sun2/sun2/pmap.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sun2/sun2/promlib.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/sun2/dev/if_ie_obio.c
diff -u src/sys/arch/sun2/dev/if_ie_obio.c:1.15 src/sys/arch/sun2/dev/if_ie_obio.c:1.16
--- src/sys/arch/sun2/dev/if_ie_obio.c:1.15	Fri Jun  3 12:28:40 2011
+++ src/sys/arch/sun2/dev/if_ie_obio.c	Mon Mar 24 14:50:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ie_obio.c,v 1.15 2011/06/03 16:28:40 tsutsui Exp $	*/
+/*	$NetBSD: if_ie_obio.c,v 1.16 2014/03/24 18:50:31 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_ie_obio.c,v 1.15 2011/06/03 16:28:40 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_ie_obio.c,v 1.16 2014/03/24 18:50:31 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -260,7 +260,6 @@ ie_obio_attach(device_t parent, device_t
 	int rseg;
 	int error;
 	paddr_t pa;
-	struct intrhand *ih;
 	bus_size_t memsize;
 	u_long iebase;
 	uint8_t myaddr[ETHER_ADDR_LEN];
@@ -393,6 +392,6 @@ ie_obio_attach(device_t parent, device_t
 	i82586_attach(sc, onboard, myaddr, media, NMEDIA, media[0]);
 
 	/* Establish interrupt channel */
-	ih = bus_intr_establish(oba-oba_bustag, oba-oba_pri, IPL_NET, 0,
-i82586_intr, sc);
+	bus_intr_establish(oba-oba_bustag, oba-oba_pri, IPL_NET, 0,
+	i82586_intr, sc);
 }

Index: src/sys/arch/sun2/sun2/machdep.c
diff -u src/sys/arch/sun2/sun2/machdep.c:1.76 src/sys/arch/sun2/sun2/machdep.c:1.77
--- src/sys/arch/sun2/sun2/machdep.c:1.76	Fri Aug 10 10:52:26 2012
+++ src/sys/arch/sun2/sun2/machdep.c	Mon Mar 24 14:50:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.76 2012/08/10 14:52:26 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.77 2014/03/24 18:50:31 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -149,7 +149,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.76 2012/08/10 14:52:26 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.77 2014/03/24 18:50:31 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -179,6 +179,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include sys/vnode.h
 #include sys/syscallargs.h
 #include sys/ksyms.h
+#include sys/cpu.h
 #ifdef	KGDB
 #include sys/kgdb.h
 #endif
@@ -366,7 +367,6 @@ cpu_startup(void)
  */
 char	machine[16] = MACHINE;		/* from machine/param.h */
 char	kernel_arch[16] = sun2;	/* XXX needs a sysctl node */
-char	cpu_model[120];
 
 /*
  * Determine which Sun2 model we are running on.
@@ -378,9 +378,9 @@ identifycpu(void)
 
 	/* Other stuff? (VAC, mc6888x version, etc.) */
 	/* Note: miniroot cares about the kernel_arch part. */
-	sprintf(cpu_model, %s %s, kernel_arch, cpu_string);
+	cpu_setmodel(%s %s, kernel_arch, cpu_string);
 
-	printf(Model: %s\n, cpu_model);
+	printf(Model: %s\n, cpu_getmodel());
 }
 
 /*
@@ -879,7 +879,7 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm
 	int pagesz = PAGE_SIZE;
 	bus_addr_t dva;
 	pmap_t pmap;
-	int rv;
+	int rv __diagused;
 
 	/*
 	 * Make sure that on error condition we return no valid mappings.

Index: src/sys/arch/sun2/sun2/pmap.c
diff -u src/sys/arch/sun2/sun2/pmap.c:1.46 src/sys/arch/sun2/sun2/pmap.c:1.47
--- src/sys/arch/sun2/sun2/pmap.c:1.46	Mon Jan  7 11:58:09 2013
+++ src/sys/arch/sun2/sun2/pmap.c	Mon Mar 24 14:50:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.46 2013/01/07 16:58:09 chs Exp $	*/
+/*	$NetBSD: pmap.c,v 1.47 2014/03/24 18:50:31 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.46 2013/01/07 16:58:09 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.47 2014/03/24 18:50:31 christos Exp $);
 
 #include opt_ddb.h
 #include opt_pmap_debug.h
@@ -1324,15 +1324,12 @@ pv_link(pmap_t pmap, int pte, vaddr_t va
 	paddr_t pa;
 	pv_entry_t *head, pv;
 	u_char *pv_flags;
-	int flags;
 
 	if (!pv_initialized)
 		return 0;
 
 	CHECK_SPL();
 
-	/* Only the non-cached bit is of interest here. */
-	flags = (pte  PG_NC) ? PV_NC : 0;
 	pa = PG_PA(pte);
 
 #ifdef PMAP_DEBUG
@@ -1357,6 +1354,8 @@ pv_link(pmap_t pmap, int pte, vaddr_t va
 	/*
 	 * Does this new mapping cause VAC alias problems?
 	 */
+	/* Only the non-cached bit is of interest here. */
+	int flags = (pte  PG_NC) ? PV_NC : 0;
 
 	*pv_flags |= flags;
 	if ((*pv_flags  PV_NC) == 0) {
@@ -3070,9 +3069,8 @@ out:
 void 
 pmap_protect_mmu(pmap_t pmap, 

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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:51:45 UTC 2014

Modified Files:
src/sys/kern [matt-nb5-mips64]: kern_runq.c

Log Message:
Use the cpu_name in ci_data


To generate a diff of this commit:
cvs rdiff -u -r1.22.4.3.4.2 -r1.22.4.3.4.3 src/sys/kern/kern_runq.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_runq.c
diff -u src/sys/kern/kern_runq.c:1.22.4.3.4.2 src/sys/kern/kern_runq.c:1.22.4.3.4.3
--- src/sys/kern/kern_runq.c:1.22.4.3.4.2	Sat Feb  5 06:00:14 2011
+++ src/sys/kern/kern_runq.c	Mon Mar 24 18:51:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_runq.c,v 1.22.4.3.4.2 2011/02/05 06:00:14 cliff Exp $	*/
+/*	$NetBSD: kern_runq.c,v 1.22.4.3.4.3 2014/03/24 18:51:45 matt Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius rmind at NetBSD org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.22.4.3.4.2 2011/02/05 06:00:14 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.22.4.3.4.3 2014/03/24 18:51:45 matt Exp $);
 
 #include opt_multiprocessor.h
 
@@ -145,7 +145,6 @@ sched_cpuattach(struct cpu_info *ci)
 	runqueue_t *ci_rq;
 	void *rq_ptr;
 	u_int i, size;
-	char *cpuname;
 
 	if (ci-ci_schedstate.spc_lwplock == NULL) {
 		ci-ci_schedstate.spc_lwplock =
@@ -178,17 +177,14 @@ sched_cpuattach(struct cpu_info *ci)
 
 	ci-ci_schedstate.spc_sched_info = ci_rq;
 
-	cpuname = kmem_alloc(8, KM_SLEEP);
-	snprintf(cpuname, 8, cpu%d, cpu_index(ci));
-
 	evcnt_attach_dynamic(ci_rq-r_ev_pull, EVCNT_TYPE_MISC, NULL,
-	   cpuname, runqueue pull);
+	ci-ci_data.cpu_name, runqueue pull);
 	evcnt_attach_dynamic(ci_rq-r_ev_push, EVCNT_TYPE_MISC, NULL,
-	   cpuname, runqueue push);
+	ci-ci_data.cpu_name, runqueue push);
 	evcnt_attach_dynamic(ci_rq-r_ev_stay, EVCNT_TYPE_MISC, NULL,
-	   cpuname, runqueue stay);
+	ci-ci_data.cpu_name, runqueue stay);
 	evcnt_attach_dynamic(ci_rq-r_ev_localize, EVCNT_TYPE_MISC, NULL,
-	   cpuname, runqueue localize);
+	ci-ci_data.cpu_name, runqueue localize);
 }
 
 /*



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

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:50:51 UTC 2014

Modified Files:
src/sys/conf [matt-nb5-mips64]: files

Log Message:
Add sata_fis to ahcisata


To generate a diff of this commit:
cvs rdiff -u -r1.924.4.1.4.4 -r1.924.4.1.4.5 src/sys/conf/files

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

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.924.4.1.4.4 src/sys/conf/files:1.924.4.1.4.5
--- src/sys/conf/files:1.924.4.1.4.4	Fri Feb 14 18:35:15 2014
+++ src/sys/conf/files	Mon Mar 24 18:50:51 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.924.4.1.4.4 2014/02/14 18:35:15 matt Exp $
+#	$NetBSD: files,v 1.924.4.1.4.5 2014/03/24 18:50:51 matt Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20080610
@@ -930,7 +930,7 @@ file	dev/ic/lpt_upc.c		lpt_upc
 # AHCI-compatible SATA controllers
 define ahcisata_core
 file dev/ic/ahcisata_core.c ahcisata_core
-device ahcisata: ata, ata_dma, ata_udma, sata, ahcisata_core
+device ahcisata: ata, ata_dma, ata_udma, sata, sata_fis, ahcisata_core
 
 # Silicon Image SteelVine SATA-II controllers
 define	siisata



CVS commit: [matt-nb5-mips64] src

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:58:00 UTC 2014

Modified Files:
src/libexec/ld.aout_so [matt-nb5-mips64]: Makefile
src/sbin/ldconfig [matt-nb5-mips64]: Makefile

Log Message:
Make these work with a machine_arch of armv7


To generate a diff of this commit:
cvs rdiff -u -r1.45.38.1 -r1.45.38.1.4.1 src/libexec/ld.aout_so/Makefile
cvs rdiff -u -r1.21.40.1 -r1.21.40.1.4.1 src/sbin/ldconfig/Makefile

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

Modified files:

Index: src/libexec/ld.aout_so/Makefile
diff -u src/libexec/ld.aout_so/Makefile:1.45.38.1 src/libexec/ld.aout_so/Makefile:1.45.38.1.4.1
--- src/libexec/ld.aout_so/Makefile:1.45.38.1	Thu Nov  6 23:51:27 2008
+++ src/libexec/ld.aout_so/Makefile	Mon Mar 24 18:58:00 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.45.38.1 2008/11/06 23:51:27 snj Exp $
+#	$NetBSD: Makefile,v 1.45.38.1.4.1 2014/03/24 18:58:00 matt Exp $
 
 .include bsd.own.mk			# for OBJECT_FMT definition
 .include bsd.shlib.mk			# for SHLINKINSTALLDIR definition
@@ -41,6 +41,7 @@ SYMLINKS+=	${SHLINKINSTALLDIR}/${PROG} /
 
 .elif (${OBJECT_FMT} == ELF  \
(${MACHINE_ARCH} == arm || \
+${MACHINE_ARCH} == armv7 || \
 ${MACHINE_ARCH} == i386 || \
 ${MACHINE_ARCH} == m68k || \
 ${MACHINE_ARCH} == sparc || \
@@ -49,12 +50,12 @@ SYMLINKS+=	${SHLINKINSTALLDIR}/${PROG} /
 FILES=		ld.so
 FILESDIR=	/usr/libexec
 FILESMODE=	${BINMODE}
-UUDECODE_FILES=	ld.so.${MACHINE_ARCH}
+UUDECODE_FILES=	ld.so.${MACHINE_CPU}
 UUDECODE_FILES_RENAME_${UUDECODE_FILES}= ld.so
 
 all dependall: ${FILES}
 
-ld.so:	ld.so.${MACHINE_ARCH}
+ld.so:	ld.so.${MACHINE_CPU}
 
 .endif
 .endif

Index: src/sbin/ldconfig/Makefile
diff -u src/sbin/ldconfig/Makefile:1.21.40.1 src/sbin/ldconfig/Makefile:1.21.40.1.4.1
--- src/sbin/ldconfig/Makefile:1.21.40.1	Thu Nov  6 23:51:27 2008
+++ src/sbin/ldconfig/Makefile	Mon Mar 24 18:58:00 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21.40.1 2008/11/06 23:51:27 snj Exp $
+#	$NetBSD: Makefile,v 1.21.40.1.4.1 2014/03/24 18:58:00 matt Exp $
 
 .include bsd.own.mk   # For OBJECT_FMT
 .include bsd.shlib.mk
@@ -7,6 +7,7 @@
 (${OBJECT_FMT} == a.out ||	\
 (${OBJECT_FMT} == ELF 		\
 (${MACHINE_ARCH} == arm ||	\
+ ${MACHINE_ARCH} == armv7 ||	\
  ${MACHINE_ARCH} == i386 ||	\
  ${MACHINE_ARCH} == m68k ||	\
  ${MACHINE_ARCH} == sparc ||	\



CVS commit: src/sys/arch/sun3/sun3x

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 18:42:56 UTC 2014

Modified Files:
src/sys/arch/sun3/sun3x: locore.s

Log Message:
avoid dup defs, use global macros


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sun3/sun3x/locore.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/sun3/sun3x/locore.s
diff -u src/sys/arch/sun3/sun3x/locore.s:1.64 src/sys/arch/sun3/sun3x/locore.s:1.65
--- src/sys/arch/sun3/sun3x/locore.s:1.64	Thu Dec 22 10:33:30 2011
+++ src/sys/arch/sun3/sun3x/locore.s	Mon Mar 24 14:42:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.64 2011/12/22 15:33:30 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.65 2014/03/24 18:42:56 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -431,12 +431,6 @@ Lbrkpt2:
  *   %d0,%d1,%a0,%a1, sr, pc, vo
  */
 
-#define INTERRUPT_SAVEREG \
-	moveml	#0xC0C0,%sp@-
-
-#define INTERRUPT_RESTORE \
-	moveml	%sp@+,#0x0303
-
 /*
  * This is the common auto-vector interrupt handler,
  * for which the CPU provides the vector=0x18+level.
@@ -450,7 +444,7 @@ Lbrkpt2:
 GLOBAL(_isr_autovec)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(isr_autovec)
-	INTERRUPT_RESTORE
+	INTERRUPT_RESTOREREG
 	jra	_ASM_LABEL(rei)
 
 /* clock: see clock.c */
@@ -462,7 +456,7 @@ GLOBAL(_isr_autovec)
 GLOBAL(_isr_clock)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(clock_intr)
-	INTERRUPT_RESTORE
+	INTERRUPT_RESTOREREG
 	jra	_ASM_LABEL(rei)
 
 | Handler for all vectored interrupts (i.e. VME interrupts)
@@ -474,11 +468,11 @@ GLOBAL(_isr_clock)
 GLOBAL(_isr_vectored)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(isr_vectored)
-	INTERRUPT_RESTORE
+	INTERRUPT_RESTOREREG
 	jra	_ASM_LABEL(rei)
 
 #undef	INTERRUPT_SAVEREG
-#undef	INTERRUPT_RESTORE
+#undef	INTERRUPT_RESTOREREG
 
 /* interrupt counters (needed by vmstat) */
 GLOBAL(intrnames)



CVS commit: [matt-nb5-mips64] src/common/lib/libc/arch/arm/atomic

2014-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Mar 24 18:53:34 UTC 2014

Modified Files:
src/common/lib/libc/arch/arm/atomic [matt-nb5-mips64]: atomic_swap.S

Log Message:
Use ldrex/strex instead of swp when possible.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.12.1 \
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_swap.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_swap.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_swap.S:1.2.12.1
--- src/common/lib/libc/arch/arm/atomic/atomic_swap.S:1.2	Sat Aug 16 07:12:40 2008
+++ src/common/lib/libc/arch/arm/atomic/atomic_swap.S	Mon Mar 24 18:53:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_swap.S,v 1.2 2008/08/16 07:12:40 matt Exp $	*/
+/*	$NetBSD: atomic_swap.S,v 1.2.12.1 2014/03/24 18:53:34 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -39,7 +39,15 @@
 #include atomic_op_asm.h
 
 ENTRY_NP(_atomic_swap_32)
+#ifdef _ARM_ARCH_6
+	mov	ip, r0
+1:	ldrex	r0, [ip]
+	strex	r2, r1, ip
+	cmp	r2, #0
+	bne	1b
+#else
 	swp	r0, r1, [r0]
+#endif
 	RET
 	END(_atomic_swap_32)
 ATOMIC_OP_ALIAS(atomic_swap_32,_atomic_swap_32)
@@ -51,7 +59,15 @@ STRONG_ALIAS(_atomic_swap_ulong,_atomic_
 STRONG_ALIAS(_atomic_swap_ptr,_atomic_swap_32)
 
 ENTRY_NP(_atomic_swap_8)
+#ifdef _ARM_ARCH_6
+	mov	ip, r0
+1:	ldrexb	r0, [ip]
+	strexb	r2, r1, ip
+	cmp	r2, #0
+	bne	1b
+#else
 	swpb	r0, r1, [r0]
+#endif
 	RET
 	END(_atomic_swap_8)
 ATOMIC_OP_ALIAS(atomic_swap_8,_atomic_swap_8)



CVS commit: src/sys/arch/sgimips

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:10:34 UTC 2014

Modified Files:
src/sys/arch/sgimips/dev: scn.c zs.c
src/sys/arch/sgimips/sgimips: machdep.c

Log Message:
- use cpu_{g,s}etmodel
- fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/dev/scn.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/sgimips/dev/zs.c
cvs rdiff -u -r1.139 -r1.140 src/sys/arch/sgimips/sgimips/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/sgimips/dev/scn.c
diff -u src/sys/arch/sgimips/dev/scn.c:1.5 src/sys/arch/sgimips/dev/scn.c:1.6
--- src/sys/arch/sgimips/dev/scn.c:1.5	Sun Mar 16 01:20:25 2014
+++ src/sys/arch/sgimips/dev/scn.c	Mon Mar 24 15:10:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: scn.c,v 1.5 2014/03/16 05:20:25 dholland Exp $ */
+/*	$NetBSD: scn.c,v 1.6 2014/03/24 19:10:34 christos Exp $ */
 
 /*
  * Resurrected from the old pc532 port 1/18/2009.
@@ -92,7 +92,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scn.c,v 1.5 2014/03/16 05:20:25 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: scn.c,v 1.6 2014/03/24 19:10:34 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -517,6 +517,7 @@ scn_setchip(struct scn_softc *sc)
 u_char temp;
 /* start C/T running */
 temp = dp-base[DU_CSTRT];
+__USE(temp);
 			}
 			dp-ocounter = dp-counter;
 		}
@@ -806,7 +807,7 @@ scn_attach(device_t parent, device_t sel
 	int channel;
 	int speed;
 	int s;
-	int maj;
+	int maj __diagused;
 	u_char unit;
 	u_char duartno;
 	u_char delim = ':';
@@ -1080,7 +1081,6 @@ scnopen(dev_t dev, int flags, int mode, 
 	int unit = DEV_UNIT(dev);
 	struct scn_softc *sc;
 	int error = 0;
-	int hwset = 0;
 
 	if (unit = scn_cd.cd_ndevs)
 		return ENXIO;
@@ -1130,7 +1130,6 @@ scnopen(dev_t dev, int flags, int mode, 
 
 		/* enable receiver interrupts */
 		scn_rxenable(sc);
-		hwset = 1;
 
 		/* set carrier state; */
 		if ((sc-sc_swflags  SCN_SW_SOFTCAR) || /* check ttyflags */
@@ -1670,15 +1669,10 @@ scnioctl(dev_t dev, u_long cmd, void *da
 
 	case TIOCMGET: {
 			int bits;
-			unsigned char ip, op;
+			unsigned char ip;
 
 			/* s = spltty(); */
 			ip = sc-sc_duart-base[DU_IP];
-			/*
-			 * XXX sigh; cannot get op current state!! even if
-			 * maintained in private, RTS is done in h/w!!
-			 */
-			op = 0;
 			/* splx(s); */
 
 			bits = 0;
@@ -1688,6 +1682,11 @@ scnioctl(dev_t dev, u_long cmd, void *da
 bits |= TIOCM_CTS;
 
 #if 0
+			/*
+			 * XXX sigh; cannot get op current state!! even if
+			 * maintained in private, RTS is done in h/w!!
+			 */
+			unsigned char op = 0;
 			if (op  sc-sc_op_dtr)
 bits |= TIOCM_DTR;
 			if (op  sc-sc_op_rts)

Index: src/sys/arch/sgimips/dev/zs.c
diff -u src/sys/arch/sgimips/dev/zs.c:1.37 src/sys/arch/sgimips/dev/zs.c:1.38
--- src/sys/arch/sgimips/dev/zs.c:1.37	Sun Feb 20 02:59:50 2011
+++ src/sys/arch/sgimips/dev/zs.c	Mon Mar 24 15:10:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.37 2011/02/20 07:59:50 matt Exp $	*/
+/*	$NetBSD: zs.c,v 1.38 2014/03/24 19:10:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.37 2011/02/20 07:59:50 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.38 2014/03/24 19:10:34 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -444,7 +444,7 @@ zs_get_speed(struct zs_chanstate *cs)
 int
 zs_set_speed(struct zs_chanstate *cs, int bps)
 {
-	int tconst, real_bps;
+	int tconst;
 
 #if 0
 	while (!(zs_read_csr(cs)  ZSRR0_TX_READY))
@@ -464,11 +464,11 @@ zs_set_speed(struct zs_chanstate *cs, in
 	if (tconst  0)
 		return (EINVAL);
 
+#if 0
 	/* Convert back to make sure we can do it. */
-	real_bps = TCONST_TO_BPS(cs-cs_brg_clk, tconst);
+	int real_bps = TCONST_TO_BPS(cs-cs_brg_clk, tconst);
 
 	/* XXX - Allow some tolerance here? */
-#if 0
 	if (real_bps != bps)
 		return (EINVAL);
 #endif

Index: src/sys/arch/sgimips/sgimips/machdep.c
diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.139 src/sys/arch/sgimips/sgimips/machdep.c:1.140
--- src/sys/arch/sgimips/sgimips/machdep.c:1.139	Mon Dec 16 10:45:29 2013
+++ src/sys/arch/sgimips/sgimips/machdep.c	Mon Mar 24 15:10:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.139 2013/12/16 15:45:29 mrg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.139 2013/12/16 15:45:29 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -63,6 +63,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include sys/kcore.h
 #include sys/boot_flag.h
 #include sys/ksyms.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 
@@ -285,7 +286,7 @@ mach_init(int argc, int32_t 

CVS commit: src/sys/arch/sbmips/sbmips

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:13:48 UTC 2014

Modified Files:
src/sys/arch/sbmips/sbmips: cpu.c machdep.c

Log Message:
- fix unused
- use cpu_{g,s}etmodel


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sbmips/sbmips/cpu.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/sbmips/sbmips/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/sbmips/sbmips/cpu.c
diff -u src/sys/arch/sbmips/sbmips/cpu.c:1.21 src/sys/arch/sbmips/sbmips/cpu.c:1.22
--- src/sys/arch/sbmips/sbmips/cpu.c:1.21	Sat Jul  9 12:59:40 2011
+++ src/sys/arch/sbmips/sbmips/cpu.c	Mon Mar 24 15:13:48 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.21 2011/07/09 16:59:40 matt Exp $ */
+/* $NetBSD: cpu.c,v 1.22 2014/03/24 19:13:48 christos Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.21 2011/07/09 16:59:40 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.22 2014/03/24 19:13:48 christos Exp $);
 
 #include opt_multiprocessor.h
 
@@ -94,6 +94,7 @@ cpu_attach(device_t parent, device_t sel
 
 	/* XXX this code must run on the target CPU */
 	config = mips3_cp0_config_read();
+	__USE(config);
 	KASSERT((config  MIPS3_CONFIG_K0_MASK) == 5);
 
 	/* Determine CPU frequency */

Index: src/sys/arch/sbmips/sbmips/machdep.c
diff -u src/sys/arch/sbmips/sbmips/machdep.c:1.52 src/sys/arch/sbmips/sbmips/machdep.c:1.53
--- src/sys/arch/sbmips/sbmips/machdep.c:1.52	Sat Jul 28 19:09:50 2012
+++ src/sys/arch/sbmips/sbmips/machdep.c	Mon Mar 24 15:13:48 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.52 2012/07/28 23:09:50 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.53 2014/03/24 19:13:48 christos Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.52 2012/07/28 23:09:50 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.53 2014/03/24 19:13:48 christos Exp $);
 
 #include opt_ddb.h
 #include opt_execfmt.h
@@ -212,7 +212,7 @@ mach_init(long fwhandle, long magic, lon
 	(u_int)fwhandle, (u_int)magic, (u_int)bootdata, (u_int)reserved);
 #endif
 
-	strcpy(cpu_model, sb1250);
+	cpu_setmodel(sb1250);
 
 	if (magic == BOOTINFO_MAGIC) {
 		int idx;



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

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:14:31 UTC 2014

Modified Files:
src/sys/arch/powerpc/powerpc: powerpc_machdep.c

Log Message:
remove dup cpu_model sysctl; use the mi version in hw.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/powerpc/powerpc/powerpc_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/powerpc/powerpc/powerpc_machdep.c
diff -u src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.68 src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.69
--- src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.68	Thu Mar  6 14:44:32 2014
+++ src/sys/arch/powerpc/powerpc/powerpc_machdep.c	Mon Mar 24 15:14:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: powerpc_machdep.c,v 1.68 2014/03/06 19:44:32 matt Exp $	*/
+/*	$NetBSD: powerpc_machdep.c,v 1.69 2014/03/24 19:14:31 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: powerpc_machdep.c,v 1.68 2014/03/06 19:44:32 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: powerpc_machdep.c,v 1.69 2014/03/24 19:14:31 christos Exp $);
 
 #include opt_altivec.h
 #include opt_modular.h
@@ -269,11 +269,6 @@ SYSCTL_SETUP(sysctl_machdep_setup, sysc
 #endif
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT,
-		   CTLTYPE_STRING, model, NULL,
-		   NULL, 0, cpu_model, 0,
-		   CTL_MACHDEP, CPU_MODEL, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
 		   CTLTYPE_STRING, booted_device, NULL,
 		   sysctl_machdep_booted_device, 0, NULL, 0,
 		   CTL_MACHDEP, CPU_BOOTED_DEVICE, CTL_EOL);



CVS commit: src/sys/arch/powerpc

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:29:59 UTC 2014

Modified Files:
src/sys/arch/powerpc/booke: booke_machdep.c
src/sys/arch/powerpc/ibm4xx: cpu.c
src/sys/arch/powerpc/include: cpu.h
src/sys/arch/powerpc/oea: cpu_subr.c oea_machdep.c

Log Message:
use cpu_{g,s}etmodel


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/booke/booke_machdep.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/powerpc/ibm4xx/cpu.c
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/powerpc/oea/cpu_subr.c
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/powerpc/oea/oea_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/powerpc/booke/booke_machdep.c
diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.19 src/sys/arch/powerpc/booke/booke_machdep.c:1.20
--- src/sys/arch/powerpc/booke/booke_machdep.c:1.19	Tue Mar 18 14:20:41 2014
+++ src/sys/arch/powerpc/booke/booke_machdep.c	Mon Mar 24 15:29:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: booke_machdep.c,v 1.19 2014/03/18 18:20:41 riastradh Exp $	*/
+/*	$NetBSD: booke_machdep.c,v 1.20 2014/03/24 19:29:59 christos Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,7 +38,7 @@
 #define	_POWERPC_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: booke_machdep.c,v 1.19 2014/03/18 18:20:41 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: booke_machdep.c,v 1.20 2014/03/24 19:29:59 christos Exp $);
 
 #include opt_modular.h
 
@@ -51,6 +51,7 @@ __KERNEL_RCSID(0, $NetBSD: booke_machde
 #include sys/kernel.h
 #include sys/reboot.h
 #include sys/bus.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 
@@ -145,7 +146,6 @@ __CTASSERT(__arraycount(cpu_info) == __a
 /*
  * This should probably be in autoconf!XXX
  */
-char cpu_model[80];
 char machine[] = MACHINE;		/* from machine/param.h */
 char machine_arch[] = MACHINE_ARCH;	/* from machine/param.h */
 
@@ -167,7 +167,7 @@ booke_cpu_startup(const char *model)
 	vaddr_t 	minaddr, maxaddr;
 	char 		pbuf[9];
 
-	strlcpy(cpu_model, model, sizeof(cpu_model));
+	cpu_setmodel(%s, model);
 
 	printf(%s%s, copyright, version);
 

Index: src/sys/arch/powerpc/ibm4xx/cpu.c
diff -u src/sys/arch/powerpc/ibm4xx/cpu.c:1.32 src/sys/arch/powerpc/ibm4xx/cpu.c:1.33
--- src/sys/arch/powerpc/ibm4xx/cpu.c:1.32	Tue Jun 21 00:21:16 2011
+++ src/sys/arch/powerpc/ibm4xx/cpu.c	Mon Mar 24 15:29:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.32 2011/06/21 04:21:16 matt Exp $	*/
+/*	$NetBSD: cpu.c,v 1.33 2014/03/24 19:29:59 christos Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.32 2011/06/21 04:21:16 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.33 2014/03/24 19:29:59 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -223,8 +223,6 @@ struct cpu_info cpu_info[1] = {
 	}
 };
 
-char cpu_model[80];
-
 bool cpufound;
 
 static int
@@ -257,16 +255,16 @@ cpuattach(device_t parent, device_t self
 	const u_int pvr = mfpvr();
 	for (cp = models; cp-name != NULL; cp++) {
 		if ((pvr  cp-mask) == cp-version) {
-			strcpy(cpu_model, cp-name);
+			cpu_setmodel(%s, cp-name);
 			break;
 		}
 	}
 	if (__predict_false(cp-name == NULL))
-		sprintf(cpu_model, Version 0x%x, pvr);
+		cpu_setmodel(Version 0x%x, pvr);
 
 	aprint_normal(: %uMHz %s (PVR 0x%x)\n,
 	(processor_freq + 50) / 100,
-	(cp-name != NULL ? cpu_model : unknown model),
+	(cp-name != NULL ? cpu_getmodel() : unknown model),
 	pvr);
 
 	cpu_probe_cache();

Index: src/sys/arch/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.99 src/sys/arch/powerpc/include/cpu.h:1.100
--- src/sys/arch/powerpc/include/cpu.h:1.99	Mon Mar  3 10:36:36 2014
+++ src/sys/arch/powerpc/include/cpu.h	Mon Mar 24 15:29:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.99 2014/03/03 15:36:36 macallan Exp $	*/
+/*	$NetBSD: cpu.h,v 1.100 2014/03/24 19:29:59 christos Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -361,7 +361,6 @@ extern char *booted_kernel;
 extern int powersave;
 extern int cpu_timebase;
 extern int cpu_printfataltraps;
-extern char cpu_model[];
 
 struct cpu_info *
 	cpu_attach_common(device_t, int);

Index: src/sys/arch/powerpc/oea/cpu_subr.c
diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.81 src/sys/arch/powerpc/oea/cpu_subr.c:1.82
--- src/sys/arch/powerpc/oea/cpu_subr.c:1.81	Fri Mar 14 17:59:41 2014
+++ src/sys/arch/powerpc/oea/cpu_subr.c	Mon Mar 24 15:29:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.81 2014/03/14 21:59:41 mrg Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.82 2014/03/24 19:29:59 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.81 2014/03/14 21:59:41 mrg Exp $);

CVS commit: src/sys/arch/pmax/pmax

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:31:40 UTC 2014

Modified Files:
src/sys/arch/pmax/pmax: dec_3100.c dec_3max.c dec_3maxplus.c dec_3min.c
dec_5100.c dec_maxine.c machdep.c

Log Message:
use cpu_{g,s}etmodel


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/pmax/pmax/dec_3100.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/pmax/pmax/dec_3max.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/pmax/pmax/dec_3maxplus.c
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/pmax/pmax/dec_3min.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/pmax/pmax/dec_5100.c
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/pmax/pmax/dec_maxine.c
cvs rdiff -u -r1.247 -r1.248 src/sys/arch/pmax/pmax/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/pmax/pmax/dec_3100.c
diff -u src/sys/arch/pmax/pmax/dec_3100.c:1.53 src/sys/arch/pmax/pmax/dec_3100.c:1.54
--- src/sys/arch/pmax/pmax/dec_3100.c:1.53	Sat Oct 13 02:51:22 2012
+++ src/sys/arch/pmax/pmax/dec_3100.c	Mon Mar 24 15:31:39 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $ */
+/* $NetBSD: dec_3100.c,v 1.54 2014/03/24 19:31:39 christos Exp $ */
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -69,7 +69,7 @@
 
 #define __INTR_PRIVATE
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: dec_3100.c,v 1.54 2014/03/24 19:31:39 christos Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -141,7 +141,7 @@ dec_3100_init(void)
 		submodel = 2100 (PMIN);
 	else
 		submodel = 3100 (PMAX);
-	sprintf(cpu_model, DECstation %s, submodel);
+	cpu_setmodel(DECstation %s, submodel);
 }
 
 /*

Index: src/sys/arch/pmax/pmax/dec_3max.c
diff -u src/sys/arch/pmax/pmax/dec_3max.c:1.55 src/sys/arch/pmax/pmax/dec_3max.c:1.56
--- src/sys/arch/pmax/pmax/dec_3max.c:1.55	Sat Oct 13 02:51:22 2012
+++ src/sys/arch/pmax/pmax/dec_3max.c	Mon Mar 24 15:31:39 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $ */
+/* $NetBSD: dec_3max.c,v 1.56 2014/03/24 19:31:39 christos Exp $ */
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -70,7 +70,7 @@
 #define	__INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: dec_3max.c,v 1.56 2014/03/24 19:31:39 christos Exp $);
 
 #include dzkbd.h
 
@@ -155,7 +155,7 @@ dec_3max_init(void)
 	*(volatile uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr;
 	kn02_wbflush();
 
-	strcpy(cpu_model, DECstation 5000/200 (3MAX));
+	cpu_setmodel(DECstation 5000/200 (3MAX));
 }
 
 /*

Index: src/sys/arch/pmax/pmax/dec_3maxplus.c
diff -u src/sys/arch/pmax/pmax/dec_3maxplus.c:1.69 src/sys/arch/pmax/pmax/dec_3maxplus.c:1.70
--- src/sys/arch/pmax/pmax/dec_3maxplus.c:1.69	Sat Oct 13 02:51:22 2012
+++ src/sys/arch/pmax/pmax/dec_3maxplus.c	Mon Mar 24 15:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3maxplus.c,v 1.69 2012/10/13 06:51:22 tsutsui Exp $ */
+/* $NetBSD: dec_3maxplus.c,v 1.70 2014/03/24 19:31:40 christos Exp $ */
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -70,7 +70,7 @@
 #define __INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dec_3maxplus.c,v 1.69 2012/10/13 06:51:22 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: dec_3maxplus.c,v 1.70 2014/03/24 19:31:40 christos Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -180,10 +180,10 @@ dec_3maxplus_init(void)
 	prodtype = KN03_INTR_PROD_JUMPER;
 	/* the bit persists even if INTR register is assigned value 0 */
 	if (prodtype)
-		sprintf(cpu_model, DECstation 5000/%s (3MAXPLUS),
+		cpu_setmodel(DECstation 5000/%s (3MAXPLUS),
 		(CPUISMIPS3) ? 260 : 240);
 	else
-		sprintf(cpu_model, DECsystem 5900%s (3MAXPLUS),
+		cpu_setmodel(DECsystem 5900%s (3MAXPLUS),
 		(CPUISMIPS3) ? -260 : );
 }
 

Index: src/sys/arch/pmax/pmax/dec_3min.c
diff -u src/sys/arch/pmax/pmax/dec_3min.c:1.72 src/sys/arch/pmax/pmax/dec_3min.c:1.73
--- src/sys/arch/pmax/pmax/dec_3min.c:1.72	Sat Oct 13 02:51:23 2012
+++ src/sys/arch/pmax/pmax/dec_3min.c	Mon Mar 24 15:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3min.c,v 1.72 2012/10/13 06:51:23 tsutsui Exp $ */
+/* $NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $ */
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -70,7 +70,7 @@
 #define	__INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dec_3min.c,v 1.72 2012/10/13 06:51:23 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -183,7 +183,7 @@ dec_3min_init(void)
 		physmem_boardmax = physmem_boardmax  2;
 	physmem_boardmax = MIPS_PHYS_TO_KSEG1(physmem_boardmax);
 
-	sprintf(cpu_model, DECstation 5000/1%d (3MIN), mips_options.mips_cpu_mhz);
+	

CVS commit: src/sys/arch/hp300

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:42:58 UTC 2014

Modified Files:
src/sys/arch/hp300/dev: ct.c dcm.c diofb.c dmareg.h fhpib.c mt.c
nhpib.c rd.c
src/sys/arch/hp300/hp300: autoconf.c bus_space.c machdep.c

Log Message:
- remove unused
- use cpu_{g,s}etmodel


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/hp300/dev/ct.c
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/hp300/dev/dcm.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/diofb.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hp300/dev/dmareg.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hp300/dev/fhpib.c
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/hp300/dev/mt.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp300/dev/nhpib.c
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/hp300/dev/rd.c
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/hp300/hp300/autoconf.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp300/hp300/bus_space.c
cvs rdiff -u -r1.227 -r1.228 src/sys/arch/hp300/hp300/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/hp300/dev/ct.c
diff -u src/sys/arch/hp300/dev/ct.c:1.58 src/sys/arch/hp300/dev/ct.c:1.59
--- src/sys/arch/hp300/dev/ct.c:1.58	Sun Mar 16 01:20:24 2014
+++ src/sys/arch/hp300/dev/ct.c	Mon Mar 24 15:42:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ct.c,v 1.58 2014/03/16 05:20:24 dholland Exp $	*/
+/*	$NetBSD: ct.c,v 1.59 2014/03/24 19:42:58 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ct.c,v 1.58 2014/03/16 05:20:24 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: ct.c,v 1.59 2014/03/24 19:42:58 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -732,11 +732,10 @@ ctintr(void *arg)
 	struct ct_softc *sc = arg;
 	struct buf *bp;
 	uint8_t stat;
-	int ctlr, slave, unit;
+	int ctlr, slave;
 
 	ctlr = device_unit(device_parent(sc-sc_dev));
 	slave = sc-sc_slave;
-	unit = device_unit(sc-sc_dev);
 
 	bp = bufq_peek(sc-sc_tab);
 	if (bp == NULL) {

Index: src/sys/arch/hp300/dev/dcm.c
diff -u src/sys/arch/hp300/dev/dcm.c:1.84 src/sys/arch/hp300/dev/dcm.c:1.85
--- src/sys/arch/hp300/dev/dcm.c:1.84	Sun Mar 16 01:20:24 2014
+++ src/sys/arch/hp300/dev/dcm.c	Mon Mar 24 15:42:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dcm.c,v 1.84 2014/03/16 05:20:24 dholland Exp $	*/
+/*	$NetBSD: dcm.c,v 1.85 2014/03/24 19:42:58 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dcm.c,v 1.84 2014/03/16 05:20:24 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: dcm.c,v 1.85 2014/03/24 19:42:58 christos Exp $);
 
 #include opt_kgdb.h
 
@@ -1594,6 +1594,7 @@ dcmcngetc(dev_t dev)
 	c = fifo-data_char;
 	stat = fifo-data_stat;
 	pp-r_head = (head + 2)  RX_MASK;
+	__USE(stat);
 	splx(s);
 	return c;
 }
@@ -1621,7 +1622,7 @@ dcmcnputc(dev_t dev, int c)
 	}
 	tail = pp-t_tail  TX_MASK;
 	while (tail != (pp-t_head  TX_MASK))
-		;
+		continue;
 	dcm_cn-dcm_tfifos[3-DCMCONSPORT][tail].data_char = c;
 	pp-t_tail = tail = (tail + 1)  TX_MASK;
 	SEM_LOCK(dcm_cn);
@@ -1629,7 +1630,7 @@ dcmcnputc(dev_t dev, int c)
 	dcm_cn-dcm_cr |= (1  DCMCONSPORT);
 	SEM_UNLOCK(dcm_cn);
 	while (tail != (pp-t_head  TX_MASK))
-		;
+		continue;
 	/*
 	 * If board interrupts are enabled, just let our completion
 	 * interrupt through in case some other port on the board
@@ -1640,5 +1641,6 @@ dcmcnputc(dev_t dev, int c)
 		stat = dcm_cn-dcm_iir;
 		SEM_UNLOCK(dcm_cn);
 	}
+	__USE(stat);
 	splx(s);
 }

Index: src/sys/arch/hp300/dev/diofb.c
diff -u src/sys/arch/hp300/dev/diofb.c:1.3 src/sys/arch/hp300/dev/diofb.c:1.4
--- src/sys/arch/hp300/dev/diofb.c:1.3	Fri Feb 18 14:15:43 2011
+++ src/sys/arch/hp300/dev/diofb.c	Mon Mar 24 15:42:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: diofb.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
+/*	$NetBSD: diofb.c,v 1.4 2014/03/24 19:42:58 christos Exp $	*/
 /*	$OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $	*/
 
 /*
@@ -318,7 +318,7 @@ diofb_end_attach(device_t self, struct w
 
 	fb-scrlist[0] = fb-wsd;
 	fb-wsl.nscreens = 1;
-	fb-wsl.screens = (const struct wsscreen_descr **)fb-scrlist;
+	fb-wsl.screens = (void *)fb-scrlist;
 
 	waa.console = console;
 	waa.scrdata = fb-wsl;

Index: src/sys/arch/hp300/dev/dmareg.h
diff -u src/sys/arch/hp300/dev/dmareg.h:1.16 src/sys/arch/hp300/dev/dmareg.h:1.17
--- src/sys/arch/hp300/dev/dmareg.h:1.16	Wed Jul 19 13:21:23 2006
+++ src/sys/arch/hp300/dev/dmareg.h	Mon Mar 24 15:42:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dmareg.h,v 1.16 2006/07/19 17:21:23 tsutsui Exp $	*/
+/*	$NetBSD: dmareg.h,v 1.17 2014/03/24 19:42:58 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -108,7 +108,8 @@ struct	dmareg {
 #define	DMA_CLEAR(dc) do {	\
 		v_int dmaclr;	\
 		dmaclr = (int)dc-dm_Bhwaddr-dmaB_addr;	\
-	} while (0);
+		__USE(dmaclr);	\
+	} while 

CVS commit: src/sys/arch/luna68k/luna68k

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:46:24 UTC 2014

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

Log Message:
- use cpu_{g,s}etmodel
- fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/luna68k/luna68k/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/luna68k/luna68k/machdep.c
diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.97 src/sys/arch/luna68k/luna68k/machdep.c:1.98
--- src/sys/arch/luna68k/luna68k/machdep.c:1.97	Sat Jan 11 11:34:05 2014
+++ src/sys/arch/luna68k/luna68k/machdep.c	Mon Mar 24 15:46:24 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.97 2014/01/11 16:34:05 tsutsui Exp $ */
+/* $NetBSD: machdep.c,v 1.98 2014/03/24 19:46:24 christos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.97 2014/01/11 16:34:05 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.98 2014/03/24 19:46:24 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -70,6 +70,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include sys/boot_flag.h
 #define ELFSIZE 32
 #include sys/exec_elf.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 
@@ -98,7 +99,6 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
  * Info for CTL_HW
  */
 char	machine[] = MACHINE;
-char	cpu_model[120];
 
 /* Our exported CPU info; we can have only one. */
 struct cpu_info cpu_info_store;
@@ -360,7 +360,6 @@ identifycpu(void)
 	extern int cputype;
 	const char *model, *fpu;
 
-	memset(cpu_model, 0, sizeof(cpu_model));
 	switch (cputype) {
 	case CPU_68030:
 		model =LUNA-I;
@@ -378,8 +377,7 @@ identifycpu(void)
 			fpu = unknown;
 			break;
 		}
-		snprintf(cpu_model, sizeof(cpu_model),
-		%s (MC68030 CPU+MMU, %s FPU), model, fpu);
+		cpu_setmodel(%s (MC68030 CPU+MMU, %s FPU), model, fpu);
 		machtype = LUNA_I;
 		/* 20MHz 68030 */
 		cpuspeed = 20;
@@ -389,7 +387,7 @@ identifycpu(void)
 #if defined(M68040)
 	case CPU_68040:
 		model =LUNA-II;
-		snprintf(cpu_model, sizeof(cpu_model),
+		cpu_setmodel(
 		%s (MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches),
 		model);
 		machtype = LUNA_II;
@@ -402,7 +400,7 @@ identifycpu(void)
 	default:
 		panic(unknown CPU type);
 	}
-	printf(%s\n, cpu_model);
+	printf(%s\n, cpu_getmodel());
 }
 
 /*
@@ -742,13 +740,9 @@ int	*nofault;
 int
 badaddr(register void *addr, int nbytes)
 {
-	register int i;
+	int i;
 	label_t faultbuf;
 
-#ifdef lint
-	i = *addr; if (i) return (0);
-#endif
-
 	nofault = (int *)faultbuf;
 	if (setjmp((label_t *)nofault)) {
 		nofault = (int *)0;
@@ -771,6 +765,7 @@ badaddr(register void *addr, int nbytes)
 	default:
 		panic(badaddr: bad request);
 	}
+	__USE(i);
 	nofault = (int *)0;
 	return 0;
 }



CVS commit: src/sys/arch/mvme68k

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:52:27 UTC 2014

Modified Files:
src/sys/arch/mvme68k/dev: sbic.c
src/sys/arch/mvme68k/mvme68k: machdep.c trap.c

Log Message:
use cpu_{g,s}etmodel
fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/mvme68k/dev/sbic.c
cvs rdiff -u -r1.152 -r1.153 src/sys/arch/mvme68k/mvme68k/machdep.c
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/mvme68k/mvme68k/trap.c

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

Modified files:

Index: src/sys/arch/mvme68k/dev/sbic.c
diff -u src/sys/arch/mvme68k/dev/sbic.c:1.33 src/sys/arch/mvme68k/dev/sbic.c:1.34
--- src/sys/arch/mvme68k/dev/sbic.c:1.33	Sat Oct 27 13:18:04 2012
+++ src/sys/arch/mvme68k/dev/sbic.c	Mon Mar 24 15:52:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbic.c,v 1.33 2012/10/27 17:18:04 chs Exp $	*/
+/*	$NetBSD: sbic.c,v 1.34 2014/03/24 19:52:27 christos Exp $	*/
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbic.c,v 1.33 2012/10/27 17:18:04 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbic.c,v 1.34 2014/03/24 19:52:27 christos Exp $);
 
 #include opt_ddb.h
 
@@ -900,6 +900,7 @@ sbicreset(struct sbic_softc *dev)
 
 	SBIC_WAIT(regs, SBIC_ASR_INT, 0);
 	GET_SBIC_csr(regs, csr);	/* clears interrupt also */
+	__USE(csr);
 
 	/*
 	 * Set up various chip parameters
@@ -1258,6 +1259,7 @@ sbicxfin(sbic_regmap_p regs, int len, vo
 			} else {
 u_char foo;
 GET_SBIC_data (regs, foo);
+__USE(foo);
 			}
 			wait = sbic_data_wait;
 		}

Index: src/sys/arch/mvme68k/mvme68k/machdep.c
diff -u src/sys/arch/mvme68k/mvme68k/machdep.c:1.152 src/sys/arch/mvme68k/mvme68k/machdep.c:1.153
--- src/sys/arch/mvme68k/mvme68k/machdep.c:1.152	Sat Jul 28 15:08:24 2012
+++ src/sys/arch/mvme68k/mvme68k/machdep.c	Mon Mar 24 15:52:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.152 2012/07/28 19:08:24 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.153 2014/03/24 19:52:27 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.152 2012/07/28 19:08:24 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.153 2014/03/24 19:52:27 christos Exp $);
 
 #include opt_ddb.h
 #include opt_m060sp.h
@@ -71,6 +71,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include sys/ksyms.h
 #include sys/module.h
 #include sys/device.h
+#include sys/cpu.h
 
 #include ksyms.h
 
@@ -478,51 +479,39 @@ cpu_startup(void)
 	initcpu();
 }
 
-/*
- * Info for CTL_HW
- */
-char	cpu_model[124];
-
 void
 identifycpu(void)
 {
 	char board_str[16];
-	char cpu_str[32];
-	char mmu_str[16];
-	char fpu_str[16];
-	int len = 0;
-
-	memset(cpu_model, 0, sizeof(cpu_model));
-	memset(board_str, 0, sizeof(board_str));
-	memset(cpu_str, 0, sizeof(cpu_str));
-	memset(mmu_str, 0, sizeof(mmu_str));
-	memset(fpu_str, 0, sizeof(fpu_str));
+	const char *cpu_str, *mmu_str, *fpu_str, *cache_str;
 
 	/* Fill in the CPU string. */
 	switch (cputype) {
 #ifdef M68020
 	case CPU_68020:
-		sprintf(cpu_str, MC68020 CPU);
-		sprintf(fpu_str, MC68881 FPU);	/* XXX */
+		cpu_str = MC68020 CPU;
+		fpu_str = , MC68881 FPU;	/* XXX */
 		break;
 #endif
 
 #ifdef M68030
 	case CPU_68030:
-		sprintf(cpu_str, MC68030 CPU+MMU);
-		sprintf(fpu_str, MC68882 FPU);	/* XXX */
+		cpu_str = MC68030 CPU+MMU;
+		fpu_str = , MC68882 FPU;	/* XXX */
 		break;
 #endif
 
 #ifdef M68040
 	case CPU_68040:
-		sprintf(cpu_str, MC68040 CPU+MMU+FPU);
+		cpu_str = MC68040 CPU+MMU+FPU;
+		fpu_str = ;
 		break;
 #endif
 
 #ifdef M68060
 	case CPU_68060:
-		sprintf(cpu_str, MC68060 CPU+MMU+FPU);
+		cpu_str = MC68060 CPU+MMU+FPU;
+		fpu_str = ;
 		break;
 #endif
 
@@ -534,40 +523,31 @@ identifycpu(void)
 	/* Fill in the MMU string; only need to handle one case. */
 	switch (mmutype) {
 	case MMU_68851:
-		sprintf(mmu_str, MC68851 MMU);
+		mmu_str = , MC68851 MMU;
+		break;
+	default:
+		mmu_str = ;
 		break;
 	}
 
-	/* XXX Find out FPU type and fill in string here. */
-
 	/* Fill in board model string. */
 	switch (machineid) {
-#ifdef MVME147
+#if defined(MVME_147) || defined(MVME162) || defined(MVME167) || defined(MVME172) || defined(MVME177)
 	case MVME_147:
-	{
-		char *suffix = (char *)boardid.suffix;
-		len = sprintf(board_str, %x, machineid);
-		if (suffix[0] != '\0') {
-			board_str[len++] = suffix[0];
-			if (suffix[1] != '\0')
-board_str[len++] = suffix[1];
-		}
-		break;
-	}
-#endif
-
-#if defined(MVME162) || defined(MVME167) || defined(MVME172) || defined(MVME177)
 	case MVME_162:
 	case MVME_167:
 	case MVME_172:
 	case MVME_177:
 	{
 		char *suffix = (char *)boardid.suffix;
-		len = sprintf(board_str, %x, machineid);
-		if (suffix[0] != '\0') {
+		int len = snprintf(board_str, sizeof(board_str), %x,
+		machineid);
+		if (suffix[0] != '\0'  len  0 
+		len + 3  sizeof(board_str)) 

CVS commit: src/sys/arch/news68k/news68k

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:54:28 UTC 2014

Modified Files:
src/sys/arch/news68k/news68k: autoconf.c bus_space.c machdep.c

Log Message:
- use cpu_{g,s}etmodel
- fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/news68k/autoconf.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/news68k/news68k/bus_space.c
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/news68k/news68k/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/news68k/news68k/autoconf.c
diff -u src/sys/arch/news68k/news68k/autoconf.c:1.22 src/sys/arch/news68k/news68k/autoconf.c:1.23
--- src/sys/arch/news68k/news68k/autoconf.c:1.22	Sat Oct 13 02:18:44 2012
+++ src/sys/arch/news68k/news68k/autoconf.c	Mon Mar 24 15:54:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.23 2014/03/24 19:54:28 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -51,7 +51,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.23 2014/03/24 19:54:28 christos Exp $);
 
 #include scsibus.h
 
@@ -124,14 +124,13 @@ void
 findroot(void)
 {
 #if NSCSIBUS  0
-	int ctlr, unit, part, type;
+	int ctlr, part, type;
 	device_t dv;
 
 	if (BOOTDEV_MAG(bootdev) != 5)	/* NEWS-OS's B_DEVMAGIC */
 		return;
 
 	ctlr = BOOTDEV_CTLR(bootdev);	/* SCSI ID */
-	unit = BOOTDEV_UNIT(bootdev);
 	part = BOOTDEV_PART(bootdev);	/* LUN */
 	type = BOOTDEV_TYPE(bootdev);
 

Index: src/sys/arch/news68k/news68k/bus_space.c
diff -u src/sys/arch/news68k/news68k/bus_space.c:1.11 src/sys/arch/news68k/news68k/bus_space.c:1.12
--- src/sys/arch/news68k/news68k/bus_space.c:1.11	Tue Nov 22 09:31:02 2011
+++ src/sys/arch/news68k/news68k/bus_space.c	Mon Mar 24 15:54:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $	*/
+/*	$NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -151,7 +151,7 @@ news68k_bus_space_probe(bus_space_tag_t 
 		panic(bus_space_probe: unupported data size %d, sz);
 		/* NOTREACHED */
 	}
-
+	__USE(i);
 	nofault = NULL;
 	return 1;
 }

Index: src/sys/arch/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.100 src/sys/arch/news68k/news68k/machdep.c:1.101
--- src/sys/arch/news68k/news68k/machdep.c:1.100	Fri Aug 10 08:17:51 2012
+++ src/sys/arch/news68k/news68k/machdep.c	Mon Mar 24 15:54:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.100 2012/08/10 12:17:51 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.101 2014/03/24 19:54:28 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.100 2012/08/10 12:17:51 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.101 2014/03/24 19:54:28 christos Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -64,6 +64,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include sys/kcore.h
 #include sys/ksyms.h
 #include sys/module.h
+#include sys/cpu.h
 
 #ifdef DDB
 #include machine/db_machdep.h
@@ -245,18 +246,13 @@ cpu_startup(void)
 	initcpu();
 }
 
-/*
- * Info for CTL_HW
- */
-char cpu_model[124];
-
 int news_machine_id;
 
 static void
 identifycpu(void)
 {
 
-	printf(SONY NET WORK STATION, Model %s, , cpu_model);
+	printf(SONY NET WORK STATION, Model %s, , cpu_getmodel());
 	printf(Machine ID #%d\n, news_machine_id);
 
 	delay_divisor = (20480 / cpuspeed + 5) / 10; /* XXX */
@@ -645,6 +641,7 @@ badaddr(void *addr, int nbytes)
 	default:
 		panic(badaddr: bad request);
 	}
+	__USE(i);
 	nofault = (int *) 0;
 	return 0;
 }
@@ -661,6 +658,7 @@ badbaddr(void *addr)
 		return 1;
 	}
 	i = *(volatile char *)addr;
+	__USE(i);
 	nofault = (int *) 0;
 	return 0;
 }
@@ -808,7 +806,7 @@ news1700_init(void)
 	if (t == NULL)
 		panic(unexpected system model.);
 
-	strcat(cpu_model, t);
+	cpu_setmodel(%s, t);
 	news_machine_id = (idrom.id_serial[0]  8) + idrom.id_serial[1];
 
 	ctrl_parity	= (uint8_t *)(0xe108);
@@ -890,7 +888,7 @@ news1200_init(void)
 	for (i = 0; i  sizeof(idrom); i++, p += 2)
 		*q++ = ((*p  0x0f)  4) | (*(p + 1)  0x0f);
 
-	strcat(cpu_model, idrom.id_model);
+	cpu_setmodel(%s, idrom.id_model);
 	news_machine_id = idrom.id_serial;
 
 	cpuspeed = 25;



CVS commit: src/sys/arch/next68k/next68k

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:57:47 UTC 2014

Modified Files:
src/sys/arch/next68k/next68k: disksubr.c

Log Message:
fix memset bugs


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/next68k/next68k/disksubr.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/next68k/next68k/disksubr.c
diff -u src/sys/arch/next68k/next68k/disksubr.c:1.25 src/sys/arch/next68k/next68k/disksubr.c:1.26
--- src/sys/arch/next68k/next68k/disksubr.c:1.25	Mon Mar 16 19:11:13 2009
+++ src/sys/arch/next68k/next68k/disksubr.c	Mon Mar 24 15:57:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.25 2009/03/16 23:11:13 dsl Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.26 2014/03/24 19:57:47 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.25 2009/03/16 23:11:13 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.26 2014/03/24 19:57:47 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -171,7 +171,7 @@ build_nextstep_label(struct next68k_disk
 	unsigned short *checksum;
 
 
-	memset (ondisk, 0, sizeof (ondisk));
+	memset (ondisk, 0, sizeof (*ondisk));
 
 	ondisk-cd_version = NEXT68K_LABEL_CD_V3;
 	/* ondisk-cd_label_blkno = 0; */
@@ -272,7 +272,7 @@ build_nextstep_label(struct next68k_disk
 p-cp_minfree = 5; /* set some default */
 			p-cp_cpg = lp-d_partitions[nbp].p_cpg;
 		} else {
-			memset (p, 0, sizeof(p));
+			memset (p, 0, sizeof(*p);
 			p-cp_size = -1;
 			p-cp_offset = -1;
 			p-cp_bsize = -1;



CVS commit: src/sys/arch/next68k/next68k

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:58:04 UTC 2014

Modified Files:
src/sys/arch/next68k/next68k: disksubr.c machdep.c rtc.c trap.c

Log Message:
fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/next68k/next68k/disksubr.c
cvs rdiff -u -r1.109 -r1.110 src/sys/arch/next68k/next68k/machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/next68k/next68k/rtc.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/next68k/next68k/trap.c

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

Modified files:

Index: src/sys/arch/next68k/next68k/disksubr.c
diff -u src/sys/arch/next68k/next68k/disksubr.c:1.26 src/sys/arch/next68k/next68k/disksubr.c:1.27
--- src/sys/arch/next68k/next68k/disksubr.c:1.26	Mon Mar 24 15:57:47 2014
+++ src/sys/arch/next68k/next68k/disksubr.c	Mon Mar 24 15:58:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.26 2014/03/24 19:57:47 christos Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.27 2014/03/24 19:58:04 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.26 2014/03/24 19:57:47 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.27 2014/03/24 19:58:04 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -272,7 +272,7 @@ build_nextstep_label(struct next68k_disk
 p-cp_minfree = 5; /* set some default */
 			p-cp_cpg = lp-d_partitions[nbp].p_cpg;
 		} else {
-			memset (p, 0, sizeof(*p);
+			memset (p, 0, sizeof(*p));
 			p-cp_size = -1;
 			p-cp_offset = -1;
 			p-cp_bsize = -1;

Index: src/sys/arch/next68k/next68k/machdep.c
diff -u src/sys/arch/next68k/next68k/machdep.c:1.109 src/sys/arch/next68k/next68k/machdep.c:1.110
--- src/sys/arch/next68k/next68k/machdep.c:1.109	Fri Aug 10 21:21:04 2012
+++ src/sys/arch/next68k/next68k/machdep.c	Mon Mar 24 15:58:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.109 2012/08/11 01:21:04 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $	*/
 
 /*
  * Copyright (c) 1998 Darrin B. Jewell
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.109 2012/08/11 01:21:04 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -311,15 +311,12 @@ cpu_startup(void)
 	initcpu();
 }
 
-/*
- * Info for CTL_HW
- */
-char	cpu_model[124];
-
 void
 identifycpu(void)
 {
-	const char *mc;
+/*###317 [cc] error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token%%%*/
+	const char *mc, *mmu_str *fpu_str, *cache_str;
+/*###318 [cc] error: unused variable 'len' [-Werror=unused-variable]%%%*/
 	int len;
 
 	/*
@@ -340,67 +337,74 @@ identifycpu(void)
 		goto lose;
 	}
 
-	sprintf(cpu_model, NeXT/MC680%s CPU,mc);
-
 	/*
 	 * ...and the MMU type.
 	 */
 	switch (mmutype) {
 	case MMU_68040:
 	case MMU_68030:
-		strcat(cpu_model, +MMU);
+/*###344 [cc] error: 'mmu_str' undeclared (first use in this function)%%%*/
+/*###344 [cc] note: each undeclared identifier is reported only once for each function it appears in%%%*/
+		mmu_str = +MMU;
 		break;
 	case MMU_68851:
-		strcat(cpu_model, , MC68851 MMU);
+		mmu_str = , MC68851 MMU;
 		break;
 	case MMU_HP:
-		strcat(cpu_model, , HP MMU);
+		mmu_str = , HP MMU;
 		break;
 	default:
-		printf(%s\nunknown MMU type %d\n, cpu_model, mmutype);
+		printf(MC680%s: unknown MMU type %d\n, mc, mmutype);
 		panic(startup);
 	}
 
-	len = strlen(cpu_model);
-
 	/*
 	 * ...and the FPU type.
 	 */
 	switch (fputype) {
 	case FPU_68040:
-		len += sprintf(cpu_model + len, +FPU);
+/*###362 [cc] error: 'fpu_str' undeclared (first use in this function)%%%*/
+		fpu_str = +FPU;
 		break;
 	case FPU_68882:
-		len += sprintf(cpu_model + len, , MC68882 FPU);
+		fpu_str = , MC68882 FPU;
 		break;
 	case FPU_68881:
-		len += sprintf(cpu_model + len, , MHz MC68881 FPU);
+		fpu_str = , MHz MC68881 FPU;
 		break;
 	default:
-		len += sprintf(cpu_model + len, , unknown FPU);
+		fpu_str = , unknown FPU;
 	}
 
 	/*
 	 * ...and finally, the cache type.
 	 */
 	if (cputype == CPU_68040)
-		sprintf(cpu_model + len, , 4k on-chip physical I/D caches);
+/*###378 [cc] error: 'cache_str' undeclared (first use in this function)%%%*/
+		cache_str = , 4k on-chip physical I/D caches;
 	else {
 #if defined(ENABLE_HP_CODE)
 		switch (ectype) {
 		case EC_VIRT:
-			sprintf(cpu_model + len,
-			, virtual-address cache);
+			cache_str = , virtual-address cache;
 			break;
 		case EC_PHYS:
-			sprintf(cpu_model + len,
-			, physical-address cache);
+			cache_str = , physical-address cache;
+			break;
+		default:
+			cache_str = ;
 			break;
 		}
+#else
+		cache_str = ;
 #endif
 	}
 
-	printf(%s\n, cpu_model);
+/*###397 [cc] error: implicit declaration of function 'cpu_setmodel' [-Werror=implicit-function-declaration]%%%*/
+	cpu_setmodel(NeXT/MC680%s CPU%s%s%s, mc, 

CVS commit: src/sys/arch/next68k

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 20:01:03 UTC 2014

Modified Files:
src/sys/arch/next68k/dev: mb8795.c nextkbd.c
src/sys/arch/next68k/next68k: machdep.c rtc.c trap.c

Log Message:
- use cpu_{g,s}etmodel
- fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/next68k/dev/mb8795.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/next68k/dev/nextkbd.c
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/next68k/next68k/machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/next68k/next68k/rtc.c
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/next68k/next68k/trap.c

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

Modified files:

Index: src/sys/arch/next68k/dev/mb8795.c
diff -u src/sys/arch/next68k/dev/mb8795.c:1.51 src/sys/arch/next68k/dev/mb8795.c:1.52
--- src/sys/arch/next68k/dev/mb8795.c:1.51	Sat Oct 27 13:18:05 2012
+++ src/sys/arch/next68k/dev/mb8795.c	Mon Mar 24 16:01:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mb8795.c,v 1.51 2012/10/27 17:18:05 chs Exp $	*/
+/*	$NetBSD: mb8795.c,v 1.52 2014/03/24 20:01:03 christos Exp $	*/
 /*
  * Copyright (c) 1998 Darrin B. Jewell
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mb8795.c,v 1.51 2012/10/27 17:18:05 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: mb8795.c,v 1.52 2014/03/24 20:01:03 christos Exp $);
 
 #include opt_inet.h
 
@@ -254,6 +254,7 @@ mb8795_rint(struct mb8795_softc *sc)
 
 	rxstat = MB_READ_REG(sc, MB8795_RXSTAT);
 	rxmask = MB_READ_REG(sc, MB8795_RXMASK);
+	__USE(rxmask);
 
 	MB_WRITE_REG(sc, MB8795_RXSTAT, MB8795_RXSTAT_CLEAR);
 
@@ -376,6 +377,7 @@ mb8795_tint(struct mb8795_softc *sc)
 	panic (tint);
 	txstat = MB_READ_REG(sc, MB8795_TXSTAT);
 	txmask = MB_READ_REG(sc, MB8795_TXMASK);
+	__USE(txmask);
 
 	if ((txstat  MB8795_TXSTAT_READY) ||
 	(txstat  MB8795_TXSTAT_TXRECV)) {
@@ -764,6 +766,7 @@ mb8795_start_dma(struct mb8795_softc *sc
 
 	MB_WRITE_REG(sc, MB8795_TXSTAT, MB8795_TXSTAT_CLEAR);
 	txmask = MB_READ_REG(sc, MB8795_TXMASK);
+	__USE(txmask);
 	/* MB_WRITE_REG(sc, MB8795_TXMASK, txmask | MB8795_TXMASK_READYIE); */
 	/* MB_WRITE_REG(sc, MB8795_TXMASK, txmask | MB8795_TXMASK_TXRXIE); */
 

Index: src/sys/arch/next68k/dev/nextkbd.c
diff -u src/sys/arch/next68k/dev/nextkbd.c:1.14 src/sys/arch/next68k/dev/nextkbd.c:1.15
--- src/sys/arch/next68k/dev/nextkbd.c:1.14	Sat Oct 27 13:18:07 2012
+++ src/sys/arch/next68k/dev/nextkbd.c	Mon Mar 24 16:01:03 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: nextkbd.c,v 1.14 2012/10/27 17:18:07 chs Exp $ */
+/* $NetBSD: nextkbd.c,v 1.15 2014/03/24 20:01:03 christos Exp $ */
 /*
  * Copyright (c) 1998 Matt DeBergalis
  * All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nextkbd.c,v 1.14 2012/10/27 17:18:07 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: nextkbd.c,v 1.15 2014/03/24 20:01:03 christos Exp $);
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
@@ -331,7 +331,7 @@ static int
 nextkbd_read_data(struct nextkbd_internal *id)
 {
 	unsigned char device;
-	struct mon_regs stat;
+	struct mon_regs stat = { 0 };
 
 	bus_space_read_region_4(id-iot, id-ioh, 0, stat, 3);
 	if ((stat.mon_csr  CSR_INT)  (stat.mon_csr  CSR_DATA)) {

Index: src/sys/arch/next68k/next68k/machdep.c
diff -u src/sys/arch/next68k/next68k/machdep.c:1.110 src/sys/arch/next68k/next68k/machdep.c:1.111
--- src/sys/arch/next68k/next68k/machdep.c:1.110	Mon Mar 24 15:58:04 2014
+++ src/sys/arch/next68k/next68k/machdep.c	Mon Mar 24 16:01:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.111 2014/03/24 20:01:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1998 Darrin B. Jewell
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.111 2014/03/24 20:01:03 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -74,6 +74,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include sys/kgdb.h
 #endif
 #include sys/boot_flag.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 
@@ -314,10 +315,7 @@ cpu_startup(void)
 void
 identifycpu(void)
 {
-/*###317 [cc] error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token%%%*/
-	const char *mc, *mmu_str *fpu_str, *cache_str;
-/*###318 [cc] error: unused variable 'len' [-Werror=unused-variable]%%%*/
-	int len;
+	const char *mc, *mmu_str, *fpu_str, *cache_str;
 
 	/*
 	 * ...and the CPU type.
@@ -343,8 +341,6 @@ identifycpu(void)
 	switch (mmutype) {
 	case MMU_68040:
 	case MMU_68030:
-/*###344 [cc] error: 'mmu_str' undeclared (first use in this function)%%%*/
-/*###344 [cc] note: each undeclared identifier is reported only once for each function it appears in%%%*/
 		mmu_str = +MMU;
 		break;
 	case MMU_68851:
@@ -363,7 +359,6 @@ identifycpu(void)
 	 */
 	switch (fputype) {
 	case FPU_68040:
-/*###362 

CVS commit: src/sys/arch/newsmips

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 20:05:20 UTC 2014

Modified Files:
src/sys/arch/newsmips/apbus: apbus_subr.c
src/sys/arch/newsmips/dev: scsi_1185.c
src/sys/arch/newsmips/newsmips: autoconf.c machdep.c news3400.c

Log Message:
- fix unused
- use cpu_{g,s}etmodel


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/newsmips/apbus/apbus_subr.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/newsmips/dev/scsi_1185.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/newsmips/newsmips/autoconf.c
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/newsmips/newsmips/machdep.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/newsmips/newsmips/news3400.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/newsmips/apbus/apbus_subr.c
diff -u src/sys/arch/newsmips/apbus/apbus_subr.c:1.8 src/sys/arch/newsmips/apbus/apbus_subr.c:1.9
--- src/sys/arch/newsmips/apbus/apbus_subr.c:1.8	Wed Apr  9 11:40:30 2008
+++ src/sys/arch/newsmips/apbus/apbus_subr.c	Mon Mar 24 16:05:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: apbus_subr.c,v 1.8 2008/04/09 15:40:30 tsutsui Exp $	*/
+/*	$NetBSD: apbus_subr.c,v 1.9 2014/03/24 20:05:20 christos Exp $	*/
 
 /*-
  * Copyright (C) 1999 SHIMIZU Ryo.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: apbus_subr.c,v 1.8 2008/04/09 15:40:30 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: apbus_subr.c,v 1.9 2014/03/24 20:05:20 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -74,15 +74,11 @@ apbus_lookupdev(char *devname)
 static void
 apctl_dump(struct apbus_ctl *apctl)
 {
-	unsigned int *p;
-
 	if (!apctl)
 		return;
 
 	printf(	apbus_ctl dump (%p)\n, apctl);
 
-	p = (void *)apctl;
-
 	printf(	Num:		%d\n, apctl-apbc_ctlno);
 	printf(	HWaddr:		0x%08x\n, apctl-apbc_hwbase);
 	printf(	softc:		%p\n, apctl-apbc_softc);

Index: src/sys/arch/newsmips/dev/scsi_1185.c
diff -u src/sys/arch/newsmips/dev/scsi_1185.c:1.20 src/sys/arch/newsmips/dev/scsi_1185.c:1.21
--- src/sys/arch/newsmips/dev/scsi_1185.c:1.20	Sun Feb 20 02:56:31 2011
+++ src/sys/arch/newsmips/dev/scsi_1185.c	Mon Mar 24 16:05:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsi_1185.c,v 1.20 2011/02/20 07:56:31 matt Exp $	*/
+/*	$NetBSD: scsi_1185.c,v 1.21 2014/03/24 20:05:20 christos Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scsi_1185.c,v 1.20 2011/02/20 07:56:31 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: scsi_1185.c,v 1.21 2014/03/24 20:05:20 christos Exp $);
 
 #define	__INTR_PRIVATE
 #include sys/param.h
@@ -568,8 +568,10 @@ scintr_loop:
 			int volatile cmonr;
 
 			statr = sc_statr;
+			__USE(statr);
 			DMAC_WAIT0;
 			cmonr = sc_cmonr;
+			__USE(cmonr);
 			sc-int_stat2 = ~R3_SPE;
 			sc-perr_flag[sc-ip-chan_num] = 1;
 		}

Index: src/sys/arch/newsmips/newsmips/autoconf.c
diff -u src/sys/arch/newsmips/newsmips/autoconf.c:1.37 src/sys/arch/newsmips/newsmips/autoconf.c:1.38
--- src/sys/arch/newsmips/newsmips/autoconf.c:1.37	Sat Oct 13 02:25:20 2012
+++ src/sys/arch/newsmips/newsmips/autoconf.c	Mon Mar 24 16:05:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.37 2012/10/13 06:25:20 tsutsui Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.38 2014/03/24 20:05:20 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -49,7 +49,7 @@
 #define __INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.37 2012/10/13 06:25:20 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.38 2014/03/24 20:05:20 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -126,14 +126,13 @@ u_long	bootdev = 0;		/* should be dev_t,
 static void
 findroot(void)
 {
-	int ctlr, unit, part, type;
+	int ctlr, part, type;
 	device_t dv;
 
 	if (BOOTDEV_MAG(bootdev) != 5)	/* NEWS-OS's B_DEVMAGIC */
 		return;
 
 	ctlr = BOOTDEV_CTLR(bootdev);	/* SCSI ID */
-	unit = BOOTDEV_UNIT(bootdev);
 	part = BOOTDEV_PART(bootdev);	/* LUN */
 	type = BOOTDEV_TYPE(bootdev);
 

Index: src/sys/arch/newsmips/newsmips/machdep.c
diff -u src/sys/arch/newsmips/newsmips/machdep.c:1.114 src/sys/arch/newsmips/newsmips/machdep.c:1.115
--- src/sys/arch/newsmips/newsmips/machdep.c:1.114	Sat Jul 28 19:08:57 2012
+++ src/sys/arch/newsmips/newsmips/machdep.c	Mon Mar 24 16:05:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.114 2012/07/28 23:08:57 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.115 2014/03/24 20:05:20 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.114 2012/07/28 23:08:57 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.115 2014/03/24 20:05:20 christos Exp $);
 
 /* from: Utah Hdr: machdep.c 1.63 91/04/24 */
 
@@ -148,6 +148,7 @@ mach_init(int x_boothowto, int x_bootdev
 {
 	u_long first, last;
 	char *kernend;
+	const char *model;
 	

CVS commit: src/sys

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 20:07:41 UTC 2014

Modified Files:
src/sys/kern: init_sysctl.c kern_cpu.c
src/sys/sys: cpu.h systm.h

Log Message:
- create  cpu_{g,s}etmodel() and hide cpu_model from direct access.


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/sys/kern/init_sysctl.c
cvs rdiff -u -r1.63 -r1.64 src/sys/kern/kern_cpu.c
cvs rdiff -u -r1.39 -r1.40 src/sys/sys/cpu.h
cvs rdiff -u -r1.260 -r1.261 src/sys/sys/systm.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/init_sysctl.c
diff -u src/sys/kern/init_sysctl.c:1.201 src/sys/kern/init_sysctl.c:1.202
--- src/sys/kern/init_sysctl.c:1.201	Tue Feb 25 13:30:11 2014
+++ src/sys/kern/init_sysctl.c	Mon Mar 24 16:07:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl.c,v 1.201 2014/02/25 18:30:11 pooka Exp $ */
+/*	$NetBSD: init_sysctl.c,v 1.202 2014/03/24 20:07:41 christos Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.201 2014/02/25 18:30:11 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.202 2014/03/24 20:07:41 christos Exp $);
 
 #include opt_sysv.h
 #include opt_compat_netbsd.h
@@ -635,6 +635,7 @@ SYSCTL_SETUP(sysctl_hw_setup, sysctl hw
 {
 	u_int u;
 	u_quad_t q;
+	const char *model = cpu_getmodel();
 
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT,
@@ -646,7 +647,7 @@ SYSCTL_SETUP(sysctl_hw_setup, sysctl hw
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_STRING, model,
 		   SYSCTL_DESCR(Machine model),
-		   NULL, 0, cpu_model, 0,
+		   NULL, 0, __UNCONST(model), 0,
 		   CTL_HW, HW_MODEL, CTL_EOL);
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT,

Index: src/sys/kern/kern_cpu.c
diff -u src/sys/kern/kern_cpu.c:1.63 src/sys/kern/kern_cpu.c:1.64
--- src/sys/kern/kern_cpu.c:1.63	Sun Mar 16 01:20:30 2014
+++ src/sys/kern/kern_cpu.c	Mon Mar 24 16:07:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_cpu.c,v 1.63 2014/03/16 05:20:30 dholland Exp $	*/
+/*	$NetBSD: kern_cpu.c,v 1.64 2014/03/24 20:07:41 christos 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.63 2014/03/16 05:20:30 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.64 2014/03/24 20:07:41 christos Exp $);
 
 #include opt_cpu_ucode.h
 #include opt_compat_netbsd.h
@@ -127,6 +127,9 @@ struct cpu_info **cpu_infos		__read_most
 kcpuset_t *	kcpuset_attached	__read_mostly	= NULL;
 kcpuset_t *	kcpuset_running		__read_mostly	= NULL;
 
+
+static char cpu_model[128];
+
 /*
  * mi_cpu_init: early initialisation of MI CPU related structures.
  *
@@ -475,6 +478,24 @@ cpu_setstate(struct cpu_info *ci, bool o
 	return 0;
 }
 
+int
+cpu_setmodel(const char *fmt, ...)
+{
+	int len;
+	va_list ap;
+
+	va_start(ap, fmt);
+	len = snprintf(cpu_model, sizeof(cpu_model), fmt, ap);
+	va_end(ap);
+	return len;
+}
+
+const char *
+cpu_getmodel(void)
+{
+	return cpu_model;
+}
+
 #ifdef __HAVE_INTR_CONTROL
 static void
 cpu_xc_intr(struct cpu_info *ci)

Index: src/sys/sys/cpu.h
diff -u src/sys/sys/cpu.h:1.39 src/sys/sys/cpu.h:1.40
--- src/sys/sys/cpu.h:1.39	Sun Nov 24 22:06:08 2013
+++ src/sys/sys/cpu.h	Mon Mar 24 16:07:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.39 2013/11/25 03:06:08 christos Exp $	*/
+/*	$NetBSD: cpu.h,v 1.40 2014/03/24 20:07:40 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007 YAMAMOTO Takashi,
@@ -79,6 +79,8 @@ void	cpu_offline_md(void);
 
 struct lwp *cpu_switchto(struct lwp *, struct lwp *, bool);
 struct	cpu_info *cpu_lookup(u_int);
+int	cpu_setmodel(const char *fmt, ...)	__printflike(1, 2);
+const char *cpu_getmodel(void);
 int	cpu_setstate(struct cpu_info *, bool);
 int	cpu_setintr(struct cpu_info *, bool);
 bool	cpu_intr_p(void);

Index: src/sys/sys/systm.h
diff -u src/sys/sys/systm.h:1.260 src/sys/sys/systm.h:1.261
--- src/sys/sys/systm.h:1.260	Sat Feb  1 04:04:57 2014
+++ src/sys/sys/systm.h	Mon Mar 24 16:07:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: systm.h,v 1.260 2014/02/01 09:04:57 matt Exp $	*/
+/*	$NetBSD: systm.h,v 1.261 2014/03/24 20:07:40 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -67,7 +67,6 @@ extern const char *panicstr;	/* panic me
 extern int doing_shutdown;	/* shutting down */
 
 extern const char copyright[];	/* system copyright */
-extern char cpu_model[];	/* machine/cpu model name */
 extern char machine[];		/* machine type */
 extern char machine_arch[];	/* machine architecture */
 extern const char osrelease[];	/* short system version */



CVS commit: src/sys/compat/common

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 20:08:08 UTC 2014

Modified Files:
src/sys/compat/common: kern_info_43.c

Log Message:
use cpu_getmodel() to get the model name


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/compat/common/kern_info_43.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/compat/common/kern_info_43.c
diff -u src/sys/compat/common/kern_info_43.c:1.34 src/sys/compat/common/kern_info_43.c:1.35
--- src/sys/compat/common/kern_info_43.c:1.34	Sat Jan 10 21:45:46 2009
+++ src/sys/compat/common/kern_info_43.c	Mon Mar 24 16:08:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_info_43.c,v 1.34 2009/01/11 02:45:46 christos Exp $	*/
+/*	$NetBSD: kern_info_43.c,v 1.35 2014/03/24 20:08:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1991, 1993
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_info_43.c,v 1.34 2009/01/11 02:45:46 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_info_43.c,v 1.35 2014/03/24 20:08:08 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -50,6 +50,7 @@ __KERNEL_RCSID(0, $NetBSD: kern_info_43
 #include sys/unistd.h
 #include sys/resourcevar.h
 #include sys/kauth.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 #include sys/sysctl.h
@@ -220,6 +221,7 @@ compat_43_sys_getkerninfo(struct lwp *l,
 			(struct bsdi_si *) SCARG(uap, where);
 			struct bsdi_si ksi;
 			struct timeval tv;
+			const char *cpu_model = cpu_getmodel();
 			char *us = (char *) usi[1];
 
 			if (usi == NULL) {



CVS commit: src/sys/modules/luasystm

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 20:21:02 UTC 2014

Modified Files:
src/sys/modules/luasystm: luasystm.c

Log Message:
use cpu_getmodel()


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/luasystm/luasystm.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/modules/luasystm/luasystm.c
diff -u src/sys/modules/luasystm/luasystm.c:1.1 src/sys/modules/luasystm/luasystm.c:1.2
--- src/sys/modules/luasystm/luasystm.c:1.1	Mon Dec 16 19:02:22 2013
+++ src/sys/modules/luasystm/luasystm.c	Mon Mar 24 16:21:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: luasystm.c,v 1.1 2013/12/17 00:02:22 lneto Exp $ */
+/*	$NetBSD: luasystm.c,v 1.2 2014/03/24 20:21:02 christos Exp $ */
 
 /*
  * Copyright (c) 2011, 2013 Marc Balmer mbal...@netbsd.org.
@@ -33,6 +33,7 @@
 #include sys/param.h
 #include sys/lua.h
 #include sys/callout.h
+#include sys/cpu.h
 #ifdef _MODULE
 #include sys/module.h
 #endif
@@ -187,7 +188,7 @@ luaopen_systm(void *ls)
 	/* some string values */
 	lua_pushstring(L, copyright);
 	lua_setfield(L, -2, copyright);
-	lua_pushstring(L, cpu_model);
+	lua_pushstring(L, cpu_getmodel());
 	lua_setfield(L, -2, cpu_model);
 	lua_pushstring(L, machine);
 	lua_setfield(L, -2, machine);



CVS commit: src

2014-03-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Mar 24 21:25:03 UTC 2014

Modified Files:
src/share/mk: bsd.own.mk
src/sys/lib/libunwind: Registers.hpp libunwind.cxx unwind_registers.S

Log Message:
Add m68k support to our unwinder.


To generate a diff of this commit:
cvs rdiff -u -r1.790 -r1.791 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libunwind/Registers.hpp \
src/sys/lib/libunwind/libunwind.cxx \
src/sys/lib/libunwind/unwind_registers.S

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.790 src/share/mk/bsd.own.mk:1.791
--- src/share/mk/bsd.own.mk:1.790	Tue Mar 18 13:10:27 2014
+++ src/share/mk/bsd.own.mk	Mon Mar 24 21:25:03 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.790 2014/03/18 13:10:27 joerg Exp $
+#	$NetBSD: bsd.own.mk,v 1.791 2014/03/24 21:25:03 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -99,6 +99,7 @@ HAVE_LIBGCC?=	yes
 .endif
 
 _LIBC_UNWIND_SUPPORT.i386=	yes
+_LIBC_UNWIND_SUPPORT.m68k=	yes
 _LIBC_UNWIND_SUPPORT.powerpc=	yes
 _LIBC_UNWIND_SUPPORT.vax=	yes
 _LIBC_UNWIND_SUPPORT.x86_64=	yes

Index: src/sys/lib/libunwind/Registers.hpp
diff -u src/sys/lib/libunwind/Registers.hpp:1.5 src/sys/lib/libunwind/Registers.hpp:1.6
--- src/sys/lib/libunwind/Registers.hpp:1.5	Tue Mar 18 13:08:15 2014
+++ src/sys/lib/libunwind/Registers.hpp	Mon Mar 24 21:25:03 2014
@@ -372,6 +372,75 @@ private:
   uint32_t reg[REGNO_VAX_PSW + 1];
 };
 
+enum {
+  DWARF_M68K_A0 = 0,
+  DWARF_M68K_A7 = 7,
+  DWARF_M68K_D0 = 8,
+  DWARF_M68K_D7 = 15,
+  DWARF_M68K_PC = 24,
+
+  REGNO_M68K_A0 = 0,
+  REGNO_M68K_A7 = 7,
+  REGNO_M68K_D0 = 8,
+  REGNO_M68K_D7 = 15,
+  REGNO_M68K_PC = 16,
+};
+
+class Registers_M68K {
+public:
+  enum {
+LAST_REGISTER = REGNO_M68K_PC,
+LAST_RESTORE_REG = REGNO_M68K_PC,
+RETURN_REG = REGNO_M68K_PC,
+  };
+
+  __dso_hidden Registers_M68K();
+
+  static int dwarf2regno(int num) {
+if (num = DWARF_M68K_A0  num = DWARF_M68K_A7)
+  return REGNO_M68K_A0 + (num - DWARF_M68K_A0);
+if (num = DWARF_M68K_D0  num = DWARF_M68K_D7)
+  return REGNO_M68K_D0 + (num - DWARF_M68K_D0);
+if (num == DWARF_M68K_PC)
+  return REGNO_M68K_PC;
+return LAST_REGISTER + 1;
+  }
+
+  bool validRegister(int num) const {
+return num = 0  num = LAST_RESTORE_REG;
+  }
+
+  uint64_t getRegister(int num) const {
+assert(validRegister(num));
+return reg[num];
+  }
+
+  void setRegister(int num, uint64_t value) {
+assert(validRegister(num));
+reg[num] = value;
+  }
+
+  uint64_t getIP() const { return reg[REGNO_M68K_PC]; }
+
+  void setIP(uint64_t value) { reg[REGNO_M68K_PC] = value; }
+
+  uint64_t getSP() const { return reg[REGNO_M68K_A7]; }
+
+  void setSP(uint64_t value) { reg[REGNO_M68K_A7] = value; }
+
+  bool validFloatVectorRegister(int num) const {
+return false;
+  }
+
+  void copyFloatVectorRegister(int num, uint64_t addr_) {
+  }
+
+  __dso_hidden void jumpto() const __dead;
+
+private:
+  uint32_t reg[REGNO_M68K_PC + 1];
+};
+
 } // namespace _Unwind
 
 #endif // __REGISTERS_HPP__
Index: src/sys/lib/libunwind/libunwind.cxx
diff -u src/sys/lib/libunwind/libunwind.cxx:1.5 src/sys/lib/libunwind/libunwind.cxx:1.6
--- src/sys/lib/libunwind/libunwind.cxx:1.5	Thu Mar 20 01:35:45 2014
+++ src/sys/lib/libunwind/libunwind.cxx	Mon Mar 24 21:25:03 2014
@@ -27,6 +27,8 @@ typedef Registers_ppc32 ThisUnwindRegist
 typedef Registers_arm32 ThisUnwindRegisters;
 #elif __vax__
 typedef Registers_vax ThisUnwindRegisters;
+#elif __m68k__
+typedef Registers_M68K ThisUnwindRegisters;
 #else
 #error Unsupported architecture
 #endif
Index: src/sys/lib/libunwind/unwind_registers.S
diff -u src/sys/lib/libunwind/unwind_registers.S:1.5 src/sys/lib/libunwind/unwind_registers.S:1.6
--- src/sys/lib/libunwind/unwind_registers.S:1.5	Wed Mar 19 21:15:45 2014
+++ src/sys/lib/libunwind/unwind_registers.S	Mon Mar 24 21:25:03 2014
@@ -339,6 +339,26 @@ ENTRY(_ZNK7_Unwind13Registers_vax6jumpto
 	movl	0(%r0), %r0
 	/* XXX restore PSW */
 	rsb
-
 END(_ZNK7_Unwind13Registers_vax6jumptoEv)
 #endif
+
+#if defined(__m68k__)
+ENTRY(_ZN7_Unwind14Registers_M68KC1Ev)
+	move.l	4(%sp), %a0
+	movem.l	%d0-%d7/%a0-%a7, (%a0)
+	move.l	0(%sp), %a1
+	move.l	%a1, 64(%a0)
+	addq.l	#4, 60(%a0)
+	rts
+END(_ZN7_Unwind14Registers_M68KC1Ev)
+
+ENTRY(_ZNK7_Unwind14Registers_M68K6jumptoEv)
+	move.l	4(%sp), %a0
+	subq.l	#4, 60(%a0)
+	move.l	64(%a0), %a1
+	move.l	60(%a0), %a2
+	move.l	%a1, (%a2)
+	movem.l	(%a0), %d0-%d7/%a0-%a7
+	rts
+END(_ZNK7_Unwind14Registers_M68K6jumptoEv)
+#endif



CVS commit: src

2014-03-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Mar 24 21:26:01 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/gcc/ginclude: unwind-arm-common.h
src/external/gpl3/gcc/dist/libgcc: unwind-compat.c unwind-dw2.c
unwind-generic.h unwind-seh.c unwind-sjlj.c
src/external/gpl3/gcc/dist/libgcc/config/arm: pr-support.c
src/external/gpl3/gcc/dist/libgcc/config/c6x: pr-support.c
src/external/gpl3/gcc/dist/libgcc/config/cr16: unwind-cr16.c
src/external/gpl3/gcc/dist/libgcc/config/ia64: unwind-ia64.c
src/external/gpl3/gcc/dist/libgcc/config/xtensa: unwind-dw2-xtensa.c
src/lib/libexecinfo: unwind.c unwind.h

Log Message:
_Unwind_GetLanguageSpecificData is supposed to return a _Unwind_Ptr.
This makes a difference on M68K as it uses a different register for
integer vs pointer values.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/gcc/ginclude/unwind-arm-common.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libgcc/unwind-compat.c \
src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c \
src/external/gpl3/gcc/dist/libgcc/unwind-generic.h \
src/external/gpl3/gcc/dist/libgcc/unwind-sjlj.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/gpl3/gcc/dist/libgcc/unwind-seh.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libgcc/config/arm/pr-support.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libgcc/config/c6x/pr-support.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libgcc/config/cr16/unwind-cr16.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libgcc/config/ia64/unwind-ia64.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libgcc/config/xtensa/unwind-dw2-xtensa.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libexecinfo/unwind.c \
src/lib/libexecinfo/unwind.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/ginclude/unwind-arm-common.h
diff -u src/external/gpl3/gcc/dist/gcc/ginclude/unwind-arm-common.h:1.1.1.1 src/external/gpl3/gcc/dist/gcc/ginclude/unwind-arm-common.h:1.2
--- src/external/gpl3/gcc/dist/gcc/ginclude/unwind-arm-common.h:1.1.1.1	Sat Mar  1 08:43:02 2014
+++ src/external/gpl3/gcc/dist/gcc/ginclude/unwind-arm-common.h	Mon Mar 24 21:26:01 2014
@@ -183,7 +183,7 @@ extern C {
 #define _Unwind_Exception _Unwind_Control_Block
   typedef char _Unwind_Exception_Class[8];
 
-  void * _Unwind_GetLanguageSpecificData (_Unwind_Context *);
+  _Unwind_Ptr _Unwind_GetLanguageSpecificData (_Unwind_Context *);
   _Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *);
 
   _Unwind_Ptr _Unwind_GetDataRelBase (_Unwind_Context *);
@@ -234,7 +234,7 @@ extern C {
 }
 
   _Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *);
-  void * _Unwind_GetLanguageSpecificData (_Unwind_Context *);
+  _Unwind_Ptr _Unwind_GetLanguageSpecificData (_Unwind_Context *);
 
 /* leb128 type numbers have a potentially unlimited size.
The target of the following definitions of _sleb128_t and _uleb128_t

Index: src/external/gpl3/gcc/dist/libgcc/unwind-compat.c
diff -u src/external/gpl3/gcc/dist/libgcc/unwind-compat.c:1.1.1.1 src/external/gpl3/gcc/dist/libgcc/unwind-compat.c:1.2
--- src/external/gpl3/gcc/dist/libgcc/unwind-compat.c:1.1.1.1	Sat Mar  1 08:41:45 2014
+++ src/external/gpl3/gcc/dist/libgcc/unwind-compat.c	Mon Mar 24 21:26:01 2014
@@ -137,10 +137,10 @@ _Unwind_GetIPInfo (struct _Unwind_Contex
   return __libunwind_Unwind_GetIP (context);
 }
 
-extern void *__libunwind_Unwind_GetLanguageSpecificData
+extern _Unwind_Ptr __libunwind_Unwind_GetLanguageSpecificData
   (struct _Unwind_Context *);
 
-void *
+_Unwind_Ptr
 _Unwind_GetLanguageSpecificData (struct _Unwind_Context *context)
 {
   return __libunwind_Unwind_GetLanguageSpecificData (context);
Index: src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c
diff -u src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c:1.1.1.1 src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c:1.2
--- src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c:1.1.1.1	Sat Mar  1 08:41:45 2014
+++ src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c	Mon Mar 24 21:26:01 2014
@@ -365,7 +365,7 @@ _Unwind_SetIP (struct _Unwind_Context *c
   context-ra = (void *) val;
 }
 
-void *
+_Unwind_Ptr
 _Unwind_GetLanguageSpecificData (struct _Unwind_Context *context)
 {
   return context-lsda;
Index: src/external/gpl3/gcc/dist/libgcc/unwind-generic.h
diff -u src/external/gpl3/gcc/dist/libgcc/unwind-generic.h:1.1.1.1 src/external/gpl3/gcc/dist/libgcc/unwind-generic.h:1.2
--- src/external/gpl3/gcc/dist/libgcc/unwind-generic.h:1.1.1.1	Sat Mar  1 08:41:45 2014
+++ src/external/gpl3/gcc/dist/libgcc/unwind-generic.h	Mon Mar 24 21:26:01 2014
@@ -177,7 +177,7 @@ extern void _Unwind_SetIP (struct _Unwin
 /* @@@ Retrieve the CFA of the given context.  */
 extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
 

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

2014-03-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Mar 24 22:39:06 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/libgcc: unwind-dw2.c

Log Message:
Cast context-ldsa to the correct return type.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c

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

Modified files:

Index: src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c
diff -u src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c:1.2 src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c:1.3
--- src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c:1.2	Mon Mar 24 21:26:01 2014
+++ src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c	Mon Mar 24 22:39:06 2014
@@ -368,7 +368,7 @@ _Unwind_SetIP (struct _Unwind_Context *c
 _Unwind_Ptr
 _Unwind_GetLanguageSpecificData (struct _Unwind_Context *context)
 {
-  return context-lsda;
+  return (_Unwind_Ptr) context-lsda;
 }
 
 _Unwind_Ptr



CVS commit: src/gnu/usr.bin/texinfo/makeinfo

2014-03-24 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Mon Mar 24 23:03:02 UTC 2014

Modified Files:
src/gnu/usr.bin/texinfo/makeinfo: Makefile

Log Message:
Don't compile with fortification. It breaks makeinfo(1) for certain
input files (e.g. cl.texi shipped with Emacs 23.4) if it is compiled
with GCC 4.8.3 and USE_SSP set to yes.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/gnu/usr.bin/texinfo/makeinfo/Makefile

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

Modified files:

Index: src/gnu/usr.bin/texinfo/makeinfo/Makefile
diff -u src/gnu/usr.bin/texinfo/makeinfo/Makefile:1.7 src/gnu/usr.bin/texinfo/makeinfo/Makefile:1.8
--- src/gnu/usr.bin/texinfo/makeinfo/Makefile:1.7	Thu May 26 12:56:29 2011
+++ src/gnu/usr.bin/texinfo/makeinfo/Makefile	Mon Mar 24 23:03:01 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2011/05/26 12:56:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.8 2014/03/24 23:03:01 tron Exp $
 
 PROG=		makeinfo
 SRCS=		cmds.c defun.c files.c float.c footnote.c \
@@ -12,4 +12,6 @@ WARNS?=		0	# pointer sign issues
 
 .include bsd.prog.mk
 
+CPPFLAGS:=	${CPPFLAGS:S/-D_FORTIFY_SOURCE=2//}
+
 .PATH: ${IDIST}/makeinfo ${IDIST}/doc



CVS commit: src/doc

2014-03-24 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Mon Mar 24 23:03:21 UTC 2014

Modified Files:
src/doc: HACKS

Log Message:
Document makeinfo(1) hack.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/doc/HACKS

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

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.143 src/doc/HACKS:1.144
--- src/doc/HACKS:1.143	Sat Nov 16 17:14:06 2013
+++ src/doc/HACKS	Mon Mar 24 23:03:21 2014
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.143 2013/11/16 17:14:06 skrll Exp $
+# $NetBSD: HACKS,v 1.144 2014/03/24 23:03:21 tron Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -343,6 +343,17 @@ descr
 	sections
 kcah
 
+hack	Disable fortification for /usr/bin/makeinfo
+cdata	24 Mar 2014
+who	tron
+file	src/gnu/usr.bin/texinfo/makeinfo/Makefile	: 1.8
+pr	N/A
+descr
+	If makeinfo is compiled with -D_FORTIFY_SOURCE=2 using GCC 4.8.3
+	it fails to process certain texinfo files, e.g. cl.texi
+	included in the Emacs 24.3 distribution.
+kcah
+
 port	vax
 
 	hack	gcc4/vax ICE



CVS commit: src/sys/lib/libunwind

2014-03-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 25 00:00:55 UTC 2014

Modified Files:
src/sys/lib/libunwind: Registers.hpp unwind_registers.S

Log Message:
Save  restore FP registers.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/lib/libunwind/Registers.hpp \
src/sys/lib/libunwind/unwind_registers.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/lib/libunwind/Registers.hpp
diff -u src/sys/lib/libunwind/Registers.hpp:1.6 src/sys/lib/libunwind/Registers.hpp:1.7
--- src/sys/lib/libunwind/Registers.hpp:1.6	Mon Mar 24 21:25:03 2014
+++ src/sys/lib/libunwind/Registers.hpp	Tue Mar 25 00:00:55 2014
@@ -377,6 +377,8 @@ enum {
   DWARF_M68K_A7 = 7,
   DWARF_M68K_D0 = 8,
   DWARF_M68K_D7 = 15,
+  DWARF_M68K_FP0 = 16,
+  DWARF_M68K_FP7 = 23,
   DWARF_M68K_PC = 24,
 
   REGNO_M68K_A0 = 0,
@@ -384,13 +386,15 @@ enum {
   REGNO_M68K_D0 = 8,
   REGNO_M68K_D7 = 15,
   REGNO_M68K_PC = 16,
+  REGNO_M68K_FP0 = 17,
+  REGNO_M68K_FP7 = 24,
 };
 
 class Registers_M68K {
 public:
   enum {
-LAST_REGISTER = REGNO_M68K_PC,
-LAST_RESTORE_REG = REGNO_M68K_PC,
+LAST_REGISTER = REGNO_M68K_FP7,
+LAST_RESTORE_REG = REGNO_M68K_FP7,
 RETURN_REG = REGNO_M68K_PC,
   };
 
@@ -401,13 +405,15 @@ public:
   return REGNO_M68K_A0 + (num - DWARF_M68K_A0);
 if (num = DWARF_M68K_D0  num = DWARF_M68K_D7)
   return REGNO_M68K_D0 + (num - DWARF_M68K_D0);
+if (num = DWARF_M68K_FP0  num = DWARF_M68K_FP7)
+  return REGNO_M68K_FP0 + (num - DWARF_M68K_FP0);
 if (num == DWARF_M68K_PC)
   return REGNO_M68K_PC;
 return LAST_REGISTER + 1;
   }
 
   bool validRegister(int num) const {
-return num = 0  num = LAST_RESTORE_REG;
+return num = 0  num = REGNO_M68K_PC;
   }
 
   uint64_t getRegister(int num) const {
@@ -429,16 +435,23 @@ public:
   void setSP(uint64_t value) { reg[REGNO_M68K_A7] = value; }
 
   bool validFloatVectorRegister(int num) const {
-return false;
+return num = REGNO_M68K_FP0  num = REGNO_M68K_FP7;
   }
 
   void copyFloatVectorRegister(int num, uint64_t addr_) {
+assert(validFloatVectorRegister(num));
+const void *addr = reinterpret_castconst void *(addr_);
+memcpy(fpreg + (num - REGNO_M68K_FP0), addr, sizeof(fpreg[0]));
   }
 
   __dso_hidden void jumpto() const __dead;
 
 private:
+  typedef uint32_t fpreg_t[3];
+
   uint32_t reg[REGNO_M68K_PC + 1];
+  uint32_t dummy;
+  fpreg_t fpreg[8];
 };
 
 } // namespace _Unwind
Index: src/sys/lib/libunwind/unwind_registers.S
diff -u src/sys/lib/libunwind/unwind_registers.S:1.6 src/sys/lib/libunwind/unwind_registers.S:1.7
--- src/sys/lib/libunwind/unwind_registers.S:1.6	Mon Mar 24 21:25:03 2014
+++ src/sys/lib/libunwind/unwind_registers.S	Tue Mar 25 00:00:55 2014
@@ -346,6 +346,7 @@ END(_ZNK7_Unwind13Registers_vax6jumptoEv
 ENTRY(_ZN7_Unwind14Registers_M68KC1Ev)
 	move.l	4(%sp), %a0
 	movem.l	%d0-%d7/%a0-%a7, (%a0)
+	fmovem	%fp0-%fp7, 72(%a0)
 	move.l	0(%sp), %a1
 	move.l	%a1, 64(%a0)
 	addq.l	#4, 60(%a0)
@@ -358,6 +359,7 @@ ENTRY(_ZNK7_Unwind14Registers_M68K6jumpt
 	move.l	64(%a0), %a1
 	move.l	60(%a0), %a2
 	move.l	%a1, (%a2)
+	fmovem	72(%a0), %fp0-%fp7
 	movem.l	(%a0), %d0-%d7/%a0-%a7
 	rts
 END(_ZNK7_Unwind14Registers_M68K6jumptoEv)



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

2014-03-24 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Mar 25 00:50:46 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/libgcc/config/arm: pr-support.c
src/external/gpl3/gcc/dist/libgcc/config/c6x: pr-support.c

Log Message:
Cast ptr to the correct return type (_Unwind_Ptr)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/dist/libgcc/config/arm/pr-support.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/dist/libgcc/config/c6x/pr-support.c

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

Modified files:

Index: src/external/gpl3/gcc/dist/libgcc/config/arm/pr-support.c
diff -u src/external/gpl3/gcc/dist/libgcc/config/arm/pr-support.c:1.2 src/external/gpl3/gcc/dist/libgcc/config/arm/pr-support.c:1.3
--- src/external/gpl3/gcc/dist/libgcc/config/arm/pr-support.c:1.2	Mon Mar 24 21:26:01 2014
+++ src/external/gpl3/gcc/dist/libgcc/config/arm/pr-support.c	Tue Mar 25 00:50:45 2014
@@ -366,7 +366,7 @@ _Unwind_GetLanguageSpecificData (_Unwind
   /* Skip the unwind opcodes.  */
   ptr += (((*ptr)  24)  0xff) + 1;
 
-  return ptr;
+  return (_Unwind_Ptr) ptr;
 }
 
 

Index: src/external/gpl3/gcc/dist/libgcc/config/c6x/pr-support.c
diff -u src/external/gpl3/gcc/dist/libgcc/config/c6x/pr-support.c:1.2 src/external/gpl3/gcc/dist/libgcc/config/c6x/pr-support.c:1.3
--- src/external/gpl3/gcc/dist/libgcc/config/c6x/pr-support.c:1.2	Mon Mar 24 21:26:01 2014
+++ src/external/gpl3/gcc/dist/libgcc/config/c6x/pr-support.c	Tue Mar 25 00:50:45 2014
@@ -531,5 +531,5 @@ _Unwind_GetLanguageSpecificData (_Unwind
   /* Skip the unwind opcodes.  */
   ptr += (((*ptr)  24)  0xff) + 1;
 
-  return ptr;
+  return (_Unwind_Ptr) ptr;
 }