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

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 24 05:25:26 UTC 2009

Modified Files:
src/lib/libc/arch/mips/sys [matt-nb5-mips64]: cerror.S

Log Message:
Fix an O32'ism.  Store the error into the S0 slot, not the arguments array
above us (since that doesn't always exist in NewABI).


To generate a diff of this commit:
cvs rdiff -u -r1.13.46.2 -r1.13.46.3 src/lib/libc/arch/mips/sys/cerror.S

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

Modified files:

Index: src/lib/libc/arch/mips/sys/cerror.S
diff -u src/lib/libc/arch/mips/sys/cerror.S:1.13.46.2 src/lib/libc/arch/mips/sys/cerror.S:1.13.46.3
--- src/lib/libc/arch/mips/sys/cerror.S:1.13.46.2	Tue Aug 18 06:56:52 2009
+++ src/lib/libc/arch/mips/sys/cerror.S	Mon Aug 24 05:25:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cerror.S,v 1.13.46.2 2009/08/18 06:56:52 matt Exp $	*/
+/*	$NetBSD: cerror.S,v 1.13.46.3 2009/08/24 05:25:25 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
 #if 0
 	RCSID("from: @(#)cerror.s	8.1 (Berkeley) 6/16/93")
 #else
-	RCSID("$NetBSD: cerror.S,v 1.13.46.2 2009/08/18 06:56:52 matt Exp $")
+	RCSID("$NetBSD: cerror.S,v 1.13.46.3 2009/08/24 05:25:25 matt Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -49,14 +49,14 @@
 	PIC_PROLOGUE(__cerror)
 	PTR_SUBU	sp, sp, CALLFRAME_SIZ
 	PTR_S		ra, CALLFRAME_RA(sp)
-	INT_S		v0, 3*SZREG(sp)		# save errno value
+	INT_S		v0, CALLFRAME_S0(sp)	# save errno value
 
 	SAVE_GP(CALLFRAME_GP)
 
 	la		t9, _C_LABEL(__errno)	# locate address of errno
 	jalr		t9
 
-	INT_L		t0, 3*SZREG(sp)
+	INT_L		t0, CALLFRAME_S0(sp)
 	PTR_L		ra, CALLFRAME_RA(sp)
 	INT_S		t0, 0(v0)		# update errno value
 	PTR_ADDU	sp, sp, CALLFRAME_SIZ



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

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 24 05:18:03 UTC 2009

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mipsX_subr.S

Log Message:
Don't bother saving/restore t0-t3/ta0-ta3 in the trapframe.  Instead use
the just saved s0-s7 to hold them.  any function we call will preserve
them and we just do moves on the way back.


To generate a diff of this commit:
cvs rdiff -u -r1.26.36.1.2.2 -r1.26.36.1.2.3 \
src/sys/arch/mips/mips/mipsX_subr.S

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

Modified files:

Index: src/sys/arch/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.2 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.3
--- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.2	Mon Aug 24 04:04:53 2009
+++ src/sys/arch/mips/mips/mipsX_subr.S	Mon Aug 24 05:18:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.2 2009/08/24 04:04:53 matt Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.3 2009/08/24 05:18:03 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -861,15 +861,6 @@
 	REG_S	a3, FRAME_A3(k1)
 	PTR_L	a0, CPUVAR(CURLWP)		# 1st arg is curlwp
 	mfhi	v1
-	REG_S	t0, FRAME_T0(k1)		# no need to save temp regs
-	REG_S	t1, FRAME_T1(k1)
-	REG_S	t2, FRAME_T2(k1)
-	REG_S	t3, FRAME_T3(k1)
-	mfc0	a1, MIPS_COP_0_STATUS		# 2nd arg is STATUS
-	REG_S	ta0, FRAME_TA0(k1)
-	REG_S	ta1, FRAME_TA1(k1)
-	REG_S	ta2, FRAME_TA2(k1)
-	REG_S	ta3, FRAME_TA3(k1)
 	mfc0	a2, MIPS_COP_0_CAUSE		# 3rd arg is CAUSE
 	REG_S	s0, FRAME_S0(k1)
 	REG_S	s1, FRAME_S1(k1)
@@ -880,6 +871,15 @@
 	REG_S	s5, FRAME_S5(k1)
 	REG_S	s6, FRAME_S6(k1)
 	REG_S	s7, FRAME_S7(k1)
+	move	s0, t0# since the saved registers
+	move	s1, t1# saved been saved we can
+	move	s2, t2# use them to stash most of
+	move	s3, t3# temporary registers
+	mfc0	a1, MIPS_COP_0_STATUS		# 2nd arg is STATUS
+	move	s4, ta0
+	move	s5, ta1
+	move	s6, ta2
+	move	s7, ta3
 	#REG_S	t8, FRAME_T8(k1)
 	#REG_S	t9, FRAME_T9(k1)
 	REG_S	gp, FRAME_GP(k1)
@@ -978,14 +978,14 @@
 	REG_L	a1, FRAME_A1(k1)
 	REG_L	a2, FRAME_A2(k1)
 	REG_L	a3, FRAME_A3(k1)
-	REG_L	t0, FRAME_T0(k1)
-	REG_L	t1, FRAME_T1(k1)
-	REG_L	t2, FRAME_T2(k1)
-	REG_L	t3, FRAME_T3(k1)
-	REG_L	ta0, FRAME_TA0(k1)
-	REG_L	ta1, FRAME_TA1(k1)
-	REG_L	ta2, FRAME_TA2(k1)
-	REG_L	ta3, FRAME_TA3(k1)
+	move	t0, s0			# restore the temps
+	move	t1, s1
+	move	t2, s2
+	move	t3, s3
+	move	ta0, s4
+	move	ta1, s5
+	move	ta2, s6
+	move	ta3, s7
 	REG_L	s0, FRAME_S0(k1)
 	REG_L	s1, FRAME_S1(k1)
 	REG_L	s2, FRAME_S2(k1)



CVS commit: [matt-nb5-mips64] src/distrib/evbmips

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 24 04:37:11 UTC 2009

Modified Files:
src/distrib/evbmips [matt-nb5-mips64]: Makefile

Log Message:
Build install kernels on all machine archs


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.26.1 src/distrib/evbmips/Makefile

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

Modified files:

Index: src/distrib/evbmips/Makefile
diff -u src/distrib/evbmips/Makefile:1.4 src/distrib/evbmips/Makefile:1.4.26.1
--- src/distrib/evbmips/Makefile:1.4	Wed Mar  7 19:42:02 2007
+++ src/distrib/evbmips/Makefile	Mon Aug 24 04:37:10 2009
@@ -1,12 +1,10 @@
-#	$NetBSD: Makefile,v 1.4 2007/03/07 19:42:02 bouyer Exp $
+#	$NetBSD: Makefile,v 1.4.26.1 2009/08/24 04:37:10 matt Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 SUBDIR=		cdroms
-.if ${MACHINE_ARCH} == "mipsel"
 SUBDIR+=	instkernel
-.endif
 TARGETS+=	release
 
 iso_image:



CVS commit: [matt-nb5-mips64] src

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 24 04:05:56 UTC 2009

Modified Files:
src/sys/miscfs/procfs [matt-nb5-mips64]: procfs_map.c
src/usr.bin/pmap [matt-nb5-mips64]: pmap.c pmap.h

Log Message:
Fix some vaddr_t/vaddr_t type droppings.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.36.12.1 src/sys/miscfs/procfs/procfs_map.c
cvs rdiff -u -r1.41 -r1.41.10.1 src/usr.bin/pmap/pmap.c
cvs rdiff -u -r1.7 -r1.7.12.1 src/usr.bin/pmap/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/miscfs/procfs/procfs_map.c
diff -u src/sys/miscfs/procfs/procfs_map.c:1.36 src/sys/miscfs/procfs/procfs_map.c:1.36.12.1
--- src/sys/miscfs/procfs/procfs_map.c:1.36	Fri Jul 25 18:36:50 2008
+++ src/sys/miscfs/procfs/procfs_map.c	Mon Aug 24 04:05:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_map.c,v 1.36 2008/07/25 18:36:50 christos Exp $	*/
+/*	$NetBSD: procfs_map.c,v 1.36.12.1 2009/08/24 04:05:56 matt Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_map.c,v 1.36 2008/07/25 18:36:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_map.c,v 1.36.12.1 2009/08/24 04:05:56 matt Exp $");
 
 #include 
 #include 
@@ -171,19 +171,21 @@
 }
 			}
 			pos += snprintf(buffer + pos, bufsize - pos,
-			"%0*lx-%0*lx %c%c%c%c %0*lx %02x:%02x %ld %s\n",
-			(int)sizeof(void *) * 2,(unsigned long)entry->start,
-			(int)sizeof(void *) * 2,(unsigned long)entry->end,
+			"%0*"PRIxVADDR"-%0*"PRIxVADDR
+			" %c%c%c%c %0*"PRIxVADDR" %02x:%02x %ld %s\n",
+			(int)sizeof(void *) * 2, entry->start,
+			(int)sizeof(void *) * 2, entry->end,
 			(entry->protection & VM_PROT_READ) ? 'r' : '-',
 			(entry->protection & VM_PROT_WRITE) ? 'w' : '-',
 			(entry->protection & VM_PROT_EXECUTE) ? 'x' : '-',
 			(entry->etype & UVM_ET_COPYONWRITE) ? 'p' : 's',
 			(int)sizeof(void *) * 2,
-			(unsigned long)entry->offset,
+			(vsize_t)entry->offset,
 			major(dev), minor(dev), fileid, path);
 		} else {
 			pos += snprintf(buffer + pos, bufsize - pos,
-			"0x%lx 0x%lx %c%c%c %c%c%c %s %s %d %d %d\n",
+			"%#"PRIxVADDR" %#"PRIxVADDR
+			" %c%c%c %c%c%c %s %s %d %d %d\n",
 			entry->start, entry->end,
 			(entry->protection & VM_PROT_READ) ? 'r' : '-',
 			(entry->protection & VM_PROT_WRITE) ? 'w' : '-',

Index: src/usr.bin/pmap/pmap.c
diff -u src/usr.bin/pmap/pmap.c:1.41 src/usr.bin/pmap/pmap.c:1.41.10.1
--- src/usr.bin/pmap/pmap.c:1.41	Mon Apr 28 20:24:14 2008
+++ src/usr.bin/pmap/pmap.c	Mon Aug 24 04:05:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.41 2008/04/28 20:24:14 martin Exp $ */
+/*	$NetBSD: pmap.c,v 1.41.10.1 2009/08/24 04:05:56 matt Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: pmap.c,v 1.41 2008/04/28 20:24:14 martin Exp $");
+__RCSID("$NetBSD: pmap.c,v 1.41.10.1 2009/08/24 04:05:56 matt Exp $");
 #endif
 
 #include 
@@ -136,7 +136,7 @@
 		printf("%*slock = ,", indent(2), "");
 		printf(" header = ,");
 		printf(" nentries = %d,\n", D(vm_map, vm_map)->nentries);
-		printf("%*ssize = %lx,", indent(2), "",
+		printf("%*ssize = %#"PRIxVSIZE",", indent(2), "",
 		   D(vm_map, vm_map)->size);
 		printf(" ref_count = %d,", D(vm_map, vm_map)->ref_count);
 		printf("%*shint = %p,", indent(2), "",
@@ -161,11 +161,11 @@
 	if (print_ddb) {
 		const char *name = mapname(P(vm_map));
 
-		printf("%*s%s %p: [0x%lx->0x%lx]\n", indent(2), "",
+		printf("%*s%s %p: [0x%#"PRIxVADDR"->0x%#"PRIxVADDR"]\n", indent(2), "",
 		   recurse < 2 ? "MAP" : "SUBMAP", P(vm_map),
 		   vm_map_min(D(vm_map, vm_map)),
 		   vm_map_max(D(vm_map, vm_map)));
-		printf("\t%*s#ent=%d, sz=%ld, ref=%d, version=%d, flags=0x%x\n",
+		printf("\t%*s#ent=%d, sz=%"PRIdVSIZE", ref=%d, version=%d, flags=0x%x\n",
 		   indent(2), "", D(vm_map, vm_map)->nentries,
 		   D(vm_map, vm_map)->size, D(vm_map, vm_map)->ref_count,
 		   D(vm_map, vm_map)->timestamp, D(vm_map, vm_map)->flags);
@@ -284,8 +284,8 @@
 		   P(vm_map_entry));
 		printf(" prev = %p,", vme->prev);
 		printf(" next = %p,\n", vme->next);
-		printf("%*sstart = %lx,", indent(2), "", vme->start);
-		printf(" end = %lx,", vme->end);
+		printf("%*sstart = %#"PRIxVADDR",", indent(2), "", vme->start);
+		printf(" end = %#"PRIxVADDR",", vme->end);
 		printf(" object.uvm_obj/sub_map = %p,\n", vme->object.uvm_obj);
 		printf("%*soffset = %" PRIx64 ",", indent(2), "",
 		   vme->offset);
@@ -384,7 +384,7 @@
 	name = findname(kd, vmspace, vm_map_entry, vp, vfs, uvm_obj);
 
 	if (print_map) {
-		printf("%*s0x%lx 0x%lx %c%c%c %c%c%c %s %s %d %d %d",
+		printf("%*s0x%#"PRIxVADDR" 0x%#"PRIxVADDR" %c%c%c %c%c%c %s %s %d %d %d",
 		   indent(2), "",
 		   vme->start, vme->end,
 		   (vme->prot

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

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 24 04:04:53 UTC 2009

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mipsX_subr.S

Log Message:
SyscallCall exception didn't save the temporaries which libc no longer likes.
So now it saves them.


To generate a diff of this commit:
cvs rdiff -u -r1.26.36.1.2.1 -r1.26.36.1.2.2 \
src/sys/arch/mips/mips/mipsX_subr.S

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

Modified files:

Index: src/sys/arch/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.1 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.2
--- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.1	Fri Aug 21 17:50:35 2009
+++ src/sys/arch/mips/mips/mipsX_subr.S	Mon Aug 24 04:04:53 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.1 2009/08/21 17:50:35 matt Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.2 2009/08/24 04:04:53 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -861,15 +861,15 @@
 	REG_S	a3, FRAME_A3(k1)
 	PTR_L	a0, CPUVAR(CURLWP)		# 1st arg is curlwp
 	mfhi	v1
-	#REG_S	t0, FRAME_T0(k1)		# no need to save temp regs
-	#REG_S	t1, FRAME_T1(k1)
-	#REG_S	t2, FRAME_T2(k1)
-	#REG_S	t3, FRAME_T3(k1)
+	REG_S	t0, FRAME_T0(k1)		# no need to save temp regs
+	REG_S	t1, FRAME_T1(k1)
+	REG_S	t2, FRAME_T2(k1)
+	REG_S	t3, FRAME_T3(k1)
 	mfc0	a1, MIPS_COP_0_STATUS		# 2nd arg is STATUS
-	#REG_S	ta0, FRAME_TA0(k1)
-	#REG_S	ta1, FRAME_TA1(k1)
-	#REG_S	ta2, FRAME_TA2(k1)
-	#REG_S	ta3, FRAME_TA3(k1)
+	REG_S	ta0, FRAME_TA0(k1)
+	REG_S	ta1, FRAME_TA1(k1)
+	REG_S	ta2, FRAME_TA2(k1)
+	REG_S	ta3, FRAME_TA3(k1)
 	mfc0	a2, MIPS_COP_0_CAUSE		# 3rd arg is CAUSE
 	REG_S	s0, FRAME_S0(k1)
 	REG_S	s1, FRAME_S1(k1)



CVS commit: [matt-nb5-mips64] src

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 24 04:03:30 UTC 2009

Modified Files:
src/distrib/evbmips/instkernel/instkernel [matt-nb5-mips64]: Makefile
src/etc/etc.evbmips [matt-nb5-mips64]: Makefile.inc
Added Files:
src/sys/arch/evbmips/conf [matt-nb5-mips64]: INSTALL_MALTA
INSTALL_MALTA32 INSTALL_MALTA64

Log Message:
Build INSTALL_MALTA kernels for big and little endian for mips and mips64.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.34.1 \
src/distrib/evbmips/instkernel/instkernel/Makefile
cvs rdiff -u -r1.11 -r1.11.26.1 src/etc/etc.evbmips/Makefile.inc
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/evbmips/conf/INSTALL_MALTA \
src/sys/arch/evbmips/conf/INSTALL_MALTA32 \
src/sys/arch/evbmips/conf/INSTALL_MALTA64

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

Modified files:

Index: src/distrib/evbmips/instkernel/instkernel/Makefile
diff -u src/distrib/evbmips/instkernel/instkernel/Makefile:1.1 src/distrib/evbmips/instkernel/instkernel/Makefile:1.1.34.1
--- src/distrib/evbmips/instkernel/instkernel/Makefile:1.1	Thu Mar 30 15:45:42 2006
+++ src/distrib/evbmips/instkernel/instkernel/Makefile	Mon Aug 24 04:03:30 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2006/03/30 15:45:42 shige Exp $
+#	$NetBSD: Makefile,v 1.1.34.1 2009/08/24 04:03:30 matt Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -9,9 +9,16 @@
 .if ${MACHINE_ARCH} == "mipsel"
 # Little endian platforms.
 MDSETTARGETS=		INSTALL_OMSAL400	${RAMDISK}	-
+MDSETTARGETS+=		INSTALL_MALTA		${RAMDISK}	-
+
+.elif ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
+MDSETTARGETS=		INSTALL_MALTA32		${RAMDISK}	-
+MDSETTARGETS+=		INSTALL_MALTA64		${RAMDISK}	-
+
 .else
 # Big endian platforms.
-MDSETTARGETS=		
+MDSETTARGETS=		INSTALL_MALTA		${RAMDISK}	-
+
 .endif
 MDSET_RELEASEDIR=	installation
 MDSET_SUFFIXES.-=	srec create-srec

Index: src/etc/etc.evbmips/Makefile.inc
diff -u src/etc/etc.evbmips/Makefile.inc:1.11 src/etc/etc.evbmips/Makefile.inc:1.11.26.1
--- src/etc/etc.evbmips/Makefile.inc:1.11	Tue Jul 24 10:49:25 2007
+++ src/etc/etc.evbmips/Makefile.inc	Mon Aug 24 04:03:30 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11 2007/07/24 10:49:25 pavel Exp $
+#	$NetBSD: Makefile.inc,v 1.11.26.1 2009/08/24 04:03:30 matt Exp $
 #
 #	etc.evbmips/Makefile.inc -- evbmips-specific etc Makefile targets
 #
@@ -10,10 +10,15 @@
 
 .if ${MACHINE_ARCH} == "mipsel"
 KERNEL_SETS=		ALCHEMY DBAU1500 DBAU1550 MALTA MTX-1 OMSAL400
-BUILD_KERNELS=		INSTALL_OMSAL400
+BUILD_KERNELS=		INSTALL_OMSAL400 INSTALL_MALTA
+
+.elif ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
+KERNEL_SETS=		MALTA32 MALTA64
+BUILD_KERNELS=		INSTALL_MALTA32 INSTALL_MALTA64
 
 .else
 KERNEL_SETS=		ALCHEMY DBAU1500 DBAU1550 MALTA
+BUILD_KERNELS=		INSTALL_OMSAL400 INSTALL_MALTA
 
 .endif
 

Added files:

Index: src/sys/arch/evbmips/conf/INSTALL_MALTA
diff -u /dev/null src/sys/arch/evbmips/conf/INSTALL_MALTA:1.1.2.1
--- /dev/null	Mon Aug 24 04:03:30 2009
+++ src/sys/arch/evbmips/conf/INSTALL_MALTA	Mon Aug 24 04:03:30 2009
@@ -0,0 +1,14 @@
+# $NetBSD: INSTALL_MALTA,v 1.1.2.1 2009/08/24 04:03:30 matt Exp $
+
+include		"arch/evbmips/conf/MALTA"
+
+#ident 		"INSTALL_MALTA-$Revision: 1.1.2.1 $"
+
+# Enable the hooks used for initializing the root memory-disk.
+# The ramdisk size must be kept in sync manually with the size of
+# the `ramdisk' image (which is built in distrib/evbmips/ramdisk/ramdisk).
+pseudo-device	md# memory disk device
+options 	MEMORY_DISK_HOOKS
+options 	MEMORY_DISK_IS_ROOT		# force root on memory disk
+options 	MEMORY_DISK_SERVER=0		# no userspace memory disk
+options 	MEMORY_DISK_ROOT_SIZE=12288	# size of memory disk, in blocks
Index: src/sys/arch/evbmips/conf/INSTALL_MALTA32
diff -u /dev/null src/sys/arch/evbmips/conf/INSTALL_MALTA32:1.1.2.1
--- /dev/null	Mon Aug 24 04:03:30 2009
+++ src/sys/arch/evbmips/conf/INSTALL_MALTA32	Mon Aug 24 04:03:30 2009
@@ -0,0 +1,14 @@
+# $NetBSD: INSTALL_MALTA32,v 1.1.2.1 2009/08/24 04:03:30 matt Exp $
+
+include		"arch/evbmips/conf/MALTA32"
+
+#ident 		"INSTALL_MALTA32-$Revision: 1.1.2.1 $"
+
+# Enable the hooks used for initializing the root memory-disk.
+# The ramdisk size must be kept in sync manually with the size of
+# the `ramdisk' image (which is built in distrib/evbmips/ramdisk/ramdisk).
+pseudo-device	md# memory disk device
+options 	MEMORY_DISK_HOOKS
+options 	MEMORY_DISK_IS_ROOT		# force root on memory disk
+options 	MEMORY_DISK_SERVER=0		# no userspace memory disk
+options 	MEMORY_DISK_ROOT_SIZE=12288	# size of memory disk, in blocks
Index: src/sys/arch/evbmips/conf/INSTALL_MALTA64
diff -u /dev/null src/sys/arch/evbmips/conf/INSTALL_MALTA64:1.1.2.1
--- /dev/null	Mon Aug 24 04:03:30 2009
+++ src/sys/arch/evbmips/conf/INSTALL_MALTA64	Mon Aug 24 04:03:30 2009
@@ -0,0 +1,14 @@
+# $NetBSD: INSTALL_MALTA64,v 1.1.2.1 2009/0

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

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 24 02:35:05 UTC 2009

Modified Files:
src/lib/libpthread/arch/mips [matt-nb5-mips64]: _context_u.S

Log Message:
Fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.3.14.1 -r1.3.14.2 src/lib/libpthread/arch/mips/_context_u.S

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

Modified files:

Index: src/lib/libpthread/arch/mips/_context_u.S
diff -u src/lib/libpthread/arch/mips/_context_u.S:1.3.14.1 src/lib/libpthread/arch/mips/_context_u.S:1.3.14.2
--- src/lib/libpthread/arch/mips/_context_u.S:1.3.14.1	Sun Aug 16 03:30:55 2009
+++ src/lib/libpthread/arch/mips/_context_u.S	Mon Aug 24 02:35:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: _context_u.S,v 1.3.14.1 2009/08/16 03:30:55 matt Exp $	*/
+/*	$NetBSD: _context_u.S,v 1.3.14.2 2009/08/24 02:35:05 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -66,10 +66,10 @@
 	li	t0, 1	; \
 	sll	t0, t0, _UC_USER_BIT			; \
 	ori	t0, t0, _UC_CPU; \
-	INT_S	t0, UC_FLAGS(reg)
+	INT_S	t0, _OFFSETOF_UC_FLAGS(reg)
 
 #define SETC(reg)	; \
-	INT_L	t0, UC_FLAGS(reg)			; \
+	INT_L	t0, _OFFSETOF_UC_FLAGS(reg)		; \
 	li	t1, 1	; \
 	sll	t1, t1, _UC_USER_BIT			; \
 	and	t0, t1, t0; \



CVS commit: src/share/man/man4

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug 24 02:25:18 UTC 2009

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

Log Message:
Update BUGS section; genfb works on i386 and amd64 now.


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

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

Modified files:

Index: src/share/man/man4/genfb.4
diff -u src/share/man/man4/genfb.4:1.2 src/share/man/man4/genfb.4:1.3
--- src/share/man/man4/genfb.4:1.2	Sun Dec  2 19:03:16 2007
+++ src/share/man/man4/genfb.4	Mon Aug 24 02:25:18 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: genfb.4,v 1.2 2007/12/02 19:03:16 wiz Exp $
+.\"	$NetBSD: genfb.4,v 1.3 2009/08/24 02:25:18 jmcneill Exp $
 .\"
 .\" Copyright (c) 2007 Michael Lorenz
 .\" All rights reserved.
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd April 12, 2007
+.Dd August 23, 2009
 .Dt GENFB 4
 .Os
 .Sh NAME
@@ -74,6 +74,6 @@
 There is no way to change the color map even when the firmware supports it.
 The
 .Xr pci 4
-bus frontend has only been tested on macppc and requires machine
-dependent code to pass the properties mentioned above.
-So far only macppc provides them.
+bus frontend has only been tested on macppc, i386, and amd64 and requires
+machine dependent code to pass the properties mentioned above.
+So far only macppc, i386, and amd64 provides them.



CVS commit: src/doc

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug 24 02:21:27 UTC 2009

Modified Files:
src/doc: CHANGES

Log Message:
amd64, i386: Suspend and resume is now supported when using the
genfb(4) display driver. [jmcneill 20090823]


To generate a diff of this commit:
cvs rdiff -u -r1.1278 -r1.1279 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.1278 src/doc/CHANGES:1.1279
--- src/doc/CHANGES:1.1278	Tue Aug 18 23:46:05 2009
+++ src/doc/CHANGES	Mon Aug 24 02:21:26 2009
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1278 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1279 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -372,3 +372,5 @@
 	iasl(1): The ACPICA ASL (ACPI Source Language) compiler/decompiler
 		is now included with i386 and amd64 installations.
 		[jmcneill 20090818]
+	amd64, i386: Suspend and resume is now supported when using the
+		genfb(4) display driver. [jmcneill 20090823]



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

2009-08-23 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Aug 24 02:19:30 UTC 2009

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mips_emul.c

Log Message:
Dereferencing a given PC address (to a branch instruction) to know the target
address doesn't work if the address is in user space.  Use the fetched branch
instruction instead.

Reviewed By:matt


To generate a diff of this commit:
cvs rdiff -u -r1.14.78.2 -r1.14.78.3 src/sys/arch/mips/mips/mips_emul.c

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

Modified files:

Index: src/sys/arch/mips/mips/mips_emul.c
diff -u src/sys/arch/mips/mips/mips_emul.c:1.14.78.2 src/sys/arch/mips/mips/mips_emul.c:1.14.78.3
--- src/sys/arch/mips/mips/mips_emul.c:1.14.78.2	Fri Aug 21 17:50:00 2009
+++ src/sys/arch/mips/mips/mips_emul.c	Mon Aug 24 02:19:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_emul.c,v 1.14.78.2 2009/08/21 17:50:00 matt Exp $ */
+/*	$NetBSD: mips_emul.c,v 1.14.78.3 2009/08/24 02:19:30 uebayasi Exp $ */
 
 /*
  * Copyright (c) 1999 Shuichiro URATA.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.14.78.2 2009/08/21 17:50:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.14.78.3 2009/08/24 02:19:30 uebayasi Exp $");
 
 #include 
 #include 
@@ -102,7 +102,7 @@
 	unsigned fpuCSR;
 	int allowNonBranch;
 {
-#define	BRANCHTARGET(p) (4 + (p) + ((short)((InstFmt *)(p))->IType.imm << 2))
+#define	BRANCHTARGET(i) (4 + ((i).word) + ((short)(i).IType.imm << 2))
 	InstFmt inst;
 	vaddr_t nextpc;
 
@@ -129,7 +129,7 @@
 		case OP_BLTZL:		/* squashed */
 		case OP_BLTZALL:	/* squashed */
 			if ((int)(f->f_regs[inst.RType.rs]) < 0)
-nextpc = BRANCHTARGET(instpc);
+nextpc = BRANCHTARGET(inst);
 			else
 nextpc = instpc + 8;
 			break;
@@ -139,7 +139,7 @@
 		case OP_BGEZL:		/* squashed */
 		case OP_BGEZALL:	/* squashed */
 			if ((int)(f->f_regs[inst.RType.rs]) >= 0)
-nextpc = BRANCHTARGET(instpc);
+nextpc = BRANCHTARGET(inst);
 			else
 nextpc = instpc + 8;
 			break;
@@ -158,7 +158,7 @@
 	case OP_BEQ:
 	case OP_BEQL:	/* squashed */
 		if (f->f_regs[inst.RType.rs] == f->f_regs[inst.RType.rt])
-			nextpc = BRANCHTARGET(instpc);
+			nextpc = BRANCHTARGET(inst);
 		else
 			nextpc = instpc + 8;
 		break;
@@ -166,7 +166,7 @@
 	case OP_BNE:
 	case OP_BNEL:	/* squashed */
 		if (f->f_regs[inst.RType.rs] != f->f_regs[inst.RType.rt])
-			nextpc = BRANCHTARGET(instpc);
+			nextpc = BRANCHTARGET(inst);
 		else
 			nextpc = instpc + 8;
 		break;
@@ -174,7 +174,7 @@
 	case OP_BLEZ:
 	case OP_BLEZL:	/* squashed */
 		if ((int)(f->f_regs[inst.RType.rs]) <= 0)
-			nextpc = BRANCHTARGET(instpc);
+			nextpc = BRANCHTARGET(inst);
 		else
 			nextpc = instpc + 8;
 		break;
@@ -182,7 +182,7 @@
 	case OP_BGTZ:
 	case OP_BGTZL:	/* squashed */
 		if ((int)(f->f_regs[inst.RType.rs]) > 0)
-			nextpc = BRANCHTARGET(instpc);
+			nextpc = BRANCHTARGET(inst);
 		else
 			nextpc = instpc + 8;
 		break;
@@ -193,7 +193,7 @@
 			if ((inst.RType.rt & COPz_BC_TF_MASK) != COPz_BC_TRUE)
 condition = !condition;
 			if (condition)
-nextpc = BRANCHTARGET(instpc);
+nextpc = BRANCHTARGET(inst);
 			else
 nextpc = instpc + 8;
 		}



