CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgp

2010-02-24 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb 24 08:22:59 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgp: netpgp.1

Log Message:
New sentence, new line; remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1
diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.8 src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.9
--- src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.8	Tue Feb 23 01:24:45 2010
+++ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1	Wed Feb 24 08:22:58 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: netpgp.1,v 1.8 2010/02/23 01:24:45 agc Exp $
+.\ $NetBSD: netpgp.1,v 1.9 2010/02/24 08:22:58 wiz Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -270,17 +270,18 @@
 the user.
 .It Fl Fl from Ns = Ns Ar signature-valid-from
 This option allows the signer to specify a time as the
-starting point for validity of the signature. In this way
-it is possible to prevent files from being verified until a
-specific point in time. The time can be specified either
-in
+starting point for validity of the signature.
+In this way it is possible to prevent files from being verified
+until a specific point in time.
+The time can be specified either in
 .Dv -MM-DD
 format, or as the number of seconds since the epoch.
 .It Fl Fl duration Ns = Ns Ar signature-valid-to
 This option allows the signer to specify a time as the
-end point for validity of the signature. In this way
-it is possible to prevent files from being verified after a
-specific point in time. The time can be specified either
+end point for validity of the signature.
+In this way it is possible to prevent files from being verified
+after a specific point in time.
+The time can be specified either
 in
 .Dv -MM-DD
 format, or as the number of seconds.
@@ -411,20 +412,20 @@
 .Nm
 commands can be used together in a pipeline to produce the desired effect.
 .Bd -literal
-% netpgp --sign \*[Lt] a | netpgp --cat \*[Gt] b 
+% netpgp --sign \*[Lt] a | netpgp --cat \*[Gt] b
 netpgp: default key set to C0596823
 netpgp: default key set to C0596823
 pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12
-Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 
+Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823
 uid  Alistair Crooks \*[lt]...@netbsd.org\*[gt]
 uid  Alistair Crooks \*[lt]...@pkgsrc.org\*[gt]
 uid  Alistair Crooks \*[lt]...@alistaircrooks.com\*[gt]
 uid  Alistair Crooks \*[lt]alist...@hockley-crooks.com\*[gt]
-netpgp passphrase: 
+netpgp passphrase:
 Good signature for \*[Lt]stdin\*[Gt] made Mon Dec 21 18:25:02 2009
 using RSA (Encrypt or Sign) key 1b68dcfcc0596823
 pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12
-Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 
+Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823
 uid  Alistair Crooks \*[lt]alist...@hockley-crooks.com\*[gt]
 uid  Alistair Crooks \*[lt]...@pkgsrc.org\*[gt]
 uid  Alistair Crooks \*[lt]...@netbsd.org\*[gt]



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

2010-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb 24 09:49:36 UTC 2010

Modified Files:
src/sys/arch/sparc64/sparc64: cache.h ipifuncs.c locore.s pmap.c

Log Message:
when handing back page table pages to UVM, flush them from the dcache
on all CPUs.

idea from skrll@, and makes my disk-based SB2000 stable.

tested on U60, SB2000 and SB2500.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sparc64/sparc64/cache.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sparc64/sparc64/ipifuncs.c
cvs rdiff -u -r1.320 -r1.321 src/sys/arch/sparc64/sparc64/locore.s
cvs rdiff -u -r1.252 -r1.253 src/sys/arch/sparc64/sparc64/pmap.c

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/cache.h
diff -u src/sys/arch/sparc64/sparc64/cache.h:1.14 src/sys/arch/sparc64/sparc64/cache.h:1.15
--- src/sys/arch/sparc64/sparc64/cache.h:1.14	Wed Feb 24 06:05:35 2010
+++ src/sys/arch/sparc64/sparc64/cache.h	Wed Feb 24 09:49:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache.h,v 1.14 2010/02/24 06:05:35 mrg Exp $ */
+/*	$NetBSD: cache.h,v 1.15 2010/02/24 09:49:36 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -138,8 +138,11 @@
 #ifdef MULTIPROCESSOR
 void smp_tlb_flush_pte(vaddr_t, struct pmap *);
 #define	tlb_flush_pte(va,pm)	smp_tlb_flush_pte(va, pm)
+void smp_dcache_flush_page_all(paddr_t pa);
+#define	dcache_flush_page_all(pa)	smp_dcache_flush_page_all(pa)
 #else
 #define	tlb_flush_pte(va,pm)	sp_tlb_flush_pte(va, (pm)-pm_ctx)
+#define	dcache_flush_page_all(pa)	dcache_flush_page(pa)
 #endif
 
 /* Various cache size/line sizes */

Index: src/sys/arch/sparc64/sparc64/ipifuncs.c
diff -u src/sys/arch/sparc64/sparc64/ipifuncs.c:1.33 src/sys/arch/sparc64/sparc64/ipifuncs.c:1.34
--- src/sys/arch/sparc64/sparc64/ipifuncs.c:1.33	Wed Feb 24 06:05:35 2010
+++ src/sys/arch/sparc64/sparc64/ipifuncs.c	Wed Feb 24 09:49:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipifuncs.c,v 1.33 2010/02/24 06:05:35 mrg Exp $ */
+/*	$NetBSD: ipifuncs.c,v 1.34 2010/02/24 09:49:36 mrg Exp $ */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipifuncs.c,v 1.33 2010/02/24 06:05:35 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipifuncs.c,v 1.34 2010/02/24 09:49:36 mrg Exp $);
 
 #include opt_ddb.h
 
@@ -71,6 +71,8 @@
 void	sparc64_ipi_pause(void *);
 void	sparc64_ipi_flush_pte_us(void *);
 void	sparc64_ipi_flush_pte_usiii(void *);
+void	sparc64_ipi_dcache_flush_page_us(void *);
+void	sparc64_ipi_dcache_flush_page_usiii(void *);
 
 /*
  * Process cpu stop-self event.
@@ -409,6 +411,23 @@
 }
 
 /*
+ * Make sure this page is flushed from all CPUs.
+ */
+void
+smp_dcache_flush_page_all(paddr_t pa)
+{
+	ipifunc_t func;
+
+	if (CPU_IS_USIII_UP())
+		func = sparc64_ipi_dcache_flush_page_usiii;
+	else
+		func = sparc64_ipi_dcache_flush_page_us;
+
+	sparc64_broadcast_ipi(func, pa, dcache_line_size);
+	dcache_flush_page(pa);
+}
+
+/*
  * Print an error message.
  */
 void

Index: src/sys/arch/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.320 src/sys/arch/sparc64/sparc64/locore.s:1.321
--- src/sys/arch/sparc64/sparc64/locore.s:1.320	Wed Feb 24 01:58:53 2010
+++ src/sys/arch/sparc64/sparc64/locore.s	Wed Feb 24 09:49:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.320 2010/02/24 01:58:53 mrg Exp $	*/
+/*	$NetBSD: locore.s,v 1.321 2010/02/24 09:49:36 mrg Exp $	*/
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -9047,6 +9047,65 @@
 	IPIEVC_INC(IPI_EVCNT_FPU_FLUSH,%g2,%g3)
 	ba,a	ret_from_intr_vector
 	 nop
+
+/*
+ * IPI handler to drop the current FPU state.
+ * void sparc64_ipi_dcache_flush_page_usiii(paddr_t pa, int line_size)
+ * void sparc64_ipi_dcache_flush_page_us(paddr_t pa, int line_size)
+ *
+ * On entry:
+ *	%g2 = pa
+ *	%g3 = line_size
+ */
+ENTRY(sparc64_ipi_dcache_flush_page_usiii)
+	set	NBPG, %g1
+	add	%g2, %g1, %g1	! end address
+
+1:
+	stxa	%g0, [%g2] ASI_DCACHE_INVALIDATE
+	add	%g2, %g3, %g2
+	cmp	%g2, %g1
+	bl,pt	%xcc, 1b
+	 nop
+
+	sethi	%hi(KERNBASE), %g5
+	flush	%g5
+	membar	#Sync
+	ba,a	ret_from_intr_vector
+	 nop
+
+ENTRY(sparc64_ipi_dcache_flush_page_us)
+	mov	-1, %g1		! Generate mask for tag: bits [29..2]
+	srlx	%g2, 13-2, %g5	! Tag is PA bits 40:13 in bits 29:2
+	clr	%g4
+	srl	%g1, 2, %g1	! Now we have bits 29:0 set
+	set	(2*NBPG), %g7
+	ba,pt	%icc, 1f
+	 andn	%g1, 3, %g1	! Now we have bits 29:2 set
+
+	.align 8
+1:
+	ldxa	[%g4] ASI_DCACHE_TAG, %g6
+	mov	%g4, %g2
+	deccc	32, %g7
+	bl,pn	%icc, 2f
+	 inc	32, %g4
+
+	xor	%g6, %g5, %g6
+	andcc	%g6, %g1, %g0
+	bne,pt	%xcc, 1b
+	 membar	#LoadStore
+
+	stxa	%g0, [%g2] ASI_DCACHE_TAG
+	ba,pt	%icc, 1b
+	 membar	#StoreLoad
+2:
+
+	sethi	%hi(KERNBASE), %g5
+	flush	%g5
+	membar	#Sync
+	ba,a	ret_from_intr_vector
+	 nop
 #endif
 
 /*

Index: src/sys/arch/sparc64/sparc64/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.252 src/sys/arch/sparc64/sparc64/pmap.c:1.253
--- 

CVS commit: src/external/cddl/osnet/usr.sbin/zdb

2010-02-24 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Wed Feb 24 11:56:35 UTC 2010

Modified Files:
src/external/cddl/osnet/usr.sbin/zdb: Makefile

Log Message:
Disable stack protection warnings for zdb_il.c which uses a dynamically
sized array on the stack.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/usr.sbin/zdb/Makefile

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

Modified files:

Index: src/external/cddl/osnet/usr.sbin/zdb/Makefile
diff -u src/external/cddl/osnet/usr.sbin/zdb/Makefile:1.2 src/external/cddl/osnet/usr.sbin/zdb/Makefile:1.3
--- src/external/cddl/osnet/usr.sbin/zdb/Makefile:1.2	Wed Oct 21 22:29:54 2009
+++ src/external/cddl/osnet/usr.sbin/zdb/Makefile	Wed Feb 24 11:56:35 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2009/10/21 22:29:54 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2010/02/24 11:56:35 tron Exp $
 
 .include ../../Makefile.zfs
 
@@ -29,6 +29,8 @@
 
 LDADD+= 	-lm -lpthread
 
+COPTS.zdb_il.c += -Wno-stack-protector
+
 .PATH:	${ZFSDIR}/dist/cmd/zdb
 
 .include bsd.prog.mk



CVS commit: src/external/cddl/osnet/lib

2010-02-24 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Wed Feb 24 12:18:37 UTC 2010

Modified Files:
src/external/cddl/osnet/lib: Makefile

Log Message:
Include bsd.own.mk before checking MKDTRACE to allow setting it
in /etc/mk.conf.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/lib/Makefile

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

Modified files:

Index: src/external/cddl/osnet/lib/Makefile
diff -u src/external/cddl/osnet/lib/Makefile:1.3 src/external/cddl/osnet/lib/Makefile:1.4
--- src/external/cddl/osnet/lib/Makefile:1.3	Sun Feb 21 01:46:34 2010
+++ src/external/cddl/osnet/lib/Makefile	Wed Feb 24 12:18:37 2010
@@ -1,7 +1,9 @@
-#	$NetBSD: Makefile,v 1.3 2010/02/21 01:46:34 darran Exp $
+#	$NetBSD: Makefile,v 1.4 2010/02/24 12:18:37 tron Exp $
 #
 #
 
+.include bsd.own.mk
+
 .if (defined(MKDTRACE)  ${MKDTRACE} != no)
 SUBDIR+=	libdtrace
 SUBDIR+=	libctf



CVS commit: src/sys/dev/ic

2010-02-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Feb 24 13:10:26 UTC 2010

Modified Files:
src/sys/dev/ic: dp8390.c

Log Message:
Fix a wrong calculation bug around RX ring buffer memory address
slipped in about sixteen years ago.  Fortunately, it had been working
for ages because some devices used address zero and other devices
ignored wrong higher bits.

Tested on we(4) (SMC Elite Ultra) and ne(4) (NE2000 compatible
named UL0001) on ISA.
Note FreeBSD also uses the same correct value in their ed(4) driver.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/ic/dp8390.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/ic/dp8390.c
diff -u src/sys/dev/ic/dp8390.c:1.73 src/sys/dev/ic/dp8390.c:1.74
--- src/sys/dev/ic/dp8390.c:1.73	Tue Jan 19 22:06:24 2010
+++ src/sys/dev/ic/dp8390.c	Wed Feb 24 13:10:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dp8390.c,v 1.73 2010/01/19 22:06:24 pooka Exp $	*/
+/*	$NetBSD: dp8390.c,v 1.74 2010/02/24 13:10:26 tsutsui Exp $	*/
 
 /*
  * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -14,7 +14,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dp8390.c,v 1.73 2010/01/19 22:06:24 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: dp8390.c,v 1.74 2010/02/24 13:10:26 tsutsui Exp $);
 
 #include opt_ipkdb.h
 #include opt_inet.h
@@ -114,7 +114,8 @@
 	sc-tx_page_start = sc-mem_start  ED_PAGE_SHIFT;
 	sc-rec_page_start = sc-tx_page_start + sc-txb_cnt * ED_TXBUF_SIZE;
 	sc-rec_page_stop = sc-tx_page_start + (sc-mem_size  ED_PAGE_SHIFT);
-	sc-mem_ring = sc-mem_start + (sc-rec_page_start  ED_PAGE_SHIFT);
+	sc-mem_ring = sc-mem_start +
+	((sc-txb_cnt * ED_TXBUF_SIZE)  ED_PAGE_SHIFT);
 	sc-mem_end = sc-mem_start + sc-mem_size;
 
 	/* Now zero memory and verify that it is clear. */



CVS commit: src/sbin/fsck

2010-02-24 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Feb 24 13:56:07 UTC 2010

Modified Files:
src/sbin/fsck: fsck.c

Log Message:
Dont pass option -x down to fsck_xxxfs.

Hi christos ...


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sbin/fsck/fsck.c

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

Modified files:

Index: src/sbin/fsck/fsck.c
diff -u src/sbin/fsck/fsck.c:1.48 src/sbin/fsck/fsck.c:1.49
--- src/sbin/fsck/fsck.c:1.48	Wed Feb 17 23:30:21 2010
+++ src/sbin/fsck/fsck.c	Wed Feb 24 13:56:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsck.c,v 1.48 2010/02/17 23:30:21 christos Exp $	*/
+/*	$NetBSD: fsck.c,v 1.49 2010/02/24 13:56:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1996 Christos Zoulas. All rights reserved.
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: fsck.c,v 1.48 2010/02/17 23:30:21 christos Exp $);
+__RCSID($NetBSD: fsck.c,v 1.49 2010/02/24 13:56:07 hannken Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -156,7 +156,7 @@
 
 		case 'x':
 			addentry(omhead, optarg, );
-			break;
+			continue;
 
 		case 'y':
 			break;



CVS commit: src/sys/rump/include/rump

2010-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 24 14:56:04 UTC 2010

Modified Files:
src/sys/rump/include/rump: rump.h

Log Message:
Expose rump_schedule() and rump_unschedule().  These can be used
for wrapping application space calls to the rump kernel without
having to do heavyweight interface specification with ifspec.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/rump/include/rump/rump.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/rump/include/rump/rump.h
diff -u src/sys/rump/include/rump/rump.h:1.36 src/sys/rump/include/rump/rump.h:1.37
--- src/sys/rump/include/rump/rump.h:1.36	Thu Feb 11 01:13:58 2010
+++ src/sys/rump/include/rump/rump.h	Wed Feb 24 14:56:04 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.h,v 1.36 2010/02/11 01:13:58 pooka Exp $	*/
+/*	$NetBSD: rump.h,v 1.37 2010/02/24 14:56:04 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -90,6 +90,9 @@
 int	rump_boot_gethowto(void);
 void	rump_boot_sethowto(int);
 
+void	rump_schedule(void);
+void	rump_unschedule(void);
+
 int	rump__init(int);
 
 #ifndef _RUMPKERNEL



CVS commit: src/sys/dev/ic

2010-02-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Feb 24 15:13:34 UTC 2010

Modified Files:
src/sys/dev/ic: ne2000.c

Log Message:
Now dp8390_config() calculates mem_ring correctly so
no longer need to override it in ne2000_attach().


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/ic/ne2000.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/ic/ne2000.c
diff -u src/sys/dev/ic/ne2000.c:1.64 src/sys/dev/ic/ne2000.c:1.65
--- src/sys/dev/ic/ne2000.c:1.64	Fri Jan  8 20:02:39 2010
+++ src/sys/dev/ic/ne2000.c	Wed Feb 24 15:13:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ne2000.c,v 1.64 2010/01/08 20:02:39 dyoung Exp $	*/
+/*	$NetBSD: ne2000.c,v 1.65 2010/02/24 15:13:34 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ne2000.c,v 1.64 2010/01/08 20:02:39 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: ne2000.c,v 1.65 2010/02/24 15:13:34 tsutsui Exp $);
 
 #include opt_ipkdb.h
 
@@ -298,13 +298,6 @@
 		return (1);
 	}
 
-	/*
-	 * We need to compute mem_ring a bit differently; override the
-	 * value set up in dp8390_config().
-	 */
-	dsc-mem_ring =
-	dsc-mem_start + ((dsc-txb_cnt * ED_TXBUF_SIZE)  ED_PAGE_SHIFT);
-
 	return (0);
 }
 



CVS commit: src/sys/uvm

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Feb 24 15:58:26 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Merge more indirect functions.  Some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 src/sys/uvm/uvm_fault.c

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

Modified files:

Index: src/sys/uvm/uvm_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.172 src/sys/uvm/uvm_fault.c:1.173
--- src/sys/uvm/uvm_fault.c:1.172	Wed Feb 24 06:18:19 2010
+++ src/sys/uvm/uvm_fault.c	Wed Feb 24 15:58:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_fault.c,v 1.172 2010/02/24 06:18:19 uebayasi Exp $	*/
+/*	$NetBSD: uvm_fault.c,v 1.173 2010/02/24 15:58:26 uebayasi Exp $	*/
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.172 2010/02/24 06:18:19 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.173 2010/02/24 15:58:26 uebayasi Exp $);
 
 #include opt_uvmhist.h
 
@@ -741,15 +741,12 @@
 static int		uvm_fault_lower(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			struct vm_page **);