CVS commit: src/sys/arch

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug 24 02:15:46 UTC 2009

Modified Files:
src/sys/arch/amd64/acpi: acpi_wakecode.S
src/sys/arch/i386/acpi: acpi_wakecode.S
src/sys/arch/i386/stand/lib: vbe.c
src/sys/arch/x86/acpi: acpi_wakeup.c
src/sys/arch/x86/include: bootinfo.h
src/sys/arch/x86/x86: genfb_machdep.c

Log Message:
Pass the VBE mode number from the bootloader to the kernel, and then
make the ACPI wakecode aware of it. Restore the desired VBE mode on resume
when acpi_vbios_reset=1, so suspend/resume with genfb console will work.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/acpi/acpi_wakecode.S
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/acpi/acpi_wakecode.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/lib/vbe.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/acpi/acpi_wakeup.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/include/bootinfo.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/x86/genfb_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/amd64/acpi/acpi_wakecode.S
diff -u src/sys/arch/amd64/acpi/acpi_wakecode.S:1.7 src/sys/arch/amd64/acpi/acpi_wakecode.S:1.8
--- src/sys/arch/amd64/acpi/acpi_wakecode.S:1.7	Sun May 25 17:20:29 2008
+++ src/sys/arch/amd64/acpi/acpi_wakecode.S	Mon Aug 24 02:15:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakecode.S,v 1.7 2008/05/25 17:20:29 joerg Exp $	*/
+/*	$NetBSD: acpi_wakecode.S,v 1.8 2009/08/24 02:15:46 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger 
@@ -125,6 +125,20 @@
 	outb	%al,$0x61
 1:
 
+	/* If we need to restore a VESA VBE mode, do it now */
+	cmpb	$0,WAKEUP_vesa_modenum
+	je	1f
+	movw	WAKEUP_vesa_modenum,%bx
+	orw	$0x4000,%bx
+	movw	$0x4f02,%ax
+	int	$0x10
+
+	/* paranoia */
+	movw	%cs,%ax
+	movw	%ax,%ds
+	movw	%ax,%ss
+1:
+
 	/* Load temporary 32bit GDT */
 	data32 addr32 lgdt	tmp_gdt
 

Index: src/sys/arch/i386/acpi/acpi_wakecode.S
diff -u src/sys/arch/i386/acpi/acpi_wakecode.S:1.12 src/sys/arch/i386/acpi/acpi_wakecode.S:1.13
--- src/sys/arch/i386/acpi/acpi_wakecode.S:1.12	Mon Apr 28 20:23:23 2008
+++ src/sys/arch/i386/acpi/acpi_wakecode.S	Mon Aug 24 02:15:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakecode.S,v 1.12 2008/04/28 20:23:23 martin Exp $	*/
+/*	$NetBSD: acpi_wakecode.S,v 1.13 2009/08/24 02:15:46 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -121,6 +121,20 @@
 	outb	%al,$0x61
 1:
 
+	/* If we need to restore a VESA VBE mode, do it now */
+	cmpb	$0,WAKEUP_vesa_modenum
+	je	1f
+	movw	WAKEUP_vesa_modenum,%bx
+	orw	$0x4000,%bx
+	movw	$0x4f02,%ax
+	int	$0x10
+
+	/* paranoia */
+	movw	%cs,%ax
+	movw	%ax,%ds
+	movw	%ax,%ss
+1:
+
 	/* Load GDT while non-paging */
 	lgdt	tmp_gdt
 
@@ -199,5 +213,7 @@
 
 	.global WAKEUP_vbios_reset
 WAKEUP_vbios_reset:	.byte 0
+	.global WAKEUP_vesa_modenum
+WAKEUP_vesa_modenum:	.word 0
 	.global WAKEUP_beep_on_reset
 WAKEUP_beep_on_reset:	.byte 0

Index: src/sys/arch/i386/stand/lib/vbe.c
diff -u src/sys/arch/i386/stand/lib/vbe.c:1.2 src/sys/arch/i386/stand/lib/vbe.c:1.3
--- src/sys/arch/i386/stand/lib/vbe.c:1.2	Tue Feb 17 23:17:39 2009
+++ src/sys/arch/i386/stand/lib/vbe.c	Mon Aug 24 02:15:46 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vbe.c,v 1.2 2009/02/17 23:17:39 jmcneill Exp $ */
+/* $NetBSD: vbe.c,v 1.3 2009/08/24 02:15:46 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill 
@@ -166,6 +166,7 @@
 	fb.gpos = mi.GreenFieldPosition;
 	fb.bnum = mi.BlueMaskSize;
 	fb.bpos = mi.BlueFieldPosition;
+	fb.vbemode = modenum;
 
 	framebuffer_configure(&fb);
 

Index: src/sys/arch/x86/acpi/acpi_wakeup.c
diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.15 src/sys/arch/x86/acpi/acpi_wakeup.c:1.16
--- src/sys/arch/x86/acpi/acpi_wakeup.c:1.15	Tue Aug 18 16:41:03 2009
+++ src/sys/arch/x86/acpi/acpi_wakeup.c	Mon Aug 24 02:15:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup.c,v 1.15 2009/08/18 16:41:03 jmcneill Exp $	*/
+/*	$NetBSD: acpi_wakeup.c,v 1.16 2009/08/24 02:15:46 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.15 2009/08/18 16:41:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.16 2009/08/24 02:15:46 jmcneill Exp $");
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe 
@@ -111,6 +111,7 @@
 
 static int acpi_md_node = CTL_EOL;
 int acpi_md_vbios_reset = 1; /* Referenced by dev/pci/vga_pci.c */
+int acpi_md_vesa_modenum = 0; /* Referenced by arch/x86/x86/genfb_machdep.c */
 static int acpi_md_beep_on_reset = 0;
 
 static int	sysctl_md_acpi_vbios_reset(SYSCTLFN_ARGS);