-static inline		int uvm_fault_lower_lookup(
+static inline void	uvm_fault_lower_lookup(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			struct vm_page **);
 static inline void	uvm_fault_lower_neighbor(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			vaddr_t, struct vm_page *, bool);
-static inline int	uvm_fault_lower1(
-			struct uvm_faultinfo *, struct uvm_faultctx *,
-			struct uvm_object *, struct vm_page *);
 static inline int	uvm_fault_lower_io(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			struct uvm_object **, struct vm_page **);
@@ -827,10 +824,15 @@
 			struct uvm_object * const uobj = ufi.entry-object.uvm_obj;
 
 			if (uobj  uobj-pgops-pgo_fault != NULL) {
+/*
+ * invoke special fault routine.
+ */
 mutex_enter(uobj-vmobjlock);
-/* locked: maps(read), amap (if there), uobj */
-error = uobj-pgops-pgo_fault(ufi, flt.startva, pages, flt.npages,
-flt.centeridx, flt.access_type, PGO_LOCKED|PGO_SYNCIO);
+/* locked: maps(read), amap(if there), uobj */
+error = uobj-pgops-pgo_fault(ufi,
+flt.startva, pages, flt.npages,
+flt.centeridx, flt.access_type,
+PGO_LOCKED|PGO_SYNCIO);
 
 /* locked: nothing, pgo_fault has unlocked everything */
 
@@ -850,6 +852,21 @@
 	return error;
 }
 
+/*
+ * uvm_fault_check: check prot, handle needs-copy, etc.
+ *
+ *	1. lookup entry.
+ *	2. check protection.
+ *	3. adjust fault condition (mainly for simulated fault).
+ *	4. handle needs-copy (lazy amap copy).
+ *	5. establish range of interest for neighbor fault (aka pre-fault).
+ *	6. look up anons (if amap exists).
+ *	7. flush pages (if MADV_SEQUENTIAL)
+ *
+ * = called with nothing locked.
+ * = if we fail (result != 0) we unlock everything.
+ */
+
 static int
 uvm_fault_check(
 	struct uvm_faultinfo *ufi, struct uvm_faultctx *flt,
@@ -1059,6 +1076,17 @@
 	return 0;
 }
 
+/*
+ * uvm_fault_upper_lookup: look up existing h/w mapping and amap.
+ *
+ * iterate range of interest:
+ *	1. check if h/w mapping exists.  if yes, we don't care
+ *	2. check if anon exists.  if not, page is lower.
+ *	3. if anon exists, enter h/w mapping for neighbors.
+ *
+ * = called with amap locked (if exists).
+ */
+
 static int
 uvm_fault_upper_lookup(
 	struct uvm_faultinfo *ufi, struct uvm_faultctx *flt,
@@ -1139,6 +1167,12 @@
 	return 0;
 }
 
+/*
+ * uvm_fault_upper_neighbor: enter single lower neighbor page.
+ *
+ * = called with amap and anon locked.
+ */
+
 static void
 uvm_fault_upper_neighbor(
 	struct uvm_faultinfo *ufi, struct uvm_faultctx *flt,
@@ -1146,6 +1180,8 @@
 {
 	UVMHIST_FUNC(uvm_fault_upper_neighbor); UVMHIST_CALLED(maphist);
 
+	/* locked: amap, anon */
+
 	mutex_enter(uvm_pageqlock);
 	uvm_pageenqueue(pg);
 	mutex_exit(uvm_pageqlock);
@@ -1169,180 +1205,14 @@
 	pmap_update(ufi-orig_map-pmap);
 }
 
-static int
-uvm_fault_lower(
-	struct uvm_faultinfo *ufi, struct uvm_faultctx *flt,
-	struct vm_page **pages)
-{
-#ifdef DIAGNOSTIC
-	struct vm_amap *amap = ufi-entry-aref.ar_amap;
-#endif
-	struct uvm_object *uobj = ufi-entry-object.uvm_obj;
-	struct vm_page *uobjpage;
-
-	/*
-	 * if the desired page is not shadowed by the amap and we have a
-	 * backing object, then we check to see if the backing object would
-	 * prefer to handle the fault itself (rather than letting us do it
-	 * with the usual pgo_get hook).  the backing object signals this by
-	 * providing a pgo_fault routine.
-	 */
-
-	/*
-	 * now, if the desired page is not shadowed by the amap and we have
-	 * a backing object that does not have a special fault routine, then
-	 * we ask (with pgo_get) the object for resident pages that we care
-	 * about and attempt to map them in.  we do not let pgo_get block
-	 * (PGO_LOCKED).
-	 */
-
-	if (uobj == NULL) {
-		/* zero fill; don't care 

CVS commit: [uebayasi-xip] src/sys/uvm

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Feb 24 16:22:58 UTC 2010

Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_fault.c

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.166.2.3 -r1.166.2.4 src/sys/uvm/uvm_fault.c

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

Modified files:

Index: src/sys/uvm/uvm_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.166.2.3 src/sys/uvm/uvm_fault.c:1.166.2.4
--- src/sys/uvm/uvm_fault.c:1.166.2.3	Tue Feb 23 07:11:46 2010
+++ src/sys/uvm/uvm_fault.c	Wed Feb 24 16:22:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_fault.c,v 1.166.2.3 2010/02/23 07:11:46 uebayasi Exp $	*/
+/*	$NetBSD: uvm_fault.c,v 1.166.2.4 2010/02/24 16:22:58 uebayasi Exp $	*/
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.166.2.3 2010/02/23 07:11:46 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.166.2.4 2010/02/24 16:22:58 uebayasi Exp $);
 
 #include opt_uvmhist.h
 #include opt_device_page.h
@@ -702,6 +702,7 @@
 	bool wire_paging;
 	bool maxprot;
 	bool cow_now;
+	bool promote;
 };
 
 static inline int	uvm_fault_check(
@@ -730,29 +731,20 @@
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			struct uvm_object *, struct vm_anon *,
 			struct vm_page *, struct vm_anon *);
-static inline int	uvm_fault_upper_done(
+static inline void	uvm_fault_upper_done(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			struct uvm_object *, struct vm_anon *,
-			struct vm_page *, struct vm_anon *);
+			struct vm_page *);
 
 static int		uvm_fault_lower(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			struct vm_page **);
-static inline int	uvm_fault_lower_special(
-			struct uvm_faultinfo *, struct uvm_faultctx *,
-			struct vm_page **);
-static inline		int uvm_fault_lower_lookup(
+static inline void	uvm_fault_lower_lookup(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			struct vm_page **);
 static inline void	uvm_fault_lower_neighbor(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			vaddr_t, struct vm_page *, bool);
-static inline int	uvm_fault_lower_generic(
-			struct uvm_faultinfo *, struct uvm_faultctx *,
-			struct vm_page **);
-static inline int	uvm_fault_lower1(
-			struct uvm_faultinfo *, struct uvm_faultctx *,
-			struct uvm_object *, struct vm_page *);
 static inline int	uvm_fault_lower_io(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
 			struct uvm_object **, struct vm_page **);
@@ -771,10 +763,10 @@
 			struct uvm_object *,
 			struct vm_anon *, struct vm_page *,
 			struct vm_page *);
-static inline int	uvm_fault_lower_done(
+static inline void	uvm_fault_lower_done(
 			struct uvm_faultinfo *, struct uvm_faultctx *,
-			struct uvm_object *,
-			struct vm_anon *, struct vm_page *);
+			struct uvm_object *, struct vm_anon *,
+			struct vm_page *);
 
 int
 uvm_fault_internal(struct vm_map *orig_map, vaddr_t vaddr,
@@ -826,8 +818,29 @@
 
 		if (pages[flt.centeridx] == PGO_DONTCARE)
 			error = uvm_fault_upper(ufi, flt, anons);
-		else
-			error = uvm_fault_lower(ufi, flt, pages);
+		else {
+			struct uvm_object * const uobj = ufi.entry-object.uvm_obj;
+
+			if (uobj  uobj-pgops-pgo_fault != NULL) {
+/*
+ * invoke special fault routine.
+ */
+mutex_enter(uobj-vmobjlock);
+/* locked: maps(read), amap(if there), uobj */
+error = uobj-pgops-pgo_fault(ufi,
+flt.startva, pages, flt.npages,
+flt.centeridx, flt.access_type,
+PGO_LOCKED|PGO_SYNCIO);
+
+/* locked: nothing, pgo_fault has unlocked everything */
+
+/*
+ * object fault routine responsible for pmap_update().
+ */
+			} else {
+error = uvm_fault_lower(ufi, flt, pages);
+			}
+		}
 	}
 
 	if (flt.anon_spare != NULL) {
@@ -837,6 +850,21 @@
 	return error;
 }
 
+/*
+ * uvm_fault_check: check prot, handle needs-copy, etc.
+ *
+ *	1. lookup entry.
+ *	2. check protection.
+ *	3. adjust fault condition (mainly for simulated fault).
+ *	4. handle needs-copy (lazy amap copy).
+ *	5. establish range of interest for neighbor fault (aka pre-fault).
+ *	6. look up anons (if amap exists).
+ *	7. flush pages (if MADV_SEQUENTIAL)
+ *
+ * = called with nothing locked.
+ * = if we fail (result != 0) we unlock everything.
+ */
+
 static int
 uvm_fault_check(
 	struct uvm_faultinfo *ufi, struct uvm_faultctx *flt,
@@ -900,6 +928,8 @@
 		flt-cow_now = (flt-access_type  VM_PROT_WRITE) != 0;
 	}
 
+	flt-promote = false;
+
 	/*
 	 * handle needs_copy case.   if we need to copy the amap we will
 	 * have to drop our readlock and relock it with a write lock.  (we
@@ -1032,11 +1062,6 @@
 		/* now forget about the backpages */
 		if (amap)
 			*ranons += nback;
-#if 0
-		/* XXXUEBS */
-		if (uobj)
-			*rpages += nback;
-#endif
 		flt-startva += (nback  PAGE_SHIFT);
 		flt-npages -= nback;
 		

CVS commit: src/sys/dev/usb

2010-02-24 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Feb 24 17:00:25 UTC 2010

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

Log Message:
use # for include directive, just because..


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/usb/if_cue.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/if_cue.c
diff -u src/sys/dev/usb/if_cue.c:1.57 src/sys/dev/usb/if_cue.c:1.58
--- src/sys/dev/usb/if_cue.c:1.57	Tue Jan 19 22:07:43 2010
+++ src/sys/dev/usb/if_cue.c	Wed Feb 24 17:00:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cue.c,v 1.57 2010/01/19 22:07:43 pooka Exp $	*/
+/*	$NetBSD: if_cue.c,v 1.58 2010/02/24 17:00:25 plunky Exp $	*/
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul wp...@ee.columbia.edu.  All rights reserved.
@@ -56,13 +56,13 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_cue.c,v 1.57 2010/01/19 22:07:43 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_cue.c,v 1.58 2010/02/24 17:00:25 plunky Exp $);
 
 #if defined(__NetBSD__)
 #include opt_inet.h
 #include rnd.h
 #elif defined(__OpenBSD__)
-include bpfilter.h
+#include bpfilter.h
 #endif /* defined(__OpenBSD__) */
 
 #include sys/param.h



CVS commit: src/sys/dev/if_ndis

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 24 18:16:50 UTC 2010

Modified Files:
src/sys/dev/if_ndis: if_ndisvar.h

Log Message:
Start to tuck Cardbus under the PCI abstraction.  Step #1, textual
substitution: for all practical purposes, pcitag_t and cardbustag_t
are interchangeable, so just use pcitag_t.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/if_ndis/if_ndisvar.h

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

Modified files:

Index: src/sys/dev/if_ndis/if_ndisvar.h
diff -u src/sys/dev/if_ndis/if_ndisvar.h:1.5 src/sys/dev/if_ndis/if_ndisvar.h:1.6
--- src/sys/dev/if_ndis/if_ndisvar.h:1.5	Thu Dec 20 21:08:19 2007
+++ src/sys/dev/if_ndis/if_ndisvar.h	Wed Feb 24 18:16:50 2010
@@ -175,7 +175,7 @@
 	
 	/* cardbus specific */
 	cardbus_devfunc_tndis_res_ct;	/* cardbus devfuncs */
-	cardbustag_t ndis_res_ctag;	/* carbus tag */
+	pcitag_t ndis_res_ctag;	/* carbus tag */
 	bus_size_t   ndis_res_mapsize;	/* size of mapped bus space region */
 #endif /* end __NetBSD__ section */
 	int			ndis_rescnt;



CVS commit: src/sys/fs/udf

2010-02-24 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Wed Feb 24 19:14:12 UTC 2010

Modified Files:
src/sys/fs/udf: udf.h udf_subr.c

Log Message:
Extract UDF metadata partition parameters as already done for VAT and sparable
partitions.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/fs/udf/udf.h
cvs rdiff -u -r1.101 -r1.102 src/sys/fs/udf/udf_subr.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/fs/udf/udf.h
diff -u src/sys/fs/udf/udf.h:1.38 src/sys/fs/udf/udf.h:1.39
--- src/sys/fs/udf/udf.h:1.38	Wed Aug  5 13:45:48 2009
+++ src/sys/fs/udf/udf.h	Wed Feb 24 19:14:12 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.h,v 1.38 2009/08/05 13:45:48 reinoud Exp $ */
+/* $NetBSD: udf.h,v 1.39 2010/02/24 19:14:12 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -330,6 +330,8 @@
 	struct udf_node 	*metadatabitmap_node;	/* system node   */
 	struct space_bitmap_desc*metadata_unalloc_dscr;
 	struct udf_bitmap	 metadata_unalloc_bits;
+	uint32_t		 alloc_unit_size;
+	uint16_t		 alignment_unit_size;
 
 	/* rb tree for lookup icb to udf_node and sorted list for sync */
 	kmutex_t	ihash_lock;

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.101 src/sys/fs/udf/udf_subr.c:1.102
--- src/sys/fs/udf/udf_subr.c:1.101	Tue Jan  5 13:30:11 2010
+++ src/sys/fs/udf/udf_subr.c	Wed Feb 24 19:14:12 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.101 2010/01/05 13:30:11 mbalmer Exp $ */
+/* $NetBSD: udf_subr.c,v 1.102 2010/02/24 19:14:12 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__KERNEL_RCSID(0, $NetBSD: udf_subr.c,v 1.101 2010/01/05 13:30:11 mbalmer Exp $);
+__KERNEL_RCSID(0, $NetBSD: udf_subr.c,v 1.102 2010/02/24 19:14:12 reinoud Exp $);
 #endif /* not lint */
 
 
@@ -3118,6 +3118,10 @@
 	struct vnode *vp;
 	int error;
 
+	/* extract our allocation parameters set up on format */
+	ump-alloc_unit_size = udf_rw32(mapping-pmm.alloc_unit_size);
+	ump-alignment_unit_size = udf_rw16(mapping-pmm.alignment_unit_size);
+
 	DPRINTF(VOLUMES, (Reading in Metadata files\n));
 	icb_loc.loc.part_num = pmm-part_num;
 	icb_loc.loc.lb_num   = pmm-meta_file_lbn;



CVS commit: src/sys/fs/udf

2010-02-24 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Wed Feb 24 19:20:13 UTC 2010

Modified Files:
src/sys/fs/udf: udf.h udf_subr.c

Log Message:
Rename metadata partition parameters to be less generic and add the flags.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/fs/udf/udf.h
cvs rdiff -u -r1.102 -r1.103 src/sys/fs/udf/udf_subr.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/fs/udf/udf.h
diff -u src/sys/fs/udf/udf.h:1.39 src/sys/fs/udf/udf.h:1.40
--- src/sys/fs/udf/udf.h:1.39	Wed Feb 24 19:14:12 2010
+++ src/sys/fs/udf/udf.h	Wed Feb 24 19:20:13 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.h,v 1.39 2010/02/24 19:14:12 reinoud Exp $ */
+/* $NetBSD: udf.h,v 1.40 2010/02/24 19:20:13 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -330,8 +330,9 @@
 	struct udf_node 	*metadatabitmap_node;	/* system node   */
 	struct space_bitmap_desc*metadata_unalloc_dscr;
 	struct udf_bitmap	 metadata_unalloc_bits;
-	uint32_t		 alloc_unit_size;
-	uint16_t		 alignment_unit_size;
+	uint32_t		 metadata_alloc_unit_size;
+	uint16_t		 metadata_alignment_unit_size;
+	uint8_t			 metadata_flags;
 
 	/* rb tree for lookup icb to udf_node and sorted list for sync */
 	kmutex_t	ihash_lock;

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.102 src/sys/fs/udf/udf_subr.c:1.103
--- src/sys/fs/udf/udf_subr.c:1.102	Wed Feb 24 19:14:12 2010
+++ src/sys/fs/udf/udf_subr.c	Wed Feb 24 19:20:13 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.102 2010/02/24 19:14:12 reinoud Exp $ */
+/* $NetBSD: udf_subr.c,v 1.103 2010/02/24 19:20:13 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__KERNEL_RCSID(0, $NetBSD: udf_subr.c,v 1.102 2010/02/24 19:14:12 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: udf_subr.c,v 1.103 2010/02/24 19:20:13 reinoud Exp $);
 #endif /* not lint */
 
 
@@ -3119,8 +3119,9 @@
 	int error;
 
 	/* extract our allocation parameters set up on format */
-	ump-alloc_unit_size = udf_rw32(mapping-pmm.alloc_unit_size);
-	ump-alignment_unit_size = udf_rw16(mapping-pmm.alignment_unit_size);
+	ump-metadata_alloc_unit_size = udf_rw32(mapping-pmm.alloc_unit_size);
+	ump-metadata_alignment_unit_size = udf_rw16(mapping-pmm.alignment_unit_size);
+	ump-metadata_flags = mapping-pmm.flags;
 
 	DPRINTF(VOLUMES, (Reading in Metadata files\n));
 	icb_loc.loc.part_num = pmm-part_num;



CVS commit: src/sys/dev/cardbus

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 24 19:52:52 UTC 2010

Modified Files:
src/sys/dev/cardbus: adv_cardbus.c ahc_cardbus.c cardbus_exrom.c
cardbus_map.c com_cardbus.c ehci_cardbus.c fwohci_cardbus.c
if_ath_cardbus.c if_ex_cardbus.c if_ral_cardbus.c if_re_cardbus.c
if_rtk_cardbus.c if_tlp_cardbus.c njata_cardbus.c njs_cardbus.c
ohci_cardbus.c rbus_ppb.c siisata_cardbus.c uhci_cardbus.c

Log Message:
Start to tuck Cardbus under the PCI abstraction.  Step #1, textual
substitution: for all practical purposes, pcitag_t and cardbustag_t
are interchangeable, so just use pcitag_t.  Ditto pcireg_t and
cardbusreg_t.

While I'm here, don't make a copy (sc_intrline) of
cardbus_attach_args.ca_intrline unless we use it, later.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/cardbus/adv_cardbus.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/cardbus/ahc_cardbus.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/cardbus/cardbus_exrom.c \
src/sys/dev/cardbus/njs_cardbus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/cardbus/cardbus_map.c \
src/sys/dev/cardbus/rbus_ppb.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/cardbus/com_cardbus.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/cardbus/ehci_cardbus.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/cardbus/fwohci_cardbus.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/cardbus/if_ath_cardbus.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/cardbus/if_ex_cardbus.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/cardbus/if_ral_cardbus.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/cardbus/if_re_cardbus.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/cardbus/if_rtk_cardbus.c
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/cardbus/if_tlp_cardbus.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/cardbus/njata_cardbus.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/cardbus/ohci_cardbus.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/cardbus/siisata_cardbus.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/cardbus/uhci_cardbus.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/cardbus/adv_cardbus.c
diff -u src/sys/dev/cardbus/adv_cardbus.c:1.22 src/sys/dev/cardbus/adv_cardbus.c:1.23
--- src/sys/dev/cardbus/adv_cardbus.c:1.22	Tue May 12 14:17:31 2009
+++ src/sys/dev/cardbus/adv_cardbus.c	Wed Feb 24 19:52:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: adv_cardbus.c,v 1.22 2009/05/12 14:17:31 cegger Exp $	*/
+/*	$NetBSD: adv_cardbus.c,v 1.23 2010/02/24 19:52:51 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: adv_cardbus.c,v 1.22 2009/05/12 14:17:31 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: adv_cardbus.c,v 1.23 2010/02/24 19:52:51 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -74,8 +74,7 @@
 
 	/* CardBus-specific goo. */
 	cardbus_devfunc_t sc_ct;	/* our CardBus devfuncs */
-	cardbus_intr_line_t sc_intrline; /* our interrupt line */
-	cardbustag_t sc_tag;
+	pcitag_t sc_tag;
 
 	int	sc_cbenable;		/* what CardBus access type to enable */
 	int	sc_csr;			/* CSR bits */
@@ -151,7 +150,6 @@
 
 	csc-sc_ct = ct;
 	csc-sc_tag = ca-ca_tag;
-	csc-sc_intrline = ca-ca_intrline;
 	csc-sc_cbenable = 0;
 
 	/*

Index: src/sys/dev/cardbus/ahc_cardbus.c
diff -u src/sys/dev/cardbus/ahc_cardbus.c:1.29 src/sys/dev/cardbus/ahc_cardbus.c:1.30
--- src/sys/dev/cardbus/ahc_cardbus.c:1.29	Thu Nov 12 19:21:03 2009
+++ src/sys/dev/cardbus/ahc_cardbus.c	Wed Feb 24 19:52:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahc_cardbus.c,v 1.29 2009/11/12 19:21:03 dyoung Exp $	*/
+/*	$NetBSD: ahc_cardbus.c,v 1.30 2010/02/24 19:52:51 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2005 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ahc_cardbus.c,v 1.29 2009/11/12 19:21:03 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: ahc_cardbus.c,v 1.30 2010/02/24 19:52:51 dyoung Exp $);
 
 #include opt_ahc_cardbus.h
 
@@ -77,8 +77,7 @@
 
 	/* CardBus-specific goo. */
 	cardbus_devfunc_t sc_ct;	/* our CardBus devfuncs */
-	cardbus_intr_line_t sc_intrline; /* our interrupt line */
-	cardbustag_t sc_tag;
+	pcitag_t sc_tag;
 
 	int	sc_cbenable;		/* what CardBus access type to enable */
 	int	sc_csr;			/* CSR bits */
@@ -123,7 +122,6 @@
 	ahc-sc_dev = self;
 	csc-sc_ct = ct;
 	csc-sc_tag = ca-ca_tag;
-	csc-sc_intrline = ca-ca_intrline;
 
 	printf(: Adaptec ADP-1480 SCSI\n);
 

Index: src/sys/dev/cardbus/cardbus_exrom.c
diff -u src/sys/dev/cardbus/cardbus_exrom.c:1.11 src/sys/dev/cardbus/cardbus_exrom.c:1.12
--- src/sys/dev/cardbus/cardbus_exrom.c:1.11	Tue Apr 29 06:53:02 2008
+++ src/sys/dev/cardbus/cardbus_exrom.c	Wed Feb 24 19:52:51 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: cardbus_exrom.c,v 1.11 2008/04/29 06:53:02 martin Exp $ */
+/* $NetBSD: cardbus_exrom.c,v 1.12 2010/02/24 19:52:51 dyoung Exp $ */
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
  */
 
 #include 

CVS commit: src/external/cddl/osnet/dist/uts/common/dtrace

2010-02-24 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Wed Feb 24 21:08:54 UTC 2010

Modified Files:
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c

Log Message:
Fix a bug in the dtrace_state_deadman() thread; return should have been
a continue (thanks Frank!).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
diff -u src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.3 src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.4
--- src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.3	Sun Feb 21 01:46:34 2010
+++ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c	Wed Feb 24 21:08:54 2010
@@ -12856,7 +12856,7 @@
 
 	if (state != dtrace_anon.dta_state 
 		now - state-dts_laststatus = dtrace_deadman_user)
-		return;
+		continue;
 
 	/*
 	 * We must be sure that dts_alive never appears to be less than the



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

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 24 21:22:01 UTC 2010

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

Log Message:
Rename to 'pc' all variables 'pci_chipset_tag'.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/x86/x86/intr.c

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

Modified files:

Index: src/sys/arch/x86/x86/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.66 src/sys/arch/x86/x86/intr.c:1.67
--- src/sys/arch/x86/x86/intr.c:1.66	Wed Nov 25 14:28:50 2009
+++ src/sys/arch/x86/x86/intr.c	Wed Feb 24 21:22:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.66 2009/11/25 14:28:50 rmind Exp $	*/
+/*	$NetBSD: intr.c,v 1.67 2010/02/24 21:22:01 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.66 2009/11/25 14:28:50 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.67 2010/02/24 21:22:01 dyoung Exp $);
 
 #include opt_intrdebug.h
 #include opt_multiprocessor.h
@@ -325,7 +325,7 @@
 
 static int
 intr_find_pcibridge(int bus, pcitag_t *pci_bridge_tag,
-		pci_chipset_tag_t *pci_chipset_tag)
+		pci_chipset_tag_t *pc)
 {
 	struct intr_extra_bus *iebp;
 	struct mp_bus *mpb;
@@ -338,7 +338,7 @@
 		if (mpb-mb_pci_bridge_tag == NULL)
 			return ENOENT;
 		*pci_bridge_tag = *mpb-mb_pci_bridge_tag;
-		*pci_chipset_tag = mpb-mb_pci_chipset_tag;
+		*pc = mpb-mb_pci_chipset_tag;
 		return 0;
 	}
 
@@ -347,7 +347,7 @@
 			if (iebp-pci_bridge_tag == NULL)
 return ENOENT;
 			*pci_bridge_tag = *iebp-pci_bridge_tag;
-			*pci_chipset_tag = iebp-pci_chipset_tag;
+			*pc = iebp-pci_chipset_tag;
 			return 0;
 		}
 	}
@@ -362,18 +362,18 @@
 #if NPCI  0
 	int dev, func;
 	pcitag_t pci_bridge_tag;
-	pci_chipset_tag_t pci_chipset_tag;
+	pci_chipset_tag_t pc;
 #endif
 
 #if NPCI  0
 	while (intr_scan_bus(bus, pin, handle) != 0) {
 		if (intr_find_pcibridge(bus, pci_bridge_tag,
-		pci_chipset_tag) != 0)
+		pc) != 0)
 			return ENOENT;
 		dev = pin  2;
 		pin = pin  3;
 		pin = PPB_INTERRUPT_SWIZZLE(pin + 1, dev) - 1;
-		pci_decompose_tag(pci_chipset_tag, pci_bridge_tag, bus,
+		pci_decompose_tag(pc, pci_bridge_tag, bus,
 		dev, func);
 		pin |= (dev  2);
 	}



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

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 24 21:24:20 UTC 2010

Modified Files:
src/sys/arch/x86/include: pci_machdep.h

Log Message:
Change 'typedef void *pci_chipset_tag_t' to 'typedef struct
pci_chipset_tag *pci_chipset_tag_t' for an improvement in type safety.
(Back when I did the same for cardbus_chipset_tag_t, it helped to turn
up some bugs!)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x86/include/pci_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/x86/include/pci_machdep.h
diff -u src/sys/arch/x86/include/pci_machdep.h:1.9 src/sys/arch/x86/include/pci_machdep.h:1.10
--- src/sys/arch/x86/include/pci_machdep.h:1.9	Tue Feb 16 00:03:47 2010
+++ src/sys/arch/x86/include/pci_machdep.h	Wed Feb 24 21:24:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.h,v 1.9 2010/02/16 00:03:47 dyoung Exp $	*/
+/*	$NetBSD: pci_machdep.h,v 1.10 2010/02/24 21:24:20 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -71,10 +71,14 @@
 extern struct x86_bus_dma_tag pci_bus_dma64_tag;
 #endif
 
+struct {
+int dummy;
+} pci_chipset_tag;
+
 /*
  * Types provided to machine-independent PCI code
  */
-typedef void *pci_chipset_tag_t;
+typedef struct pci_chipset_tag *pci_chipset_tag_t;
 typedef union x86_pci_tag_u pcitag_t;
 typedef int pci_intr_handle_t;
 



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

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 24 21:25:52 UTC 2010

Modified Files:
src/sys/arch/x86/include: pci_machdep.h

Log Message:
Don't bother to #define PCI_PREFER_IOSPACE, nothing uses it.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/include/pci_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/x86/include/pci_machdep.h
diff -u src/sys/arch/x86/include/pci_machdep.h:1.10 src/sys/arch/x86/include/pci_machdep.h:1.11
--- src/sys/arch/x86/include/pci_machdep.h:1.10	Wed Feb 24 21:24:20 2010
+++ src/sys/arch/x86/include/pci_machdep.h	Wed Feb 24 21:25:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.h,v 1.10 2010/02/24 21:24:20 dyoung Exp $	*/
+/*	$NetBSD: pci_machdep.h,v 1.11 2010/02/24 21:25:51 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -39,14 +39,6 @@
 #define	__HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
 
 /*
- * Many i386 PCI systems only work properly with I/O mapped space, in
- * particular, buses behind PCI-PCI bridges may not have memory
- * space mapped at all.  For this reason, tell drivers that have
- * a choice that we prefer I/O space.
- */
-#define	PCI_PREFER_IOSPACE
-
-/*
  * i386-specific PCI structure and type definitions.
  * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
  *



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

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 24 21:34:23 UTC 2010

Modified Files:
src/sys/arch/x86/include: pci_machdep.h

Log Message:
KNF: change spaces to tabs.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/include/pci_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/x86/include/pci_machdep.h
diff -u src/sys/arch/x86/include/pci_machdep.h:1.11 src/sys/arch/x86/include/pci_machdep.h:1.12
--- src/sys/arch/x86/include/pci_machdep.h:1.11	Wed Feb 24 21:25:51 2010
+++ src/sys/arch/x86/include/pci_machdep.h	Wed Feb 24 21:34:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.h,v 1.11 2010/02/24 21:25:51 dyoung Exp $	*/
+/*	$NetBSD: pci_machdep.h,v 1.12 2010/02/24 21:34:23 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -64,7 +64,7 @@
 #endif
 
 struct {
-int dummy;
+	int dummy;
 } pci_chipset_tag;
 
 /*



CVS commit: src/tools

2010-02-24 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Wed Feb 24 21:34:57 UTC 2010

Added Files:
src/tools/ctfconvert: Makefile
src/tools/ctfmerge: Makefile
src/tools/libctf: Makefile
src/tools/libdwarf: Makefile

Log Message:
DTrace: add CTF tools to the toolchain (not built yet).


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tools/ctfconvert/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/ctfmerge/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/libctf/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/libdwarf/Makefile

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

Added files:

Index: src/tools/ctfconvert/Makefile
diff -u /dev/null src/tools/ctfconvert/Makefile:1.1
--- /dev/null	Wed Feb 24 21:34:57 2010
+++ src/tools/ctfconvert/Makefile	Wed Feb 24 21:34:57 2010
@@ -0,0 +1,57 @@
+#	$NetBSD: Makefile,v 1.1 2010/02/24 21:34:57 darran Exp $
+
+.include bsd.own.mk
+
+HOSTPROGNAME=   ${_TOOL_PREFIX}ctfconvert
+HOST_SRCDIR=external/cddl/osnet/usr.bin/ctfconvert
+#HOST_SRCS=	alist.c \
+		ctf.c \
+		ctfconvert.c \
+		dwarf.c \
+		fixup_tdescs.c \
+		hash.c \
+		iidesc.c \
+		input.c \
+		list.c \
+		memory.c \
+		merge.c \
+		output.c \
+		st_parse.c \
+		stabs.c \
+		stack.c \
+		strtab.c \
+		symbol.c \
+		tdata.c \
+		traverse.c \
+		util.c
+
+LIBELF_DIR=	${.CURDIR}/../../external/bsd/libelf/dist
+LIBDWARF_DIR=	${.CURDIR}/../../external/bsd/libdwarf/dist
+
+HOST_CPPFLAGS+=	-I${OSNETDIR}/sys \
+		-I${OSNETDIR}/include \
+		-I${OPENSOLARIS_DISTDIR} \
+		-I${OPENSOLARIS_DISTDIR}/head \
+		-I${OPENSOLARIS_DISTDIR}/tools/ctf/common \
+		-I${OPENSOLARIS_DISTDIR}/tools/ctf/cvt \
+		-I${OPENSOLARIS_DISTDIR}/uts/common \
+		-I${LIBELF_DIR} \
+		-I${LIBDWARF_DIR}
+
+HOST_CPPFLAGS+=	-DHAVE_NBTOOL_CONFIG_H=1
+
+OSNETDIR=	${.CURDIR}/../../external/cddl/osnet
+OPENSOLARIS_DISTDIR= ${OSNETDIR}/dist
+
+CTFOBJ!=	cd ${.CURDIR}/../libctf  ${PRINTOBJDIR}
+DWARFOBJ!=	cd ${.CURDIR}/../libdwarf  ${PRINTOBJDIR}
+ELFOBJ!=	cd ${.CURDIR}/../libelf  ${PRINTOBJDIR}
+LDADD+=		-L${CTFOBJ} -lctf
+LDADD+=		-L${DWARFOBJ} -ldwarf
+LDADD+=		-L${ELFOBJ} -lelf
+
+.PATH:		${OPENSOLARIS_DISTDIR}/tools/ctf/common
+.PATH:		${OPENSOLARIS_DISTDIR}/tools/ctf/cvt
+
+.include ${.CURDIR}/../Makefile.disklabel
+.include ${.CURDIR}/../Makefile.host

Index: src/tools/ctfmerge/Makefile
diff -u /dev/null src/tools/ctfmerge/Makefile:1.1
--- /dev/null	Wed Feb 24 21:34:57 2010
+++ src/tools/ctfmerge/Makefile	Wed Feb 24 21:34:57 2010
@@ -0,0 +1,40 @@
+#	$NetBSD: Makefile,v 1.1 2010/02/24 21:34:57 darran Exp $
+
+.include bsd.own.mk
+
+HOSTPROGNAME=   ${_TOOL_PREFIX}ctfmerge
+HOST_SRCDIR=external/cddl/osnet/usr.bin/ctfmerge
+
+LIBELF_DIR=	${.CURDIR}/../../external/bsd/libelf/dist
+LIBDWARF_DIR=	${.CURDIR}/../../external/bsd/libdwarf/dist
+
+HOST_CPPFLAGS+=	-I${OSNETDIR}/sys \
+		-I${OSNETDIR}/include \
+		-I${OPENSOLARIS_DISTDIR} \
+		-I${OPENSOLARIS_DISTDIR}/head \
+		-I${OPENSOLARIS_DISTDIR}/tools/ctf/common \
+		-I${OPENSOLARIS_DISTDIR}/tools/ctf/cvt \
+		-I${OPENSOLARIS_DISTDIR}/uts/common \
+		-I${LIBELF_DIR} \
+		-I${LIBDWARF_DIR}
+
+HOST_CPPFLAGS+=	-DHAVE_NBTOOL_CONFIG_H=1
+
+OSNETDIR=	${.CURDIR}/../../external/cddl/osnet
+OPENSOLARIS_DISTDIR= ${OSNETDIR}/dist
+
+CTFOBJ!=	cd ${.CURDIR}/../libctf  ${PRINTOBJDIR}
+DWARFOBJ!=	cd ${.CURDIR}/../libdwarf  ${PRINTOBJDIR}
+ELFOBJ!=	cd ${.CURDIR}/../libelf  ${PRINTOBJDIR}
+LDADD+=		-L${CTFOBJ} -lctf
+LDADD+=		-L${DWARFOBJ} -ldwarf
+LDADD+=		-L${ELFOBJ} -lelf
+
+# need native pthread support
+LDADD+=		-lpthread
+
+.PATH:		${OPENSOLARIS_DISTDIR}/tools/ctf/common
+.PATH:		${OPENSOLARIS_DISTDIR}/tools/ctf/cvt
+
+.include ${.CURDIR}/../Makefile.disklabel
+.include ${.CURDIR}/../Makefile.host

Index: src/tools/libctf/Makefile
diff -u /dev/null src/tools/libctf/Makefile:1.1
--- /dev/null	Wed Feb 24 21:34:57 2010
+++ src/tools/libctf/Makefile	Wed Feb 24 21:34:57 2010
@@ -0,0 +1,65 @@
+#	$NetBSD: Makefile,v 1.1 2010/02/24 21:34:57 darran Exp $
+
+.include bsd.own.mk
+
+HOSTLIB=	ctf
+
+SRCS=		ctf_create.c \
+		ctf_decl.c \
+		ctf_error.c \
+		ctf_hash.c \
+		ctf_labels.c \
+		ctf_lib.c \
+		ctf_lookup.c \
+		ctf_open.c \
+		ctf_subr.c \
+		ctf_types.c \
+		ctf_util.c
+
+OSNETDIR=	${.CURDIR}/../../external/cddl/osnet
+OPENSOLARIS_DISTDIR= ${OSNETDIR}/dist
+LIBELF_DIR=	${.CURDIR}/../../external/bsd/libelf/dist
+
+CPPFLAGS+=	-DCTF_OLD_VERSIONS
+
+.ifndef NOCOMPATLIB
+COMPATOBJ!= cd ${.CURDIR}/../compat  ${PRINTOBJDIR}
+CPPFLAGS+=	-I${COMPATOBJ}
+.endif
+
+CPPFLAGS+=	-I${.CURDIR}/../compat \
+		-I${OSNETDIR}/sys \
+		-I${OSNETDIR}/include \
+		-I${OPENSOLARIS_DISTDIR}/head \
+		-I${OPENSOLARIS_DISTDIR}/common/ctf \
+		-I${OPENSOLARIS_DISTDIR}/lib/libctf/common \
+		-I${OPENSOLARIS_DISTDIR}/uts/common \
+		-I${LIBELF_DIR}
+
+BUILD_OSTYPE!=  uname -s
+
+# Disable use of pre-compiled headers on Darwin.
+.if ${BUILD_OSTYPE} == Darwin
+CPPFLAGS+=	-no-cpp-precomp
+.endif
+
+# -D_FILE_OFFSET_BITS=64 produces a much more 

CVS commit: src/sys/arch/dreamcast/dev/maple

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 24 22:58:45 UTC 2010

Modified Files:
src/sys/arch/dreamcast/dev/maple: mlcd.c

Log Message:
Use device_t, device_private().


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/dreamcast/dev/maple/mlcd.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/dreamcast/dev/maple/mlcd.c
diff -u src/sys/arch/dreamcast/dev/maple/mlcd.c:1.11 src/sys/arch/dreamcast/dev/maple/mlcd.c:1.12
--- src/sys/arch/dreamcast/dev/maple/mlcd.c:1.11	Wed Jun 11 14:55:30 2008
+++ src/sys/arch/dreamcast/dev/maple/mlcd.c	Wed Feb 24 22:58:45 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mlcd.c,v 1.11 2008/06/11 14:55:30 tsutsui Exp $	*/
+/*	$NetBSD: mlcd.c,v 1.12 2010/02/24 22:58:45 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mlcd.c,v 1.11 2008/06/11 14:55:30 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: mlcd.c,v 1.12 2010/02/24 22:58:45 dyoung Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -93,7 +93,7 @@
 struct mlcd_softc {
 	struct device	sc_dev;
 
-	struct device	*sc_parent;
+	device_t sc_parent;
 	struct maple_unit *sc_unit;
 	int		sc_direction;
 	enum mlcd_stat {
@@ -148,9 +148,9 @@
 #define MLCD_UNIT(dev)		(minor(dev)  8)
 #define MLCD_MINOR(unit, part)	(((unit)  8) | (part))
 
-static int	mlcdmatch(struct device *, struct cfdata *, void *);
-static void	mlcdattach(struct device *, struct device *, void *);
-static int	mlcddetach(struct device *, int);
+static int	mlcdmatch(device_t, struct cfdata *, void *);
+static void	mlcdattach(device_t, device_t, void *);
+static int	mlcddetach(device_t, int);
 static void	mlcd_intr(void *, struct maple_response *, int, int);
 static void	mlcd_printerror(const char *, uint32_t);
 static struct mlcd_buf *mlcd_buf_alloc(int /*dev*/, int /*flags*/);
@@ -198,7 +198,7 @@
 
 /* ARGSUSED */
 static int
-mlcdmatch(struct device *parent, struct cfdata *cf, void *aux)
+mlcdmatch(device_t parent, struct cfdata *cf, void *aux)
 {
 	struct maple_attach_args *ma = aux;
 
@@ -206,9 +206,9 @@
 }
 
 static void
-mlcdattach(struct device *parent, struct device *self, void *aux)
+mlcdattach(device_t parent, device_t self, void *aux)
 {
-	struct mlcd_softc *sc = (void *) self;
+	struct mlcd_softc *sc = device_private(self);
 	struct maple_attach_args *ma = aux;
 	int i;
 	union {
@@ -282,9 +282,9 @@
 
 /* ARGSUSED1 */
 static int
-mlcddetach(struct device *self, int flags)
+mlcddetach(device_t self, int flags)
 {
-	struct mlcd_softc *sc = (struct mlcd_softc *) self;
+	struct mlcd_softc *sc = device_private(self);
 	struct mlcd_buf *bp;
 	int minor_l, minor_h;
 



CVS commit: src/share/man/man9

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 24 23:49:34 UTC 2010

Modified Files:
src/share/man/man9: cardbus.9

Log Message:
Update the doco, just in case somebody adds a new CardBus driver
before I've finished tucking CardBus under the PCI abstraction,
unlikely though that is.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man9/cardbus.9

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/man9/cardbus.9
diff -u src/share/man/man9/cardbus.9:1.12 src/share/man/man9/cardbus.9:1.13
--- src/share/man/man9/cardbus.9:1.12	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/cardbus.9	Wed Feb 24 23:49:34 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: cardbus.9,v 1.12 2008/04/30 13:10:58 martin Exp $
+.\ $NetBSD: cardbus.9,v 1.13 2010/02/24 23:49:34 dyoung Exp $
 .\
 .\ Copyright (c) 2001 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 July 3, 2004
+.Dd February 24, 2010
 .Dt CARDBUS 9
 .Os
 .Sh NAME
@@ -72,7 +72,7 @@
 .Ft int
 .Fo cardbus_mapreg_map
 .Fa struct cardbus_softc *csc int cf int reg
-.Fa cardbusreg_t type int busflags bus_space_tag_t *tagp
+.Fa pcireg_t type int busflags bus_space_tag_t *tagp
 .Fa bus_space_handle_t *handlep bus_addr_t *basep bus_size_t *sizep
 .Fc
 .Ft int
@@ -81,20 +81,20 @@
 bus_size_t size
 .Ft int
 .Fn cardbus_get_capability cardbus_chipset_tag_t cc \
-cardbus_function_tag_t cf cardbustag_t tag int capid \
-int *offsetp cardbusreg_t *valuep
-.Ft cardbustag_t
+cardbus_function_tag_t cf pcitag_t tag int capid \
+int *offsetp pcireg_t *valuep
+.Ft pcitag_t
 .Fn cardbus_make_tag cardbus_chipset_tag_t cc int cf int bus \
 int device int function
 .Ft void
 .Fn cardbus_free_tag cardbus_chipset_tag_t cc int cf \
-cardbustag_t tag
-.Ft cardbusreg_t
+pcitag_t tag
+.Ft pcireg_t
 .Fn cardbus_conf_read cardbus_chipset_tag_t cc int cf \
-cardbustag_t tag int offs
+pcitag_t tag int offs
 .Ft void
 .Fn cardbus_conf_write cardbus_chipset_tag_t cc int cf \
-cardbustag_t tag int offs busreg_t val
+pcitag_t tag int offs busreg_t val
 .Ft void *
 .Fn cardbus_intr_establish cardbus_chipset_tag_t cc \
 cardbus_function_tag_t cf cardbus_intr_handle_t irq int level \
@@ -103,30 +103,30 @@
 .Fn cardbus_intr_disestablish cardbus_chipset_tag_t cc \
 cardbus_function_tag_t cf void *ih
 .Ft int
-.Fn CARDBUS_VENDOR cardbusreg_t id
+.Fn CARDBUS_VENDOR pcireg_t id
 .Ft int
-.Fn CARDBUS_PRODUCT cardbusreg_t id
+.Fn CARDBUS_PRODUCT pcireg_t id
 .Ft int
 .Fn Cardbus_function_enable cardbus_devfunc_t ct
 .Ft int
 .Fn Cardbus_function_disable cardbus_devfunc_t ct
 .Ft int
 .Fn Cardbus_mapreg_map cardbus_devfunc_t ct int reg \
-cardbusreg_t type int busflags bus_space_tag_t *tagp \
+pcireg_t type int busflags bus_space_tag_t *tagp \
 bus_space_handle_t *handlep bus_addr_t *basep bus_size_t *sizep
 .Ft int
 .Fn Cardbus_mapreg_unmap cardbus_devfunc_t ct \
 int reg bus_space_tag_t tag bus_space_handle_t handle \
 bus_size_t size
-.Ft cardbustag_t
+.Ft pcitag_t
 .Fn Cardbus_make_tag cardbus_devfunc_t ct 
 .Ft void
-.Fn Cardbus_free_tag cardbus_devfunc_t ct cardbustag_t tag
-.Ft cardbusreg_t
-.Fn Cardbus_conf_read cardbus_devfunc_t ct cardbustag_t tag \
+.Fn Cardbus_free_tag cardbus_devfunc_t ct pcitag_t tag
+.Ft pcireg_t
+.Fn Cardbus_conf_read cardbus_devfunc_t ct pcitag_t tag \
 int offs
 .Ft void
-.Fn Cardbus_conf_write cardbus_devfunc_t ct cardbustag_t tag \
+.Fn Cardbus_conf_write cardbus_devfunc_t ct pcitag_t tag \
 int offs busreg_t val
 .Sh DESCRIPTION
 The machine-independent
@@ -166,9 +166,9 @@
 	bus_space_tag_t ca_memt;  /* CardBus MEM space tag */
 	bus_dma_tag_t ca_dmat;/* DMA tag */
 	u_int ca_device;
-	cardbustag_t ca_tag;
-	cardbusreg_t ca_id;
-	cardbusreg_t ca_class;
+	pcitag_t ca_tag;
+	pcireg_t ca_id;
+	pcireg_t ca_class;
 	cardbus_intr_line_t ca_intrline; /* interrupt info */
 	struct cardbus_cis_info ca_cis;
 .Ed



CVS commit: src/sys/dev/pci

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Feb 24 23:52:49 UTC 2010

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

Log Message:
Use device_suspensor_t.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/dev/pci/if_sip.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_sip.c
diff -u src/sys/dev/pci/if_sip.c:1.146 src/sys/dev/pci/if_sip.c:1.147
--- src/sys/dev/pci/if_sip.c:1.146	Wed Feb 24 22:38:00 2010
+++ src/sys/dev/pci/if_sip.c	Wed Feb 24 23:52:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_sip.c,v 1.146 2010/02/24 22:38:00 dyoung Exp $	*/
+/*	$NetBSD: if_sip.c,v 1.147 2010/02/24 23:52:49 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_sip.c,v 1.146 2010/02/24 22:38:00 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_sip.c,v 1.147 2010/02/24 23:52:49 dyoung Exp $);
 
 #include rnd.h
 
@@ -204,7 +204,7 @@
  */
 struct sip_softc {
 	device_t sc_dev;		/* generic device information */
-	struct device_suspensor		sc_suspensor;
+	device_suspensor_t		sc_suspensor;
 	pmf_qual_t			sc_qual;
 
 	bus_space_tag_t sc_st;		/* bus space tag */



CVS commit: src/external/cddl

2010-02-24 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Thu Feb 25 00:14:10 UTC 2010

Modified Files:
src/external/cddl: Makefile

Log Message:
DTrace: have DTrace build with out requiring MKZFS=yes.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/Makefile

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

Modified files:

Index: src/external/cddl/Makefile
diff -u src/external/cddl/Makefile:1.1 src/external/cddl/Makefile:1.2
--- src/external/cddl/Makefile:1.1	Mon Oct  5 22:44:26 2009
+++ src/external/cddl/Makefile	Thu Feb 25 00:14:10 2010
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.1 2009/10/05 22:44:26 haad Exp $
+#	$NetBSD: Makefile,v 1.2 2010/02/25 00:14:10 darran Exp $
 .include bsd.own.mk
 
 # We need more modular flag e.g. we can add dtrace to osnet later
 
-.if ( ${MKZFS} != no)
+.if ( ${MKZFS} != no || ${MKDTRACE} != no )
 SUBDIR+= osnet
 .endif
 



CVS commit: src/external/cddl/osnet

2010-02-24 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Thu Feb 25 00:18:44 UTC 2010

Modified Files:
src/external/cddl/osnet/dist/tools/ctf/cvt: ctfmerge.c
src/external/cddl/osnet/sys/sys: types.h

Log Message:
DTrace: fix CTF tools for non-toolchain build.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/sys/sys/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/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c
diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.4 src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.5
--- src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.4	Wed Feb 24 21:53:26 2010
+++ src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c	Thu Feb 25 00:18:44 2010
@@ -177,9 +177,13 @@
 
 #include stdio.h
 #include stdlib.h
-#define _NETBSD_SOURCE
+#ifndef _NETBSD_SOURCE
+#define _NETBSD_SOURCE	/* XXX TBD fix this */
 #include unistd.h
 #undef _NETBSD_SOURCE
+#else
+#include unistd.h
+#endif
 #include pthread.h
 #include assert.h
 #if defined(sun)

Index: src/external/cddl/osnet/sys/sys/types.h
diff -u src/external/cddl/osnet/sys/sys/types.h:1.4 src/external/cddl/osnet/sys/sys/types.h:1.5
--- src/external/cddl/osnet/sys/sys/types.h:1.4	Wed Feb 24 21:53:26 2010
+++ src/external/cddl/osnet/sys/sys/types.h	Thu Feb 25 00:18:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.4 2010/02/24 21:53:26 darran Exp $	*/
+/*	$NetBSD: types.h,v 1.5 2010/02/25 00:18:44 darran Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -65,9 +65,13 @@
  */
 
 #include sys/stdint.h
+#ifndef _NETBSD_SOURCE
 #define _NETBSD_SOURCE		/* XXX TBD fix this */
 #include_next sys/types.h
 #undef _NETBSD_SOURCE
+#else
+#include_next sys/types.h
+#endif
 #include_next sys/ccompile.h
 
 #ifndef _KERNEL



CVS commit: src/sys/dev

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Feb 25 00:47:40 UTC 2010

Modified Files:
src/sys/dev/cardbus: cardbus.c cardbus_map.c cardbusvar.h
siisata_cardbus.c
src/sys/dev/pci: pccbb.c

Log Message:
Cardbus_free_tag() and cardbus_free_tag() are no-ops, so get rid of them
to simplify the code a bit.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/cardbus/cardbus.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/cardbus/cardbus_map.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/cardbus/cardbusvar.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/cardbus/siisata_cardbus.c
cvs rdiff -u -r1.195 -r1.196 src/sys/dev/pci/pccbb.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/cardbus/cardbus.c
diff -u src/sys/dev/cardbus/cardbus.c:1.102 src/sys/dev/cardbus/cardbus.c:1.103
--- src/sys/dev/cardbus/cardbus.c:1.102	Wed Feb 24 23:38:40 2010
+++ src/sys/dev/cardbus/cardbus.c	Thu Feb 25 00:47:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cardbus.c,v 1.102 2010/02/24 23:38:40 dyoung Exp $	*/
+/*	$NetBSD: cardbus.c,v 1.103 2010/02/25 00:47:39 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 1999 and 2000
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cardbus.c,v 1.102 2010/02/24 23:38:40 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: cardbus.c,v 1.103 2010/02/25 00:47:39 dyoung Exp $);
 
 #include opt_cardbus.h
 
@@ -826,8 +826,6 @@
 	if ((ct = sc-sc_funcs[func]) != NULL)
 		Cardbus_conf_write(ct, tag, CARDBUS_BHLC_REG, ct-ct_bhlc);
 
-	cardbus_free_tag(cc, cf, tag);
-
 	DPRINTF((%x\n, sc-sc_poweron_func));
 
 	return (0);

Index: src/sys/dev/cardbus/cardbus_map.c
diff -u src/sys/dev/cardbus/cardbus_map.c:1.32 src/sys/dev/cardbus/cardbus_map.c:1.33
--- src/sys/dev/cardbus/cardbus_map.c:1.32	Wed Feb 24 19:52:51 2010
+++ src/sys/dev/cardbus/cardbus_map.c	Thu Feb 25 00:47:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cardbus_map.c,v 1.32 2010/02/24 19:52:51 dyoung Exp $	*/
+/*	$NetBSD: cardbus_map.c,v 1.33 2010/02/25 00:47:39 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1999 and 2000
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cardbus_map.c,v 1.32 2010/02/24 19:52:51 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: cardbus_map.c,v 1.33 2010/02/25 00:47:39 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -304,7 +304,6 @@
 	if (sizep != 0) {
 		*sizep = size;
 	}
-	cardbus_free_tag(cc, cf, tag);
 
 	return 0;
 }
@@ -357,8 +356,6 @@
 	(*cf-cardbus_space_free)(cc, rbustag, handle, size);
 #endif
 
-	cardbus_free_tag(cc, cf, cardbustag);
-
 	return st;
 }
 
@@ -387,8 +384,6 @@
 
 	DPRINTF((cardbus_save_bar: %x %x\n, ct-ct_bar[0], ct-ct_bar[1]));
 
-	Cardbus_free_tag(ct, tag);
-
 	return 0;
 }
 
@@ -413,7 +408,5 @@
 	cardbus_conf_write(cc, cf, tag, CARDBUS_BASE4_REG, ct-ct_bar[4]);
 	cardbus_conf_write(cc, cf, tag, CARDBUS_BASE5_REG, ct-ct_bar[5]);
 
-	Cardbus_free_tag(ct, tag);
-
 	return 0;
 }

Index: src/sys/dev/cardbus/cardbusvar.h
diff -u src/sys/dev/cardbus/cardbusvar.h:1.46 src/sys/dev/cardbus/cardbusvar.h:1.47
--- src/sys/dev/cardbus/cardbusvar.h:1.46	Wed Feb 24 23:38:40 2010
+++ src/sys/dev/cardbus/cardbusvar.h	Thu Feb 25 00:47:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cardbusvar.h,v 1.46 2010/02/24 23:38:40 dyoung Exp $	*/
+/*	$NetBSD: cardbusvar.h,v 1.47 2010/02/25 00:47:39 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1998, 1999 and 2000
@@ -47,8 +47,7 @@
  * The child devices can use those functions.  The contained functions
  * are: cardbus_space_alloc, cardbus_space_free,
  * cardbus_intr_establish, cardbus_intr_disestablish, cardbus_ctrl,
- * cardbus_power, cardbus_make_tag, cardbus_free_tag and
- * cardbus_conf_write.
+ * cardbus_power, cardbus_make_tag, and cardbus_conf_write.
  *
  *	int (*cardbus_space_alloc)(cardbus_chipset_tag_t ct, rbus_tag_t rb,
  *	bus_addr_t addr, bus_size_t size,
@@ -71,7 +70,6 @@
  *
  *	pcitag_t (*cardbus_make_tag)(cardbus_chipset_tag_t ct,
  *	int busno, int functionno);
- *	void (*cardbus_free_tag)(cardbus_chipset_tag_t ct, pcitag_t tag);
  *	pcireg_t (*cardbus_conf_read)(cardbus_chipset_tag_t ct,
  *	pcitag_t tag, int offs);
  *	void (*cardbus_conf_write)(cardbus_chipset_tag_t ct,
@@ -90,7 +88,6 @@
 	int (*cardbus_power)(cardbus_chipset_tag_t, int);
 
 	pcitag_t (*cardbus_make_tag)(cardbus_chipset_tag_t, int, int);
-	void (*cardbus_free_tag)(cardbus_chipset_tag_t, pcitag_t);
 	pcireg_t (*cardbus_conf_read)(cardbus_chipset_tag_t,
 	pcitag_t, int);
 	void (*cardbus_conf_write)(cardbus_chipset_tag_t, pcitag_t,
@@ -346,9 +343,6 @@
 #define Cardbus_make_tag(ct) (*(ct)-ct_cf-cardbus_make_tag)((ct)-ct_cc, (ct)-ct_bus, (ct)-ct_func)
 #define cardbus_make_tag(cc, cf, bus, function) ((cf)-cardbus_make_tag)((cc), (bus), (function))
 
-#define Cardbus_free_tag(ct, tag) (*(ct)-ct_cf-cardbus_free_tag)((ct)-ct_cc, (tag))
-#define cardbus_free_tag(cc, cf, tag) (*(cf)-cardbus_free_tag)(cc, (tag))
-
 

CVS commit: src/share/man/man9

2010-02-24 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Feb 25 00:50:52 UTC 2010

Modified Files:
src/share/man/man9: cardbus.9

Log Message:
Don't mention cardbus_free_tag() and Cardbus_free_tag(), they are no
more.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man9/cardbus.9

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/man9/cardbus.9
diff -u src/share/man/man9/cardbus.9:1.13 src/share/man/man9/cardbus.9:1.14
--- src/share/man/man9/cardbus.9:1.13	Wed Feb 24 23:49:34 2010
+++ src/share/man/man9/cardbus.9	Thu Feb 25 00:50:52 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: cardbus.9,v 1.13 2010/02/24 23:49:34 dyoung Exp $
+.\ $NetBSD: cardbus.9,v 1.14 2010/02/25 00:50:52 dyoung Exp $
 .\
 .\ Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -40,7 +40,6 @@
 .Nm cardbus_mapreg_unmap ,
 .Nm cardbus_get_capability ,
 .Nm cardbus_make_tag ,
-.Nm cardbus_free_tag ,
 .Nm cardbus_conf_read ,
 .Nm cardbus_conf_write ,
 .Nm cardbus_intr_establish ,
@@ -52,7 +51,6 @@
 .Nm Cardbus_mapreg_map ,
 .Nm Cardbus_mapreg_unmap ,
 .Nm Cardbus_make_tag ,
-.Nm Cardbus_free_tag ,
 .Nm Cardbus_conf_read ,
 .Nm Cardbus_conf_write
 .Nd support for CardBus PC-Card devices
@@ -86,9 +84,6 @@
 .Ft pcitag_t
 .Fn cardbus_make_tag cardbus_chipset_tag_t cc int cf int bus \
 int device int function
-.Ft void
-.Fn cardbus_free_tag cardbus_chipset_tag_t cc int cf \
-pcitag_t tag
 .Ft pcireg_t
 .Fn cardbus_conf_read cardbus_chipset_tag_t cc int cf \
 pcitag_t tag int offs
@@ -120,8 +115,6 @@
 bus_size_t size
 .Ft pcitag_t
 .Fn Cardbus_make_tag cardbus_devfunc_t ct 
-.Ft void
-.Fn Cardbus_free_tag cardbus_devfunc_t ct pcitag_t tag
 .Ft pcireg_t
 .Fn Cardbus_conf_read cardbus_devfunc_t ct pcitag_t tag \
 int offs
@@ -228,10 +221,6 @@
 Make a tag to access config space of a CardBus card.
 It works the same as
 .Fn pci_make_tag .
-.It Fn cardbus_free_tag cc cf tag
-Release a tag used to access the config space of a CardBus card.
-It works the same as
-.Fn pci_free_tag .
 .It Fn cardbus_conf_read cc cf tag offs
 Read the config space of a CardBus card.
 It works the same as



CVS commit: src/share/man/man4

2010-02-24 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Feb 25 02:19:28 UTC 2010

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

Log Message:
Update sensor list for VID sensor.

XXX I don't think this is sufficiently large change to bump the date.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/dbcool.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/dbcool.4
diff -u src/share/man/man4/dbcool.4:1.4 src/share/man/man4/dbcool.4:1.5
--- src/share/man/man4/dbcool.4:1.4	Wed May 27 19:23:59 2009
+++ src/share/man/man4/dbcool.4	Thu Feb 25 02:19:28 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: dbcool.4,v 1.4 2009/05/27 19:23:59 snj Exp $
+.\	$NetBSD: dbcool.4,v 1.5 2010/02/25 02:19:28 pgoyette Exp $
 .\
 .\ Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -75,6 +75,7 @@
 .It Li fan2 Ta RPM Ta Chassis Fan
 .It Li fan3 Ta RPM Ta Chassis Fan
 .It Li fan4 Ta RPM Ta Chassis Fan
+.It Li VID Ta (none) Ta CPU VID code (selected chips only)
 .El
 .Pp
 Each temperature and voltage sensor has a



CVS commit: [uebayasi-xip] src/sys/arch/x86/x86

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 02:57:18 UTC 2010

Modified Files:
src/sys/arch/x86/x86 [uebayasi-xip]: pmap.c

Log Message:
pg-mdpage - VM_PAGE_TO_MD(pg)


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.100.2.1 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.100 src/sys/arch/x86/x86/pmap.c:1.100.2.1
--- src/sys/arch/x86/x86/pmap.c:1.100	Sun Jan 31 00:43:37 2010
+++ src/sys/arch/x86/x86/pmap.c	Thu Feb 25 02:57:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.100 2010/01/31 00:43:37 hubertf Exp $	*/
+/*	$NetBSD: pmap.c,v 1.100.2.1 2010/02/25 02:57:17 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -149,7 +149,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.100 2010/01/31 00:43:37 hubertf Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.100.2.1 2010/02/25 02:57:17 uebayasi Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -415,7 +415,7 @@
 paddr_t pmap_pa_end;   /* PA of last physical page for this domain */
 #endif /* XEN */
 
-#define	VM_PAGE_TO_PP(pg)	((pg)-mdpage.mp_pp)
+#define	VM_PAGE_TO_PP(pg)	(VM_PAGE_TO_MD(pg)-mp_pp)
 
 #define	pp_lock(pp)	mutex_spin_enter((pp)-pp_lock)
 #define	pp_unlock(pp)	mutex_spin_exit((pp)-pp_lock)



CVS commit: src/share/man/man9

2010-02-24 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Feb 25 03:11:25 UTC 2010

Modified Files:
src/share/man/man9: sysmon_envsys.9

Log Message:
Update for recent changes to data structures.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man9/sysmon_envsys.9

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/man9/sysmon_envsys.9
diff -u src/share/man/man9/sysmon_envsys.9:1.31 src/share/man/man9/sysmon_envsys.9:1.32
--- src/share/man/man9/sysmon_envsys.9:1.31	Sat Dec 19 00:16:51 2009
+++ src/share/man/man9/sysmon_envsys.9	Thu Feb 25 03:11:25 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysmon_envsys.9,v 1.31 2009/12/19 00:16:51 snj Exp $
+.\	$NetBSD: sysmon_envsys.9,v 1.32 2010/02/25 03:11:25 pgoyette Exp $
 .\
 .\ Copyright (c) 2007, 2008 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 June 13, 2009
+.Dd February 25, 2010
 .Dt SYSMON_ENVSYS 9
 .Os
 .Sh NAME
@@ -105,9 +105,9 @@
 	void 		*sme_cookie;
 	void (*sme_refresh)(struct sysmon_envsys *, envsys_data_t *);
 	void (*sme_set_limits)(struct sysmon_envsys *, envsys_data_t *,
-			   sysmon_envsys_lim_t *);
+			   sysmon_envsys_lim_t *, uint32_t *);
 	void (*sme_get_limits)(struct sysmon_envsys *, envsys_data_t *,
-			   sysmon_envsys_lim_t *);
+			   sysmon_envsys_lim_t *, uint32_t *);
 };
 .Ed
 .Pp
@@ -286,6 +286,8 @@
 	int32_t		value_max;
 	int32_t		value_min;
 	int32_t		value_avg;
+	sysmon_envsys_lim_t limits;
+	int		upropset;
 	bool		monitor;
 	char		desc[ENVSYS_DESCLEN];
 } envsys_data_t;