@@ -150,9 +151,11 @@
 	memcpy( (void *)acpi_wakeup_vaddr, wakecode, sizeof(wakecode));
 
 	if (CPU_IS_PRIMARY(ci)) {
+		WAKECODE_FIXUP(WAKEUP_vesa_modenum, uint16_t, acpi_md_vesa_modenum);
 		WAKECODE_FIXUP(WAKEUP_vbios_reset, uint8_t, acpi_md_vbios_reset);
 		WAKECODE_FIXUP

CVS commit: src/sys/dev/pci

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug 24 02:10:42 UTC 2009

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

Log Message:
Register NULL pmf handlers, and note that firmware & MD code is responsible
for restoring the display device.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/genfb_pci.c

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

Modified files:

Index: src/sys/dev/pci/genfb_pci.c
diff -u src/sys/dev/pci/genfb_pci.c:1.20 src/sys/dev/pci/genfb_pci.c:1.21
--- src/sys/dev/pci/genfb_pci.c:1.20	Tue May 12 08:23:00 2009
+++ src/sys/dev/pci/genfb_pci.c	Mon Aug 24 02:10:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb_pci.c,v 1.20 2009/05/12 08:23:00 cegger Exp $ */
+/*	$NetBSD: genfb_pci.c,v 1.21 2009/08/24 02:10:41 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.20 2009/05/12 08:23:00 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.21 2009/08/24 02:10:41 jmcneill Exp $");
 
 #include 
 #include 
@@ -128,6 +128,9 @@
 	sc->sc_pcitag = pa->pa_tag;
 	sc->sc_want_wsfb = 0;
 
+	/* firmware / MD code responsible for restoring the display */
+	pmf_device_register(self, NULL, NULL);
+
 	genfb_init(&sc->sc_gen);
 
 	if ((sc->sc_gen.sc_width == 0) || (sc->sc_gen.sc_fbsize == 0)) {



CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips/gen

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 23:17:55 UTC 2009

Modified Files:
src/lib/libc/arch/mips/gen [matt-nb5-mips64]: sigsetjmp.S

Log Message:
savemask goes into the slot at _JBLEN


To generate a diff of this commit:
cvs rdiff -u -r1.8.34.2 -r1.8.34.3 src/lib/libc/arch/mips/gen/sigsetjmp.S

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

Modified files:

Index: src/lib/libc/arch/mips/gen/sigsetjmp.S
diff -u src/lib/libc/arch/mips/gen/sigsetjmp.S:1.8.34.2 src/lib/libc/arch/mips/gen/sigsetjmp.S:1.8.34.3
--- src/lib/libc/arch/mips/gen/sigsetjmp.S:1.8.34.2	Tue Aug 18 06:52:09 2009
+++ src/lib/libc/arch/mips/gen/sigsetjmp.S	Sun Aug 23 23:17:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sigsetjmp.S,v 1.8.34.2 2009/08/18 06:52:09 matt Exp $	*/
+/*	$NetBSD: sigsetjmp.S,v 1.8.34.3 2009/08/23 23:17:55 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993, 1995,
@@ -44,7 +44,7 @@
 #if 0
 	RCSID("from: @(#)setjmp.s	8.1 (Berkeley) 6/4/93")
 #else
-	RCSID("$NetBSD: sigsetjmp.S,v 1.8.34.2 2009/08/18 06:52:09 matt Exp $")
+	RCSID("$NetBSD: sigsetjmp.S,v 1.8.34.3 2009/08/23 23:17:55 matt Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -62,7 +62,7 @@
 
 LEAF(__sigsetjmp14)
 	PIC_PROLOGUE(__sigsetjmp14)
-	INT_S	a1, _OFFSETOF_SC_MASK(a0)	# save "savemask"
+	REG_S	a1, _JBLEN*SZREG(a0)		# save "savemask"
 	bne	a1, 0x0, 1f			# do saving of signal mask?
 	PIC_TAILCALL(_setjmp)
 
@@ -71,7 +71,7 @@
 
 LEAF(__siglongjmp14)
 	PIC_PROLOGUE(__siglongjmp14)
-	INT_L	t0, _OFFSETOF_SC_MASK(a0)	# get "savemask"
+	REG_L	t0, _JBLEN*SZREG(a0)		# get "savemask"
 	bne	t0, 0x0, 1f			# restore signal mask?
 	PIC_TAILCALL(_longjmp)
 



CVS commit: [matt-nb5-mips64] src/common/lib/libc/arch/mips/string

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 23:14:42 UTC 2009

Modified Files:
src/common/lib/libc/arch/mips/string [matt-nb5-mips64]: bcopy.S

Log Message:
Use #if 0 method for RCSID selection.


To generate a diff of this commit:
cvs rdiff -u -r1.2.40.3 -r1.2.40.4 \
src/common/lib/libc/arch/mips/string/bcopy.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/mips/string/bcopy.S
diff -u src/common/lib/libc/arch/mips/string/bcopy.S:1.2.40.3 src/common/lib/libc/arch/mips/string/bcopy.S:1.2.40.4
--- src/common/lib/libc/arch/mips/string/bcopy.S:1.2.40.3	Thu Aug 20 10:03:43 2009
+++ src/common/lib/libc/arch/mips/string/bcopy.S	Sun Aug 23 23:14:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcopy.S,v 1.2.40.3 2009/08/20 10:03:43 matt Exp $	*/
+/*	$NetBSD: bcopy.S,v 1.2.40.4 2009/08/23 23:14:42 matt Exp $	*/
 
 /*
  * Mach Operating System
@@ -43,8 +43,11 @@
 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	/* RCSID("from: @(#)mips_bcopy.s	2.2 CMU 18/06/93") */
-	RCSID("$NetBSD: bcopy.S,v 1.2.40.3 2009/08/20 10:03:43 matt Exp $")
+#if 0
+	RCSID("from: @(#)mips_bcopy.s	2.2 CMU 18/06/93")
+#else
+	RCSID("$NetBSD: bcopy.S,v 1.2.40.4 2009/08/23 23:14:42 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 /*



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

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 23:12:40 UTC 2009

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

Log Message:
Use CPUFLAGS for -mno-abicall -fno-pic


To generate a diff of this commit:
cvs rdiff -u -r1.179.8.3 -r1.179.8.4 src/share/mk/bsd.sys.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.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.179.8.3 src/share/mk/bsd.sys.mk:1.179.8.4
--- src/share/mk/bsd.sys.mk:1.179.8.3	Tue Aug 18 16:10:44 2009
+++ src/share/mk/bsd.sys.mk	Sun Aug 23 23:12:39 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.179.8.3 2009/08/18 16:10:44 uebayasi Exp $
+#	$NetBSD: bsd.sys.mk,v 1.179.8.4 2009/08/23 23:12:39 matt Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -86,13 +86,17 @@
 CFLAGS+=	-Wa,-Av8plus
 .endif
 
+.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
+CFLAGS+=	-Wa,--fatal-warnings
+.endif
+
 #.if ${MACHINE} == "sbmips"
 #CFLAGS+=	-mips64 -mtune=sb1
 #.endif
 
 .if (${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb") && \
 (defined(MKPIC) && ${MKPIC} == "no")
-COPTS+=		-mno-abicalls -fno-PIC
+CPUFLAGS+=	-mno-abicalls -fno-PIC
 .endif
 CFLAGS+=	${CPUFLAGS}
 AFLAGS+=	${CPUFLAGS}



CVS commit: [matt-nb5-mips64] src/gnu/dist/gdb6/bfd

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 23:04:08 UTC 2009

Modified Files:
src/gnu/dist/gdb6/bfd [matt-nb5-mips64]: config.bfd

Log Message:
Make bfd aware of mips64


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.24.1 src/gnu/dist/gdb6/bfd/config.bfd

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

Modified files:

Index: src/gnu/dist/gdb6/bfd/config.bfd
diff -u src/gnu/dist/gdb6/bfd/config.bfd:1.4 src/gnu/dist/gdb6/bfd/config.bfd:1.4.24.1
--- src/gnu/dist/gdb6/bfd/config.bfd:1.4	Sat Dec  2 01:16:34 2006
+++ src/gnu/dist/gdb6/bfd/config.bfd	Sun Aug 23 23:04:08 2009
@@ -827,6 +827,16 @@
 targ_defvec=ecoff_big_vec
 targ_selvecs=ecoff_little_vec
 ;;
+#ifdef BFD64
+  mips64*el-*-netbsd*)
+targ_defvec=bfd_elf32_nlittlemips_vec
+targ_selvecs="bfd_elf32_nbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec"
+;;
+  mips64*-*-netbsd*)
+targ_defvec=bfd_elf32_nbigmips_vec
+targ_selvecs="bfd_elf32_nlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec"
+;;
+#endif
   mips*el-*-netbsd*)
 targ_defvec=bfd_elf32_tradlittlemips_vec
 targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec"



CVS commit: [matt-nb5-mips64] src/gnu/lib/libstdc++-v3_4/arch

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 22:54:07 UTC 2009

Modified Files:
src/gnu/lib/libstdc++-v3_4/arch/mips64eb [matt-nb5-mips64]: c++config.h
config.h
src/gnu/lib/libstdc++-v3_4/arch/mips64el [matt-nb5-mips64]: c++config.h
config.h

Log Message:
Fix a few minor config botches


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
src/gnu/lib/libstdc++-v3_4/arch/mips64eb/c++config.h \
src/gnu/lib/libstdc++-v3_4/arch/mips64eb/config.h
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h \
src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h

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

Modified files:

Index: src/gnu/lib/libstdc++-v3_4/arch/mips64eb/c++config.h
diff -u src/gnu/lib/libstdc++-v3_4/arch/mips64eb/c++config.h:1.1.2.1 src/gnu/lib/libstdc++-v3_4/arch/mips64eb/c++config.h:1.1.2.2
--- src/gnu/lib/libstdc++-v3_4/arch/mips64eb/c++config.h:1.1.2.1	Sun Aug 23 20:26:02 2009
+++ src/gnu/lib/libstdc++-v3_4/arch/mips64eb/c++config.h	Sun Aug 23 22:54:07 2009
@@ -770,13 +770,13 @@
 #define _GLIBCXX_HOSTED 1
 
 /* Define if ptrdiff_t is int. */
-#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+/* #undef _GLIBCXX_PTRDIFF_T_IS_INT */
 
 /* Define if using setrlimit to set resource limits during "make check" */
 /* #undef _GLIBCXX_RES_LIMITS */
 
 /* Define if size_t is unsigned int. */
-#define _GLIBCXX_SIZE_T_IS_UINT 1
+/* #undef _GLIBCXX_SIZE_T_IS_UINT */
 
 /* Define if the compiler is configured for setjmp/longjmp exceptions. */
 /* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
Index: src/gnu/lib/libstdc++-v3_4/arch/mips64eb/config.h
diff -u src/gnu/lib/libstdc++-v3_4/arch/mips64eb/config.h:1.1.2.1 src/gnu/lib/libstdc++-v3_4/arch/mips64eb/config.h:1.1.2.2
--- src/gnu/lib/libstdc++-v3_4/arch/mips64eb/config.h:1.1.2.1	Sun Aug 23 20:26:02 2009
+++ src/gnu/lib/libstdc++-v3_4/arch/mips64eb/config.h	Sun Aug 23 22:54:07 2009
@@ -664,13 +664,13 @@
 #define _GLIBCXX_HOSTED 1
 
 /* Define if ptrdiff_t is int. */
-#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+/* #undef _GLIBCXX_PTRDIFF_T_IS_INT */
 
 /* Define if using setrlimit to set resource limits during "make check" */
 /* #undef _GLIBCXX_RES_LIMITS */
 
 /* Define if size_t is unsigned int. */
-#define _GLIBCXX_SIZE_T_IS_UINT 1
+/* #undef _GLIBCXX_SIZE_T_IS_UINT */
 
 /* Define if the compiler is configured for setjmp/longjmp exceptions. */
 /* #undef _GLIBCXX_SJLJ_EXCEPTIONS */

Index: src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h
diff -u src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h:1.1.2.1 src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h:1.1.2.2
--- src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h:1.1.2.1	Sun Aug 23 20:26:02 2009
+++ src/gnu/lib/libstdc++-v3_4/arch/mips64el/c++config.h	Sun Aug 23 22:54:07 2009
@@ -770,13 +770,13 @@
 #define _GLIBCXX_HOSTED 1
 
 /* Define if ptrdiff_t is int. */
-#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+/* #undef _GLIBCXX_PTRDIFF_T_IS_INT */
 
 /* Define if using setrlimit to set resource limits during "make check" */
 /* #undef _GLIBCXX_RES_LIMITS */
 
 /* Define if size_t is unsigned int. */
-#define _GLIBCXX_SIZE_T_IS_UINT 1
+/* #undef _GLIBCXX_SIZE_T_IS_UINT */
 
 /* Define if the compiler is configured for setjmp/longjmp exceptions. */
 /* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
Index: src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h
diff -u src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h:1.1.2.1 src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h:1.1.2.2
--- src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h:1.1.2.1	Sun Aug 23 20:26:02 2009
+++ src/gnu/lib/libstdc++-v3_4/arch/mips64el/config.h	Sun Aug 23 22:54:07 2009
@@ -664,13 +664,13 @@
 #define _GLIBCXX_HOSTED 1
 
 /* Define if ptrdiff_t is int. */
-#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+/* #undef _GLIBCXX_PTRDIFF_T_IS_INT */
 
 /* Define if using setrlimit to set resource limits during "make check" */
 /* #undef _GLIBCXX_RES_LIMITS */
 
 /* Define if size_t is unsigned int. */
-#define _GLIBCXX_SIZE_T_IS_UINT 1
+/* #undef _GLIBCXX_SIZE_T_IS_UINT */
 
 /* Define if the compiler is configured for setjmp/longjmp exceptions. */
 /* #undef _GLIBCXX_SJLJ_EXCEPTIONS */



CVS commit: [matt-nb5-mips64] src/gnu/lib/libopcodes/arch

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 22:53:20 UTC 2009

Added Files:
src/gnu/lib/libopcodes/arch/mips64eb [matt-nb5-mips64]: config.h
defs.mk
src/gnu/lib/libopcodes/arch/mips64el [matt-nb5-mips64]: config.h
defs.mk

Log Message:
Add configuration for mips64 (identical to mips).


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/gnu/lib/libopcodes/arch/mips64eb/config.h \
src/gnu/lib/libopcodes/arch/mips64eb/defs.mk
cvs rdiff -u -r0 -r1.1.2.1 src/gnu/lib/libopcodes/arch/mips64el/config.h \
src/gnu/lib/libopcodes/arch/mips64el/defs.mk

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

Added files:

Index: src/gnu/lib/libopcodes/arch/mips64eb/config.h
diff -u /dev/null src/gnu/lib/libopcodes/arch/mips64eb/config.h:1.1.2.1
--- /dev/null	Sun Aug 23 22:53:20 2009
+++ src/gnu/lib/libopcodes/arch/mips64eb/config.h	Sun Aug 23 22:53:19 2009
@@ -0,0 +1,166 @@
+/* This file is automatically generated.  DO NOT EDIT! */
+/* Generated from: 	NetBSD: mknative-binutils,v 1.5 2006/02/02 20:06:04 skrll Exp  */
+
+/* config.h.  Generated by configure.  */
+/* config.in.  Generated from configure.in by autoheader.  */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to 1 if NLS is requested */
+#define ENABLE_NLS 1
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have  and it should be used (not on Ultrix).
+   */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define to 1 if you have the  header file. */
+/* #undef HAVE_ARGZ_H */
+
+/* Define to 1 if you have the `dcgettext' function. */
+/* #undef HAVE_DCGETTEXT */
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+/* #undef HAVE_GETTEXT */
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#define HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Define to 1 if you have the `munmap' function. */
+#define HAVE_MUNMAP 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_NL_TYPES_H 1
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the `setlocale' function. */
+#define HAVE_SETLOCALE 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have the stpcpy function */
+/* #undef HAVE_STPCPY */
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the  header file. */
+/* #undef HAVE_VALUES_H */
+
+/* Define to 1 if you have the `__argz_count' function. */
+/* #undef HAVE___ARGZ_COUNT */
+
+/* Define to 1 if you have the `__argz_next' function. */
+/* #undef HAVE___ARGZ_NEXT */
+
+/* Define to 1 if you have the `__argz_stringify' function. */
+/* #undef HAVE___ARGZ_STRINGIFY */
+
+/* Name of package */
+#define PACKAGE "opcodes"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth

CVS commit: [matt-nb5-mips64] src/gnu/lib/libbfd/arch

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 22:52:51 UTC 2009

Modified Files:
src/gnu/lib/libbfd/arch/mips64eb [matt-nb5-mips64]: bfd.h config.h
defs.mk
src/gnu/lib/libbfd/arch/mips64el [matt-nb5-mips64]: bfd.h config.h
defs.mk

Log Message:
Fix the bfd files to actually do the mips64 bits.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/gnu/lib/libbfd/arch/mips64eb/bfd.h \
src/gnu/lib/libbfd/arch/mips64eb/config.h \
src/gnu/lib/libbfd/arch/mips64eb/defs.mk
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/gnu/lib/libbfd/arch/mips64el/bfd.h \
src/gnu/lib/libbfd/arch/mips64el/config.h \
src/gnu/lib/libbfd/arch/mips64el/defs.mk

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

Modified files:

Index: src/gnu/lib/libbfd/arch/mips64eb/bfd.h
diff -u src/gnu/lib/libbfd/arch/mips64eb/bfd.h:1.1.2.1 src/gnu/lib/libbfd/arch/mips64eb/bfd.h:1.1.2.2
--- src/gnu/lib/libbfd/arch/mips64eb/bfd.h:1.1.2.1	Sun Aug 23 20:26:01 2009
+++ src/gnu/lib/libbfd/arch/mips64eb/bfd.h	Sun Aug 23 22:52:51 2009
@@ -60,7 +60,7 @@
 /* The word size of the default bfd target.  */
 #define BFD_DEFAULT_TARGET_SIZE 32
 
-#define BFD_HOST_64BIT_LONG 0
+#define BFD_HOST_64BIT_LONG 1
 #define BFD_HOST_LONG_LONG 1
 #if 1
 #define BFD_HOST_64_BIT long long
Index: src/gnu/lib/libbfd/arch/mips64eb/config.h
diff -u src/gnu/lib/libbfd/arch/mips64eb/config.h:1.1.2.1 src/gnu/lib/libbfd/arch/mips64eb/config.h:1.1.2.2
--- src/gnu/lib/libbfd/arch/mips64eb/config.h:1.1.2.1	Sun Aug 23 20:26:01 2009
+++ src/gnu/lib/libbfd/arch/mips64eb/config.h	Sun Aug 23 22:52:51 2009
@@ -275,7 +275,7 @@
 #define PACKAGE_VERSION ""
 
 /* The number of bytes in type long */
-#define SIZEOF_LONG 4
+#define SIZEOF_LONG 8
 
 /* The number of bytes in type long long */
 #define SIZEOF_LONG_LONG 8
Index: src/gnu/lib/libbfd/arch/mips64eb/defs.mk
diff -u src/gnu/lib/libbfd/arch/mips64eb/defs.mk:1.1.2.1 src/gnu/lib/libbfd/arch/mips64eb/defs.mk:1.1.2.2
--- src/gnu/lib/libbfd/arch/mips64eb/defs.mk:1.1.2.1	Sun Aug 23 20:26:01 2009
+++ src/gnu/lib/libbfd/arch/mips64eb/defs.mk	Sun Aug 23 22:52:51 2009
@@ -1,8 +1,8 @@
 # This file is automatically generated.  DO NOT EDIT!
 # Generated from: 	NetBSD: mknative-binutils,v 1.5 2006/02/02 20:06:04 skrll Exp 
 #
-G_libbfd_la_DEPENDENCIES=elf32-mips.lo elfxx-mips.lo elf32.lo elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo ecofflink.lo elf64-mips.lo elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo cpu-mips.lo netbsd-core.lo ofiles
+G_libbfd_la_DEPENDENCIES=elfn32-mips.lo elfxx-mips.lo elf32.lo elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo ecofflink.lo elf64-mips.lo elf64.lo elf32-mips.lo elf64-gen.lo elf32-gen.lo cpu-mips.lo netbsd-core.lo ofiles
 G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo  cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo  opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo  linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo  stab-syms.lo merge.lo dwarf2.lo simple.lo archive64.lo
 G_DEFS=-DHAVE_CONFIG_H
 G_INCLUDES=-D_GNU_SOURCE  -DNETBSD_CORE   -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include  -I${GNUHOSTDIST}/bfd/../intl -I../intl
-G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_tradbigmips_vec -DSELECT_VECS='&bfd_elf32_tradbigmips_vec,&bfd_elf32_tradlittlemips_vec,&bfd_elf64_tradbigmips_vec,&bfd_elf64_tradlittlemips_vec,&ecoff_big_vec,&ecoff_little_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' -DHAVE_bfd_elf32_tradbigmips_vec -DHAVE_bfd_elf32_tradlittlemips_vec -DHAVE_bfd_elf64_tradbigmips_vec -DHAVE_bfd_elf64_tradlittlemips_vec -DHAVE_ecoff_big_vec -DHAVE_ecoff_little_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec
+G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_nbigmips_vec -DSELECT_VECS='&bfd_elf32_nlittlemips_vec,&bfd_elf64_tradbigmips_vec,&bfd_elf64_tradlittlemips_vec,&bfd_elf32_nbigmips_vec,&bfd_elf32_ntradlittlemips_vec,&bfd_elf32_ntradbigmips_vec,&bfd_elf32_tradlittlemips_vec,&bfd_elf32_tradbigmips_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' -DHAVE_bfd_elf32_nlittlemips_vec -DHAVE_bfd_elf64_tradbigmips_vec -DHAVE_bfd_elf64_tradlittlemips_vec -DHAVE_bfd_elf32_nbigmips_vec -DHAVE_bfd_elf32_ntradlittlemips_vec -DHAVE_bfd_elf32_ntradbigmips_vec -DHAVE_bfd_elf32_tradlittlemips_vec -DHAVE_bfd_elf32_tradbigmips_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec

Index: src/gnu/lib/libbfd/arch/mips64el/bfd.h
diff -u src/gnu/lib/libbfd/arch/mips64el/bfd.h:1.1.2.1 src/gnu/lib/libbfd/arch/mips64el/bfd.h:1.1.2

CVS commit: src/distrib/notes/common

2009-08-23 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Aug 23 22:17:19 UTC 2009

Modified Files:
src/distrib/notes/common: sysinst

Log Message:
Kill an incorrect bit of text about creating device nodes that had been hiding
under a macppc conditional.  Update for today's progress bar world.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/distrib/notes/common/sysinst

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

Modified files:

Index: src/distrib/notes/common/sysinst
diff -u src/distrib/notes/common/sysinst:1.98 src/distrib/notes/common/sysinst:1.99
--- src/distrib/notes/common/sysinst:1.98	Sat Apr 25 10:34:43 2009
+++ src/distrib/notes/common/sysinst	Sun Aug 23 22:17:18 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysinst,v 1.98 2009/04/25 10:34:43 snj Exp $
+.\"	$NetBSD: sysinst,v 1.99 2009/08/23 22:17:18 snj Exp $
 .\"
 .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -1595,22 +1595,10 @@
 .To 2 "Extracting the distribution sets"
 .Em Extracting the distribution sets
 .Pp
-Before extraction begins, you can elect to watch the files being
-extracted; the name of each file that is extracted will be shown.
-This can slow down the installation process considerably
-on machines with slow graphics consoles or serial consoles.
-Alternatively, you can choose to see a progress bar.
-This is the preferred option as it shows progress without significantly
-slowing down the installation process.
+A progress bar will be displayed while the distribution sets are
+being extracted.
 .Pp
-.ie \n[macppc] \{\
-If you are installing using the
-.Me "Re-install sets or install additional sets"
-option, then you will need to create the device nodes in
-.Pa /dev ,
-otherwise,
-.\}
-.el After all the files have been extracted,
+After all the files have been extracted,
 the device node files will be created.
 If you have already configured networking, you will be asked if you want to
 use this configuration for normal operation.
@@ -1620,39 +1608,6 @@
 Finally you will be asked to select a password encryption algorithm
 and can then set a password for the "root" account, to prevent
 the machine from coming up without access restrictions.
-.if \n[macppc] \{\
-.It
-.To 2 "Making the device nodes"
-.Em Making the device nodes
-.Pp
-If you are installing using the
-.Me "Re-install sets or install additional sets"
-option, then you will need to create the device nodes in
-.Pa /dev
-now.
-Otherwise, skip this step.
-.Pp
-Go to the main installation menu, and select
-.Me "Utility menu"
-and then select the
-.Me "Run /bin/sh"
-option, which will give you a shell prompt.
-You may need to type one of the following commands to get your delete key
-to work properly, depending on your keyboard:
-.Dl # Ic "stty erase '^h'"
-.Dl # Ic "stty erase '^?'"
-.Pp
-Type the following command (replacing
-.Pa wd0a
-with the partition name of your destination root partition):
-Now you need to mount your destination root partition:
-.Dl # Ic "mount /dev/wd0a /mnt"
-.Dl # Ic "cd /mnt/dev"
-.Dl # Ic "sh MAKEDEV all"
-.Dl # Ic "cd /"
-.Dl # Ic "umount /mnt"
-.Dl # Ic "exit"
-.\}
 .if \n[sparc64] \{\
 .It
 .To 2 "Ensure you have the correct kernel installed"



CVS commit: src/distrib/utils/sysinst

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 21:16:17 UTC 2009

Modified Files:
src/distrib/utils/sysinst: menus.mi msg.mi.de msg.mi.en msg.mi.es
msg.mi.fr msg.mi.pl util.c

Log Message:
Get rid of the 'select extraction verbosity' menu.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/distrib/utils/sysinst/menus.mi
cvs rdiff -u -r1.49 -r1.50 src/distrib/utils/sysinst/msg.mi.de
cvs rdiff -u -r1.157 -r1.158 src/distrib/utils/sysinst/msg.mi.en \
src/distrib/utils/sysinst/util.c
cvs rdiff -u -r1.26 -r1.27 src/distrib/utils/sysinst/msg.mi.es
cvs rdiff -u -r1.106 -r1.107 src/distrib/utils/sysinst/msg.mi.fr
cvs rdiff -u -r1.65 -r1.66 src/distrib/utils/sysinst/msg.mi.pl

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

Modified files:

Index: src/distrib/utils/sysinst/menus.mi
diff -u src/distrib/utils/sysinst/menus.mi:1.35 src/distrib/utils/sysinst/menus.mi:1.36
--- src/distrib/utils/sysinst/menus.mi:1.35	Fri Feb 27 22:51:33 2009
+++ src/distrib/utils/sysinst/menus.mi	Sun Aug 23 21:16:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: menus.mi,v 1.35 2009/02/27 22:51:33 hubertf Exp $	*/
+/*	$NetBSD: menus.mi,v 1.36 2009/08/23 21:16:16 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -371,9 +371,3 @@
 	option "/bin/sh",  exit, action {*(const char **)arg = "/bin/sh";}; 
 	option "/bin/ksh", exit, action {*(const char **)arg = "/bin/ksh";};
 	option "/bin/csh", exit, action {*(const char **)arg = "/bin/csh";};
-
-menu extract, title MSG_Select_set_extraction_verbosity;
-	display action { menu->cursel = *(int *)arg; };
-	option MSG_Progress_bar, exit, action { *(int *)arg = 0; };
-	option MSG_Silent,   exit, action { *(int *)arg = 1; };
-	option MSG_Verbose,  exit, action { *(int *)arg = 2; };

Index: src/distrib/utils/sysinst/msg.mi.de
diff -u src/distrib/utils/sysinst/msg.mi.de:1.49 src/distrib/utils/sysinst/msg.mi.de:1.50
--- src/distrib/utils/sysinst/msg.mi.de:1.49	Thu May 14 16:23:38 2009
+++ src/distrib/utils/sysinst/msg.mi.de	Sun Aug 23 21:16:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.de,v 1.49 2009/05/14 16:23:38 sborrill Exp $	*/
+/*	$NetBSD: msg.mi.de,v 1.50 2009/08/23 21:16:16 jmcneill Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -616,12 +616,6 @@
 message delete_xfer_file
 {Nach der Installation löschen}
 
-message verboseextract
-{
-Im nächsten Schritt werden nun die Distributionssets (Basissystem + Kernel)
-geladen und auf die Festplatte kopiert.
-}
-
 message notarfile
 {Das Release-Paket %s existiert nicht.}
 
@@ -1004,10 +998,6 @@
 message Perform_IPv6_autoconfiguration {IPv6 automatisch konfigurieren?}
 message Perform_DHCP_autoconfiguration {Konfiguration per DHCP ermitteln?}
 message Root_shell {Root-Shell}
-message Select_set_extraction_verbosity {Bitte wählen Sie die Fortschrittsanzeige während des Extrahierens}
-message Progress_bar {Fortschrittsbalken (empfohlen)}
-message Silent {Keine (schnell)}
-message Verbose {Alle installierten Dateien anzeigen (langsam))}
 
 .if AOUT2ELF
 message aoutfail

Index: src/distrib/utils/sysinst/msg.mi.en
diff -u src/distrib/utils/sysinst/msg.mi.en:1.157 src/distrib/utils/sysinst/msg.mi.en:1.158
--- src/distrib/utils/sysinst/msg.mi.en:1.157	Sun Aug 23 20:58:05 2009
+++ src/distrib/utils/sysinst/msg.mi.en	Sun Aug 23 21:16:17 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.157 2009/08/23 20:58:05 jmcneill Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.158 2009/08/23 21:16:17 jmcneill Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -594,14 +594,6 @@
 message delete_xfer_file
 {Delete after install}
 
-message verboseextract
-{
-The next step is to fetch and unpack the distribution filesets. 
-
-During the extraction process, what do you want to see as
-each file is extracted?
-}
-
 message notarfile
 {Release set %s does not exist.}
 
@@ -948,10 +940,6 @@
 message Perform_IPv6_autoconfiguration {Perform IPv6 autoconfiguration?}
 message Perform_DHCP_autoconfiguration {Perform DHCP autoconfiguration?}
 message Root_shell {Root shell}
-message Select_set_extraction_verbosity {Select set extraction verbosity}
-message Progress_bar {Progress bar (recommended)}
-message Silent {Silent}
-message Verbose {Verbose file name listing (slow)}
 
 .if AOUT2ELF
 message aoutfail
Index: src/distrib/utils/sysinst/util.c
diff -u src/distrib/utils/sysinst/util.c:1.157 src/distrib/utils/sysinst/util.c:1.158
--- src/distrib/utils/sysinst/util.c:1.157	Sat Apr  4 11:24:24 2009
+++ src/distrib/utils/sysinst/util.c	Sun Aug 23 21:16:17 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.157 2009/04/04 11:24:24 ad Exp $	*/
+/*	$NetBSD: util.c,v 1.158 2009/08/23 21:16:17 jmcneill Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -607,23 +607,6 @@
 	free_menu(menu_no);
 }
 
-static int
-ask_verbose_dist(msg setup_done)
-{
-	int verbose = 0;
-
-	wclear(stdscr);
-	wrefresh(stdscr);
-	

CVS commit: src/distrib/utils/sysinst

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 20:58:05 UTC 2009

Modified Files:
src/distrib/utils/sysinst: Makefile.inc msg.mi.en

Log Message:
Print ${MACHINE} in the welcome message.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/distrib/utils/sysinst/Makefile.inc
cvs rdiff -u -r1.156 -r1.157 src/distrib/utils/sysinst/msg.mi.en

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

Modified files:

Index: src/distrib/utils/sysinst/Makefile.inc
diff -u src/distrib/utils/sysinst/Makefile.inc:1.47 src/distrib/utils/sysinst/Makefile.inc:1.48
--- src/distrib/utils/sysinst/Makefile.inc:1.47	Sat Oct 25 22:27:34 2008
+++ src/distrib/utils/sysinst/Makefile.inc	Sun Aug 23 20:58:05 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.47 2008/10/25 22:27:34 apb Exp $
+#	$NetBSD: Makefile.inc,v 1.48 2009/08/23 20:58:05 jmcneill Exp $
 #
 # Makefile for sysinst
 
@@ -108,17 +108,20 @@
 msg.def: msg.mi.${SYSINSTLANG} ${MSG_MD} msgtouch
 	${_MKTARGET_CREATE}
 	${TOOL_SED} "s/@@VERSION@@/${DISTRIBVER}/" ${.ALLSRC} | \
+	${TOOL_SED} "s/@@MACHINE@@/${MACHINE}/" | \
 	${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET}
 
 menus.def: menus.mi ${MENUS_MD} msgtouch
 	${_MKTARGET_CREATE}
 	${TOOL_SED} "s/@@VERSION@@/${DISTRIBVER}/" ${.ALLSRC} | \
+	${TOOL_SED} "s/@@MACHINE@@/${MACHINE}/" | \
 	${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET}
 
 sysinstmsgs.fmtcnt: msg.mi.${SYSINSTLANG} ${MSG_MD} msgtouch msg_defs.h
 	${_MKTARGET_CREATE}
 	${TOOL_SED} "s/@@VERSION@@/${DISTRIBVER}/" \
 		${.ALLSRC:M*.${SYSINSTLANG}} | \
+	${TOOL_SED} "s/@@MACHINE@@/${MACHINE}/" | \
 	${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \
 	${HOST_SH} ${MSG_XLAT_SH} -c > ${.TARGET}
 
@@ -126,6 +129,7 @@
 sysinstmsgs.${LANG}: msg.mi.${LANG} ${MSG_MD:S/.${SYSINSTLANG}$/.${LANG}/} msgtouch msg_defs.h sysinstmsgs.fmtcnt
 	${_MKTARGET_CREATE}
 	${TOOL_SED} "s/@@VERSION@@/${DISTRIBVER}/" ${.ALLSRC:M*.${LANG}} | \
+	${TOOL_SED} "s/@@MACHINE@@/${MACHINE}/" | \
 	${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \
 	${HOST_SH} ${MSG_XLAT_SH} -f sysinstmsgs.fmtcnt > ${.TARGET}
 

Index: src/distrib/utils/sysinst/msg.mi.en
diff -u src/distrib/utils/sysinst/msg.mi.en:1.156 src/distrib/utils/sysinst/msg.mi.en:1.157
--- src/distrib/utils/sysinst/msg.mi.en:1.156	Tue Aug 11 19:15:30 2009
+++ src/distrib/utils/sysinst/msg.mi.en	Sun Aug 23 20:58:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.156 2009/08/11 19:15:30 snj Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.157 2009/08/23 20:58:05 jmcneill Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -71,7 +71,8 @@
 {upgrade}
 
 message hello
-{Welcome to sysinst, the NetBSD-@@VERSION@@ system installation tool.
+{NetBSD/@@MACHINE@@ @@VERSION@@
+
 This menu-driven tool is designed to help you install NetBSD to a hard
 disk, or upgrade an existing NetBSD system, with a minimum of work. 
 In the following menus type the reference letter (a, b, c, ...) to



CVS commit: src/distrib/utils/sysinst/arch/i386

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 20:57:40 UTC 2009

Modified Files:
src/distrib/utils/sysinst/arch/i386: msg.md.en

Log Message:
Mention USB media as well as floppy disks.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/distrib/utils/sysinst/arch/i386/msg.md.en

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

Modified files:

Index: src/distrib/utils/sysinst/arch/i386/msg.md.en
diff -u src/distrib/utils/sysinst/arch/i386/msg.md.en:1.58 src/distrib/utils/sysinst/arch/i386/msg.md.en:1.59
--- src/distrib/utils/sysinst/arch/i386/msg.md.en:1.58	Tue Apr  7 10:45:05 2009
+++ src/distrib/utils/sysinst/arch/i386/msg.md.en	Sun Aug 23 20:57:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.en,v 1.58 2009/04/07 10:45:05 tsutsui Exp $	*/
+/*	$NetBSD: msg.md.en,v 1.59 2009/08/23 20:57:40 jmcneill Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -39,7 +39,8 @@
 /* MD Message catalog -- English, i386 version */
 
 message md_hello
-{If you booted from a floppy, you may now remove the disk.
+{If you booted from removable media such as a USB drive or floppy disk, you
+may now remove the device.
 
 }
 



CVS commit: [matt-nb5-mips64] src/gnu/dist/gcc4/gcc/config/mips

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 20:28:58 UTC 2009

Modified Files:
src/gnu/dist/gcc4/gcc/config/mips [matt-nb5-mips64]: netbsd64.h
Added Files:
src/gnu/dist/gcc4/gcc/config/mips [matt-nb5-mips64]: t-netbsd64

Log Message:
For now, make LONG_DOUBLE 64bit on N32/N64 until libgcc issue is addressed.
Add vestigal MULTILIB support for mips64.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h
cvs rdiff -u -r0 -r1.1.2.1 src/gnu/dist/gcc4/gcc/config/mips/t-netbsd64

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

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h
diff -u src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h:1.1.2.1 src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h:1.1.2.2
--- src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h:1.1.2.1	Sun Aug 16 02:55:13 2009
+++ src/gnu/dist/gcc4/gcc/config/mips/netbsd64.h	Sun Aug 23 20:28:58 2009
@@ -52,3 +52,8 @@
%{bestGnum} %{call_shared} %{no_archive} %{exact_version} \
%(netbsd_link_spec)"
 
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 64
+
+#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
+#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64

Added files:

Index: src/gnu/dist/gcc4/gcc/config/mips/t-netbsd64
diff -u /dev/null src/gnu/dist/gcc4/gcc/config/mips/t-netbsd64:1.1.2.1
--- /dev/null	Sun Aug 23 20:28:58 2009
+++ src/gnu/dist/gcc4/gcc/config/mips/t-netbsd64	Sun Aug 23 20:28:58 2009
@@ -0,0 +1,9 @@
+# NetBSD has (will have) "non-native" libraries in /usr/lib/.
+# For NetBSD/mips64 we thus have /usr/lib and /usr/lib/abiN64.
+
+MULTILIB_OPTIONS = mabi=n32/mabi=64/mabi=32
+MULTILIB_DIRNAMES = n32 n64 o32
+MULTILIB_OSDIRNAMES = . ../lib/abiN64 ../lib/abiO32
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib



CVS commit: [matt-nb5-mips64] src/gnu/lib/libgcc4

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 20:24:06 UTC 2009

Modified Files:
src/gnu/lib/libgcc4 [matt-nb5-mips64]: Makefile

Log Message:
Build libgcc_eh even if NOPIC


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.10.1 src/gnu/lib/libgcc4/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/lib/libgcc4/Makefile
diff -u src/gnu/lib/libgcc4/Makefile:1.2 src/gnu/lib/libgcc4/Makefile:1.2.10.1
--- src/gnu/lib/libgcc4/Makefile:1.2	Tue Sep 23 06:59:42 2008
+++ src/gnu/lib/libgcc4/Makefile	Sun Aug 23 20:24:06 2009
@@ -1,11 +1,13 @@
-#	$NetBSD: Makefile,v 1.2 2008/09/23 06:59:42 skrll Exp $
+#	$NetBSD: Makefile,v 1.2.10.1 2009/08/23 20:24:06 matt Exp $
 
 SUBDIR+=	libgcc
 
 .include 
 
+SUBDIR+=	libgcc_eh
+
 .if ${MKPIC} != "no"
-SUBDIR+=	libgcc_eh libgcc_s
+SUBDIR+=	libgcc_s
 .endif
 
 SUBDIR+=	libgcov



CVS commit: [matt-nb5-mips64] src/common/lib/libc/string

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 20:06:14 UTC 2009

Modified Files:
src/common/lib/libc/string [matt-nb5-mips64]: memset2.c

Log Message:
CTASSERT only defined for kernel enviornments.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/common/lib/libc/string/memset2.c

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/string/memset2.c
diff -u src/common/lib/libc/string/memset2.c:1.1.2.2 src/common/lib/libc/string/memset2.c:1.1.2.3
--- src/common/lib/libc/string/memset2.c:1.1.2.2	Sun Aug 23 06:40:49 2009
+++ src/common/lib/libc/string/memset2.c	Sun Aug 23 20:06:13 2009
@@ -53,7 +53,7 @@
 #endif
 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: memset2.c,v 1.1.2.2 2009/08/23 06:40:49 matt Exp $");
+__RCSID("$NetBSD: memset2.c,v 1.1.2.3 2009/08/23 20:06:13 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -71,7 +71,9 @@
 #define memset test_memset
 #endif
 
+#ifdef CTASSERT
 CTASSERT((~(memword_t)0U >> 1) != ~(memword_t)0U);
+#endif
 
 void *
 memset(void *addr, int c, size_t len)



CVS commit: src/share/man/man4

2009-08-23 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Aug 23 19:44:39 UTC 2009

Modified Files:
src/share/man/man4: bcsp.4 btuart.4

Log Message:
make a small mention how to configure the tty line as a bluetooth device


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

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

Modified files:

Index: src/share/man/man4/bcsp.4
diff -u src/share/man/man4/bcsp.4:1.4 src/share/man/man4/bcsp.4:1.5
--- src/share/man/man4/bcsp.4:1.4	Mon May 18 13:51:10 2009
+++ src/share/man/man4/bcsp.4	Sun Aug 23 19:44:39 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: bcsp.4,v 1.4 2009/05/18 13:51:10 wiz Exp $
+.\" $NetBSD: bcsp.4,v 1.5 2009/08/23 19:44:39 plunky Exp $
 .\"
 .\" Copyright (c) 2007 KIYOHARA Takashi
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 2, 2007
+.Dd August 23, 2009
 .Dt BCSP 4
 .Os
 .Sh NAME
@@ -47,6 +47,12 @@
 supports BCSP Link Establishment Protocol, as described in the
 .Qq BCSP Link Establishment Protocol
 specification.
+.Pp
+The
+.Xr btattach 8
+program is used to configure the tty line and create the
+.Nm
+driver instance.
 .Sh SEE ALSO
 .Xr bluetooth 4 ,
 .Xr btuart 4 ,
@@ -59,6 +65,5 @@
 .Sh AUTHORS
 .An KIYOHARA Takashi Aq kiyoh...@kk.iij4u.or.jp
 .Sh BUGS
-The
 .Nm
-not support configuration for baud rate yet.
+does not support configuration for baud rate yet.

Index: src/share/man/man4/btuart.4
diff -u src/share/man/man4/btuart.4:1.8 src/share/man/man4/btuart.4:1.9
--- src/share/man/man4/btuart.4:1.8	Wed May 27 19:23:59 2009
+++ src/share/man/man4/btuart.4	Sun Aug 23 19:44:39 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: btuart.4,v 1.8 2009/05/27 19:23:59 snj Exp $
+.\" $NetBSD: btuart.4,v 1.9 2009/08/23 19:44:39 plunky Exp $
 .\"
 .\" Copyright (c) 2007 KIYOHARA Takashi
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 23, 2008
+.Dd August 23, 2009
 .Dt BTUART 4
 .Os
 .Sh NAME
@@ -44,6 +44,12 @@
 .Bq Transport Layer
 specification, Vol 4 part A.
 .Qc
+.Pp
+The
+.Xr btattach 8
+program is used to configure the tty line and create the
+.Nm
+driver instance.
 .Sh SEE ALSO
 .Xr bcsp 4 ,
 .Xr bluetooth 4 ,



CVS commit: src/share/man/man4

2009-08-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Aug 23 19:32:16 UTC 2009

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

Log Message:
Rewrite the sentence about the socket options to avoid questionable
typographic layout and to be more inline with the wording of the rest of
the man page.


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

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

Modified files:

Index: src/share/man/man4/unix.4
diff -u src/share/man/man4/unix.4:1.19 src/share/man/man4/unix.4:1.20
--- src/share/man/man4/unix.4:1.19	Thu Aug  9 15:23:03 2007
+++ src/share/man/man4/unix.4	Sun Aug 23 19:32:16 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: unix.4,v 1.19 2007/08/09 15:23:03 he Exp $
+.\"	$NetBSD: unix.4,v 1.20 2009/08/23 19:32:16 joerg Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -168,12 +168,12 @@
 purposely not received, are automatically closed by the system
 when the destination socket is closed.
 .Pp
-There are two
+A UNIX-domain socket supports two
 .Tn socket-level
-.Xr setsockopt 2 / Ns Xr getsockopt 2
-option available in the
-.Nm
-domain:
+options for use with
+.Xr setsockopt 2
+and
+.Xr getsockopt 2 :
 .Pp
 The
 .Dv LOCAL_CREDS



CVS commit: src/sys/dev/usb

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 19:03:18 UTC 2009

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

Log Message:
Print devinfo on the same line as locators, and make the transfer mode
output aprint_verbose


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/dev/usb/umass.c

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

Modified files:

Index: src/sys/dev/usb/umass.c
diff -u src/sys/dev/usb/umass.c:1.131 src/sys/dev/usb/umass.c:1.132
--- src/sys/dev/usb/umass.c:1.131	Tue Mar 17 19:12:17 2009
+++ src/sys/dev/usb/umass.c	Sun Aug 23 19:03:18 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass.c,v 1.131 2009/03/17 19:12:17 dyoung Exp $	*/
+/*	$NetBSD: umass.c,v 1.132 2009/08/23 19:03:18 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.131 2009/03/17 19:12:17 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.132 2009/08/23 19:03:18 jmcneill Exp $");
 
 #include "atapibus.h"
 #include "scsibus.h"
@@ -312,8 +312,7 @@
 
 	devinfop = usbd_devinfo_alloc(uaa->device, 0);
 	aprint_naive("\n");
-	aprint_normal("\n");
-	aprint_normal_dev(self, "%s\n", devinfop);
+	aprint_normal(": %s\n", devinfop);
 	usbd_devinfo_free(devinfop);
 
 	sc->sc_udev = uaa->device;
@@ -418,7 +417,7 @@
 		break;
 	}
 
-	aprint_normal_dev(self, "using %s over %s\n", sCommand, sWire);
+	aprint_verbose_dev(self, "using %s over %s\n", sCommand, sWire);
 
 	if (quirk != NULL && quirk->uq_init != NULL) {
 		err = (*quirk->uq_init)(sc);



CVS commit: src/distrib/utils/sysinst

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 18:43:33 UTC 2009

Modified Files:
src/distrib/utils/sysinst: disks.c

Log Message:
PR# install/41925: sysinst find_disks() should display more than just
   the device name

Try ATA/SCSI identify commands and when successful, use the model information
along with the disk size when creating the 'Available disks' menu.

Instead of having a list of disks (wd0, wd1, sd0) the menu now looks like:

  Available disks

 >a: wd0 (977M, SanDisk SDCFB-1024)
  b: wd1 (233G, FUJITSU MHY2250BH)
  c: sd0 (246M, LEXAR JUMPDRIVE ELITE)

ok martin@


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/distrib/utils/sysinst/disks.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/utils/sysinst/disks.c
diff -u src/distrib/utils/sysinst/disks.c:1.105 src/distrib/utils/sysinst/disks.c:1.106
--- src/distrib/utils/sysinst/disks.c:1.105	Thu May 14 16:23:38 2009
+++ src/distrib/utils/sysinst/disks.c	Sun Aug 23 18:43:33 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.105 2009/05/14 16:23:38 sborrill Exp $ */
+/*	$NetBSD: disks.c,v 1.106 2009/08/23 18:43:33 jmcneill Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -56,6 +56,12 @@
 #include 
 #undef static
 
+#include 
+#include 
+
+#include 
+#include 
+
 #include "defs.h"
 #include "md.h"
 #include "msg_defs.h"
@@ -66,6 +72,7 @@
 #define MAX_DISKS 15
 struct disk_desc {
 	char	dd_name[SSTRSIZE];
+	char	dd_descr[70];
 	uint	dd_no_mbr;
 	uint	dd_cyl;
 	uint	dd_head;
@@ -88,6 +95,213 @@
 
 static const char *disk_names[] = { DISK_NAMES, "vnd", NULL };
 
+/* from src/sbin/atactl/atactl.c
+ * extract_string: copy a block of bytes out of ataparams and make
+ * a proper string out of it, truncating trailing spaces and preserving
+ * strict typing. And also, not doing unaligned accesses.
+ */
+static void
+ata_extract_string(char *buf, size_t bufmax,
+		   uint8_t *bytes, unsigned numbytes,
+		   int needswap)
+{
+	unsigned i;
+	size_t j;
+	unsigned char ch1, ch2;
+
+	for (i = 0, j = 0; i < numbytes; i += 2) {
+		ch1 = bytes[i];
+		ch2 = bytes[i+1];
+		if (needswap && j < bufmax-1) {
+			buf[j++] = ch2;
+		}
+		if (j < bufmax-1) {
+			buf[j++] = ch1;
+		}
+		if (!needswap && j < bufmax-1) {
+			buf[j++] = ch2;
+		}
+	}
+	while (j > 0 && buf[j-1] == ' ') {
+		j--;
+	}
+	buf[j] = '\0';
+}
+
+/*
+ * from src/sbin/scsictl/scsi_subr.c
+ */
+#define STRVIS_ISWHITE(x) ((x) == ' ' || (x) == '\0' || (x) == (u_char)'\377')
+
+static void
+scsi_strvis(char *sdst, size_t dlen, const char *ssrc, size_t slen)
+{
+	u_char *dst = (u_char *)sdst;
+	const u_char *src = (const u_char *)ssrc;
+
+	/* Trim leading and trailing blanks and NULs. */
+	while (slen > 0 && STRVIS_ISWHITE(src[0]))
+		++src, --slen;
+	while (slen > 0 && STRVIS_ISWHITE(src[slen - 1]))
+		--slen;
+
+	while (slen > 0) {
+		if (*src < 0x20 || *src >= 0x80) {
+			/* non-printable characters */
+			dlen -= 4;
+			if (dlen < 1)
+break;
+			*dst++ = '\\';
+			*dst++ = ((*src & 0300) >> 6) + '0';
+			*dst++ = ((*src & 0070) >> 3) + '0';
+			*dst++ = ((*src & 0007) >> 0) + '0';
+		} else if (*src == '\\') {
+			/* quote characters */
+			dlen -= 2;
+			if (dlen < 1)
+break;
+			*dst++ = '\\';
+			*dst++ = '\\';
+		} else {
+			/* normal characters */
+			if (--dlen < 1)
+break;
+			*dst++ = *src;
+		}
+		++src, --slen;
+	}
+
+	*dst++ = 0;
+}
+
+
+static int
+get_descr_scsi(struct disk_desc *dd, int fd)
+{
+	struct scsipi_inquiry_data inqbuf;
+	struct scsipi_inquiry cmd;
+	scsireq_t req;
+/* x4 in case every character is escaped, +1 for NUL. */
+	char vendor[(sizeof(inqbuf.vendor) * 4) + 1],
+	 product[(sizeof(inqbuf.product) * 4) + 1],
+	 revision[(sizeof(inqbuf.revision) * 4) + 1];
+	char size[5];
+	int error;
+
+	memset(&inqbuf, 0, sizeof(inqbuf));
+	memset(&cmd, 0, sizeof(cmd));
+	memset(&req, 0, sizeof(req));
+
+	cmd.opcode = INQUIRY;
+	cmd.length = sizeof(inqbuf);
+	memcpy(req.cmd, &cmd, sizeof(cmd));
+	req.cmdlen = sizeof(cmd);
+	req.databuf = &inqbuf;
+	req.datalen = sizeof(inqbuf);
+	req.timeout = 1;
+	req.flags = SCCMD_READ;
+	req.senselen = SENSEBUFLEN;
+
+	error = ioctl(fd, SCIOCCOMMAND, &req);
+	if (error == -1 || req.retsts != SCCMD_OK)
+		return 0;
+
+	scsi_strvis(vendor, sizeof(vendor), inqbuf.vendor,
+	sizeof(inqbuf.vendor));
+	scsi_strvis(product, sizeof(product), inqbuf.product,
+	sizeof(inqbuf.product));
+	scsi_strvis(revision, sizeof(revision), inqbuf.revision,
+	sizeof(inqbuf.revision));
+
+	humanize_number(size, sizeof(size),
+	(uint64_t)dd->dd_secsize * (uint64_t)dd->dd_totsec,
+	"", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL);
+	
+	snprintf(dd->dd_descr, sizeof(dd->dd_descr),
+	"%s (%s, %s %s)",
+	dd->dd_name, size, vendor, product);
+
+	return 1;
+}
+
+static int
+get_descr_ata(struct disk_desc *dd, int fd)
+{
+	struct atareq req;
+	

CVS commit: src/sys/dev/pci

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 16:21:55 UTC 2009

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

Log Message:
s/Advanced Micro Devices/AMD/ for device descriptions.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/viaide.c

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

Modified files:

Index: src/sys/dev/pci/viaide.c
diff -u src/sys/dev/pci/viaide.c:1.58 src/sys/dev/pci/viaide.c:1.59
--- src/sys/dev/pci/viaide.c:1.58	Sun Dec 21 16:27:57 2008
+++ src/sys/dev/pci/viaide.c	Sun Aug 23 16:21:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: viaide.c,v 1.58 2008/12/21 16:27:57 nonaka Exp $	*/
+/*	$NetBSD: viaide.c,v 1.59 2009/08/23 16:21:55 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.58 2008/12/21 16:27:57 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.59 2009/08/23 16:21:55 jmcneill Exp $");
 
 #include 
 #include 
@@ -75,27 +75,27 @@
 static const struct pciide_product_desc pciide_amd_products[] =  {
 	{ PCI_PRODUCT_AMD_PBC756_IDE,
 	  0,
-	  "Advanced Micro Devices AMD756 IDE Controller",
+	  "AMD AMD756 IDE Controller",
 	  via_chip_map
 	},
 	{ PCI_PRODUCT_AMD_PBC766_IDE,
 	  0,
-	  "Advanced Micro Devices AMD766 IDE Controller",
+	  "AMD AMD766 IDE Controller",
 	  via_chip_map
 	},
 	{ PCI_PRODUCT_AMD_PBC768_IDE,
 	  0,
-	  "Advanced Micro Devices AMD768 IDE Controller",
+	  "AMD AMD768 IDE Controller",
 	  via_chip_map
 	},
 	{ PCI_PRODUCT_AMD_PBC8111_IDE,
 	  0,
-	  "Advanced Micro Devices AMD8111 IDE Controller",
+	  "AMD AMD8111 IDE Controller",
 	  via_chip_map
 	},
 	{ PCI_PRODUCT_AMD_CS5536_IDE,
 	  0,
-	  "Advanced Micro Devices CS5536 IDE Controller",
+	  "AMD CS5536 IDE Controller",
 	  via_chip_map
 	},
 	{ 0,



CVS commit: src/sys/dev/pci

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 16:21:36 UTC 2009

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

Log Message:
Print device description on the same line as locators.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/pciide_common.c

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

Modified files:

Index: src/sys/dev/pci/pciide_common.c
diff -u src/sys/dev/pci/pciide_common.c:1.41 src/sys/dev/pci/pciide_common.c:1.42
--- src/sys/dev/pci/pciide_common.c:1.41	Sun Mar 15 21:28:09 2009
+++ src/sys/dev/pci/pciide_common.c	Sun Aug 23 16:21:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pciide_common.c,v 1.41 2009/03/15 21:28:09 cegger Exp $	*/
+/*	$NetBSD: pciide_common.c,v 1.42 2009/08/23 16:21:36 jmcneill Exp $	*/
 
 
 /*
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.41 2009/03/15 21:28:09 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.42 2009/08/23 16:21:36 jmcneill Exp $");
 
 #include 
 #include 
@@ -132,7 +132,6 @@
 	const char *displaydev;
 
 	aprint_naive(": disk controller\n");
-	aprint_normal("\n");
 
 	sc->sc_pci_id = pa->pa_id;
 	if (pp == NULL) {
@@ -147,9 +146,10 @@
 
 	/* if displaydev == NULL, printf is done in chip-specific map */
 	if (displaydev)
-		aprint_normal_dev(sc->sc_wdcdev.sc_atac.atac_dev,
-		"%s (rev. 0x%02x)\n", displaydev,
+		aprint_normal(": %s (rev. 0x%02x)\n", displaydev,
 		PCI_REVISION(pa->pa_class));
+	else
+		aprint_normal("\n");
 
 	sc->sc_pc = pa->pa_pc;
 	sc->sc_tag = pa->pa_tag;



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

2009-08-23 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Sun Aug 23 16:15:45 UTC 2009

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

Log Message:
Typo fix: Mhz -> MHz

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/ia64/ia64/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/ia64/ia64/machdep.c
diff -u src/sys/arch/ia64/ia64/machdep.c:1.16 src/sys/arch/ia64/ia64/machdep.c:1.17
--- src/sys/arch/ia64/ia64/machdep.c:1.16	Mon Jul 20 05:10:49 2009
+++ src/sys/arch/ia64/ia64/machdep.c	Sun Aug 23 16:15:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.16 2009/07/20 05:10:49 kiyohara Exp $	*/
+/*	$NetBSD: machdep.c,v 1.17 2009/08/23 16:15:45 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -227,7 +227,7 @@
 
 	printf("CPU: %s (", model_name);
 	if (processor_frequency) {
-		printf("%ld.%02ld-Mhz ", (processor_frequency + 4999) / Mhz,
+		printf("%ld.%02ld-MHz ", (processor_frequency + 4999) / Mhz,
 		((processor_frequency + 4999) / (Mhz/100)) % 100);
 	}
 	printf("%s)\n", family_name);



CVS commit: src/sys/dev/pci

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 16:11:48 UTC 2009

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

Log Message:
Don't maintain a list of descriptions for each supported device, that's
what PCIVERBOSE is for; use pci_devinfo instead.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/pci/if_vr.c

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

Modified files:

Index: src/sys/dev/pci/if_vr.c
diff -u src/sys/dev/pci/if_vr.c:1.96 src/sys/dev/pci/if_vr.c:1.97
--- src/sys/dev/pci/if_vr.c:1.96	Wed May  6 09:25:16 2009
+++ src/sys/dev/pci/if_vr.c	Sun Aug 23 16:11:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vr.c,v 1.96 2009/05/06 09:25:16 cegger Exp $	*/
+/*	$NetBSD: if_vr.c,v 1.97 2009/08/23 16:11:48 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.96 2009/05/06 09:25:16 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.97 2009/08/23 16:11:48 jmcneill Exp $");
 
 #include "rnd.h"
 
@@ -150,19 +150,12 @@
 static const struct vr_type {
 	pci_vendor_id_t		vr_vid;
 	pci_product_id_t	vr_did;
-	const char		*vr_name;
 } vr_devs[] = {
-	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT3043,
-		"VIA VT3043 (Rhine) 10/100" },
-	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT6102,
-		"VIA VT6102 (Rhine II) 10/100" },
-	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT6105,
-		"VIA VT6105 (Rhine III) 10/100" },
-	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT6105M,
-		"VIA VT6105M (Rhine III) 10/100" },
-	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT86C100A,
-		"VIA VT86C100A (Rhine-II) 10/100" },
-	{ 0, 0, NULL }
+	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT3043 },
+	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT6102 },
+	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT6105 },
+	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT6105M },
+	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT86C100A }
 };
 
 /*
@@ -1407,8 +1400,10 @@
 vr_lookup(struct pci_attach_args *pa)
 {
 	const struct vr_type *vrt;
+	int i;
 
-	for (vrt = vr_devs; vrt->vr_name != NULL; vrt++) {
+	for (i = 0; i < __arraycount(vr_devs); i++) {
+		vrt = &vr_devs[i];
 		if (PCI_VENDOR(pa->pa_id) == vrt->vr_vid &&
 		PCI_PRODUCT(pa->pa_id) == vrt->vr_did)
 			return (vrt);
@@ -1449,11 +1444,11 @@
 	struct vr_softc *sc = device_private(self);
 	struct pci_attach_args *pa = (struct pci_attach_args *) aux;
 	bus_dma_segment_t seg;
-	const struct vr_type *vrt;
 	uint32_t reg;
 	struct ifnet *ifp;
 	uint8_t eaddr[ETHER_ADDR_LEN], mac;
 	int i, rseg, error;
+	char devinfo[256];
 
 #define	PCI_CONF_WRITE(r, v)	pci_conf_write(sc->vr_pc, sc->vr_tag, (r), (v))
 #define	PCI_CONF_READ(r)	pci_conf_read(sc->vr_pc, sc->vr_tag, (r))
@@ -1463,13 +1458,10 @@
 	sc->vr_tag = pa->pa_tag;
 	callout_init(&sc->vr_tick_ch, 0);
 
-	vrt = vr_lookup(pa);
-	if (vrt == NULL) {
-		printf("\n");
-		panic("vr_attach: impossible");
-	}
-
-	printf(": %s Ethernet\n", vrt->vr_name);
+	pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
+	aprint_naive("\n");
+	aprint_normal(": %s (rev. 0x%02x)\n", devinfo,
+	PCI_REVISION(pa->pa_class));
 
 	/*
 	 * Handle power management nonsense.



CVS commit: src/sys/dev/isa

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 16:02:53 UTC 2009

Modified Files:
src/sys/dev/isa: attimer_isa.c

Log Message:
Not much sense in printing 'AT Timer' when the 'attimer' driver attaches.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/isa/attimer_isa.c

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

Modified files:

Index: src/sys/dev/isa/attimer_isa.c
diff -u src/sys/dev/isa/attimer_isa.c:1.12 src/sys/dev/isa/attimer_isa.c:1.13
--- src/sys/dev/isa/attimer_isa.c:1.12	Tue May 12 08:44:19 2009
+++ src/sys/dev/isa/attimer_isa.c	Sun Aug 23 16:02:53 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: attimer_isa.c,v 1.12 2009/05/12 08:44:19 cegger Exp $	*/
+/*	$NetBSD: attimer_isa.c,v 1.13 2009/08/23 16:02:53 jmcneill Exp $	*/
 
 /*
  *  Copyright (c) 2005 The NetBSD Foundation.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: attimer_isa.c,v 1.12 2009/05/12 08:44:19 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: attimer_isa.c,v 1.13 2009/08/23 16:02:53 jmcneill Exp $");
 
 #include 
 #include 
@@ -131,8 +131,8 @@
 	sc->sc_dev = self;
 	sc->sc_iot = ia->ia_iot;
 
-	aprint_naive(": AT Timer\n");
-	aprint_normal(": AT Timer\n");
+	aprint_naive("\n");
+	aprint_normal("\n");
 
 	sc->sc_size = 4;
 	if (bus_space_map(sc->sc_iot, IO_TIMER1, sc->sc_size, 0,



CVS commit: src/sys/arch/x86/x86

2009-08-23 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Sun Aug 23 16:02:50 UTC 2009

Modified Files:
src/sys/arch/x86/x86: powernow_k8.c

Log Message:
Typo fix: Mhz -> MHz

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/x86/x86/powernow_k8.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/x86/x86/powernow_k8.c
diff -u src/sys/arch/x86/x86/powernow_k8.c:1.24 src/sys/arch/x86/x86/powernow_k8.c:1.25
--- src/sys/arch/x86/x86/powernow_k8.c:1.24	Wed Nov 12 12:36:09 2008
+++ src/sys/arch/x86/x86/powernow_k8.c	Sun Aug 23 16:02:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: powernow_k8.c,v 1.24 2008/11/12 12:36:09 ad Exp $ */
+/*	$NetBSD: powernow_k8.c,v 1.25 2009/08/23 16:02:50 ahoka Exp $ */
 /*	$OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */
 
 /*-
@@ -59,7 +59,7 @@
 /* AMD POWERNOW K8 driver */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: powernow_k8.c,v 1.24 2008/11/12 12:36:09 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: powernow_k8.c,v 1.25 2009/08/23 16:02:50 ahoka Exp $");
 
 #include 
 #include 
@@ -470,7 +470,7 @@
 
 	aprint_normal("%s: AMD %s Technology %d MHz\n",
 	cpuname, techname, cur_freq);
-	aprint_normal("%s: available frequencies (Mhz): %s\n",
+	aprint_normal("%s: available frequencies (MHz): %s\n",
 	cpuname, freq_names);
 
 	return;



CVS commit: src/sys/arch/i386/i386

2009-08-23 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Sun Aug 23 15:58:39 UTC 2009

Modified Files:
src/sys/arch/i386/i386: powernow_k7.c

Log Message:
Fix typo: Mhz -> MHz

No functional change at all intended.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/i386/i386/powernow_k7.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/i386/i386/powernow_k7.c
diff -u src/sys/arch/i386/i386/powernow_k7.c:1.32 src/sys/arch/i386/i386/powernow_k7.c:1.33
--- src/sys/arch/i386/i386/powernow_k7.c:1.32	Wed Nov 12 12:36:02 2008
+++ src/sys/arch/i386/i386/powernow_k7.c	Sun Aug 23 15:58:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: powernow_k7.c,v 1.32 2008/11/12 12:36:02 ad Exp $ */
+/*	$NetBSD: powernow_k7.c,v 1.33 2009/08/23 15:58:39 ahoka Exp $ */
 /*	$OpenBSD: powernow-k7.c,v 1.24 2006/06/16 05:58:50 gwk Exp $ */
 
 /*-
@@ -59,7 +59,7 @@
 /* AMD POWERNOW K7 driver */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: powernow_k7.c,v 1.32 2008/11/12 12:36:02 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: powernow_k7.c,v 1.33 2009/08/23 15:58:39 ahoka Exp $");
 
 #include 
 #include 
@@ -468,7 +468,7 @@
 
 	aprint_normal("%s: AMD %s Technology %d MHz\n",
 	cpuname, techname, cur_freq);
-	aprint_normal("%s: frequencies available (Mhz): %s\n",
+	aprint_normal("%s: frequencies available (MHz): %s\n",
 	cpuname, freq_names);
 
 	return;



CVS commit: src/sys/dev/isapnp

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 15:56:56 UTC 2009

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

Log Message:
Drop the string 'ISA Plug 'n Play device support', it's not something to
brag about anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/isapnp/isapnp.c

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

Modified files:

Index: src/sys/dev/isapnp/isapnp.c
diff -u src/sys/dev/isapnp/isapnp.c:1.58 src/sys/dev/isapnp/isapnp.c:1.59
--- src/sys/dev/isapnp/isapnp.c:1.58	Mon Apr 28 20:23:53 2008
+++ src/sys/dev/isapnp/isapnp.c	Sun Aug 23 15:56:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isapnp.c,v 1.58 2008/04/28 20:23:53 martin Exp $	*/
+/*	$NetBSD: isapnp.c,v 1.59 2009/08/23 15:56:56 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1996, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.58 2008/04/28 20:23:53 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.59 2009/08/23 15:56:56 jmcneill Exp $");
 
 #include "isadma.h"
 
@@ -907,7 +907,8 @@
 	sc->sc_dmat = ia->ia_dmat;
 	sc->sc_ncards = 0;
 
-	aprint_normal(": ISA Plug 'n Play device support\n");
+	aprint_naive("\n");
+	aprint_normal("\n");
 
 	if (isapnp_map(sc)) {
 		aprint_error_dev(self, "unable to map PnP register\n");



CVS commit: src/sys/dev

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 15:56:07 UTC 2009

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

Log Message:
I'm not so sure this is actually CPU-intensive in 2009, so don't print it.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/midi.c

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

Modified files:

Index: src/sys/dev/midi.c
diff -u src/sys/dev/midi.c:1.69 src/sys/dev/midi.c:1.70
--- src/sys/dev/midi.c:1.69	Tue Apr  7 17:54:58 2009
+++ src/sys/dev/midi.c	Sun Aug 23 15:56:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: midi.c,v 1.69 2009/04/07 17:54:58 dyoung Exp $	*/
+/*	$NetBSD: midi.c,v 1.70 2009/08/23 15:56:07 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.69 2009/04/07 17:54:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.70 2009/08/23 15:56:07 jmcneill Exp $");
 
 #include "midi.h"
 #include "sequencer.h"
@@ -275,9 +275,7 @@
 			device_xname(sc->dev), "rcv incomplete msgs");
 	}
 	
-	aprint_normal(": %s%s\n", mi.name,
-	(sc->props & (MIDI_PROP_OUT_INTR|MIDI_PROP_NO_OUTPUT)) ?
-	"" : " (CPU-intensive output)");
+	aprint_normal(": %s\n", mi.name);
 }
 
 void midi_register_hw_if_ext(struct midi_hw_if_ext *exthw) {



CVS commit: src/usr.bin/unzip

2009-08-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug 23 15:50:35 UTC 2009

Modified Files:
src/usr.bin/unzip: unzip.1 unzip.c

Log Message:
Fix typos.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/unzip/unzip.1
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/unzip/unzip.c

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

Modified files:

Index: src/usr.bin/unzip/unzip.1
diff -u src/usr.bin/unzip/unzip.1:1.4 src/usr.bin/unzip/unzip.1:1.5
--- src/usr.bin/unzip/unzip.1:1.4	Sat Aug 22 17:19:11 2009
+++ src/usr.bin/unzip/unzip.1	Sun Aug 23 15:50:35 2009
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD: revision 180125$
-.\" $NetBSD: unzip.1,v 1.4 2009/08/22 17:19:11 joerg Exp $
+.\" $NetBSD: unzip.1,v 1.5 2009/08/23 15:50:35 wiz Exp $
 .\"
 .Dd August 22, 2009
 .Dt UNZIP 1
@@ -96,7 +96,7 @@
 List verbosely, rather than extract, the contents of the zipfile.
 This differs from
 .Fl l
-by using the long listening.
+by using the long listing.
 Note that most of the data is currently fake and does not reflect the
 content of the archive.
 .It Fl x Ar pattern

Index: src/usr.bin/unzip/unzip.c
diff -u src/usr.bin/unzip/unzip.c:1.3 src/usr.bin/unzip/unzip.c:1.4
--- src/usr.bin/unzip/unzip.c:1.3	Sat Aug 22 17:19:11 2009
+++ src/usr.bin/unzip/unzip.c	Sun Aug 23 15:50:35 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: unzip.c,v 1.3 2009/08/22 17:19:11 joerg Exp $ */
+/* $NetBSD: unzip.c,v 1.4 2009/08/23 15:50:35 wiz Exp $ */
 
 /*-
  * Copyright (c) 2009 Joerg Sonnenberger 
@@ -37,7 +37,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: unzip.c,v 1.3 2009/08/22 17:19:11 joerg Exp $");
+__RCSID("$NetBSD: unzip.c,v 1.4 2009/08/23 15:50:35 wiz Exp $");
 
 #include 
 #include 
@@ -57,7 +57,7 @@
 
 /* command-line options */
 static int		 a_opt;		/* convert EOL */
-static int		 c_opt;		/* extract to stoud */
+static int		 c_opt;		/* extract to stdout */
 static const char	*d_arg;		/* directory */
 static int		 f_opt;		/* update existing files only */
 static int		 j_opt;		/* junk directories */



CVS commit: src/usr.bin/sort

2009-08-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug 23 15:45:08 UTC 2009

Modified Files:
src/usr.bin/sort: sort.1

Log Message:
Fix pasto.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/sort/sort.1

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

Modified files:

Index: src/usr.bin/sort/sort.1
diff -u src/usr.bin/sort/sort.1:1.28 src/usr.bin/sort/sort.1:1.29
--- src/usr.bin/sort/sort.1:1.28	Sat Aug 22 21:55:08 2009
+++ src/usr.bin/sort/sort.1	Sun Aug 23 15:45:08 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sort.1,v 1.28 2009/08/22 21:55:08 dsl Exp $
+.\"	$NetBSD: sort.1,v 1.29 2009/08/23 15:45:08 wiz Exp $
 .\"
 .\" Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -97,11 +97,11 @@
 .Nm
 returns 0.
 .Nm
+.Fl c
+produces no output.
 .It Fl H
 Ignored for compatibility with earlier versions of
 .Nm .
-.Fl c
-produces no output.
 .It Fl m
 Merge only; the input files are assumed to be pre-sorted.
 .It Fl o Ar output



CVS commit: src/sys/arch/x86/pci

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 15:42:51 UTC 2009

Modified Files:
src/sys/arch/x86/pci: pcib.c

Log Message:
Save a line of dmesg by printing the vendor/product info on the same line
as the locators.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x86/pci/pcib.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/x86/pci/pcib.c
diff -u src/sys/arch/x86/pci/pcib.c:1.9 src/sys/arch/x86/pci/pcib.c:1.10
--- src/sys/arch/x86/pci/pcib.c:1.9	Tue Aug 18 17:15:10 2009
+++ src/sys/arch/x86/pci/pcib.c	Sun Aug 23 15:42:51 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcib.c,v 1.9 2009/08/18 17:15:10 dyoung Exp $	*/
+/*	$NetBSD: pcib.c,v 1.10 2009/08/23 15:42:51 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.9 2009/08/18 17:15:10 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.10 2009/08/23 15:42:51 jmcneill Exp $");
 
 #include 
 #include 
@@ -188,14 +188,13 @@
 	char devinfo[256];
 
 	aprint_naive("\n");
-	aprint_normal("\n");
 
 	/*
 	 * Just print out a description and defer configuration
 	 * until all PCI devices have been attached.
 	 */
 	pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
-	aprint_normal_dev(self, "%s (rev. 0x%02x)\n", devinfo,
+	aprint_normal(": %s (rev. 0x%02x)\n", devinfo,
 	PCI_REVISION(pa->pa_class));
 
 	sc->sc_pc = pa->pa_pc;



CVS commit: src/share/man/man4

2009-08-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug 23 15:41:28 UTC 2009

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

Log Message:
Reword slightly so I can understand it more easily.


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

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

Modified files:

Index: src/share/man/man4/gpio.4
diff -u src/share/man/man4/gpio.4:1.13 src/share/man/man4/gpio.4:1.14
--- src/share/man/man4/gpio.4:1.13	Sun Aug 23 10:20:41 2009
+++ src/share/man/man4/gpio.4	Sun Aug 23 15:41:28 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: gpio.4,v 1.13 2009/08/23 10:20:41 mbalmer Exp $
+.\" $NetBSD: gpio.4,v 1.14 2009/08/23 15:41:28 wiz Exp $
 .\"	$OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $
 .\"
 .\" Copyright (c) 2004 Alexander Yurchenko 
@@ -57,9 +57,9 @@
 .Xr kauth 9
 framework.
 .Pp
-If the
+If for example
 .Xr secmodel_securelevel 9
-is active, e.g., the layout of the GPIO device is defined at a securelevel
+is active, the layout of the GPIO device is defined at a securelevel
 less than 1, i.e. typically during system boot, and cannot be changed later.
 GPIO pins can be configured and given a symbolic name and device drivers
 that use GPIO pins can be attached to the



CVS commit: src/sys/arch/x86/pci

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 15:37:51 UTC 2009

Modified Files:
src/sys/arch/x86/pci: pchb.c

Log Message:
Save a line of dmesg by printing the vendor/product info on the same line
as the locators.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x86/pci/pchb.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/x86/pci/pchb.c
diff -u src/sys/arch/x86/pci/pchb.c:1.18 src/sys/arch/x86/pci/pchb.c:1.19
--- src/sys/arch/x86/pci/pchb.c:1.18	Tue Apr  7 17:52:36 2009
+++ src/sys/arch/x86/pci/pchb.c	Sun Aug 23 15:37:51 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pchb.c,v 1.18 2009/04/07 17:52:36 dyoung Exp $ */
+/*	$NetBSD: pchb.c,v 1.19 2009/08/23 15:37:51 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 1996, 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.18 2009/04/07 17:52:36 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.19 2009/08/23 15:37:51 jmcneill Exp $");
 
 #include 
 #include 
@@ -162,7 +162,6 @@
 	int doattach, attachflags, has_agp;
 
 	aprint_naive("\n");
-	aprint_normal("\n");
 
 	doattach = 0;
 	has_agp = 0;
@@ -176,7 +175,7 @@
 	 */
 
 	pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
-	aprint_normal_dev(self, "%s (rev. 0x%02x)\n", devinfo,
+	aprint_normal(": %s (rev. 0x%02x)\n", devinfo,
 	PCI_REVISION(pa->pa_class));
 
 	switch (PCI_VENDOR(pa->pa_id)) {



CVS commit: src/usr.bin/ldd

2009-08-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug 23 15:37:39 UTC 2009

Modified Files:
src/usr.bin/ldd: ldd.1

Log Message:
Add missing word and bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/ldd/ldd.1

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

Modified files:

Index: src/usr.bin/ldd/ldd.1
diff -u src/usr.bin/ldd/ldd.1:1.15 src/usr.bin/ldd/ldd.1:1.16
--- src/usr.bin/ldd/ldd.1:1.15	Sat Aug 22 06:52:16 2009
+++ src/usr.bin/ldd/ldd.1	Sun Aug 23 15:37:39 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ldd.1,v 1.15 2009/08/22 06:52:16 mrg Exp $
+.\"	$NetBSD: ldd.1,v 1.16 2009/08/23 15:37:39 wiz Exp $
 .\"
 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 23, 2004
+.Dd August 23, 2009
 .Dt LDD 1
 .Os
 .Sh NAME
@@ -55,7 +55,7 @@
 output.
 The first format argument is used for library objects and defaults to
 .Qq "\et-l%o.%m =\*[Gt] %p\en" .
-The second format argument is used for non-library objects defaults to
+The second format argument is used for non-library objects and defaults to
 .Qq "\et%o =\*[Gt] %p\en" .
 .Pp
 These arguments are interpreted as format strings a la



CVS commit: src/sys/dev/mii

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 15:26:43 UTC 2009

Modified Files:
src/sys/dev/mii: ukphy.c

Log Message:
Save a line of dmesg by printing the OUI/model after the locators.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/mii/ukphy.c

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

Modified files:

Index: src/sys/dev/mii/ukphy.c
diff -u src/sys/dev/mii/ukphy.c:1.36 src/sys/dev/mii/ukphy.c:1.37
--- src/sys/dev/mii/ukphy.c:1.36	Mon Nov 17 03:04:27 2008
+++ src/sys/dev/mii/ukphy.c	Sun Aug 23 15:26:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukphy.c,v 1.36 2008/11/17 03:04:27 dyoung Exp $	*/
+/*	$NetBSD: ukphy.c,v 1.37 2009/08/23 15:26:42 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.36 2008/11/17 03:04:27 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.37 2009/08/23 15:26:42 jmcneill Exp $");
 
 #include "opt_mii.h"
 
@@ -126,20 +126,18 @@
 	int i;
 #endif
 
-	aprint_naive(": Media interface\n");
-	aprint_normal(": Generic IEEE 802.3u media interface\n");
 #ifdef MIIVERBOSE
 	for (i = 0; mii_knowndevs[i].descr != NULL; i++)
 		if (mii_knowndevs[i].oui == oui &&
 		mii_knowndevs[i].model == model)
 			break;
 	if (mii_knowndevs[i].descr != NULL)
-		aprint_normal_dev(self, "%s (OUI 0x%06x, model 0x%04x), rev. %d\n",
+		aprint_normal(": %s (OUI 0x%06x, model 0x%04x), rev. %d\n",
 		   mii_knowndevs[i].descr,
 		   oui, model, rev);
 	else
 #endif
-		aprint_normal_dev(self, "OUI 0x%06x, model 0x%04x, rev. %d\n",
+		aprint_normal(": OUI 0x%06x, model 0x%04x, rev. %d\n",
 		   oui, model, rev);
 
 	sc->mii_dev = self;



CVS commit: src/sys/dev/acpi

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 15:16:16 UTC 2009

Modified Files:
src/sys/dev/acpi: acpi.c acpi_osd.h
src/sys/dev/acpi/acpica: OsdEnvironment.c OsdSchedule.c

Log Message:
When ACPI is not present, free any resources used by the ACPICA. Also,
no need to complain (unless we're debugging) that ACPI is not present.


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/acpi_osd.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/acpica/OsdEnvironment.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/acpica/OsdSchedule.c

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

Modified files:

Index: src/sys/dev/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.129 src/sys/dev/acpi/acpi.c:1.130
--- src/sys/dev/acpi/acpi.c:1.129	Tue Aug 18 21:38:41 2009
+++ src/sys/dev/acpi/acpi.c	Sun Aug 23 15:16:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.129 2009/08/18 21:38:41 cegger Exp $	*/
+/*	$NetBSD: acpi.c,v 1.130 2009/08/23 15:16:16 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.129 2009/08/18 21:38:41 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.130 2009/08/23 15:16:16 jmcneill Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -244,8 +244,11 @@
 
 	rv = AcpiInitializeTables(acpi_initial_tables, 128, 0);
 	if (ACPI_FAILURE(rv)) {
+#ifdef ACPI_DEBUG
 		printf("ACPI: unable to initialize ACPI tables: %s\n",
 		AcpiFormatException(rv));
+#endif
+		AcpiTerminate();
 		return 0;
 	}
 
@@ -253,6 +256,7 @@
 	if (ACPI_FAILURE(rv)) {
 		printf("ACPI: unable to reallocate root table: %s\n",
 		AcpiFormatException(rv));
+		AcpiTerminate();
 		return 0;
 	}
 
@@ -265,12 +269,14 @@
 	if (ACPI_FAILURE(rv)) {
 		printf("ACPI: unable to load tables: %s\n",
 		AcpiFormatException(rv));
+		AcpiTerminate();
 		return 0;
 	}
 
 	rsdt = acpi_map_rsdt();
 	if (rsdt == NULL) {
 		printf("ACPI: unable to map RSDT\n");
+		AcpiTerminate();
 		return 0;
 	}
 
@@ -284,6 +290,7 @@
 		rsdt->AslCompilerRevision);
 		printf("ACPI: not used. set acpi_force_load to use anyway.\n");
 		acpi_unmap_rsdt(rsdt);
+		AcpiTerminate();
 		return 0;
 	}
 
@@ -296,6 +303,7 @@
 	if (ACPI_FAILURE(rv)) {
 		printf("ACPI: unable to initialise SystemMemory handler: %s\n",
 		AcpiFormatException(rv));
+		AcpiTerminate();
 		return 0;
 	}
 	rv = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
@@ -303,6 +311,7 @@
 	if (ACPI_FAILURE(rv)) {
 		printf("ACPI: unable to initialise SystemIO handler: %s\n",
 		 AcpiFormatException(rv));
+		AcpiTerminate();
 		return 0;
 	}
 	rv = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
@@ -310,6 +319,7 @@
 	if (ACPI_FAILURE(rv)) {
 		printf("ACPI: unabled to initialise PciConfig handler: %s\n",
 		AcpiFormatException(rv));
+		AcpiTerminate();
 		return 0;
 	}
 #endif
@@ -317,6 +327,7 @@
 	rv = AcpiEnableSubsystem(~(ACPI_NO_HARDWARE_INIT|ACPI_NO_ACPI_ENABLE));
 	if (ACPI_FAILURE(rv)) {
 		printf("ACPI: unable to enable: %s\n", AcpiFormatException(rv));
+		AcpiTerminate();
 		return 0;
 	}
 

Index: src/sys/dev/acpi/acpi_osd.h
diff -u src/sys/dev/acpi/acpi_osd.h:1.1 src/sys/dev/acpi/acpi_osd.h:1.2
--- src/sys/dev/acpi/acpi_osd.h:1.1	Fri Sep 28 02:09:23 2001
+++ src/sys/dev/acpi/acpi_osd.h	Sun Aug 23 15:16:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_osd.h,v 1.1 2001/09/28 02:09:23 thorpej Exp $	*/
+/*	$NetBSD: acpi_osd.h,v 1.2 2009/08/23 15:16:16 jmcneill Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -45,4 +45,3 @@
 
 /* Osd/OsdSchedule.c */
 void	acpi_osd_sched_init(void);
-void	acpi_osd_sched_fini(void);

Index: src/sys/dev/acpi/acpica/OsdEnvironment.c
diff -u src/sys/dev/acpi/acpica/OsdEnvironment.c:1.4 src/sys/dev/acpi/acpica/OsdEnvironment.c:1.5
--- src/sys/dev/acpi/acpica/OsdEnvironment.c:1.4	Tue Aug 18 16:41:02 2009
+++ src/sys/dev/acpi/acpica/OsdEnvironment.c	Sun Aug 23 15:16:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: OsdEnvironment.c,v 1.4 2009/08/18 16:41:02 jmcneill Exp $	*/
+/*	$NetBSD: OsdEnvironment.c,v 1.5 2009/08/23 15:16:16 jmcneill Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: OsdEnvironment.c,v 1.4 2009/08/18 16:41:02 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: OsdEnvironment.c,v 1.5 2009/08/23 15:16:16 jmcneill Exp $");
 
 #include 
 
@@ -77,9 +77,6 @@
 ACPI_STATUS
 AcpiOsTerminate(void)
 {
-	/* Tear down the Osd Scheduler. */
-	acpi_osd_sched_fini();
-
 	return acpi_md_OsTerminate();
 }
 

Index: src/sys/dev/acpi/acpica/OsdSchedule.c
diff -u src/sys/dev/acpi/acpica/OsdSchedule.c:1.11 src/sys/dev/acpi/acpica/OsdSchedule.c:1.12
--- src/sys/dev/acpi/acpica/OsdSchedule.c:1.11	Tue Aug 18 16:41:02 2009
+++ src/sys/dev/acpi/acpica/OsdSchedule.c	Sun Aug 23 15:16:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: OsdSc

CVS commit: src/sys/external/intel-public/acpica/dist/tables

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 14:54:53 UTC 2009

Modified Files:
src/sys/external/intel-public/acpica/dist/tables: tbxfroot.c

Log Message:
Hide the message about an RSDP not being found unless we are debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/intel-public/acpica/dist/tables/tbxfroot.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/external/intel-public/acpica/dist/tables/tbxfroot.c
diff -u src/sys/external/intel-public/acpica/dist/tables/tbxfroot.c:1.1.1.1 src/sys/external/intel-public/acpica/dist/tables/tbxfroot.c:1.2
--- src/sys/external/intel-public/acpica/dist/tables/tbxfroot.c:1.1.1.1	Tue Aug 18 16:23:38 2009
+++ src/sys/external/intel-public/acpica/dist/tables/tbxfroot.c	Sun Aug 23 14:54:52 2009
@@ -306,7 +306,7 @@
 
 /* A valid RSDP was not found */
 
-ACPI_ERROR ((AE_INFO, "A valid RSDP was not found"));
+ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "A valid RSDP was not found"));
 return_ACPI_STATUS (AE_NOT_FOUND);
 }
 



CVS commit: src/sys/arch/dreamcast/conf

2009-08-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Aug 23 14:38:44 UTC 2009

Modified Files:
src/sys/arch/dreamcast/conf: GENERIC

Log Message:
Use rlphy(4) instead of ukphy(4) for BbA.
---
rtk0 at pci0 dev 0 function 0: SEGA Broadband Adapter (rev. 0x10)
rtk0: interrupting at SH4 IRL 11
rtk0: Ethernet address 00:d0:f1:03:69:68
rlphy0 at rtk0 phy 7: Realtek internal PHY
rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/dreamcast/conf/GENERIC

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/dreamcast/conf/GENERIC
diff -u src/sys/arch/dreamcast/conf/GENERIC:1.90 src/sys/arch/dreamcast/conf/GENERIC:1.91
--- src/sys/arch/dreamcast/conf/GENERIC:1.90	Sat Jan 24 05:06:05 2009
+++ src/sys/arch/dreamcast/conf/GENERIC	Sun Aug 23 14:38:43 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.90 2009/01/24 05:06:05 mrg Exp $
+# $NetBSD: GENERIC,v 1.91 2009/08/23 14:38:43 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -187,7 +187,7 @@
 gapspci*	at g2bus?			# GAPS PCI bridge
 pci*		at gapspci?
 rtk*		at pci? dev ? function ?	# SEGA Broadband Adapter
-ukphy*		at mii? phy ?
+rlphy*		at mii? phy ?
 
 mbe*		at g2bus?			# SEGA LAN Adapter
 



CVS commit: src/sys/arch/dreamcast

2009-08-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Aug 23 14:28:09 UTC 2009

Modified Files:
src/sys/arch/dreamcast/dev/g2: g2bus_bus_mem.c
src/sys/arch/dreamcast/include: bus.h

Log Message:
Add an empty bus_space_mmap(9) function as temporary workaround
for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c.

XXX: no bus_space_subregion(9) for g2bus.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/dreamcast/include/bus.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/dreamcast/dev/g2/g2bus_bus_mem.c
diff -u src/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c:1.14 src/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c:1.15
--- src/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c:1.14	Mon Apr 28 20:23:16 2008
+++ src/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c	Sun Aug 23 14:28:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: g2bus_bus_mem.c,v 1.14 2008/04/28 20:23:16 martin Exp $	*/
+/*	$NetBSD: g2bus_bus_mem.c,v 1.15 2009/08/23 14:28:09 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: g2bus_bus_mem.c,v 1.14 2008/04/28 20:23:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: g2bus_bus_mem.c,v 1.15 2009/08/23 14:28:09 tsutsui Exp $");
 
 #include 
 #include 
@@ -53,6 +53,7 @@
 int	g2bus_bus_mem_map(void *, bus_addr_t, bus_size_t, int,
 	bus_space_handle_t *);
 void	g2bus_bus_mem_unmap(void *, bus_space_handle_t, bus_size_t);
+paddr_t	g2bus_bus_mem_mmap(void *, bus_addr_t, off_t, int, int);
 
 uint8_t g2bus_bus_mem_read_1(void *, bus_space_handle_t, bus_size_t);
 uint16_t g2bus_bus_mem_read_2(void *, bus_space_handle_t, bus_size_t);
@@ -114,6 +115,7 @@
 
 	t->dbs_map = g2bus_bus_mem_map;
 	t->dbs_unmap = g2bus_bus_mem_unmap;
+	t->dbs_mmap = g2bus_bus_mem_mmap;
 
 	t->dbs_r_1 = g2bus_bus_mem_read_1;
 	t->dbs_r_2 = g2bus_bus_mem_read_2;
@@ -153,6 +155,14 @@
 	/* Nothing to do. */
 }
 
+paddr_t
+g2bus_bus_mem_mmap(void *v, bus_addr_t addr, off_t offset, int prot, int flags)
+{
+
+	/* XXX not implemented */
+	return -1;
+}
+
 /*
  * G2 bus cycles must not be interrupted by IRQs or G2 DMA.
  * The following paired macros will take the necessary precautions.

Index: src/sys/arch/dreamcast/include/bus.h
diff -u src/sys/arch/dreamcast/include/bus.h:1.14 src/sys/arch/dreamcast/include/bus.h:1.15
--- src/sys/arch/dreamcast/include/bus.h:1.14	Mon Apr 28 20:23:16 2008
+++ src/sys/arch/dreamcast/include/bus.h	Sun Aug 23 14:28:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.h,v 1.14 2008/04/28 20:23:16 martin Exp $	*/
+/*	$NetBSD: bus.h,v 1.15 2009/08/23 14:28:09 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -121,6 +121,7 @@
 			bus_size_t);
 	int		(*dbs_subregion)(void *, bus_space_handle_t,
 			bus_size_t, bus_size_t, bus_space_handle_t *);
+	paddr_t		(*dbs_mmap)(void *, bus_addr_t, off_t, int, int);
 
 	/* allocation/deallocation */
 	int		(*dbs_alloc)(void *, bus_addr_t, bus_addr_t,
@@ -270,6 +271,8 @@
 	(*(t)->dbs_unmap)((t)->dbs_cookie, (h), (s))
 #define	bus_space_subregion(t, h, o, s, hp)\
 	(*(t)->dbs_subregion)((t)->dbs_cookie, (h), (o), (s), (hp))
+#define	bus_space_mmap(t, a, o, p, f)\
+	(*(t)->dbs_mmap)((t)->dbs_cookie, (a), (o), (p), (f))
 
 #endif /* _KERNEL */
 



CVS commit: src/sys/arch/atari/dev

2009-08-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Aug 23 13:46:48 UTC 2009

Modified Files:
src/sys/arch/atari/dev: clock.c

Log Message:
Use proper pointer types and names rather than casts for readability.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/atari/dev/clock.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/dev/clock.c
diff -u src/sys/arch/atari/dev/clock.c:1.49 src/sys/arch/atari/dev/clock.c:1.50
--- src/sys/arch/atari/dev/clock.c:1.49	Tue Jul  7 16:16:18 2009
+++ src/sys/arch/atari/dev/clock.c	Sun Aug 23 13:46:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.49 2009/07/07 16:16:18 tsutsui Exp $	*/
+/*	$NetBSD: clock.c,v 1.50 2009/08/23 13:46:48 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.49 2009/07/07 16:16:18 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.50 2009/08/23 13:46:48 tsutsui Exp $");
 
 #include 
 #include 
@@ -428,18 +428,20 @@
  *   Real Time Clock support   *
  ***/
 
-u_int mc146818_read(void *rtc, u_int regno)
+u_int mc146818_read(void *cookie, u_int regno)
 {
+	struct rtc *rtc = cookie;
 
-	((struct rtc *)rtc)->rtc_regno = regno;
-	return ((struct rtc *)rtc)->rtc_data & 0377;
+	rtc->rtc_regno = regno;
+	return rtc->rtc_data & 0xff;
 }
 
-void mc146818_write(void *rtc, u_int regno, u_int value)
+void mc146818_write(void *cookie, u_int regno, u_int value)
 {
+	struct rtc *rtc = cookie;
 
-	((struct rtc *)rtc)->rtc_regno = regno;
-	((struct rtc *)rtc)->rtc_data  = value;
+	rtc->rtc_regno = regno;
+	rtc->rtc_data  = value;
 }
 
 static int



CVS commit: src/sys/dev/mii

2009-08-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Aug 23 13:41:06 UTC 2009

Modified Files:
src/sys/dev/mii: rgephy.c

Log Message:
Remove duplicated PHY_READ() against RGEPHY_MII_BMSR
that FreeBSD said a copy/paste error.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/mii/rgephy.c

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

Modified files:

Index: src/sys/dev/mii/rgephy.c
diff -u src/sys/dev/mii/rgephy.c:1.27 src/sys/dev/mii/rgephy.c:1.28
--- src/sys/dev/mii/rgephy.c:1.27	Tue Apr 28 13:25:17 2009
+++ src/sys/dev/mii/rgephy.c	Sun Aug 23 13:41:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rgephy.c,v 1.27 2009/04/28 13:25:17 tsutsui Exp $	*/
+/*	$NetBSD: rgephy.c,v 1.28 2009/08/23 13:41:06 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2003
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.27 2009/04/28 13:25:17 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.28 2009/08/23 13:41:06 tsutsui Exp $");
 
 
 /*
@@ -367,7 +367,6 @@
 	}
 
 	bmsr = PHY_READ(sc, RGEPHY_MII_BMSR);
-	bmsr = PHY_READ(sc, RGEPHY_MII_BMSR);
 	bmcr = PHY_READ(sc, RGEPHY_MII_BMCR);
 
 	if ((bmcr & RGEPHY_BMCR_ISO) != 0) {



CVS commit: src/distrib/utils/sysinst/arch/cobalt

2009-08-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Aug 23 13:36:54 UTC 2009

Modified Files:
src/distrib/utils/sysinst/arch/cobalt: md.c

Log Message:
Remove existing gzipped bootloader before installing new one
for upgrade install.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/sysinst/arch/cobalt/md.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/utils/sysinst/arch/cobalt/md.c
diff -u src/distrib/utils/sysinst/arch/cobalt/md.c:1.3 src/distrib/utils/sysinst/arch/cobalt/md.c:1.4
--- src/distrib/utils/sysinst/arch/cobalt/md.c:1.3	Sat May 16 10:40:16 2009
+++ src/distrib/utils/sysinst/arch/cobalt/md.c	Sun Aug 23 13:36:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.3 2009/05/16 10:40:16 nonaka Exp $	*/
+/*	$NetBSD: md.c,v 1.4 2009/08/23 13:36:54 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -112,6 +112,7 @@
 		target_expand(PART_BOOT_EXT2FS_PI_MOUNT));
 		run_program(0, "/bin/mkdir -p %s", bootdir);
 		run_program(0, "/bin/cp /usr/mdec/boot %s", bootdir); 
+		run_program(0, "/bin/rm -f %s/%s", bootdir, bootfile); 
 		run_program(0, "/usr/bin/gzip -9 %s/boot", bootdir);
 		for (i = 0; i < __arraycount(kernels); i++)
 			run_program(0, "/bin/ln -fs %s %s/%s",



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

2009-08-23 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Aug 23 13:29:09 UTC 2009

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: fp.S

Log Message:
Storing a single register into the same address twise should be a typo.


To generate a diff of this commit:
cvs rdiff -u -r1.33.38.1 -r1.33.38.2 src/sys/arch/mips/mips/fp.S

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

Modified files:

Index: src/sys/arch/mips/mips/fp.S
diff -u src/sys/arch/mips/mips/fp.S:1.33.38.1 src/sys/arch/mips/mips/fp.S:1.33.38.2
--- src/sys/arch/mips/mips/fp.S:1.33.38.1	Thu Aug 20 22:55:42 2009
+++ src/sys/arch/mips/mips/fp.S	Sun Aug 23 13:29:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fp.S,v 1.33.38.1 2009/08/20 22:55:42 matt Exp $	*/
+/*	$NetBSD: fp.S,v 1.33.38.2 2009/08/23 13:29:09 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -5072,7 +5072,6 @@
 	sltu	v0, v0, v1
 	REG_S	v0, FRAME_RZERO(t2)
 	REG_EPILOGUE
-	sw	v0, FRAME_RZERO(t2)
 #	b	bcemul_done		# fall through to bcemul_done
 
 bcemul_done:



CVS commit: src/sys/arch/i386/stand/lib

2009-08-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Aug 23 12:31:05 UTC 2009

Modified Files:
src/sys/arch/i386/stand/lib: gatea20.c

Log Message:
PR# kern/39726: Soekris 5501-60 boot/bootxx 120 second delay
PR# port-i386/41162: A20 gate legacy hook cause long pxeboot delay on Soekris 
net5501

Remove calls to delay() before polling KBD registers in gateA20().


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/i386/stand/lib/gatea20.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/i386/stand/lib/gatea20.c
diff -u src/sys/arch/i386/stand/lib/gatea20.c:1.11 src/sys/arch/i386/stand/lib/gatea20.c:1.12
--- src/sys/arch/i386/stand/lib/gatea20.c:1.11	Tue Oct 14 14:18:11 2008
+++ src/sys/arch/i386/stand/lib/gatea20.c	Sun Aug 23 12:31:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gatea20.c,v 1.11 2008/10/14 14:18:11 ad Exp $	*/
+/*	$NetBSD: gatea20.c,v 1.12 2009/08/23 12:31:05 jmcneill Exp $	*/
 
 /* extracted from freebsd:sys/i386/boot/biosboot/io.c */
 
@@ -67,12 +67,10 @@
 
 		outb(K_CMD, KC_CMD_WOUT);
 
-		delay(100);
 		while (inb(K_STATUS) & K_IBUF_FUL);
 
 		outb(K_RDWR, x_20);
 
-		delay(100);
 		while (inb(K_STATUS) & K_IBUF_FUL);
 
 		while (inb(K_STATUS) & K_OBUF_FUL)



CVS commit: src/sys/kern

2009-08-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun Aug 23 12:10:50 UTC 2009

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

Log Message:
Back out previous change: do not skip the test on rootspec, but make it
a simple attempt instead of an authoritative answer. The failure of the
rootspec test could me machine-dependant. Thanks to martin@ for pointing
that out.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/subr_tftproot.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_tftproot.c
diff -u src/sys/kern/subr_tftproot.c:1.9 src/sys/kern/subr_tftproot.c:1.10
--- src/sys/kern/subr_tftproot.c:1.9	Fri Aug 21 09:20:47 2009
+++ src/sys/kern/subr_tftproot.c	Sun Aug 23 12:10:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_tftproot.c,v 1.9 2009/08/21 09:20:47 manu Exp $ */
+/*	$NetBSD: subr_tftproot.c,v 1.10 2009/08/23 12:10:50 manu Exp $ */
 
 /*-
  * Copyright (c) 2007 Emmanuel Dreyfus, all rights reserved.
@@ -39,7 +39,7 @@
 #include "opt_md.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.9 2009/08/21 09:20:47 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.10 2009/08/23 12:10:50 manu Exp $");
 
 #include 
 #include 
@@ -129,7 +129,14 @@
 	struct device *dv;
 	int error = -1;
 
-	if ((bootdv != NULL && device_class(bootdv) == DV_IFNET)) {
+	if (rootspec != NULL) {
+		IFNET_FOREACH(ifp)
+			if (strcmp(rootspec, ifp->if_xname) == 0)
+break;
+	} 
+
+	if ((ifp == NULL) &&
+	(bootdv != NULL && device_class(bootdv) == DV_IFNET)) {
 		IFNET_FOREACH(ifp)
 			if (strcmp(device_xname(bootdv), ifp->if_xname) == 0)
 break;



CVS commit: src/sys/dev/gpio

2009-08-23 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sun Aug 23 12:08:57 UTC 2009

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

Log Message:
Prevent the creation of duplicate pin names in GPIOPINSET.
Problem noticed by rmind a while ago.


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

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

Modified files:

Index: src/sys/dev/gpio/gpio.c
diff -u src/sys/dev/gpio/gpio.c:1.27 src/sys/dev/gpio/gpio.c:1.28
--- src/sys/dev/gpio/gpio.c:1.27	Fri Aug 21 12:53:42 2009
+++ src/sys/dev/gpio/gpio.c	Sun Aug 23 12:08:56 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.27 2009/08/21 12:53:42 mbalmer Exp $ */
+/* $NetBSD: gpio.c,v 1.28 2009/08/23 12:08:56 mbalmer Exp $ */
 /*	$OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.27 2009/08/21 12:53:42 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.28 2009/08/23 12:08:56 mbalmer Exp $");
 
 /*
  * General Purpose Input/Output framework.
@@ -390,7 +390,7 @@
 	cfdata_t cf;
 	kauth_cred_t cred;
 	int locs[GPIOCF_NLOCS];
-	int pin, value, flags, npins, found;
+	int pin, value, flags, npins;
 
 	sc = device_lookup_private(&gpio_cd, minor(dev));
 	gc = sc->sc_gc;
@@ -591,17 +591,21 @@
 		}
 
 		/* rename pin or new pin? */
-		/* XXX avoid the creation of duplicates */
 		if (set->gp_name2[0] != '\0') {
-			found = 0;
-			LIST_FOREACH(nm, &sc->sc_names, gp_next)
-if (nm->gp_pin == pin) {
-	strlcpy(nm->gp_name, set->gp_name2,
-	sizeof(nm->gp_name));
-	found = 1;
-	break;
-}
-			if (!found) {
+			struct gpio_name *gnm;
+
+			gnm = NULL;
+			LIST_FOREACH(nm, &sc->sc_names, gp_next) {
+if (!strcmp(nm->gp_name, set->gp_name2) &&
+nm->gp_pin != pin)
+	return EINVAL;	/* duplicate name */
+if (nm->gp_pin == pin)
+	gnm = nm;
+			}
+			if (gnm != NULL)
+strlcpy(gnm->gp_name, set->gp_name2,
+sizeof(gnm->gp_name));
+			else  {
 nm = kmem_alloc(sizeof(struct gpio_name),
 KM_SLEEP);
 strlcpy(nm->gp_name, set->gp_name2,



CVS commit: src/share/man/man4

2009-08-23 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sun Aug 23 10:20:41 UTC 2009

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

Log Message:
Mention that defining the GPIO layout is subject to kauth(9) auhtorization.
Suggested by Elad Efrat.


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

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

Modified files:

Index: src/share/man/man4/gpio.4
diff -u src/share/man/man4/gpio.4:1.12 src/share/man/man4/gpio.4:1.13
--- src/share/man/man4/gpio.4:1.12	Sat Aug  1 15:52:55 2009
+++ src/share/man/man4/gpio.4	Sun Aug 23 10:20:41 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: gpio.4,v 1.12 2009/08/01 15:52:55 mbalmer Exp $
+.\" $NetBSD: gpio.4,v 1.13 2009/08/23 10:20:41 mbalmer Exp $
 .\"	$OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $
 .\"
 .\" Copyright (c) 2004 Alexander Yurchenko 
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd August 1, 2009
+.Dd August 23, 2009
 .Dt GPIO 4
 .Os
 .Sh NAME
@@ -52,8 +52,15 @@
 .Xr ioctl 2
 calls on these devices.
 .Pp
-The layout of the GPIO device is defined at a securelevel less than
-1, i.e. typically during system boot, and cannot be changed later.
+Whether the layout of the GPIO device can be configured is subject to
+authorization by the
+.Xr kauth 9
+framework.
+.Pp
+If the
+.Xr secmodel_securelevel 9
+is active, e.g., the layout of the GPIO device is defined at a securelevel
+less than 1, i.e. typically during system boot, and cannot be changed later.
 GPIO pins can be configured and given a symbolic name and device drivers
 that use GPIO pins can be attached to the
 .Nm



CVS commit: src

2009-08-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 23 09:05:45 UTC 2009

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/xserver: md.alpha md.amd64 md.cats md.i386
md.macppc md.netwinder md.sgimips md.shark md.sparc md.sparc64
src/etc/mtree: NetBSD.dist
src/external/mit/xorg/server/xorg-server/dix: Makefile

Log Message:
install the xorg "protocol.txt" file.


To generate a diff of this commit:
cvs rdiff -u -r1.823 -r1.824 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/xserver/md.alpha
cvs rdiff -u -r1.50 -r1.51 src/distrib/sets/lists/xserver/md.amd64
cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/xserver/md.cats
cvs rdiff -u -r1.67 -r1.68 src/distrib/sets/lists/xserver/md.i386
cvs rdiff -u -r1.49 -r1.50 src/distrib/sets/lists/xserver/md.macppc
cvs rdiff -u -r1.18 -r1.19 src/distrib/sets/lists/xserver/md.netwinder
cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/xserver/md.sgimips
cvs rdiff -u -r1.28 -r1.29 src/distrib/sets/lists/xserver/md.shark
cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/xserver/md.sparc
cvs rdiff -u -r1.36 -r1.37 src/distrib/sets/lists/xserver/md.sparc64
cvs rdiff -u -r1.408 -r1.409 src/etc/mtree/NetBSD.dist
cvs rdiff -u -r1.8 -r1.9 \
src/external/mit/xorg/server/xorg-server/dix/Makefile

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.823 src/distrib/sets/lists/base/mi:1.824
--- src/distrib/sets/lists/base/mi:1.823	Sat Jul 18 22:24:02 2009
+++ src/distrib/sets/lists/base/mi	Sun Aug 23 09:05:44 2009
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.823 2009/07/18 22:24:02 reinoud Exp $
+# $NetBSD: mi,v 1.824 2009/08/23 09:05:44 mrg Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -645,6 +645,7 @@
 ./usr/X11R7/lib/modules/fonts			base-x11-root
 ./usr/X11R7/lib/modules/input			base-x11-root
 ./usr/X11R7/lib/pkgconfig			base-x11-root
+./usr/X11R7/lib/xorgbase-x11-root
 ./usr/X11R7/libexecbase-x11-root
 ./usr/X11R7/man	base-x11-root
 ./usr/X11R7/man/cat1base-x11-root

Index: src/distrib/sets/lists/xserver/md.alpha
diff -u src/distrib/sets/lists/xserver/md.alpha:1.21 src/distrib/sets/lists/xserver/md.alpha:1.22
--- src/distrib/sets/lists/xserver/md.alpha:1.21	Tue Jun 23 04:39:52 2009
+++ src/distrib/sets/lists/xserver/md.alpha	Sun Aug 23 09:05:45 2009
@@ -1,4 +1,4 @@
-# $NetBSD: md.alpha,v 1.21 2009/06/23 04:39:52 mrg Exp $
+# $NetBSD: md.alpha,v 1.22 2009/08/23 09:05:45 mrg Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XalphaNetBSD-unknown-	x11
 ./usr/X11R6/bin/XdecNetBSD-unknown-	x11
@@ -216,6 +216,7 @@
 ./usr/X11R7/lib/modules/libxf8_32bpp.so			-unknown-	obsolete
 ./usr/X11R7/lib/modules/libxf8_32bpp.so.0		-unknown-	obsolete
 ./usr/X11R7/lib/modules/libxf8_32bpp_pic.a		-unknown-	obsolete
+./usr/X11R7/lib/xorg/protocol.txt			-unknown-	xorg
 ./usr/X11R7/man/cat1/Xorg.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat1/cvt.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat1/gtf.0-unknown-	.cat,xorg

Index: src/distrib/sets/lists/xserver/md.amd64
diff -u src/distrib/sets/lists/xserver/md.amd64:1.50 src/distrib/sets/lists/xserver/md.amd64:1.51
--- src/distrib/sets/lists/xserver/md.amd64:1.50	Tue Jun 23 04:39:52 2009
+++ src/distrib/sets/lists/xserver/md.amd64	Sun Aug 23 09:05:45 2009
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.50 2009/06/23 04:39:52 mrg Exp $
+# $NetBSD: md.amd64,v 1.51 2009/08/23 09:05:45 mrg Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -595,6 +595,7 @@
 ./usr/X11R7/lib/modules/libxf8_32bpp.so			-unknown-	obsolete
 ./usr/X11R7/lib/modules/libxf8_32bpp.so.0		-unknown-	obsolete
 ./usr/X11R7/lib/modules/libxf8_32bpp_pic.a		-unknown-	obsolete
+./usr/X11R7/lib/xorg/protocol.txt			-unknown-	xorg
 ./usr/X11R7/man/cat1/Xorg.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat1/cvt.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat1/gtf.0-unknown-	.cat,xorg

Index: src/distrib/sets/lists/xserver/md.cats
diff -u src/distrib/sets/lists/xserver/md.cats:1.29 src/distrib/sets/lists/xserver/md.cats:1.30
--- src/distrib/sets/lists/xserver/md.cats:1.29	Tue Jun 23 04:39:52 2009
+++ src/distrib/sets/lists/xserver/md.cats	Sun Aug 23 09:05:45 2009
@@ -1,4 +1,4 @@
-# $NetBSD: md.cats,v 1.29 2009/06/23 04:39:52 mrg Exp $
+# $NetBSD: md.cats,v 1.30 2009/08/23 09:05:45 mrg Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -552,6 +552,7 @@
 ./usr/X11R7/lib/modules/libxf8_32bpp.so.0		-unknown-	obsolete
 ./usr/X11R7/lib/modules/libxf8_32bpp_g.a		-unknown-	obsolete
 ./usr/X11R7/lib/modules/libxf8_32bpp_pic.a		-unknown-	obsolete
+./usr/X11R7/lib/xorg/protocol.txt			-unknown-	xorg
 ./usr/X

CVS commit: src/sys/external/bsd/drm/dist/bsd-core

2009-08-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 23 08:55:16 UTC 2009

Modified Files:
src/sys/external/bsd/drm/dist/bsd-core: drm_drv.c

Log Message:
on netbsd with the single final close() action, make sure we clean up
all the files attached to dev->files.  we check for one per "open_count"
that is above 1.  could perhaps assert() that we are empty afterwards.

this fixes restarting X + drm after actually using drm.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm/dist/bsd-core/drm_drv.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/external/bsd/drm/dist/bsd-core/drm_drv.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_drv.c:1.14 src/sys/external/bsd/drm/dist/bsd-core/drm_drv.c:1.15
--- src/sys/external/bsd/drm/dist/bsd-core/drm_drv.c:1.14	Wed Jun 24 08:09:26 2009
+++ src/sys/external/bsd/drm/dist/bsd-core/drm_drv.c	Sun Aug 23 08:55:16 2009
@@ -932,7 +932,17 @@
 #if defined(__NetBSD__)
 	/* On NetBSD, close will only be called once */
 	DRM_DEBUG("setting open_count %d to 1\n", (int)dev->open_count);
-	dev->open_count = 1;
+	while (dev->open_count != 1) {
+		/*
+		 * XXXMRG probably should assert that we are freeing
+		 * one of these each time.  i think.
+		 */
+		if (!TAILQ_EMPTY(&dev->files)) {
+			file_priv = TAILQ_FIRST(&dev->files);
+			TAILQ_REMOVE(&dev->files, file_priv, link);
+		}
+		dev->open_count--;
+	}
 #endif
 	if (--dev->open_count == 0) {
 		retcode = drm_lastclose(dev);



CVS commit: src/sys/arch/sparc/stand/bootxx

2009-08-23 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Aug 23 08:51:56 UTC 2009

Modified Files:
src/sys/arch/sparc/stand/bootxx: bootxx.c

Log Message:
We need an explicit include of  here as well.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sparc/stand/bootxx/bootxx.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/sparc/stand/bootxx/bootxx.c
diff -u src/sys/arch/sparc/stand/bootxx/bootxx.c:1.23 src/sys/arch/sparc/stand/bootxx/bootxx.c:1.24
--- src/sys/arch/sparc/stand/bootxx/bootxx.c:1.23	Mon Mar 23 13:47:32 2009
+++ src/sys/arch/sparc/stand/bootxx/bootxx.c	Sun Aug 23 08:51:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootxx.c,v 1.23 2009/03/23 13:47:32 tsutsui Exp $ */
+/*	$NetBSD: bootxx.c,v 1.24 2009/08/23 08:51:56 he Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,6 +31,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 



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

2009-08-23 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Aug 23 08:32:23 UTC 2009

Modified Files:
src/sys/arch/sgimips/include: loadfile_machdep.h

Log Message:
Remove BOOT_AOUT here as well, mips no longer deals with a.out.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/include/loadfile_machdep.h

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

Modified files:

Index: src/sys/arch/sgimips/include/loadfile_machdep.h
diff -u src/sys/arch/sgimips/include/loadfile_machdep.h:1.6 src/sys/arch/sgimips/include/loadfile_machdep.h:1.7
--- src/sys/arch/sgimips/include/loadfile_machdep.h:1.6	Mon Apr 28 20:23:34 2008
+++ src/sys/arch/sgimips/include/loadfile_machdep.h	Sun Aug 23 08:32:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: loadfile_machdep.h,v 1.6 2008/04/28 20:23:34 martin Exp $	 */
+/*	$NetBSD: loadfile_machdep.h,v 1.7 2009/08/23 08:32:22 he Exp $	 */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -32,7 +32,6 @@
 #ifndef _SGIMIPS_LOADFILE_MACHDEP_H_
 #define _SGIMIPS_LOADFILE_MACHDEP_H_
 
-#define BOOT_AOUT
 #define BOOT_ECOFF
 #define BOOT_ELF32
 



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

2009-08-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 23 07:49:56 UTC 2009

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

Log Message:
Fix LP64 botch with vaddr_t/vsize_t


To generate a diff of this commit:
cvs rdiff -u -r1.43.36.4 -r1.43.36.5 src/sys/arch/mips/include/types.h

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

Modified files:

Index: src/sys/arch/mips/include/types.h
diff -u src/sys/arch/mips/include/types.h:1.43.36.4 src/sys/arch/mips/include/types.h:1.43.36.5
--- src/sys/arch/mips/include/types.h:1.43.36.4	Sun Aug 23 06:38:07 2009
+++ src/sys/arch/mips/include/types.h	Sun Aug 23 07:49:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.43.36.4 2009/08/23 06:38:07 matt Exp $	*/
+/*	$NetBSD: types.h,v 1.43.36.5 2009/08/23 07:49:56 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -63,12 +63,20 @@
 #define PRIxPSIZE	PRIx32
 #define PRIdPSIZE	PRId32
 #endif
+#ifdef _LP64
+typedef __uint64_t	vaddr_t;
+typedef __uint64_t	vsize_t;
+#define PRIxVADDR	PRIx64
+#define PRIxVSIZE	PRIx64
+#define PRIdVSIZE	PRId64
+#else
 typedef __uint32_t	vaddr_t;
 typedef __uint32_t	vsize_t;
 #define PRIxVADDR	PRIx32
 #define PRIxVSIZE	PRIx32
 #define PRIdVSIZE	PRId32
 #endif
+#endif
 
 /* Make sure this is signed; we need pointers to be sign-extended. */
 #if defined(__mips_o64) || defined(__mips_o32)