@@ -318,6 +320,10 @@
 Used to set the minimum value.
 .It Fa value_avg
 Used to set the average value.
+.It Fa limits
+Structure used to contain the sensor's alarm thresholds.
+.It Fa upropset
+Used to keep track of which sensor properties are set.
 .It Fa monitor
 Used to enable automatic sensor monitoring (by default
 it's disabled).



CVS commit: src/sys/dev/pci

2010-02-24 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb 25 03:18:44 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add 3Dlabs Wildcat 5110, also known as Sun XVR-500


To generate a diff of this commit:
cvs rdiff -u -r1.1023 -r1.1024 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1023 src/sys/dev/pci/pcidevs:1.1024
--- src/sys/dev/pci/pcidevs:1.1023	Tue Feb 16 10:10:04 2010
+++ src/sys/dev/pci/pcidevs	Thu Feb 25 03:18:44 2010
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1023 2010/02/16 10:10:04 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1024 2010/02/25 03:18:44 macallan Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -726,6 +726,7 @@
 product 3DLABS GAMMA		0x0008	GLINT GAMMA
 product 3DLABS PERMEDIA2V	0x0009	GLINT Permedia 2V
 product 3DLABS PERMEDIA3	0x000a	GLINT Permedia 3
+product 3DLABS WILDCAT5110	0x07a2	WILDCAT 5110
 
 /* 3ware products */
 product 3WARE ESCALADE		0x1000	Escalade ATA RAID Controller



CVS commit: [uebayasi-xip] src/sys/arch/arm/arm32

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 03:19:51 UTC 2010

Modified Files:
src/sys/arch/arm/arm32 [uebayasi-xip]: mem.c

Log Message:
pg-mdpage - VM_PAGE_TO_MD(pg)


To generate a diff of this commit:
cvs rdiff -u -r1.26.6.1 -r1.26.6.2 src/sys/arch/arm/arm32/mem.c

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

Modified files:

Index: src/sys/arch/arm/arm32/mem.c
diff -u src/sys/arch/arm/arm32/mem.c:1.26.6.1 src/sys/arch/arm/arm32/mem.c:1.26.6.2
--- src/sys/arch/arm/arm32/mem.c:1.26.6.1	Wed Feb 10 14:20:23 2010
+++ src/sys/arch/arm/arm32/mem.c	Thu Feb 25 03:19:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mem.c,v 1.26.6.1 2010/02/10 14:20:23 uebayasi Exp $	*/
+/*	$NetBSD: mem.c,v 1.26.6.2 2010/02/25 03:19:51 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -74,9 +74,11 @@
 
 #include opt_arm32_pmap.h
 #include opt_compat_netbsd.h
+#include opt_device_page.h
+#include opt_xip.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mem.c,v 1.26.6.1 2010/02/10 14:20:23 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: mem.c,v 1.26.6.2 2010/02/25 03:19:51 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -144,7 +146,7 @@
 			{
 struct vm_page *pg;
 pg = PHYS_TO_VM_PAGE(trunc_page(v));
-if (pg != NULL  pmap_is_page_colored_p(pg-mdpage))
+if (pg != NULL  pmap_is_page_colored_p(VM_PAGE_TO_MD(pg)))
 	o = pg-mdpage.pvh_attrs;
 else
 	o = v;



CVS commit: [uebayasi-xip] src/sys/arch/arm

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 03:30:22 UTC 2010

Modified Files:
src/sys/arch/arm/arm32 [uebayasi-xip]: mem.c pmap.c
src/sys/arch/arm/include/arm32 [uebayasi-xip]: pmap.h

Log Message:
A few more VM_PAGE_TO_MD().


To generate a diff of this commit:
cvs rdiff -u -r1.26.6.2 -r1.26.6.3 src/sys/arch/arm/arm32/mem.c
cvs rdiff -u -r1.211.2.8 -r1.211.2.9 src/sys/arch/arm/arm32/pmap.c
cvs rdiff -u -r1.94.2.1 -r1.94.2.2 src/sys/arch/arm/include/arm32/pmap.h

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

Modified files:

Index: src/sys/arch/arm/arm32/mem.c
diff -u src/sys/arch/arm/arm32/mem.c:1.26.6.2 src/sys/arch/arm/arm32/mem.c:1.26.6.3
--- src/sys/arch/arm/arm32/mem.c:1.26.6.2	Thu Feb 25 03:19:51 2010
+++ src/sys/arch/arm/arm32/mem.c	Thu Feb 25 03:30:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mem.c,v 1.26.6.2 2010/02/25 03:19:51 uebayasi Exp $	*/
+/*	$NetBSD: mem.c,v 1.26.6.3 2010/02/25 03:30:22 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -78,7 +78,7 @@
 #include opt_xip.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mem.c,v 1.26.6.2 2010/02/25 03:19:51 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: mem.c,v 1.26.6.3 2010/02/25 03:30:22 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -147,7 +147,7 @@
 struct vm_page *pg;
 pg = PHYS_TO_VM_PAGE(trunc_page(v));
 if (pg != NULL  pmap_is_page_colored_p(VM_PAGE_TO_MD(pg)))
-	o = pg-mdpage.pvh_attrs;
+	o = VM_PAGE_TO_MD(pg)-pvh_attrs;
 else
 	o = v;
 m += o  arm_cache_prefer_mask;

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.211.2.8 src/sys/arch/arm/arm32/pmap.c:1.211.2.9
--- src/sys/arch/arm/arm32/pmap.c:1.211.2.8	Sat Feb 20 16:48:57 2010
+++ src/sys/arch/arm/arm32/pmap.c	Thu Feb 25 03:30:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.211.2.8 2010/02/20 16:48:57 uebayasi Exp $	*/
+/*	$NetBSD: pmap.c,v 1.211.2.9 2010/02/25 03:30:22 uebayasi Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -191,6 +191,8 @@
 #include opt_ddb.h
 #include opt_lockdebug.h
 #include opt_multiprocessor.h
+#include opt_device_page.h
+#include opt_xip.h
 
 #include sys/param.h
 #include sys/types.h
@@ -211,7 +213,7 @@
 #include machine/param.h
 #include arm/arm32/katelib.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.211.2.8 2010/02/20 16:48:57 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.211.2.9 2010/02/25 03:30:22 uebayasi Exp $);
 
 #ifdef PMAP_DEBUG
 
@@ -3343,8 +3345,8 @@
 	struct vm_page_md *md = VM_PAGE_TO_MD(pg);
 
 	NPDEBUG(PDB_KENTER,
-	printf(pmap_kenter_pa: va 0x%08lx, pa 0x%08lx, prot 0x%x\n,
-	va, pa, prot));
+	printf(pmap_kenter_pa: va 0x%08lx, pa 0x%08lx, prot 0x%x pg %p md %p\n,
+	va, pa, prot, pg, md));
 
 	l2b = pmap_get_l2_bucket(pmap_kernel(), va);
 	KDASSERT(l2b != NULL);

Index: src/sys/arch/arm/include/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.94.2.1 src/sys/arch/arm/include/arm32/pmap.h:1.94.2.2
--- src/sys/arch/arm/include/arm32/pmap.h:1.94.2.1	Wed Feb 10 14:20:23 2010
+++ src/sys/arch/arm/include/arm32/pmap.h	Thu Feb 25 03:30:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.94.2.1 2010/02/10 14:20:23 uebayasi Exp $	*/
+/*	$NetBSD: pmap.h,v 1.94.2.2 2010/02/25 03:30:22 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -269,9 +269,10 @@
 #define	pmap_wired_count(pmap)		((pmap)-pm_stats.wired_count)
 
 #define	pmap_is_modified(pg)	\
-	(((pg)-mdpage.pvh_attrs  PVF_MOD) != 0)
+	((VM_PAGE_TO_MD(pg)-pvh_attrs  PVF_MOD) != 0)
 #define	pmap_is_referenced(pg)	\
-	(((pg)-mdpage.pvh_attrs  PVF_REF) != 0)
+	((VM_PAGE_TO_MD(pg)-pvh_attrs  PVF_REF) != 0)
+
 #define	pmap_is_page_colored_p(md)	\
 	(((md)-pvh_attrs  PVF_COLORED) != 0)
 



CVS commit: src/sys/dev/pci

2010-02-24 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb 25 03:33:09 UTC 2010

Modified Files:
src/sys/dev/pci: files.pci
Added Files:
src/sys/dev/pci: wcfb.c

Log Message:
a very preliminary driver for Wildcat 5110 / Sun XVR-500 graphics boards
Since we don't have any documentationthis driver is unaccelerated and thanks
to the insane state we get the hardware in it's also slow and scrolling
looks weird.
Some hardware info came from OpenBSD's ifb driver.


To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 src/sys/dev/pci/files.pci
cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/wcfb.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/files.pci
diff -u src/sys/dev/pci/files.pci:1.325 src/sys/dev/pci/files.pci:1.326
--- src/sys/dev/pci/files.pci:1.325	Mon Feb 22 05:55:10 2010
+++ src/sys/dev/pci/files.pci	Thu Feb 25 03:33:09 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.325 2010/02/22 05:55:10 ahoka Exp $
+#	$NetBSD: files.pci,v 1.326 2010/02/25 03:33:09 macallan Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -999,3 +999,9 @@
 attach	pm2fb at pci
 file	dev/pci/pm2fb.c		pm2fb
 defflag	opt_pm2fb.h	PM2FB_DEBUG
+
+# 3Dlabs Wildcat / Sun XVR-500, 1200, Expert3D etc.
+device		wcfb: wsemuldisplaydev, rasops8, vcons
+attach		wcfb at pci
+file		dev/pci/wcfb.c	wcfb
+defflag		opt_wcfb.h	WCFB_DEBUG

Added files:

Index: src/sys/dev/pci/wcfb.c
diff -u /dev/null src/sys/dev/pci/wcfb.c:1.1
--- /dev/null	Thu Feb 25 03:33:10 2010
+++ src/sys/dev/pci/wcfb.c	Thu Feb 25 03:33:09 2010
@@ -0,0 +1,484 @@
+/*	$NetBSD: wcfb.c,v 1.1 2010/02/25 03:33:09 macallan Exp $ */
+
+/*-
+ * Copyright (c) 2007 Michael Lorenz
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: wcfb.c,v 1.1 2010/02/25 03:33:09 macallan Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/kernel.h
+#include sys/device.h
+#include sys/proc.h
+#include sys/mutex.h
+#include sys/ioctl.h
+#include sys/kernel.h
+#include sys/systm.h
+#include sys/kauth.h
+
+#include dev/pci/pcidevs.h
+#include dev/pci/pcireg.h
+#include dev/pci/pcivar.h
+#include dev/pci/pciio.h
+
+#include dev/wscons/wsdisplayvar.h
+#include dev/wscons/wsconsio.h
+#include dev/wsfont/wsfont.h
+#include dev/rasops/rasops.h
+#include dev/wscons/wsdisplay_vconsvar.h
+
+#include opt_wsfb.h
+#include opt_wcfb.h
+
+#ifdef WCFB_DEBUG
+# define DPRINTF printf
+#else
+# define DPRINTF while (0) printf
+#endif
+
+static int	wcfb_match(device_t, cfdata_t, void *);
+static void	wcfb_attach(device_t, device_t, void *);
+static int	wcfb_ioctl(void *, void *, u_long, void *, int,
+		struct lwp *);
+static paddr_t	wcfb_mmap(void *, void *, off_t, int);
+
+struct wcfb_softc {
+	device_t sc_dev;
+
+	pci_chipset_tag_t sc_pc;
+	pcitag_t sc_pcitag;
+
+	bus_space_tag_t sc_memt;
+	bus_space_tag_t sc_regt, sc_wtft;
+	bus_space_tag_t sc_iot;
+
+	bus_space_handle_t sc_fbh, sc_wtfh;
+	bus_space_handle_t sc_regh;
+	bus_addr_t sc_fb, sc_reg, sc_wtf;
+	bus_size_t sc_fbsize, sc_regsize, sc_wtfsize;
+
+	int sc_width, sc_height, sc_stride;
+	int sc_locked;
+	uint8_t *sc_fbaddr;
+	struct vcons_screen sc_console_screen;
+	struct wsscreen_descr sc_defaultscreen_descr;
+	const struct wsscreen_descr *sc_screens[1];
+	struct wsscreen_list sc_screenlist;
+	struct vcons_data vd;
+	int sc_mode;
+	u_char sc_cmap_red[256];
+	u_char sc_cmap_green[256];
+	u_char sc_cmap_blue[256];
+	uint32_t sc_fb0off;
+
+	void (*copycols)(void *, int, int, int, int);
+	

CVS commit: [uebayasi-xip] src/sys/arch/alpha

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 03:44:17 UTC 2010

Modified Files:
src/sys/arch/alpha/alpha [uebayasi-xip]: pmap.c
src/sys/arch/alpha/include [uebayasi-xip]: pmap.h

Log Message:
Use VM_PAGE_TO_MD().  Only compile tested.


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.252.2.1 src/sys/arch/alpha/alpha/pmap.c
cvs rdiff -u -r1.75 -r1.75.2.1 src/sys/arch/alpha/include/pmap.h

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

Modified files:

Index: src/sys/arch/alpha/alpha/pmap.c
diff -u src/sys/arch/alpha/alpha/pmap.c:1.252 src/sys/arch/alpha/alpha/pmap.c:1.252.2.1
--- src/sys/arch/alpha/alpha/pmap.c:1.252	Thu Nov 26 00:19:11 2009
+++ src/sys/arch/alpha/alpha/pmap.c	Thu Feb 25 03:44:16 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.252 2009/11/26 00:19:11 matt Exp $ */
+/* $NetBSD: pmap.c,v 1.252.2.1 2010/02/25 03:44:16 uebayasi Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008 The NetBSD Foundation, Inc.
@@ -137,10 +137,12 @@
 #include opt_lockdebug.h
 #include opt_sysv.h
 #include opt_multiprocessor.h
+#include opt_device_page.h
+#include opt_xip.h
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.252 2009/11/26 00:19:11 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.252.2.1 2010/02/25 03:44:16 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1401,6 +1403,7 @@
 void
 pmap_page_protect(struct vm_page *pg, vm_prot_t prot)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pmap_t pmap;
 	pv_entry_t pv, nextpv;
 	bool needkisync = false;
@@ -1427,7 +1430,7 @@
 		PMAP_HEAD_TO_MAP_LOCK();
 		lock = pmap_pvh_lock(pg);
 		mutex_enter(lock);
-		for (pv = pg-mdpage.pvh_list; pv != NULL; pv = pv-pv_next) {
+		for (pv = md-pvh_list; pv != NULL; pv = pv-pv_next) {
 			PMAP_LOCK(pv-pv_pmap);
 			if (*pv-pv_pte  (PG_KWE | PG_UWE)) {
 *pv-pv_pte = ~(PG_KWE | PG_UWE);
@@ -1452,7 +1455,7 @@
 	PMAP_HEAD_TO_MAP_LOCK();
 	lock = pmap_pvh_lock(pg);
 	mutex_enter(lock);
-	for (pv = pg-mdpage.pvh_list; pv != NULL; pv = nextpv) {
+	for (pv = md-pvh_list; pv != NULL; pv = nextpv) {
 		nextpv = pv-pv_next;
 		pmap = pv-pv_pmap;
 
@@ -1793,6 +1796,7 @@
 	 */
 	npte = ((pa  PGSHIFT)  PG_SHIFT) | pte_prot(pmap, prot) | PG_V;
 	if (pg != NULL) {
+		struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 		int attrs;
 
 #ifdef DIAGNOSTIC
@@ -1802,10 +1806,10 @@
 		lock = pmap_pvh_lock(pg);
 		mutex_enter(lock);
 		if (flags  VM_PROT_WRITE)
-			pg-mdpage.pvh_attrs |= (PGA_REFERENCED|PGA_MODIFIED);
+			md-pvh_attrs |= (PGA_REFERENCED|PGA_MODIFIED);
 		else if (flags  VM_PROT_ALL)
-			pg-mdpage.pvh_attrs |= PGA_REFERENCED;
-		attrs = pg-mdpage.pvh_attrs;
+			md-pvh_attrs |= PGA_REFERENCED;
+		attrs = md-pvh_attrs;
 		mutex_exit(lock);
 
 		/*
@@ -2282,6 +2286,7 @@
 bool
 pmap_clear_modify(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	bool rv = false;
 	long cpu_id = cpu_number();
 	kmutex_t *lock;
@@ -2295,10 +2300,10 @@
 	lock = pmap_pvh_lock(pg);
 	mutex_enter(lock);
 
-	if (pg-mdpage.pvh_attrs  PGA_MODIFIED) {
+	if (md-pvh_attrs  PGA_MODIFIED) {
 		rv = true;
 		pmap_changebit(pg, PG_FOW, ~0, cpu_id);
-		pg-mdpage.pvh_attrs = ~PGA_MODIFIED;
+		md-pvh_attrs = ~PGA_MODIFIED;
 	}
 
 	mutex_exit(lock);
@@ -2315,6 +2320,7 @@
 bool
 pmap_clear_reference(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	bool rv = false;
 	long cpu_id = cpu_number();
 	kmutex_t *lock;
@@ -2328,10 +2334,10 @@
 	lock = pmap_pvh_lock(pg);
 	mutex_enter(lock);
 
-	if (pg-mdpage.pvh_attrs  PGA_REFERENCED) {
+	if (md-pvh_attrs  PGA_REFERENCED) {
 		rv = true;
 		pmap_changebit(pg, PG_FOR | PG_FOW | PG_FOE, ~0, cpu_id);
-		pg-mdpage.pvh_attrs = ~PGA_REFERENCED;
+		md-pvh_attrs = ~PGA_REFERENCED;
 	}
 
 	mutex_exit(lock);
@@ -2539,6 +2545,7 @@
 static void
 pmap_changebit(struct vm_page *pg, u_long set, u_long mask, long cpu_id)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pv_entry_t pv;
 	pt_entry_t *pte, npte;
 	vaddr_t va;
@@ -2554,7 +2561,7 @@
 	/*
 	 * Loop over all current mappings setting/clearing as apropos.
 	 */
-	for (pv = pg-mdpage.pvh_list; pv != NULL; pv = pv-pv_next) {
+	for (pv = md-pvh_list; pv != NULL; pv = pv-pv_next) {
 		va = pv-pv_va;
 
 		PMAP_LOCK(pv-pv_pmap);
@@ -2681,16 +2688,17 @@
 	 *	(2) if it was a write fault, mark page as modified.
 	 */
 	pg = PHYS_TO_VM_PAGE(pa);
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 
 	PMAP_HEAD_TO_MAP_LOCK();
 	lock = pmap_pvh_lock(pg);
 	mutex_enter(lock);
 
 	if (type == ALPHA_MMCSR_FOW) {
-		pg-mdpage.pvh_attrs |= (PGA_REFERENCED|PGA_MODIFIED);
+		md-pvh_attrs |= (PGA_REFERENCED|PGA_MODIFIED);
 		faultoff = PG_FOR | PG_FOW;
 	} else {
-		pg-mdpage.pvh_attrs |= PGA_REFERENCED;
+		md-pvh_attrs |= PGA_REFERENCED;
 		faultoff = PG_FOR;
 		if (exec) {
 			faultoff |= PG_FOE;
@@ -2713,16 +2721,18 @@
 

CVS commit: [uebayasi-xip] src/sys/arch/hppa

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 04:11:29 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa [uebayasi-xip]: pmap.c
src/sys/arch/hppa/include [uebayasi-xip]: pmap.h

Log Message:
Use VM_PAGE_TO_MD().  Only compile tested.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/arch/hppa/hppa/pmap.c
cvs rdiff -u -r1.23 -r1.23.2.1 src/sys/arch/hppa/include/pmap.h

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

Modified files:

Index: src/sys/arch/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.63 src/sys/arch/hppa/hppa/pmap.c:1.63.2.1
--- src/sys/arch/hppa/hppa/pmap.c:1.63	Fri Dec 18 19:20:35 2009
+++ src/sys/arch/hppa/hppa/pmap.c	Thu Feb 25 04:11:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.63 2009/12/18 19:20:35 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.63.2.1 2010/02/25 04:11:29 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.63 2009/12/18 19:20:35 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.63.2.1 2010/02/25 04:11:29 uebayasi Exp $);
+
+#include opt_device_page.h
+#include opt_xip.h
 
 #include sys/param.h
 #include sys/systm.h
@@ -486,16 +489,18 @@
 pmap_dump_pv(paddr_t pa)
 {
 	struct vm_page *pg;
+	struct vm_page_md *md;
 	struct pv_entry *pve;
 
 	pg = PHYS_TO_VM_PAGE(pa);
-	mutex_enter(pg-mdpage.pvh_lock);
-	printf(pg %p attr 0x%08x aliases %d\n, pg, pg-mdpage.pvh_attrs,
-	pg-mdpage.pvh_aliases);
-	for (pve = pg-mdpage.pvh_list; pve; pve = pve-pv_next)
+	md = VM_PAGE_TO_MD(pg);
+	mutex_enter(md-pvh_lock);
+	printf(pg %p attr 0x%08x aliases %d\n, pg, md-pvh_attrs,
+	md-pvh_aliases);
+	for (pve = md-pvh_list; pve; pve = pve-pv_next)
 		printf(%x:%lx\n, pve-pv_pmap-pm_space,
 		pve-pv_va  PV_VAMASK);
-	mutex_exit(pg-mdpage.pvh_lock);
+	mutex_exit(md-pvh_lock);
 }
 #endif
 
@@ -507,12 +512,13 @@
  *
  * - Shouldn't be called for pages that have been marked uncacheable by
  *   pmap_kenter_pa.
- * - Must be called with pg-mdpage.pvh_lock held.
+ * - Must be called with md-pvh_lock held.
  */
 void
 pmap_check_alias(struct vm_page *pg, struct pv_entry *pve, vaddr_t va,
 pt_entry_t *ptep)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	bool nonequiv = false;
 	struct pv_entry *tpve;
 	u_int attrs;
@@ -521,8 +527,8 @@
 	(%s(%p, %p, 0x%lx, %p)\n, __func__, pg, pve, va, ptep));
 
 	/* we should only be looking if we're not PVF_NC */
-	KASSERT((pg-mdpage.pvh_attrs  PVF_NC) == 0);
-	KASSERT(mutex_owned(pg-mdpage.pvh_lock));
+	KASSERT((md-pvh_attrs  PVF_NC) == 0);
+	KASSERT(mutex_owned(md-pvh_lock));
 
 	if (ptep) {
 		attrs = pmap_pvh_attrs(*ptep);
@@ -578,7 +584,7 @@
 			 * mark all mappings as uncacheable (if they're not
 			 * already marked as such).
 			 */
-			pg-mdpage.pvh_aliases++;
+			md-pvh_aliases++;
 
 			if ((attrs  PVF_UNCACHEABLE) == 0)
 __changebit(pg, PVF_UNCACHEABLE, 0);
@@ -595,8 +601,8 @@
 			 * it cacheable if all non-equiv aliases are gone.
 			 */
 
-			pg-mdpage.pvh_aliases--;
-			if (pg-mdpage.pvh_aliases == 0) {
+			md-pvh_aliases--;
+			if (md-pvh_aliases == 0) {
 __changebit(pg, 0, PVF_UNCACHEABLE);
 
 DPRINTF(PDB_FOLLOW|PDB_ALIAS,
@@ -639,26 +645,29 @@
 pmap_pv_enter(struct vm_page *pg, struct pv_entry *pve, pmap_t pm,
 vaddr_t va, struct vm_page *pdep, u_int flags)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+
 	DPRINTF(PDB_FOLLOW|PDB_PV, (%s(%p, %p, %p, 0x%lx, %p, 0x%x)\n,
 	__func__, pg, pve, pm, va, pdep, flags));
 
-	KASSERT(mutex_owned(pg-mdpage.pvh_lock));
+	KASSERT(mutex_owned(md-pvh_lock));
 
 	pve-pv_pmap = pm;
 	pve-pv_va = va | flags;
 	pve-pv_ptp = pdep;
-	pve-pv_next = pg-mdpage.pvh_list;
-	pg-mdpage.pvh_list = pve;
+	pve-pv_next = md-pvh_list;
+	md-pvh_list = pve;
 }
 
 static inline struct pv_entry *
 pmap_pv_remove(struct vm_page *pg, pmap_t pmap, vaddr_t va)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	struct pv_entry **pve, *pv;
 
-	KASSERT(mutex_owned(pg-mdpage.pvh_lock));
+	KASSERT(mutex_owned(md-pvh_lock));
 
-	for (pv = *(pve = pg-mdpage.pvh_list);
+	for (pv = *(pve = md-pvh_list);
 	pv; pv = *(pve = (*pve)-pv_next))
 		if (pv-pv_pmap == pmap  (pv-pv_va  PV_VAMASK) == va) {
 			*pve = pv-pv_next;
@@ -1182,7 +1191,8 @@
 continue;
 
 			sheep = PHYS_TO_VM_PAGE(PTE_PAGE(*pde));
-			for (haggis = sheep-mdpage.pvh_list; haggis != NULL; )
+			struct vm_page_md * const md = VM_PAGE_TO_MD(sheap);
+			for (haggis = md-pvh_list; haggis != NULL; )
 if (haggis-pv_pmap == pmap) {
 
 	DPRINTF(PDB_FOLLOW, ( 0x%lx,
@@ -1196,7 +1206,7 @@
 	 * exploit the sacred knowledge of
 	 * lambeous ozzmosis
 	 */
-	haggis = sheep-mdpage.pvh_list;
+	haggis = md-pvh_list;
 } else
 	haggis = haggis-pv_next;
 		}
@@ -1279,10 +1289,11 @@
 		}
 
 		pg = PHYS_TO_VM_PAGE(PTE_PAGE(pte));
-		

CVS commit: [uebayasi-xip] src/sys/arch/ia64/include

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 04:33:06 UTC 2010

Modified Files:
src/sys/arch/ia64/include [uebayasi-xip]: proc.h

Log Message:
Fix build.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/arch/ia64/include/proc.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/ia64/include/proc.h
diff -u src/sys/arch/ia64/include/proc.h:1.4 src/sys/arch/ia64/include/proc.h:1.4.2.1
--- src/sys/arch/ia64/include/proc.h:1.4	Sat Nov 21 15:36:34 2009
+++ src/sys/arch/ia64/include/proc.h	Thu Feb 25 04:33:06 2010
@@ -21,7 +21,7 @@
 
 struct mdproc {
   /* XXX: Todo */
-	void	(*md_syscall)(struct trapframe *);
+	void	(*md_syscall)(struct lwp *, u_int64_t, struct trapframe *);
 	/* Syscall handling function */
 };
 



CVS commit: [uebayasi-xip] src/sys/arch/ia64

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 04:33:44 UTC 2010

Modified Files:
src/sys/arch/ia64/ia64 [uebayasi-xip]: pmap.c
src/sys/arch/ia64/include [uebayasi-xip]: pmap.h

Log Message:
Use VM_PAGE_TO_MD().  Only compile tested.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/arch/ia64/ia64/pmap.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/ia64/include/pmap.h

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

Modified files:

Index: src/sys/arch/ia64/ia64/pmap.c
diff -u src/sys/arch/ia64/ia64/pmap.c:1.24 src/sys/arch/ia64/ia64/pmap.c:1.24.2.1
--- src/sys/arch/ia64/ia64/pmap.c:1.24	Sat Nov  7 07:27:44 2009
+++ src/sys/arch/ia64/ia64/pmap.c	Thu Feb 25 04:33:44 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.24 2009/11/07 07:27:44 cegger Exp $ */
+/* $NetBSD: pmap.c,v 1.24.2.1 2010/02/25 04:33:44 uebayasi Exp $ */
 
 
 /*-
@@ -85,7 +85,10 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.24 2009/11/07 07:27:44 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.24.2.1 2010/02/25 04:33:44 uebayasi Exp $);
+
+#include opt_device_page.h
+#include opt_xip.h
 
 #include sys/param.h
 #include sys/systm.h
@@ -1233,6 +1236,7 @@
 bool
 pmap_clear_modify(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	bool rv = false;
 	struct ia64_lpte *pte;
 	pmap_t oldpmap;
@@ -1241,7 +1245,7 @@
 	if (pg-flags  PG_FAKE)
 		return rv;
 
-	TAILQ_FOREACH(pv, pg-mdpage.pv_list, pv_list) {
+	TAILQ_FOREACH(pv, md-pv_list, pv_list) {
 		PMAP_LOCK(pv-pv_pmap);
 		oldpmap = pmap_install(pv-pv_pmap);
 		pte = pmap_find_vhpt(pv-pv_va);
@@ -1266,6 +1270,7 @@
 void
 pmap_page_protect(struct vm_page *pg, vm_prot_t prot)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 struct ia64_lpte *pte;
 pmap_t oldpmap, pmap;
 pv_entry_t pv;
@@ -1275,7 +1280,7 @@
 if (prot  (VM_PROT_READ | VM_PROT_EXECUTE)) {
 if (pg-flags  PG_RDONLY)
 return;
-TAILQ_FOREACH(pv, pg-mdpage.pv_list, pv_list) {
+TAILQ_FOREACH(pv, md-pv_list, pv_list) {
 pmap = pv-pv_pmap;
 PMAP_LOCK(pmap);
 oldpmap = pmap_install(pmap);
@@ -1489,8 +1494,9 @@
  */
 
 void
-pmap_page_purge(struct vm_page * pg)
+pmap_page_purge(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pmap_t oldpmap;
 	pv_entry_t pv;
 
@@ -1505,7 +1511,7 @@
 #endif
 	//UVM_LOCK_ASSERT_PAGEQ();
 
-	while ((pv = TAILQ_FIRST(pg-mdpage.pv_list)) != NULL) {
+	while ((pv = TAILQ_FIRST(md-pv_list)) != NULL) {
 		struct ia64_lpte *pte;
 		pmap_t pmap = pv-pv_pmap;
 		vaddr_t va = pv-pv_va;
@@ -1972,11 +1978,13 @@
  * Remove an entry from the list of managed mappings.
  */
 static int
-pmap_remove_entry(pmap_t pmap, struct vm_page * pg, vaddr_t va, pv_entry_t pv)
+pmap_remove_entry(pmap_t pmap, struct vm_page *pg, vaddr_t va, pv_entry_t pv)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+
 	if (!pv) {
-		if (pg-mdpage.pv_list_count  pmap-pm_stats.resident_count) {
-			TAILQ_FOREACH(pv, pg-mdpage.pv_list, pv_list) {
+		if (md-pv_list_count  pmap-pm_stats.resident_count) {
+			TAILQ_FOREACH(pv, md-pv_list, pv_list) {
 if (pmap == pv-pv_pmap  va == pv-pv_va) 
 	break;
 			}
@@ -1989,9 +1997,9 @@
 	}
 
 	if (pv) {
-		TAILQ_REMOVE(pg-mdpage.pv_list, pv, pv_list);
-		pg-mdpage.pv_list_count--;
-		if (TAILQ_FIRST(pg-mdpage.pv_list) == NULL) {
+		TAILQ_REMOVE(md-pv_list, pv, pv_list);
+		md-pv_list_count--;
+		if (TAILQ_FIRST(md-pv_list) == NULL) {
 			//UVM_LOCK_ASSERT_PAGEQ(); 
 			pg-flags |= PG_RDONLY;
 		}
@@ -2012,6 +2020,7 @@
 static void
 pmap_insert_entry(pmap_t pmap, vaddr_t va, struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pv_entry_t pv;
 
 	pv = get_pv_entry(pmap);
@@ -2021,8 +2030,8 @@
 	//LOCK_ASSERT(simple_lock_held(pmap-slock));
 	//UVM_LOCK_ASSERT_PAGEQ(); 
 	TAILQ_INSERT_TAIL(pmap-pm_pvlist, pv, pv_plist);
-	TAILQ_INSERT_TAIL(pg-mdpage.pv_list, pv, pv_list);
-	pg-mdpage.pv_list_count++;
+	TAILQ_INSERT_TAIL(md-pv_list, pv, pv_list);
+	md-pv_list_count++;
 }
 
 
@@ -2092,13 +2101,14 @@
 		pa = VM_PAGE_TO_PHYS(pg);
 
 #ifdef DEBUG
-		mutex_enter(pg-mdpage.pv_mutex);
+		struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+		mutex_enter(md-pv_mutex);
 		if (pg-wire_count != 0) {
 			printf(pmap_physpage_alloc: page 0x%lx has 
 			%d references\n, pa, pg-wire_count);
 			panic(pmap_physpage_alloc);
 		}
-		mutex_exit(pg-mdpage.pv_mutex);
+		mutex_exit(md-pv_mutex);
 #endif
 		*pap = pa;
 		return true;
@@ -2120,10 +2130,11 @@
 		panic(pmap_physpage_free: bogus physical page address);
 
 #ifdef DEBUG
-	mutex_enter(pg-mdpage.pv_mutex);
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+	mutex_enter(md-pv_mutex);
 	if (pg-wire_count != 0)
 		panic(pmap_physpage_free: page still has references);
-	

CVS commit: [uebayasi-xip] src/sys/arch/mips/mips

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 04:46:28 UTC 2010

Modified Files:
src/sys/arch/mips/mips [uebayasi-xip]: pmap.c

Log Message:
Use VM_PAGE_TO_MD().  Only compile tested.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.188.2.1 src/sys/arch/mips/mips/pmap.c

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

Modified files:

Index: src/sys/arch/mips/mips/pmap.c
diff -u src/sys/arch/mips/mips/pmap.c:1.188 src/sys/arch/mips/mips/pmap.c:1.188.2.1
--- src/sys/arch/mips/mips/pmap.c:1.188	Mon Dec 14 00:46:07 2009
+++ src/sys/arch/mips/mips/pmap.c	Thu Feb 25 04:46:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.188 2009/12/14 00:46:07 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.188.2.1 2010/02/25 04:46:28 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.188 2009/12/14 00:46:07 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.188.2.1 2010/02/25 04:46:28 uebayasi Exp $);
 
 /*
  *	Manages physical address maps.
@@ -265,6 +265,7 @@
 mips_flushcache_allpvh(paddr_t pa)
 {
 	struct vm_page *pg;
+	struct vm_page_md *md;
 	struct pv_entry *pv;
 
 	pg = PHYS_TO_VM_PAGE(pa);
@@ -277,7 +278,8 @@
 		return;
 	}
 
-	pv = pg-mdpage.pvh_list;
+	md = VM_PAGE_TO_MD(pg);
+	pv = md-pvh_list;
 
 #if defined(MIPS3_NO_PV_UNCACHED)
 	/* No current mapping.  Cache was flushed by pmap_remove_pv() */
@@ -522,7 +524,7 @@
 	for (bank = 0; bank  vm_nphysseg; bank++) {
 		s = vm_physmem[bank].end - vm_physmem[bank].start;
 		for (i = 0; i  s; i++)
-			vm_physmem[bank].pgs[i].mdpage.pvh_list = pv++;
+			VM_PAGE_TO_MD(vm_physmem[bank].pgs[i])-pvh_list = pv++;
 	}
 
 	/*
@@ -861,6 +863,7 @@
 void
 pmap_page_protect(struct vm_page *pg, vm_prot_t prot)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pv_entry_t pv;
 	vaddr_t va;
 
@@ -878,7 +881,7 @@
 	/* copy_on_write */
 	case VM_PROT_READ:
 	case VM_PROT_READ|VM_PROT_EXECUTE:
-		pv = pg-mdpage.pvh_list;
+		pv = md-pvh_list;
 		/*
 		 * Loop over all current mappings setting/clearing as appropos.
 		 */
@@ -894,7 +897,7 @@
 
 	/* remove_all */
 	default:
-		pv = pg-mdpage.pvh_list;
+		pv = md-pvh_list;
 		while (pv-pv_pmap != NULL) {
 			pmap_remove(pv-pv_pmap, pv-pv_va,
 			pv-pv_va + PAGE_SIZE);
@@ -1079,6 +1082,7 @@
 static void
 pmap_page_cache(struct vm_page *pg, int mode)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pv_entry_t pv;
 	pt_entry_t *pte;
 	unsigned entry;
@@ -1090,7 +1094,7 @@
 		printf(pmap_page_uncache(%#PRIxPADDR)\n, VM_PAGE_TO_PHYS(pg));
 #endif
 	newmode = mode  PV_UNCACHED ? MIPS3_PG_UNCACHED : MIPS3_PG_CACHED;
-	pv = pg-mdpage.pvh_list;
+	pv = md-pvh_list;
 	asid = pv-pv_pmap-pm_asid;
 	needupdate = (pv-pv_pmap-pm_asidgen == pmap_asid_generation);
 
@@ -1189,7 +1193,8 @@
 	pg = PHYS_TO_VM_PAGE(pa);
 
 	if (pg) {
-		int *attrs = pg-mdpage.pvh_attrs;
+		struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+		int *attrs = md-pvh_attrs;
 
 		/* Set page referenced/modified status based on flags */
 		if (flags  VM_PROT_WRITE)
@@ -1643,7 +1648,8 @@
 #if defined(MIPS3_PLUS)	/* XXX mmu XXX */
 	pg = PHYS_TO_VM_PAGE(phys);
 	if (mips_cache_virtual_alias) {
-		pv = pg-mdpage.pvh_list;
+		struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+		pv = md-pvh_list;
 		if ((pv-pv_flags  PV_UNCACHED) == 0 
 		mips_cache_indexof(pv-pv_va) != mips_cache_indexof(va))
 			mips_dcache_wbinv_range_index(pv-pv_va, PAGE_SIZE);
@@ -1745,6 +1751,7 @@
 bool
 pmap_clear_reference(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	int *attrp;
 	bool rv;
 
@@ -1753,7 +1760,7 @@
 		printf(pmap_clear_reference(%#PRIxPADDR)\n,
 		VM_PAGE_TO_PHYS(pg));
 #endif
-	attrp = pg-mdpage.pvh_attrs;
+	attrp = md-pvh_attrs;
 	rv = *attrp  PGA_REFERENCED;
 	*attrp = ~PGA_REFERENCED;
 	return rv;
@@ -1768,8 +1775,9 @@
 bool
 pmap_is_referenced(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 
-	return pg-mdpage.pvh_attrs  PGA_REFERENCED;
+	return md-pvh_attrs  PGA_REFERENCED;
 }
 
 /*
@@ -1778,6 +1786,7 @@
 bool
 pmap_clear_modify(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	struct pmap *pmap;
 	struct pv_entry *pv;
 	pt_entry_t *pte;
@@ -1790,13 +1799,13 @@
 	if (pmapdebug  PDB_FOLLOW)
 		printf(pmap_clear_modify(%#PRIxPADDR)\n, VM_PAGE_TO_PHYS(pg));
 #endif
-	attrp = pg-mdpage.pvh_attrs;
+	attrp = md-pvh_attrs;
 	rv = *attrp  PGA_MODIFIED;
 	*attrp = ~PGA_MODIFIED;
 	if (!rv) {
 		return rv;
 	}
-	pv = pg-mdpage.pvh_list;
+	pv = md-pvh_list;
 	if (pv-pv_pmap == NULL) {
 		return true;
 	}
@@ -1846,8 +1855,9 @@
 bool
 pmap_is_modified(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 
-	return pg-mdpage.pvh_attrs  PGA_MODIFIED;
+	return md-pvh_attrs  PGA_MODIFIED;
 }
 
 /*
@@ -1859,9 +1869,11 @@
 pmap_set_modified(paddr_t pa)
 {
 	struct vm_page *pg;

CVS commit: [uebayasi-xip] src/sys/arch/sh3/sh3

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 05:05:23 UTC 2010

Modified Files:
src/sys/arch/sh3/sh3 [uebayasi-xip]: pmap.c

Log Message:
Use VM_PAGE_TO_MD().  Only compile tested.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.74.2.1 src/sys/arch/sh3/sh3/pmap.c

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

Modified files:

Index: src/sys/arch/sh3/sh3/pmap.c
diff -u src/sys/arch/sh3/sh3/pmap.c:1.74 src/sys/arch/sh3/sh3/pmap.c:1.74.2.1
--- src/sys/arch/sh3/sh3/pmap.c:1.74	Sat Nov  7 07:27:46 2009
+++ src/sys/arch/sh3/sh3/pmap.c	Thu Feb 25 05:05:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.74 2009/11/07 07:27:46 cegger Exp $	*/
+/*	$NetBSD: pmap.c,v 1.74.2.1 2010/02/25 05:05:23 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.74 2009/11/07 07:27:46 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.74.2.1 2010/02/25 05:05:23 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -339,7 +339,7 @@
 		entry |= _PG_WIRED;
 
 	if (pg != NULL) {	/* memory-space */
-		pvh = pg-mdpage;
+		pvh = VM_PAGE_TO_MD(pg);
 		entry |= PG_C;	/* always cached */
 
 		/* Seed modified/reference tracking */
@@ -483,7 +483,7 @@
 		 * XXX mapping them uncached (like arm and mips do).
 		 */
  again:
-		pvh = pg-mdpage;
+		pvh = VM_PAGE_TO_MD(pg);
 		SLIST_FOREACH(pv, pvh-pvh_head, pv_link) {
 			if (sh_cache_indexof(va) !=
 			sh_cache_indexof(pv-pv_va)) {
@@ -495,7 +495,7 @@
 	}
 
 	/* Register pv map */
-	pvh = pg-mdpage;
+	pvh = VM_PAGE_TO_MD(pg);
 	pv = __pmap_pv_alloc();
 	pv-pv_pmap = pmap;
 	pv-pv_va = va;
@@ -547,12 +547,12 @@
 	int s;
 
 	s = splvm();
-	pvh = pg-mdpage;
+	pvh = VM_PAGE_TO_MD(pg);
 	SLIST_FOREACH(pv, pvh-pvh_head, pv_link) {
 		if (pv-pv_pmap == pmap  pv-pv_va == vaddr) {
 			if (SH_HAS_VIRTUAL_ALIAS ||
 			(SH_HAS_WRITEBACK_CACHE 
-(pg-mdpage.pvh_flags  PVH_MODIFIED))) {
+(pvh-pvh_flags  PVH_MODIFIED))) {
 /*
  * Always use index ops. since I don't want to
  * worry about address space.
@@ -699,7 +699,7 @@
 void
 pmap_page_protect(struct vm_page *pg, vm_prot_t prot)
 {
-	struct vm_page_md *pvh = pg-mdpage;
+	struct vm_page_md *pvh = VM_PAGE_TO_MD(pg);
 	struct pv_entry *pv;
 	struct pmap *pmap;
 	vaddr_t va;
@@ -789,24 +789,25 @@
 bool
 pmap_is_referenced(struct vm_page *pg)
 {
+	struct vm_page_md *pvh = VM_PAGE_TO_MD(pg);
 
-	return ((pg-mdpage.pvh_flags  PVH_REFERENCED) ? true : false);
+	return ((pvh-pvh_flags  PVH_REFERENCED) ? true : false);
 }
 
 bool
 pmap_clear_reference(struct vm_page *pg)
 {
-	struct vm_page_md *pvh = pg-mdpage;
+	struct vm_page_md *pvh = VM_PAGE_TO_MD(pg);
 	struct pv_entry *pv;
 	pt_entry_t *pte;
 	pmap_t pmap;
 	vaddr_t va;
 	int s;
 
-	if ((pg-mdpage.pvh_flags  PVH_REFERENCED) == 0)
+	if ((pvh-pvh_flags  PVH_REFERENCED) == 0)
 		return (false);
 
-	pg-mdpage.pvh_flags = ~PVH_REFERENCED;
+	pvh-pvh_flags = ~PVH_REFERENCED;
 
 	s = splvm();
 	/* Restart reference bit emulation */
@@ -831,14 +832,15 @@
 bool
 pmap_is_modified(struct vm_page *pg)
 {
+	struct vm_page_md *pvh = VM_PAGE_TO_MD(pg);
 
-	return ((pg-mdpage.pvh_flags  PVH_MODIFIED) ? true : false);
+	return ((pvh-pvh_flags  PVH_MODIFIED) ? true : false);
 }
 
 bool
 pmap_clear_modify(struct vm_page *pg)
 {
-	struct vm_page_md *pvh = pg-mdpage;
+	struct vm_page_md *pvh = VM_PAGE_TO_MD(pg);
 	struct pv_entry *pv;
 	struct pmap *pmap;
 	pt_entry_t *pte, entry;
@@ -1023,12 +1025,14 @@
 
 	/* Emulate reference/modified tracking for managed page. */
 	if (flags != 0  (pg = PHYS_TO_VM_PAGE(entry  PG_PPN)) != NULL) {
+		struct vm_page_md *pvh = VM_PAGE_TO_MD(pg);
+
 		if (flags  PVH_REFERENCED) {
-			pg-mdpage.pvh_flags |= PVH_REFERENCED;
+			pvh-pvh_flags |= PVH_REFERENCED;
 			entry |= PG_V;
 		}
 		if (flags  PVH_MODIFIED) {
-			pg-mdpage.pvh_flags |= PVH_MODIFIED;
+			pvh-pvh_flags |= PVH_MODIFIED;
 			entry |= PG_D;
 		}
 		*pte = entry;



CVS commit: [uebayasi-xip] src/sys/arch/sh3/include

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 05:13:01 UTC 2010

Modified Files:
src/sys/arch/sh3/include [uebayasi-xip]: vmparam.h

Log Message:
Make this reall build.


To generate a diff of this commit:
cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/sys/arch/sh3/include/vmparam.h

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

Modified files:

Index: src/sys/arch/sh3/include/vmparam.h
diff -u src/sys/arch/sh3/include/vmparam.h:1.19.2.1 src/sys/arch/sh3/include/vmparam.h:1.19.2.2
--- src/sys/arch/sh3/include/vmparam.h:1.19.2.1	Tue Feb 23 15:27:56 2010
+++ src/sys/arch/sh3/include/vmparam.h	Thu Feb 25 05:13:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.19.2.1 2010/02/23 15:27:56 uebayasi Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.19.2.2 2010/02/25 05:13:01 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -99,8 +99,8 @@
 
 #define	VM_MDPAGE_INIT(pvh, pa)		\
 do {	\
-	SLIST_INIT(pvh-pvh_head);	\
-	pvh-pvh_flags = 0;		\
+	SLIST_INIT((pvh)-pvh_head);	\
+	(pvh)-pvh_flags = 0;		\
 } while (/*CONSTCOND*/0)
 #endif /* _LOCORE */
 #endif /* !_SH3_VMPARAM_H_ */



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

2010-02-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 25 05:24:24 UTC 2010

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

Log Message:
Make sure we aren't looking up a direct-mapped address.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/arch/mips/mips/pmap_segtab.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/pmap_segtab.c
diff -u src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.5 src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.6
--- src/sys/arch/mips/mips/pmap_segtab.c:1.1.2.5	Tue Feb 23 20:33:48 2010
+++ src/sys/arch/mips/mips/pmap_segtab.c	Thu Feb 25 05:24:24 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_segtab.c,v 1.1.2.5 2010/02/23 20:33:48 matt Exp $	*/
+/*	$NetBSD: pmap_segtab.c,v 1.1.2.6 2010/02/25 05:24:24 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap_segtab.c,v 1.1.2.5 2010/02/23 20:33:48 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_segtab.c,v 1.1.2.6 2010/02/25 05:24:24 matt Exp $);
 
 /*
  *	Manages physical address maps.
@@ -149,6 +149,11 @@
 pmap_segmap(struct pmap *pmap, vaddr_t va)
 {
 	struct segtab *stp = pmap-pm_segtab;
+	KASSERT(!MIPS_KSEG0_P(va));
+	KASSERT(!MIPS_KSEG1_P(va));
+#ifdef _LP64
+	KASSERT(!MIPS_XKPHYS_P(va));
+#endif
 	return stp-seg_tab[va  SEGSHIFT];
 }
 



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

2010-02-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 25 05:24:53 UTC 2010

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

Log Message:
Remove ci_curpm since it isn't used.


To generate a diff of this commit:
cvs rdiff -u -r1.90.16.21 -r1.90.16.22 src/sys/arch/mips/include/cpu.h

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

Modified files:

Index: src/sys/arch/mips/include/cpu.h
diff -u src/sys/arch/mips/include/cpu.h:1.90.16.21 src/sys/arch/mips/include/cpu.h:1.90.16.22
--- src/sys/arch/mips/include/cpu.h:1.90.16.21	Tue Feb 23 20:33:47 2010
+++ src/sys/arch/mips/include/cpu.h	Thu Feb 25 05:24:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.90.16.21 2010/02/23 20:33:47 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.90.16.22 2010/02/25 05:24:53 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -145,7 +145,6 @@
 	 */
 	uint32_t ci_ksp_tlb_slot;	/* reserved tlb entry for kernel stack */
 	struct pmap_tlb_info *ci_tlb_info;
-	struct pmap *ci_curpm;		/* current pmap */
 	struct segtab *ci_pmap_segbase;
 	vaddr_t ci_pmap_srcbase;	/* starting VA of ephemeral src space */
 	vaddr_t ci_pmap_dstbase;	/* starting VA of ephemeral dst space */



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

2010-02-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 25 05:45:12 UTC 2010

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: locore.h
src/sys/arch/mips/mips [matt-nb5-mips64]: locore.S locore_mips3.S
mipsX_subr.S mips_machdep.c

Log Message:
Add mipsXX_tlb_record_asids - records what ASIDs have valid TLB entries in
the TLB.
Move some mips3 specific routines from locore.S to locore_mips3.S


To generate a diff of this commit:
cvs rdiff -u -r1.78.36.1.2.14 -r1.78.36.1.2.15 \
src/sys/arch/mips/include/locore.h
cvs rdiff -u -r1.167.38.15 -r1.167.38.16 src/sys/arch/mips/mips/locore.S
cvs rdiff -u -r1.93.38.6 -r1.93.38.7 src/sys/arch/mips/mips/locore_mips3.S
cvs rdiff -u -r1.26.36.1.2.25 -r1.26.36.1.2.26 \
src/sys/arch/mips/mips/mipsX_subr.S
cvs rdiff -u -r1.205.4.1.2.1.2.35 -r1.205.4.1.2.1.2.36 \
src/sys/arch/mips/mips/mips_machdep.c

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

Modified files:

Index: src/sys/arch/mips/include/locore.h
diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.14 src/sys/arch/mips/include/locore.h:1.78.36.1.2.15
--- src/sys/arch/mips/include/locore.h:1.78.36.1.2.14	Tue Feb 23 20:33:47 2010
+++ src/sys/arch/mips/include/locore.h	Thu Feb 25 05:45:12 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.h,v 1.78.36.1.2.14 2010/02/23 20:33:47 matt Exp $ */
+/* $NetBSD: locore.h,v 1.78.36.1.2.15 2010/02/25 05:45:12 matt Exp $ */
 
 /*
  * This file should not be included by MI code!!!
@@ -51,6 +51,7 @@
 void	mips1_tlb_invalidate_globals(void);
 void	mips1_tlb_invalidate_asids(uint32_t, uint32_t);
 void	mips1_tlb_invalidate_addr(vaddr_t);
+u_int	mips1_tlb_record_asids(u_long *, uint32_t);
 int	mips1_tlb_update(vaddr_t, uint32_t);
 void	mips1_tlb_read_indexed(size_t, struct tlbmask *);
 void	mips1_wbflush(void);
@@ -67,6 +68,7 @@
 void	mips3_tlb_invalidate_globals(void);
 void	mips3_tlb_invalidate_asids(uint32_t, uint32_t);
 void	mips3_tlb_invalidate_addr(vaddr_t);
+u_int	mips3_tlb_record_asids(u_long *, uint32_t);
 int	mips3_tlb_update(vaddr_t, uint32_t);
 void	mips3_tlb_read_indexed(size_t, struct tlbmask *);
 void	mips3_tlb_write_indexed_VPS(size_t, struct tlbmask *);
@@ -82,6 +84,7 @@
 void	mips5900_tlb_invalidate_globals(void);
 void	mips5900_tlb_invalidate_asids(uint32_t, uint32_t);
 void	mips5900_tlb_invalidate_addr(vaddr_t);
+u_int	mips5900_tlb_record_asids(u_long *, uint32_t);
 int	mips5900_tlb_update(vaddr_t, uint32_t);
 void	mips5900_tlb_read_indexed(size_t, struct tlbmask *);
 void	mips5900_tlb_write_indexed_VPS(size_t, struct tlbmask *);
@@ -99,6 +102,7 @@
 void	mips32_tlb_invalidate_globals(void);
 void	mips32_tlb_invalidate_asids(uint32_t, uint32_t);
 void	mips32_tlb_invalidate_addr(vaddr_t);
+u_int	mips32_tlb_record_asids(u_long *, uint32_t);
 int	mips32_tlb_update(vaddr_t, uint32_t);
 void	mips32_tlb_read_indexed(size_t, struct tlbmask *);
 void	mips32_tlb_write_indexed_VPS(size_t, struct tlbmask *);
@@ -114,6 +118,7 @@
 void	mips64_tlb_invalidate_globals(void);
 void	mips64_tlb_invalidate_asids(uint32_t, uint32_t);
 void	mips64_tlb_invalidate_addr(vaddr_t);
+u_int	mips64_tlb_record_asids(u_long *, uint32_t);
 int	mips64_tlb_update(vaddr_t, uint32_t);
 void	mips64_tlb_read_indexed(size_t, struct tlbmask *);
 void	mips64_tlb_write_indexed_VPS(size_t, struct tlbmask *);
@@ -295,6 +300,7 @@
 	void (*ljv_tlb_invalidate_addr)(vaddr_t);
 	void (*ljv_tlb_invalidate_globals)(void);
 	void (*ljv_tlb_invalidate_all)(void);
+	u_int (*ljv_tlb_record_asids)(u_long *, uint32_t);
 	int  (*ljv_tlb_update)(vaddr_t, uint32_t);
 	void (*ljv_tlb_read_indexed)(size_t, struct tlbmask *);
 	void (*ljv_wbflush)(void);
@@ -334,6 +340,7 @@
 #define tlb_invalidate_addr	mips1_tlb_invalidate_addr
 #define tlb_invalidate_globals	mips1_tlb_invalidate_globals
 #define tlb_invalidate_all	mips1_tlb_invalidate_all
+#define tlb_record_asids	mips1_tlb_record_asids
 #define tlb_update		mips1_tlb_update
 #define tlb_read_indexed	mips1_tlb_read_indexed
 #define wbflush			mips1_wbflush
@@ -345,6 +352,7 @@
 #define tlb_invalidate_addr	mips3_tlb_invalidate_addr
 #define tlb_invalidate_globals	mips3_tlb_invalidate_globals
 #define tlb_invalidate_all	mips3_tlb_invalidate_all
+#define tlb_record_asids	mips3_tlb_record_asids
 #define tlb_update		mips3_tlb_update
 #define tlb_read_indexed	mips3_tlb_read_indexed
 #define tlb_write_indexed_VPS	mips3_tlb_write_indexed_VPS
@@ -357,6 +365,7 @@
 #define tlb_invalidate_addr	mips32_tlb_invalidate_addr
 #define tlb_invalidate_globals	mips32_tlb_invalidate_globals
 #define tlb_invalidate_all	mips32_tlb_invalidate_all
+#define tlb_record_asids	mips32_tlb_record_asids
 #define tlb_update		mips32_tlb_update
 #define tlb_read_indexed	mips32_tlb_read_indexed
 #define tlb_write_indexed_VPS	mips32_tlb_write_indexed_VPS
@@ -370,6 +379,7 @@
 #define tlb_invalidate_addr	mips64_tlb_invalidate_addr
 #define tlb_invalidate_globals	mips64_tlb_invalidate_globals
 #define 

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

2010-02-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 25 05:53:23 UTC 2010

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

Log Message:
Make the UP and MP ASID allocation algorithm common.  Significantly improve
the algorithm.  Now when we exhaust the ASIDs, interrogate the TLB for active
ASIDS and release all the other for future allocations.  This leaves the
TLB entries with ASIDs valid avoiding the need to re-incur TLB misses for
them.


To generate a diff of this commit:
cvs rdiff -u -r1.54.26.9 -r1.54.26.10 src/sys/arch/mips/include/pmap.h
cvs rdiff -u -r1.179.16.17 -r1.179.16.18 src/sys/arch/mips/mips/pmap.c
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/mips/mips/pmap_tlb.c

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

Modified files:

Index: src/sys/arch/mips/include/pmap.h
diff -u src/sys/arch/mips/include/pmap.h:1.54.26.9 src/sys/arch/mips/include/pmap.h:1.54.26.10
--- src/sys/arch/mips/include/pmap.h:1.54.26.9	Tue Feb 23 20:33:47 2010
+++ src/sys/arch/mips/include/pmap.h	Thu Feb 25 05:53:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.54.26.9 2010/02/23 20:33:47 matt Exp $	*/
+/*	$NetBSD: pmap.h,v 1.54.26.10 2010/02/25 05:53:23 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -143,27 +143,14 @@
  * Per TLB (normally same as CPU) asid info
  */
 struct pmap_asid_info {
-#ifdef MULTIPROCESSOR
 	LIST_ENTRY(pmap_asid_info) pai_link;
-#else
-	uint32_t	pai_asid_generation; /* its generation number */
-#endif
 	uint32_t	pai_asid;	/* TLB address space tag */
 };
 
-#ifdef MULTIPROCESSOR
-#define	TLBINFO_LOCK(ti)	mutex_spin_enter((ti)-ti_lock)
-#define	TLBINFO_UNLOCK(ti)	mutex_spin_exit((ti)-ti_lock)
-#define	PMAP_PAI_ASIDVALID_P(pai, ti)	\
-	((pai)-pai_asid != 0)
-#else
-#define	TLBINFO_LOCK(ti)	do { } while (/*CONSTCOND*/0)
-#define	TLBINFO_UNLOCK(ti)	do { } while (/*CONSTCOND*/0)
-#define	PMAP_PAI_ASIDVALID_P(pai, ti)	\
-	((pai)-pai_asid != 0 \
-	  (pai)-pai_asid_generation == (ti)-ti_asid_generation)
-#endif
-#define	PMAP_PAI(pmap, ti)	((pmap)-pm_pai[tlbinfo_index(ti)])
+#define	TLBINFO_LOCK(ti)		mutex_spin_enter((ti)-ti_lock)
+#define	TLBINFO_UNLOCK(ti)		mutex_spin_exit((ti)-ti_lock)
+#define	PMAP_PAI_ASIDVALID_P(pai, ti)	((pai)-pai_asid != 0)
+#define	PMAP_PAI(pmap, ti)		((pmap)-pm_pai[tlbinfo_index(ti)])
 #define	PAI_PMAP(pai, ti)	\
 	((pmap_t)((intptr_t)(pai) \
 	- offsetof(struct pmap, pm_pai[tlbinfo_index(ti)])))
@@ -193,23 +180,23 @@
 
 struct pmap_tlb_info {
 	uint32_t ti_asid_hint;		/* probable next ASID to use */
-#ifdef MULTIPROCESSOR
 	uint32_t ti_asids_free;		/* # of ASIDs free */
-	u_int ti_asid_bitmap[MIPS_TLB_NUM_PIDS / (sizeof(u_int) * 8)];
+#define	tlbinfo_noasids_p(ti)	((ti)-ti_asids_free == 0)
+	u_long ti_asid_bitmap[MIPS_TLB_NUM_PIDS / (sizeof(u_long) * 8)];
 	kmutex_t *ti_lock;
+	u_int ti_wired;			/* # of wired TLB entries */
+	uint32_t ti_asid_mask;
+	uint32_t ti_asid_max;
 	LIST_HEAD(, pmap_asid_info) ti_pais; /* list of active ASIDs */
+#ifdef MULTIPROCESSOR
 	pmap_t ti_victim;
 	uint32_t ti_cpu_mask;		/* bitmask of CPUs sharing this TLB */
 	enum tlb_invalidate_op ti_tlbinvop;
 	u_int ti_index;
 #define tlbinfo_index(ti)	((ti)-ti_index)
-#define	tlbinfo_noasids_p(ti)	((ti)-ti_asids_free == 0)
 #else
 #define tlbinfo_index(ti)	(0)
-#define	tlbinfo_noasids_p(ti)	((ti)-ti_asid_hint == 0)
-	uint32_t ti_asid_generation;
-#endif /* MULTIPROCESSOR */
-	u_int ti_wired;			/* # of wired TLB entries */
+#endif
 };
 
 
@@ -253,8 +240,8 @@
 void	pmap_tlb_shootdown_process(void);
 bool	pmap_tlb_shootdown_bystanders(pmap_t pmap);
 void	pmap_tlb_info_attach(struct pmap_tlb_info *, struct cpu_info *);
-void	pmap_tlb_info_init(struct pmap_tlb_info *);
 #endif
+void	pmap_tlb_info_init(struct pmap_tlb_info *);
 void	pmap_tlb_asid_acquire(pmap_t pmap, struct lwp *l);
 void	pmap_tlb_asid_deactivate(pmap_t pmap);
 void	pmap_tlb_asid_release_all(pmap_t pmap);

Index: src/sys/arch/mips/mips/pmap.c
diff -u src/sys/arch/mips/mips/pmap.c:1.179.16.17 src/sys/arch/mips/mips/pmap.c:1.179.16.18
--- src/sys/arch/mips/mips/pmap.c:1.179.16.17	Wed Feb 24 00:09:04 2010
+++ src/sys/arch/mips/mips/pmap.c	Thu Feb 25 05:53:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.179.16.17 2010/02/24 00:09:04 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.179.16.18 2010/02/25 05:53:23 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.179.16.17 2010/02/24 00:09:04 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.179.16.18 2010/02/25 05:53:23 matt Exp $);
 
 /*
  *	Manages physical address maps.
@@ -464,9 +464,7 @@
 {
 	vsize_t bufsz;
 
-#ifdef MULTIPROCESSOR
-	pmap_tlb_info_init(pmap_tlb_info);
-#endif
+	pmap_tlb_info_init(pmap_tlb_info);	/* init the lock */
 
 	/*
 	 * Compute the number of pages kmem_map will have.

Index: 

CVS commit: [uebayasi-xip] src/sys/arch

2010-02-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Feb 25 05:54:03 UTC 2010

Modified Files:
src/sys/arch/sparc/include [uebayasi-xip]: vmparam.h
src/sys/arch/sparc64/sparc64 [uebayasi-xip]: pmap.c

Log Message:
Use VM_PAGE_TO_MD().  Only compile tested.


To generate a diff of this commit:
cvs rdiff -u -r1.40.2.1 -r1.40.2.2 src/sys/arch/sparc/include/vmparam.h
cvs rdiff -u -r1.250 -r1.250.2.1 src/sys/arch/sparc64/sparc64/pmap.c

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

Modified files:

Index: src/sys/arch/sparc/include/vmparam.h
diff -u src/sys/arch/sparc/include/vmparam.h:1.40.2.1 src/sys/arch/sparc/include/vmparam.h:1.40.2.2
--- src/sys/arch/sparc/include/vmparam.h:1.40.2.1	Tue Feb 23 15:27:56 2010
+++ src/sys/arch/sparc/include/vmparam.h	Thu Feb 25 05:54:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.40.2.1 2010/02/23 15:27:56 uebayasi Exp $ */
+/*	$NetBSD: vmparam.h,v 1.40.2.2 2010/02/25 05:54:03 uebayasi Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -136,7 +136,7 @@
 		int	pv_flags;		/* flags (below) */
 	} pvlisthead;
 };
-#define VM_MDPAGE_PVHEAD(pg)	((pg)-mdpage.pvlisthead)
+#define VM_MDPAGE_PVHEAD(pg)	(VM_PAGE_TO_MD(pg)-pvlisthead)
 
 #define VM_MDPAGE_INIT(md, pa) do {			\
 	(md)-pvlisthead.pv_next = NULL;		\

Index: src/sys/arch/sparc64/sparc64/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.250 src/sys/arch/sparc64/sparc64/pmap.c:1.250.2.1
--- src/sys/arch/sparc64/sparc64/pmap.c:1.250	Fri Feb  5 12:04:10 2010
+++ src/sys/arch/sparc64/sparc64/pmap.c	Thu Feb 25 05:54:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.250 2010/02/05 12:04:10 martin Exp $	*/
+/*	$NetBSD: pmap.c,v 1.250.2.1 2010/02/25 05:54:03 uebayasi Exp $	*/
 /*
  *
  * Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.250 2010/02/05 12:04:10 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.250.2.1 2010/02/25 05:54:03 uebayasi Exp $);
 
 #undef	NO_VCACHE /* Don't forget the locked TLB in dostart */
 #define	HWREF
@@ -1398,9 +1398,13 @@
 
 	/* we could be a little smarter and leave pages zeroed */
 	for (pg = TAILQ_FIRST(pm-pm_obj.memq); pg != NULL; pg = nextpg) {
+#ifdef DIAGNOSTIC
+		struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+#endif
+
 		nextpg = TAILQ_NEXT(pg, listq.queue);
 		TAILQ_REMOVE(pm-pm_obj.memq, pg, listq.queue);
-		KASSERT(pg-mdpage.mdpg_pvh.pv_pmap == NULL);
+		KASSERT(md-mdpg_pvh.pv_pmap == NULL);
 		uvm_pagefree(pg);
 	}
 	pmap_free_page((paddr_t)(u_long)pm-pm_segs);
@@ -1667,7 +1671,9 @@
 	 */
 	pg = PHYS_TO_VM_PAGE(pa);
 	if (pg) {
-		pvh = pg-mdpage.mdpg_pvh;
+		struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+
+		pvh = md-mdpg_pvh;
 		uncached = (pvh-pv_va  (PV_ALIAS|PV_NVC));
 #ifdef DIAGNOSTIC
 		if ((flags  VM_PROT_ALL)  ~prot)
@@ -2064,8 +2070,10 @@
 
 		pg = PHYS_TO_VM_PAGE(pa);
 		if (pg) {
+			struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+
 			/* Save REF/MOD info */
-			pv = pg-mdpage.mdpg_pvh;
+			pv = md-mdpg_pvh;
 			if (data  TLB_ACCESS)
 pv-pv_va |= PV_REF;
 			if (data  TLB_MODIFY)
@@ -2410,6 +2418,7 @@
 bool
 pmap_clear_modify(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pv_entry_t pv;
 	int rv;
 	int changed = 0;
@@ -2424,7 +2433,7 @@
 #endif
 	mutex_enter(pmap_lock);
 	/* Clear all mappings */
-	pv = pg-mdpage.mdpg_pvh;
+	pv = md-mdpg_pvh;
 #ifdef DEBUG
 	if (pv-pv_va  PV_MOD)
 		pv-pv_va |= PV_WE;	/* Remember this was modified */
@@ -2493,6 +2502,7 @@
 bool
 pmap_clear_reference(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pv_entry_t pv;
 	int rv;
 	int changed = 0;
@@ -2506,7 +2516,7 @@
 	referenced = pmap_is_referenced_locked(pg);
 #endif
 	/* Clear all references */
-	pv = pg-mdpage.mdpg_pvh;
+	pv = md-mdpg_pvh;
 	if (pv-pv_va  PV_REF) {
 		changed |= 1;
 		pv-pv_va = ~PV_REF;
@@ -2559,7 +2569,7 @@
 	pv_check();
 #ifdef DEBUG
 	if (pmap_is_referenced_locked(pg)) {
-		pv = pg-mdpage.mdpg_pvh;
+		pv = md-mdpg_pvh;
 		printf(pmap_clear_reference(): %p still referenced 
 			(pmap = %p, ctx = %d)\n, pg, pv-pv_pmap,
 			pv-pv_pmap ? pmap_ctx(pv-pv_pmap) : 0);
@@ -2584,13 +2594,14 @@
 bool
 pmap_is_modified(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pv_entry_t pv, npv;
 	bool res = false;
 
 	KASSERT(!mutex_owned(pmap_lock));
 
 	/* Check if any mapping has been modified */
-	pv = pg-mdpage.mdpg_pvh;
+	pv = md-mdpg_pvh;
 	if (pv-pv_va  PV_MOD)
 		res = true;
 #ifdef HWREF
@@ -2640,13 +2651,14 @@
 static bool
 pmap_is_referenced_locked(struct vm_page *pg)
 {
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
 	pv_entry_t pv, npv;
 	bool res = false;
 
 	KASSERT(mutex_owned(pmap_lock));
 
 	/* Check if any mapping has been referenced */
-	pv = pg-mdpage.mdpg_pvh;
+	pv = md-mdpg_pvh;
 	if (pv-pv_va  PV_REF)
 		return true;
 
@@ -2688,13 +2700,14 @@
 bool
 pmap_is_referenced(struct vm_page *pg)
 

CVS commit: src/sys/arch/alpha/alpha

2010-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 25 07:14:48 UTC 2010

Modified Files:
src/sys/arch/alpha/alpha: locore.s syscall.c

Log Message:
s/cpu_fork/cpu_lwp_fork/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/alpha/syscall.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/alpha/alpha/locore.s
diff -u src/sys/arch/alpha/alpha/locore.s:1.118 src/sys/arch/alpha/alpha/locore.s:1.119
--- src/sys/arch/alpha/alpha/locore.s:1.118	Thu Dec 10 05:10:00 2009
+++ src/sys/arch/alpha/alpha/locore.s	Thu Feb 25 07:14:48 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.118 2009/12/10 05:10:00 rmind Exp $ */
+/* $NetBSD: locore.s,v 1.119 2010/02/25 07:14:48 skrll Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include machine/asm.h
 
-__KERNEL_RCSID(0, $NetBSD: locore.s,v 1.118 2009/12/10 05:10:00 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: locore.s,v 1.119 2010/02/25 07:14:48 skrll Exp $);
 
 #include assym.h
 
@@ -730,7 +730,7 @@
 /*
  * lwp_trampoline()
  *
- * Arrange for a function to be invoked neatly, after a cpu_fork().
+ * Arrange for a function to be invoked neatly, after a cpu_lwp_fork().
  *
  * Invokes the function specified by the s0 register with the return
  * address specified by the s1 register and with one argument specified

Index: src/sys/arch/alpha/alpha/syscall.c
diff -u src/sys/arch/alpha/alpha/syscall.c:1.35 src/sys/arch/alpha/alpha/syscall.c:1.36
--- src/sys/arch/alpha/alpha/syscall.c:1.35	Sat Nov 21 05:35:41 2009
+++ src/sys/arch/alpha/alpha/syscall.c	Thu Feb 25 07:14:48 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.35 2009/11/21 05:35:41 rmind Exp $ */
+/* $NetBSD: syscall.c,v 1.36 2010/02/25 07:14:48 skrll Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -89,7 +89,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.35 2009/11/21 05:35:41 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.36 2010/02/25 07:14:48 skrll Exp $);
 
 #include opt_sa.h
 
@@ -338,7 +338,7 @@
 	struct lwp *l = arg;
 
 	/*
-	 * Return values in the frame set by cpu_fork().
+	 * Return values in the frame set by cpu_lwp_fork().
 	 */
 
 	userret(l);



CVS commit: src/sys/arch/cesfic/cesfic

2010-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 25 07:15:25 UTC 2010

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

Log Message:
s/cpu_fork/cpu_lwp_fork/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/cesfic/cesfic/locore.s

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

Modified files:

Index: src/sys/arch/cesfic/cesfic/locore.s
diff -u src/sys/arch/cesfic/cesfic/locore.s:1.21 src/sys/arch/cesfic/cesfic/locore.s:1.22
--- src/sys/arch/cesfic/cesfic/locore.s:1.21	Sun Dec 13 11:24:02 2009
+++ src/sys/arch/cesfic/cesfic/locore.s	Thu Feb 25 07:15:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.21 2009/12/13 11:24:02 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.22 2010/02/25 07:15:25 skrll Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -359,7 +359,7 @@
 	jbsr	_C_LABEL(fic_init)
 
 /*
- * Create a fake exception frame so that cpu_fork() can copy it.
+ * Create a fake exception frame so that cpu_lwp_fork() can copy it.
  * main() nevers returns; we exit to user mode from a forked process
  * later on.
  */



CVS commit: src/sys/arch

2010-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 25 07:17:49 UTC 2010

Modified Files:
src/sys/arch/hp300/hp300: locore.s
src/sys/arch/luna68k/luna68k: locore.s
src/sys/arch/m68k/m68k: m68k_syscall.c
src/sys/arch/mac68k/mac68k: locore.s
src/sys/arch/mvme68k/mvme68k: locore.s
src/sys/arch/news68k/news68k: locore.s
src/sys/arch/next68k/next68k: locore.s
src/sys/arch/x68k/x68k: locore.s

Log Message:
s/cpu_fork/cpu_lwp_fork/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/arch/hp300/hp300/locore.s
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/luna68k/luna68k/locore.s
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/m68k/m68k/m68k_syscall.c
cvs rdiff -u -r1.159 -r1.160 src/sys/arch/mac68k/mac68k/locore.s
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/mvme68k/mvme68k/locore.s
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/next68k/next68k/locore.s
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/x68k/x68k/locore.s

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

Modified files:

Index: src/sys/arch/hp300/hp300/locore.s
diff -u src/sys/arch/hp300/hp300/locore.s:1.152 src/sys/arch/hp300/hp300/locore.s:1.153
--- src/sys/arch/hp300/hp300/locore.s:1.152	Sun Dec 13 12:21:26 2009
+++ src/sys/arch/hp300/hp300/locore.s	Thu Feb 25 07:17:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.152 2009/12/13 12:21:26 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.153 2010/02/25 07:17:49 skrll Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -587,7 +587,7 @@
 	jbsr	_C_LABEL(hp300_init)
 
 /*
- * Create a fake exception frame so that cpu_fork() can copy it.
+ * Create a fake exception frame so that cpu_lwp_fork() can copy it.
  * main() nevers returns; we exit to user mode from a forked process
  * later on.
  */

Index: src/sys/arch/luna68k/luna68k/locore.s
diff -u src/sys/arch/luna68k/luna68k/locore.s:1.33 src/sys/arch/luna68k/luna68k/locore.s:1.34
--- src/sys/arch/luna68k/luna68k/locore.s:1.33	Sun Dec 13 11:24:02 2009
+++ src/sys/arch/luna68k/luna68k/locore.s	Thu Feb 25 07:17:48 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.33 2009/12/13 11:24:02 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.34 2010/02/25 07:17:48 skrll Exp $ */
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -340,7 +340,7 @@
 
 /*
  * Create a fake exception frame that returns to user mode,
- * and save its address in p-p_md.md_regs for cpu_fork().
+ * and save its address in p-p_md.md_regs for cpu_lwp_fork().
  * The new frames for process 1 and 2 will be adjusted by
  * cpu_set_kpc() to arrange for a call to a kernel function
  * before the new process does its rte out to user mode.

Index: src/sys/arch/m68k/m68k/m68k_syscall.c
diff -u src/sys/arch/m68k/m68k/m68k_syscall.c:1.38 src/sys/arch/m68k/m68k/m68k_syscall.c:1.39
--- src/sys/arch/m68k/m68k/m68k_syscall.c:1.38	Mon Nov 23 00:11:44 2009
+++ src/sys/arch/m68k/m68k/m68k_syscall.c	Thu Feb 25 07:17:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: m68k_syscall.c,v 1.38 2009/11/23 00:11:44 rmind Exp $	*/
+/*	$NetBSD: m68k_syscall.c,v 1.39 2010/02/25 07:17:48 skrll Exp $	*/
 
 /*-
  * Portions Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -110,7 +110,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: m68k_syscall.c,v 1.38 2009/11/23 00:11:44 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: m68k_syscall.c,v 1.39 2010/02/25 07:17:48 skrll Exp $);
 
 #include opt_execfmt.h
 #include opt_compat_netbsd.h
@@ -466,7 +466,7 @@
 child_return(void *arg)
 {
 	struct lwp *l = arg;
-	/* See cpu_fork() */
+	/* See cpu_lwp_fork() */
 	struct frame *f = (struct frame *)l-l_md.md_regs;
 
 	f-f_regs[D0] = 0;

Index: src/sys/arch/mac68k/mac68k/locore.s
diff -u src/sys/arch/mac68k/mac68k/locore.s:1.159 src/sys/arch/mac68k/mac68k/locore.s:1.160
--- src/sys/arch/mac68k/mac68k/locore.s:1.159	Sat Dec 12 09:55:44 2009
+++ src/sys/arch/mac68k/mac68k/locore.s	Thu Feb 25 07:17:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.159 2009/12/12 09:55:44 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.160 2010/02/25 07:17:48 skrll Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -371,7 +371,7 @@
 	jbsr	_C_LABEL(mac68k_init)
 
 /*
- * Create a fake exception frame so that cpu_fork() can copy it.
+ * Create a fake exception frame so that cpu_lwp_fork() can copy it.
  * main() nevers returns; we exit to user mode from a forked process
  * later on.
  */

Index: src/sys/arch/mvme68k/mvme68k/locore.s
diff -u src/sys/arch/mvme68k/mvme68k/locore.s:1.104 src/sys/arch/mvme68k/mvme68k/locore.s:1.105
--- src/sys/arch/mvme68k/mvme68k/locore.s:1.104	Sun Dec 13 11:24:03 2009
+++ src/sys/arch/mvme68k/mvme68k/locore.s	Thu Feb 25 07:17:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.104 2009/12/13 11:24:03 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.105 2010/02/25 07:17:48 skrll Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 

CVS commit: src/sys/arch

2010-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 25 07:21:20 UTC 2010

Modified Files:
src/sys/arch/powerpc/ibm4xx: pmap.c
src/sys/arch/powerpc/oea: pmap.c
src/sys/arch/sparc/sparc: syscall.c
src/sys/arch/sun2/sun2: locore.s
src/sys/arch/sun3/sun3x: locore.s

Log Message:
s/cpu_fork/cpu_lwp_fork/ in comment


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/powerpc/ibm4xx/pmap.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sparc/sparc/syscall.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sun2/sun2/locore.s
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/sun3/sun3x/locore.s

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

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/pmap.c
diff -u src/sys/arch/powerpc/ibm4xx/pmap.c:1.60 src/sys/arch/powerpc/ibm4xx/pmap.c:1.61
--- src/sys/arch/powerpc/ibm4xx/pmap.c:1.60	Sat Nov 21 17:40:29 2009
+++ src/sys/arch/powerpc/ibm4xx/pmap.c	Thu Feb 25 07:21:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.60 2009/11/21 17:40:29 rmind Exp $	*/
+/*	$NetBSD: pmap.c,v 1.61 2010/02/25 07:21:19 skrll Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.60 2009/11/21 17:40:29 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.61 2010/02/25 07:21:19 skrll Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -1129,7 +1129,7 @@
 	pmap_t pmap = l-l_proc-p_vmspace-vm_map.pmap;
 
 	/*
-	 * XXX Normally performed in cpu_fork().
+	 * XXX Normally performed in cpu_lwp_fork().
 	 */
 	printf(pmap_activate(%p), pmap=%p\n,l,pmap);
 	pcb-pcb_pm = pmap;

Index: src/sys/arch/powerpc/oea/pmap.c
diff -u src/sys/arch/powerpc/oea/pmap.c:1.69 src/sys/arch/powerpc/oea/pmap.c:1.70
--- src/sys/arch/powerpc/oea/pmap.c:1.69	Sat Nov 21 17:40:29 2009
+++ src/sys/arch/powerpc/oea/pmap.c	Thu Feb 25 07:21:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.69 2009/11/21 17:40:29 rmind Exp $	*/
+/*	$NetBSD: pmap.c,v 1.70 2010/02/25 07:21:19 skrll Exp $	*/
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.69 2009/11/21 17:40:29 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.70 2010/02/25 07:21:19 skrll Exp $);
 
 #define	PMAP_NOOPNAMES
 
@@ -2363,7 +2363,7 @@
 	(pmap_activate: lwp %p (curlwp %p)\n, l, curlwp));
 
 	/*
-	 * XXX Normally performed in cpu_fork().
+	 * XXX Normally performed in cpu_lwp_fork().
 	 */
 	pcb-pcb_pm = pmap;
 

Index: src/sys/arch/sparc/sparc/syscall.c
diff -u src/sys/arch/sparc/sparc/syscall.c:1.21 src/sys/arch/sparc/sparc/syscall.c:1.22
--- src/sys/arch/sparc/sparc/syscall.c:1.21	Tue Oct 21 12:16:59 2008
+++ src/sys/arch/sparc/sparc/syscall.c	Thu Feb 25 07:21:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall.c,v 1.21 2008/10/21 12:16:59 ad Exp $ */
+/*	$NetBSD: syscall.c,v 1.22 2010/02/25 07:21:20 skrll Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.21 2008/10/21 12:16:59 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.22 2010/02/25 07:21:20 skrll Exp $);
 
 #include opt_sparc_arch.h
 #include opt_multiprocessor.h
@@ -381,7 +381,7 @@
 	struct lwp *l = arg;
 
 	/*
-	 * Return values in the frame set by cpu_fork().
+	 * Return values in the frame set by cpu_lwp_fork().
 	 */
 	userret(l, l-l_md.md_tf-tf_pc, 0);
 	ktrsysret((l-l_proc-p_lflag  PL_PPWAIT) ? SYS_vfork : SYS_fork,

Index: src/sys/arch/sun2/sun2/locore.s
diff -u src/sys/arch/sun2/sun2/locore.s:1.22 src/sys/arch/sun2/sun2/locore.s:1.23
--- src/sys/arch/sun2/sun2/locore.s:1.22	Thu Dec 10 05:10:04 2009
+++ src/sys/arch/sun2/sun2/locore.s	Thu Feb 25 07:21:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.22 2009/12/10 05:10:04 rmind Exp $	*/
+/*	$NetBSD: locore.s,v 1.23 2010/02/25 07:21:20 skrll Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -167,7 +167,7 @@
 | is finished, to avoid spurrious interrupts.
 
 /*
- * Create a fake exception frame so that cpu_fork() can copy it.
+ * Create a fake exception frame so that cpu_lwp_fork() can copy it.
  * main() nevers returns; we exit to user mode from a forked process
  * later on.
  */

Index: src/sys/arch/sun3/sun3x/locore.s
diff -u src/sys/arch/sun3/sun3x/locore.s:1.59 src/sys/arch/sun3/sun3x/locore.s:1.60
--- src/sys/arch/sun3/sun3x/locore.s:1.59	Thu Dec 10 05:10:04 2009
+++ src/sys/arch/sun3/sun3x/locore.s	Thu Feb 25 07:21:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.59 2009/12/10 05:10:04 rmind Exp $	*/
+/*	$NetBSD: locore.s,v 1.60 2010/02/25 07:21:20 skrll Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -179,7 +179,7 @@
 | is finished, to avoid spurrious interrupts.
 
 /*
- * Create a fake exception frame so that cpu_fork() can copy it.
+ * Create a fake exception frame so that 

CVS commit: src/external/bsd/tre/dist

2010-02-24 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Feb 25 07:33:20 UTC 2010

Update of /cvsroot/src/external/bsd/tre/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv24396

Log Message:
initial import of tre-0.8.0 into the external sources framework.

with many thanks to ville laurikari for writing tre in the first place
and for changing the licensing to a 2-clause bsd license; thanks also to
matthias-christian ott for his work on the google summer of code 2009
project.

this import brings the distribution to src/external - the reachover
build files will follow

Status:

Vendor Tag: LAURIKARI
Release Tags:   tre-0-8-0-base

N src/external/bsd/tre/dist/NEWS
N src/external/bsd/tre/dist/Makefile.am
N src/external/bsd/tre/dist/ChangeLog
N src/external/bsd/tre/dist/tre.pc.in
N src/external/bsd/tre/dist/AUTHORS
N src/external/bsd/tre/dist/config.h.in
N src/external/bsd/tre/dist/THANKS
N src/external/bsd/tre/dist/LICENSE
N src/external/bsd/tre/dist/tre.spec.in
N src/external/bsd/tre/dist/README
N src/external/bsd/tre/dist/configure
N src/external/bsd/tre/dist/Makefile.in
N src/external/bsd/tre/dist/ABOUT-NLS
N src/external/bsd/tre/dist/configure.ac
N src/external/bsd/tre/dist/TODO
N src/external/bsd/tre/dist/aclocal.m4
N src/external/bsd/tre/dist/INSTALL
N src/external/bsd/tre/dist/python/example.py
N src/external/bsd/tre/dist/python/setup.py
N src/external/bsd/tre/dist/python/tre-python.c
N src/external/bsd/tre/dist/doc/tre-syntax.html
N src/external/bsd/tre/dist/doc/Makefile.am
N src/external/bsd/tre/dist/doc/default.css
N src/external/bsd/tre/dist/doc/Makefile.in
N src/external/bsd/tre/dist/doc/agrep.1.in
N src/external/bsd/tre/dist/doc/tre-api.html
N src/external/bsd/tre/dist/utils/mkinstalldirs
N src/external/bsd/tre/dist/utils/config.guess
N src/external/bsd/tre/dist/utils/Makefile.am
N src/external/bsd/tre/dist/utils/build-rpm.sh
N src/external/bsd/tre/dist/utils/missing
N src/external/bsd/tre/dist/utils/install-sh
N src/external/bsd/tre/dist/utils/Makefile.in
N src/external/bsd/tre/dist/utils/depcomp
N src/external/bsd/tre/dist/utils/autogen.sh
N src/external/bsd/tre/dist/utils/config.sub
N src/external/bsd/tre/dist/utils/compile
N src/external/bsd/tre/dist/utils/ltmain.sh
N src/external/bsd/tre/dist/utils/config.rpath
N src/external/bsd/tre/dist/lib/tre-match-backtrack.c
N src/external/bsd/tre/dist/lib/tre-config.h.in
N src/external/bsd/tre/dist/lib/tre-internal.h
N src/external/bsd/tre/dist/lib/tre-compile.h
N src/external/bsd/tre/dist/lib/Makefile.am
N src/external/bsd/tre/dist/lib/tre-parse.c
N src/external/bsd/tre/dist/lib/xmalloc.h
N src/external/bsd/tre/dist/lib/tre-stack.c
N src/external/bsd/tre/dist/lib/xmalloc.c
N src/external/bsd/tre/dist/lib/tre-match-approx.c
N src/external/bsd/tre/dist/lib/regerror.c
N src/external/bsd/tre/dist/lib/tre-compile.c
N src/external/bsd/tre/dist/lib/regcomp.c
N src/external/bsd/tre/dist/lib/tre-stack.h
N src/external/bsd/tre/dist/lib/Makefile.in
N src/external/bsd/tre/dist/lib/regexec.c
N src/external/bsd/tre/dist/lib/tre-ast.c
N src/external/bsd/tre/dist/lib/regex.h
N src/external/bsd/tre/dist/lib/tre-ast.h
N src/external/bsd/tre/dist/lib/tre-parse.h
N src/external/bsd/tre/dist/lib/README
N src/external/bsd/tre/dist/lib/tre-match-utils.h
N src/external/bsd/tre/dist/lib/tre-mem.c
N src/external/bsd/tre/dist/lib/tre.h
N src/external/bsd/tre/dist/lib/tre-mem.h
N src/external/bsd/tre/dist/lib/tre-match-parallel.c
N src/external/bsd/tre/dist/tests/build-tests.sh
N src/external/bsd/tre/dist/tests/Makefile.am
N src/external/bsd/tre/dist/tests/test-str-source.c
N src/external/bsd/tre/dist/tests/randtest.c
N src/external/bsd/tre/dist/tests/retest.c
N src/external/bsd/tre/dist/tests/bench.c
N src/external/bsd/tre/dist/tests/Makefile.in
N src/external/bsd/tre/dist/tests/agrep/exitstatus.input
N src/external/bsd/tre/dist/tests/agrep/Makefile.am
N src/external/bsd/tre/dist/tests/agrep/delimiters.ok
N src/external/bsd/tre/dist/tests/agrep/run-tests.sh
N src/external/bsd/tre/dist/tests/agrep/records.args
N src/external/bsd/tre/dist/tests/agrep/delimiters.input
N src/external/bsd/tre/dist/tests/agrep/delimiters.args
N src/external/bsd/tre/dist/tests/agrep/exitstatus.ok
N src/external/bsd/tre/dist/tests/agrep/basic.input
N src/external/bsd/tre/dist/tests/agrep/exitstatus.args
N src/external/bsd/tre/dist/tests/agrep/basic.args
N src/external/bsd/tre/dist/tests/agrep/Makefile.in
N src/external/bsd/tre/dist/tests/agrep/records.ok
N src/external/bsd/tre/dist/tests/agrep/records.input
N src/external/bsd/tre/dist/tests/agrep/basic.ok
N src/external/bsd/tre/dist/m4/ax_decl_wchar_max.m4
N src/external/bsd/tre/dist/m4/intlmacosx.m4
N src/external/bsd/tre/dist/m4/Makefile.am
N src/external/bsd/tre/dist/m4/iconv.m4
N src/external/bsd/tre/dist/m4/lib-prefix.m4
N src/external/bsd/tre/dist/m4/gettext.m4
N src/external/bsd/tre/dist/m4/progtest.m4
N src/external/bsd/tre/dist/m4/po.m4
N src/external/bsd/tre/dist/m4/nls.m4
N 

CVS commit: src/external/bsd/tre/libtre

2010-02-24 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Feb 25 07:46:15 UTC 2010

Added Files:
src/external/bsd/tre/libtre: Makefile config.h tre-config.h

Log Message:
add reachover glue, and config headers, to allow libtre to build with WARNS=4


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/tre/libtre/Makefile \
src/external/bsd/tre/libtre/config.h \
src/external/bsd/tre/libtre/tre-config.h

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

Added files:

Index: src/external/bsd/tre/libtre/Makefile
diff -u /dev/null src/external/bsd/tre/libtre/Makefile:1.1
--- /dev/null	Thu Feb 25 07:46:15 2010
+++ src/external/bsd/tre/libtre/Makefile	Thu Feb 25 07:46:14 2010
@@ -0,0 +1,24 @@
+#	$NetBSD: Makefile,v 1.1 2010/02/25 07:46:14 agc Exp $
+
+# for information:
+# the configure script is run as:
+#	./configure --prefix=/usr --without-alloca
+
+TREDIST=	${.CURDIR}/../dist
+
+# external tre sources
+.PATH: ${TREDIST}/lib
+
+CPPFLAGS+=	-I${TREDIST} -I${TREDIST}/lib -I${.CURDIR}
+CPPFLAGS+=	-DHAVE_CONFIG_H=1
+
+LIB=	tre
+
+SRCS+=	regcomp.c regerror.c regexec.c
+SRCS+=	tre-ast.c tre-compile.c tre-match-approx.c
+SRCS+=	tre-match-backtrack.c tre-match-parallel.c tre-mem.c
+SRCS+=	tre-parse.c tre-stack.c xmalloc.c
+
+WARNS=	4
+
+.include bsd.lib.mk
Index: src/external/bsd/tre/libtre/config.h
diff -u /dev/null src/external/bsd/tre/libtre/config.h:1.1
--- /dev/null	Thu Feb 25 07:46:15 2010
+++ src/external/bsd/tre/libtre/config.h	Thu Feb 25 07:46:14 2010
@@ -0,0 +1,259 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac 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 translation of program messages to the user's native
+   language is requested. */
+/* #undef ENABLE_NLS */
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+/* #undef HAVE_ALLOCA */
+
+/* Define to 1 if you have alloca.h and it should be used (not on Ultrix).
+   */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+/* #undef HAVE_CFLOCALECOPYCURRENT */
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+/* #undef HAVE_DCGETTEXT */
+
+/* Define to 1 if you have the dlfcn.h header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the getopt.h header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `getopt_long' function. */
+#define HAVE_GETOPT_LONG 1
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+/* #undef HAVE_GETTEXT */
+
+/* Define if you have the iconv() function and it works. */
+#define HAVE_ICONV 1
+
+/* Define to 1 if you have the inttypes.h header file. */
+/* #undef HAVE_INTTYPES_H */
+
+/* Define to 1 if you have the `isascii' function. */
+#define HAVE_ISASCII 1
+
+/* Define to 1 if you have the `isblank' function. */
+#define HAVE_ISBLANK 1
+
+/* Define to 1 if you have the `iswascii' function or macro. */
+/* #undef HAVE_ISWASCII */
+
+/* Define to 1 if you have the `iswblank' function or macro. */
+#define HAVE_ISWBLANK 1
+
+/* Define to 1 if you have the `iswctype' function or macro. */
+#define HAVE_ISWCTYPE 1
+
+/* Define to 1 if you have the `iswlower' function or macro. */
+#define HAVE_ISWLOWER 1
+
+/* Define to 1 if you have the `iswupper' function or macro. */
+#define HAVE_ISWUPPER 1
+
+/* Define to 1 if you have the libutf8.h header file. */
+/* #undef HAVE_LIBUTF8_H */
+
+/* Define to 1 if you have the `mbrtowc' function or macro. */
+#define HAVE_MBRTOWC 1
+
+/* Define to 1 if the system has the type `mbstate_t'. */
+#define HAVE_MBSTATE_T 1
+
+/* Define to 1 if you have the `mbtowc' function or macro. */
+/* #undef HAVE_MBTOWC */
+
+/* Define to 1 if you have the memory.h header file. */
+/* #undef HAVE_MEMORY_H */
+
+/* Define to 1 if you have the regex.h header file. */
+/* #undef HAVE_REGEX_H */
+
+/* Define to 1 if the system has the type `reg_errcode_t'. */
+/* #undef HAVE_REG_ERRCODE_T */
+
+/* Define to 1 if you have the stdint.h header file. */
+/* #undef HAVE_STDINT_H */
+
+/* Define to 1 if you have the stdlib.h header file. */
+/* #undef HAVE_STDLIB_H */
+
+/* Define to 1 if you have the strings.h header file. */
+/* #undef HAVE_STRINGS_H */
+
+/* Define to 1 if you have the string.h header file. */
+/* #undef HAVE_STRING_H */
+
+/* Define to 1 if you have the sys/stat.h header file. */
+/* #undef HAVE_SYS_STAT_H */
+
+/* Define to 1 if