CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 08:37:48 UTC 2010

Modified Files:
src/external/bsd/pcc/libexec/ccom: Makefile
src/external/bsd/pcc/libexec/cpp: Makefile
src/external/bsd/pcc/usr.bin/pcc: Makefile

Log Message:
only go to WARNS=2 on these by default


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pcc/libexec/ccom/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pcc/libexec/cpp/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pcc/usr.bin/pcc/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/bsd/pcc/libexec/ccom/Makefile
diff -u src/external/bsd/pcc/libexec/ccom/Makefile:1.4 src/external/bsd/pcc/libexec/ccom/Makefile:1.5
--- src/external/bsd/pcc/libexec/ccom/Makefile:1.4	Wed Jan 20 11:45:55 2010
+++ src/external/bsd/pcc/libexec/ccom/Makefile	Fri Feb  5 08:37:48 2010
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.4 2010/01/20 11:45:55 plunky Exp $
+#	$NetBSD: Makefile,v 1.5 2010/02/05 08:37:48 plunky Exp $
+
+WARNS?=	2
 
 .include bsd.init.mk
 

Index: src/external/bsd/pcc/libexec/cpp/Makefile
diff -u src/external/bsd/pcc/libexec/cpp/Makefile:1.5 src/external/bsd/pcc/libexec/cpp/Makefile:1.6
--- src/external/bsd/pcc/libexec/cpp/Makefile:1.5	Wed Feb  3 22:03:56 2010
+++ src/external/bsd/pcc/libexec/cpp/Makefile	Fri Feb  5 08:37:48 2010
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.5 2010/02/03 22:03:56 plunky Exp $
+#	$NetBSD: Makefile,v 1.6 2010/02/05 08:37:48 plunky Exp $
+
+WARNS?=	2
 
 .include bsd.init.mk
 

Index: src/external/bsd/pcc/usr.bin/pcc/Makefile
diff -u src/external/bsd/pcc/usr.bin/pcc/Makefile:1.2 src/external/bsd/pcc/usr.bin/pcc/Makefile:1.3
--- src/external/bsd/pcc/usr.bin/pcc/Makefile:1.2	Wed Jan 20 11:45:55 2010
+++ src/external/bsd/pcc/usr.bin/pcc/Makefile	Fri Feb  5 08:37:48 2010
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.2 2010/01/20 11:45:55 plunky Exp $
+#	$NetBSD: Makefile,v 1.3 2010/02/05 08:37:48 plunky Exp $
+
+WARNS?=	2
 
 .include bsd.init.mk
 



CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 08:41:14 UTC 2010

Modified Files:
src/external/bsd/pcc/lib: Makefile.inc
src/external/bsd/pcc/libexec: Makefile.inc
src/external/bsd/pcc/usr.bin: Makefile.inc

Log Message:
don't conditionally include the Makefile.inc, we need the BINDIR etc
definitions for installation


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/lib/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/libexec/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/usr.bin/Makefile.inc

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

Modified files:

Index: src/external/bsd/pcc/lib/Makefile.inc
diff -u src/external/bsd/pcc/lib/Makefile.inc:1.1 src/external/bsd/pcc/lib/Makefile.inc:1.2
--- src/external/bsd/pcc/lib/Makefile.inc:1.1	Wed Jan 20 11:45:55 2010
+++ src/external/bsd/pcc/lib/Makefile.inc	Fri Feb  5 08:41:13 2010
@@ -1,7 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.1 2010/01/20 11:45:55 plunky Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2010/02/05 08:41:13 plunky Exp $
 
 .include ../Makefile.inc
-
-.if exists(../../../../lib/Makefile.inc)
 .include ../../../../lib/Makefile.inc
-.endif

Index: src/external/bsd/pcc/libexec/Makefile.inc
diff -u src/external/bsd/pcc/libexec/Makefile.inc:1.1 src/external/bsd/pcc/libexec/Makefile.inc:1.2
--- src/external/bsd/pcc/libexec/Makefile.inc:1.1	Wed Jan 20 11:45:55 2010
+++ src/external/bsd/pcc/libexec/Makefile.inc	Fri Feb  5 08:41:13 2010
@@ -1,7 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.1 2010/01/20 11:45:55 plunky Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2010/02/05 08:41:13 plunky Exp $
 
 .include ../Makefile.inc
-
-.if exists(../../../../libexec/Makefile.inc)
 .include ../../../../libexec/Makefile.inc
-.endif

Index: src/external/bsd/pcc/usr.bin/Makefile.inc
diff -u src/external/bsd/pcc/usr.bin/Makefile.inc:1.1 src/external/bsd/pcc/usr.bin/Makefile.inc:1.2
--- src/external/bsd/pcc/usr.bin/Makefile.inc:1.1	Wed Jan 20 11:45:55 2010
+++ src/external/bsd/pcc/usr.bin/Makefile.inc	Fri Feb  5 08:41:13 2010
@@ -1,7 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.1 2010/01/20 11:45:55 plunky Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2010/02/05 08:41:13 plunky Exp $
 
 .include ../Makefile.inc
-
-.if exists(../../../../usr.bin/Makefile.inc)
 .include ../../../../usr.bin/Makefile.inc
-.endif



CVS commit: src/external/bsd/pcc/lib

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 08:46:26 UTC 2010

Modified Files:
src/external/bsd/pcc/lib: Makefile
Removed Files:
src/external/bsd/pcc/lib/crtstuff: Makefile

Log Message:
don't build and install the crtbegin.o and crtend.o files at this stage,
they conflict with the system provided ones (lib/csu) and cause problems.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pcc/lib/Makefile
cvs rdiff -u -r1.2 -r0 src/external/bsd/pcc/lib/crtstuff/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/bsd/pcc/lib/Makefile
diff -u src/external/bsd/pcc/lib/Makefile:1.2 src/external/bsd/pcc/lib/Makefile:1.3
--- src/external/bsd/pcc/lib/Makefile:1.2	Wed Jan 20 11:45:55 2010
+++ src/external/bsd/pcc/lib/Makefile	Fri Feb  5 08:46:25 2010
@@ -1,5 +1,5 @@
-#	$NetBSD: Makefile,v 1.2 2010/01/20 11:45:55 plunky Exp $
+#	$NetBSD: Makefile,v 1.3 2010/02/05 08:46:25 plunky Exp $
 
-SUBDIR=		crtstuff libpcc
+SUBDIR=		libpcc
 
 .include bsd.subdir.mk



CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 08:52:25 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile.inc config.h

Log Message:
just use the actual date in PACKAGE_CHECKOUT definition


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pcc/Makefile.inc
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pcc/config.h

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

Modified files:

Index: src/external/bsd/pcc/Makefile.inc
diff -u src/external/bsd/pcc/Makefile.inc:1.3 src/external/bsd/pcc/Makefile.inc:1.4
--- src/external/bsd/pcc/Makefile.inc:1.3	Wed Feb  3 22:13:13 2010
+++ src/external/bsd/pcc/Makefile.inc	Fri Feb  5 08:52:25 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.3 2010/02/03 22:13:13 plunky Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2010/02/05 08:52:25 plunky Exp $
 
 PCC_DIR:=${.PARSEDIR}
 PCC_DIST=${PCC_DIR}/dist/pcc
@@ -16,7 +16,7 @@
 ERROR!= echo ERROR: ${MACHINE_ARCH} not yet supported - write code! 2;echo
 .endif
 
-VERSSTR = PACKAGE_STRING PACKAGE_CHECKOUT for ${HOST_OSTYPE}
+VERSSTR = PACKAGE_STRING  [ PACKAGE_CHECKOUT ] for ${HOST_OSTYPE}
 
 libexecdir = /usr/libexec
 includedir = /usr/include

Index: src/external/bsd/pcc/config.h
diff -u src/external/bsd/pcc/config.h:1.4 src/external/bsd/pcc/config.h:1.5
--- src/external/bsd/pcc/config.h:1.4	Wed Feb  3 22:13:13 2010
+++ src/external/bsd/pcc/config.h	Fri Feb  5 08:52:25 2010
@@ -190,7 +190,7 @@
 /* #define VERSSTR pcc 0.9.9 for i386-pc-netbsdelf, g...@sparky Wed Aug 13 22:19:18 EST 2008 */
 
 /* PCC checkout date */
-#define PACKAGE_CHECKOUT  [20090902] 
+#define PACKAGE_CHECKOUT 20090902
 
 /* Size of wide character type */
 #define WCHAR_SIZE 4



CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 08:58:47 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile.inc

Log Message:
be more adaptable when choosing the target arch, try to relate
the MACHINE_ARCH to the supported architectures before failing.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pcc/Makefile.inc

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

Modified files:

Index: src/external/bsd/pcc/Makefile.inc
diff -u src/external/bsd/pcc/Makefile.inc:1.4 src/external/bsd/pcc/Makefile.inc:1.5
--- src/external/bsd/pcc/Makefile.inc:1.4	Fri Feb  5 08:52:25 2010
+++ src/external/bsd/pcc/Makefile.inc	Fri Feb  5 08:58:47 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.4 2010/02/05 08:52:25 plunky Exp $
+#	$NetBSD: Makefile.inc,v 1.5 2010/02/05 08:58:47 plunky Exp $
 
 PCC_DIR:=${.PARSEDIR}
 PCC_DIST=${PCC_DIR}/dist/pcc
@@ -6,14 +6,14 @@
 
 TARGOS = netbsd
 
-.if ${MACHINE_ARCH} == i386
-TARGMACH = i386
-.elif ${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb
+.if ${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb
 TARGMACH = mips
-.elif ${MACHINE_ARCH} == vax
-TARGMACH = vax
 .else
-ERROR!= echo ERROR: ${MACHINE_ARCH} not yet supported - write code! 2;echo
+TARGMACH = ${MACHINE_ARCH}
+.endif
+
+.if !exists(${PCC_DIST}/arch/${TARGMACH})
+ERROR!= echo ERROR: ${TARGMACH} not yet supported - write code! 2;echo
 .endif
 
 VERSSTR = PACKAGE_STRING  [ PACKAGE_CHECKOUT ] for ${HOST_OSTYPE}



CVS commit: src/lib/libterminfo

2010-02-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb  5 09:42:22 UTC 2010

Modified Files:
src/lib/libterminfo: term.c terminfo.5 terminfo.5.in

Log Message:
Allow loading of a terminfo database in /rescue.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libterminfo/term.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/terminfo.5
cvs rdiff -u -r1.5 -r1.6 src/lib/libterminfo/terminfo.5.in

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

Modified files:

Index: src/lib/libterminfo/term.c
diff -u src/lib/libterminfo/term.c:1.1 src/lib/libterminfo/term.c:1.2
--- src/lib/libterminfo/term.c:1.1	Wed Feb  3 15:16:32 2010
+++ src/lib/libterminfo/term.c	Fri Feb  5 09:42:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: term.c,v 1.1 2010/02/03 15:16:32 roy Exp $ */
+/* $NetBSD: term.c,v 1.2 2010/02/05 09:42:21 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: term.c,v 1.1 2010/02/03 15:16:32 roy Exp $);
+__RCSID($NetBSD: term.c,v 1.2 2010/02/05 09:42:21 roy Exp $);
 
 #include sys/stat.h
 
@@ -44,7 +44,7 @@
 #include term_private.h
 #include term.h
 
-#define TERMINFO_DIRS	/usr/share/misc/terminfo:/etc/terminfo:
+#define TERMINFO_DIRS /usr/share/misc/terminfo:/etc/terminfo:/rescue/terminfo
 
 static char database[PATH_MAX];
 static char pathbuf[PATH_MAX];

Index: src/lib/libterminfo/terminfo.5
diff -u src/lib/libterminfo/terminfo.5:1.3 src/lib/libterminfo/terminfo.5:1.4
--- src/lib/libterminfo/terminfo.5:1.3	Thu Feb  4 09:45:30 2010
+++ src/lib/libterminfo/terminfo.5	Fri Feb  5 09:42:21 2010
@@ -1,7 +1,7 @@
 .\DO NOT EDIT
 .\Automatically generated from termcap.5.in
 .\
-.\	$NetBSD: terminfo.5,v 1.3 2010/02/04 09:45:30 roy Exp $
+.\	$NetBSD: terminfo.5,v 1.4 2010/02/05 09:42:21 roy Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -30,7 +30,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd October 1, 2009
+.Dd February 5, 2009
 .Dt TERMINFO 5
 .Os
 .Sh NAME
@@ -668,7 +668,9 @@
 will first look for
 .Pa $HOME/.terminfo.db ,
 followed by
-.Pa /usr/share/misc/terminfo.db
+.Pa /usr/share/misc/terminfo.db ,
+followed by
+.Pa /rescue/terminfo.db
 and
 .Pa /etc/terminfo.db .
 .Sh FILES
@@ -677,6 +679,8 @@
 Database of terminal descriptions for personal use.
 .It Pa /etc/terminfo.db
 Database of terminal descriptions for use during boot or single user.
+.It Pa /rescue/terminfo.db
+Database of terminal descriptions for use when rescuing the system.
 .It Pa /usr/share/misc/terminfo
 File containing terminal descriptions.
 .It Pa /usr/share/misc/terminfo.db

Index: src/lib/libterminfo/terminfo.5.in
diff -u src/lib/libterminfo/terminfo.5.in:1.5 src/lib/libterminfo/terminfo.5.in:1.6
--- src/lib/libterminfo/terminfo.5.in:1.5	Thu Feb  4 09:45:30 2010
+++ src/lib/libterminfo/terminfo.5.in	Fri Feb  5 09:42:21 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: terminfo.5.in,v 1.5 2010/02/04 09:45:30 roy Exp $
+.\	$NetBSD: terminfo.5.in,v 1.6 2010/02/05 09:42:21 roy Exp $
 .\
 .\ Copyright (c) 2009 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 October 1, 2009
+.Dd February 5, 2009
 .Dt TERMINFO 5
 .Os
 .Sh NAME
@@ -204,7 +204,9 @@
 will first look for
 .Pa $HOME/.terminfo.db ,
 followed by
-.Pa /usr/share/misc/terminfo.db
+.Pa /usr/share/misc/terminfo.db ,
+followed by
+.Pa /rescue/terminfo.db
 and
 .Pa /etc/terminfo.db .
 .Sh FILES
@@ -213,6 +215,8 @@
 Database of terminal descriptions for personal use.
 .It Pa /etc/terminfo.db
 Database of terminal descriptions for use during boot or single user.
+.It Pa /rescue/terminfo.db
+Database of terminal descriptions for use when rescuing the system.
 .It Pa /usr/share/misc/terminfo
 File containing terminal descriptions.
 .It Pa /usr/share/misc/terminfo.db



CVS commit: src

2010-02-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb  5 09:44:23 UTC 2010

Modified Files:
src/distrib/sets/lists/base: rescue.mi
src/distrib/sets/lists/etc: mi
src/etc: Makefile
src/etc/root: Makefile
src/rescue: Makefile list
Added Files:
src/rescue: mkterminfo terminfo
Removed Files:
src/etc/root: dot.terminfo mkterminfo

Log Message:
Move the emergancy terminfo database from /root to /rescue.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/base/rescue.mi
cvs rdiff -u -r1.215 -r1.216 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.379 -r1.380 src/etc/Makefile
cvs rdiff -u -r1.2 -r1.3 src/etc/root/Makefile
cvs rdiff -u -r1.1 -r0 src/etc/root/dot.terminfo src/etc/root/mkterminfo
cvs rdiff -u -r1.24 -r1.25 src/rescue/Makefile
cvs rdiff -u -r1.37 -r1.38 src/rescue/list
cvs rdiff -u -r0 -r1.1 src/rescue/mkterminfo src/rescue/terminfo

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

Modified files:

Index: src/distrib/sets/lists/base/rescue.mi
diff -u src/distrib/sets/lists/base/rescue.mi:1.30 src/distrib/sets/lists/base/rescue.mi:1.31
--- src/distrib/sets/lists/base/rescue.mi:1.30	Thu Jan 14 10:04:19 2010
+++ src/distrib/sets/lists/base/rescue.mi	Fri Feb  5 09:44:23 2010
@@ -1,4 +1,4 @@
-# $NetBSD: rescue.mi,v 1.30 2010/01/14 10:04:19 wiz Exp $
+# $NetBSD: rescue.mi,v 1.31 2010/02/05 09:44:23 roy Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -143,6 +143,7 @@
 ./rescue/sysctl	base-rescue-root
 ./rescue/systracebase-obsolete		obsolete
 ./rescue/tar	base-rescue-root
+./rescue/terminfo.dbbase-rescue-root
 ./rescue/test	base-rescue-root
 ./rescue/tetris	base-rescue-root
 ./rescue/ttyflagsbase-rescue-root

Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.215 src/distrib/sets/lists/etc/mi:1.216
--- src/distrib/sets/lists/etc/mi:1.215	Thu Feb  4 21:01:45 2010
+++ src/distrib/sets/lists/etc/mi	Fri Feb  5 09:44:23 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.215 2010/02/04 21:01:45 roy Exp $
+# $NetBSD: mi,v 1.216 2010/02/05 09:44:23 roy Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked obsolete; they should just be removed from
@@ -322,8 +322,6 @@
 ./root/.login	etc-root-root
 ./root/.profile	etc-root-root
 ./root/.shrc	etc-root-root
-./root/.terminfoetc-root-root
-./root/.terminfo.dbetc-root-root
 ./var/at/at.denyetc-cron-root
 ./var/crash/minfreeetc-sys-root
 ./var/cron/tabs/rootetc-cron-root

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.379 src/etc/Makefile:1.380
--- src/etc/Makefile:1.379	Thu Feb  4 21:01:16 2010
+++ src/etc/Makefile	Fri Feb  5 09:44:23 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.379 2010/02/04 21:01:16 roy Exp $
+#	$NetBSD: Makefile,v 1.380 2010/02/05 09:44:23 roy Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -620,7 +620,7 @@
 clean:
 	-rm -rf ${CDROM.dir} ${CDROM.pathlist} ${OBSOLETE.dir}
 
-SUBDIR=	rc.d mtree root
+SUBDIR=	rc.d mtree
 
 .include bsd.prog.mk
 .include bsd.subdir.mk

Index: src/etc/root/Makefile
diff -u src/etc/root/Makefile:1.2 src/etc/root/Makefile:1.3
--- src/etc/root/Makefile:1.2	Thu Feb  4 21:01:16 2010
+++ src/etc/root/Makefile	Fri Feb  5 09:44:23 2010
@@ -1,8 +1,6 @@
-#	$NetBSD: Makefile,v 1.2 2010/02/04 21:01:16 roy Exp $
+#	$NetBSD: Makefile,v 1.3 2010/02/05 09:44:23 roy Exp $
 
 CONFIGFILES=		dot.cshrc dot.klogin dot.login dot.profile dot.shrc
-CONFIGFILES+=		dot.terminfo.db dot.terminfo
-CLEANFILES=		dot.terminfo.db
 
 FILESDIR=		/root
 FILESMODE=		644
@@ -14,11 +12,4 @@
 CONFIGLINKS=		/root/.cshrc	/.cshrc \
 			/root/.profile	/.profile
 
-realall: dot.terminfo.db
-
-dot.terminfo.db: dot.terminfo
-	${_MKTARGET_CREATE}
-	${TOOL_TIC} -x -o ${.OBJDIR}/dot.terminfo ${.CURDIR}/dot.terminfo 
-
-
 .include bsd.prog.mk

Index: src/rescue/Makefile
diff -u src/rescue/Makefile:1.24 src/rescue/Makefile:1.25
--- src/rescue/Makefile:1.24	Sat Aug 22 06:52:15 2009
+++ src/rescue/Makefile	Fri Feb  5 09:44:23 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.24 2009/08/22 06:52:15 mrg Exp $
+#	$NetBSD: Makefile,v 1.25 2010/02/05 09:44:23 roy Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -53,7 +53,7 @@
 	${_MKTARGET_LINK}
 	${LD} -r -o $@ ${OVERRIDEOBJS}
 
-CLEANFILES+=	${OVERRIDEOBJS} ${LIBOVERRIDE}
+CLEANFILES+=	${OVERRIDEOBJS} ${LIBOVERRIDE} terminfo.db
 
 ${CRUNCHBIN}:	${LIBOVERRIDE}
 
@@ -65,7 +65,11 @@
 
 .include ${DISTRIBDIR}/common/Makefile.crunch
 
-realall: ${CRUNCHBIN}
+realall: ${CRUNCHBIN} terminfo.db
+
+terminfo.db: terminfo
+	${_MKTARGET_CREATE}
+	${TOOL_TIC} -x -o ${.OBJDIR}/terminfo ${.CURDIR}/terminfo 
 
 install: ${CRUNCHBIN}
 # XXX this MKMSG doesn't line up

Index: src/rescue/list
diff -u src/rescue/list:1.37 

CVS commit: src/usr.bin/infocmp

2010-02-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb  5 10:10:04 UTC 2010

Modified Files:
src/usr.bin/infocmp: infocmp.c

Log Message:
Make our unsigned char ports happy.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/infocmp/infocmp.c

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

Modified files:

Index: src/usr.bin/infocmp/infocmp.c
diff -u src/usr.bin/infocmp/infocmp.c:1.1 src/usr.bin/infocmp/infocmp.c:1.2
--- src/usr.bin/infocmp/infocmp.c:1.1	Wed Feb  3 15:16:33 2010
+++ src/usr.bin/infocmp/infocmp.c	Fri Feb  5 10:10:04 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: infocmp.c,v 1.1 2010/02/03 15:16:33 roy Exp $ */
+/* $NetBSD: infocmp.c,v 1.2 2010/02/05 10:10:04 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: infocmp.c,v 1.1 2010/02/03 15:16:33 roy Exp $);
+__RCSID($NetBSD: infocmp.c,v 1.2 2010/02/05 10:10:04 roy Exp $);
 
 #include sys/ioctl.h
 
@@ -46,7 +46,7 @@
 typedef struct tient {
 	char type;
 	const char *id;
-	char flag;
+	signed char flag;
 	short num;
 	const char *str;
 } TIENT;



CVS commit: src/sys/kern

2010-02-05 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Fri Feb  5 11:06:37 UTC 2010

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

Log Message:
fix LOCKDEBUG panic 'uninitialized lock'.
seminit() calls exithook_establish(). exithook_establish() uses the exec_lock.
exec_lock is initialzed by exec_init(1).
Call exec_init(1) before seminit().


To generate a diff of this commit:
cvs rdiff -u -r1.417 -r1.418 src/sys/kern/init_main.c

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

Modified files:

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.417 src/sys/kern/init_main.c:1.418
--- src/sys/kern/init_main.c:1.417	Sun Jan 31 03:57:01 2010
+++ src/sys/kern/init_main.c	Fri Feb  5 11:06:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.417 2010/01/31 03:57:01 pooka Exp $	*/
+/*	$NetBSD: init_main.c,v 1.418 2010/02/05 11:06:36 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.417 2010/01/31 03:57:01 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.418 2010/02/05 11:06:36 cegger Exp $);
 
 #include opt_ddb.h
 #include opt_ipsec.h
@@ -514,6 +514,11 @@
 	shminit();
 #endif
 
+	vmem_rehash_start();	/* must be before exec_init */
+
+	/* Initialize exec structures */
+	exec_init(1);		/* seminit calls exithook_establish() */
+
 #ifdef SYSVSEM
 	/* Initialize System V style semaphores. */
 	seminit();
@@ -685,11 +690,6 @@
 	uvm_aiodone_worker, NULL, PRI_VM, IPL_NONE, WQ_MPSAFE))
 		panic(fork aiodoned);
 
-	vmem_rehash_start();
-
-	/* Initialize exec structures */
-	exec_init(1);
-
 	/*
 	 * Okay, now we can let init(8) exec!  It's off to userland!
 	 */



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

2010-02-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  5 12:04:10 UTC 2010

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

Log Message:
Avoid taking a (not yet) initialized mutex early during bootstrap.


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.250 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/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.249 src/sys/arch/sparc64/sparc64/pmap.c:1.250
--- src/sys/arch/sparc64/sparc64/pmap.c:1.249	Tue Feb  2 04:28:56 2010
+++ src/sys/arch/sparc64/sparc64/pmap.c	Fri Feb  5 12:04:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.249 2010/02/02 04:28:56 mrg Exp $	*/
+/*	$NetBSD: pmap.c,v 1.250 2010/02/05 12:04:10 martin Exp $	*/
 /*
  *
  * Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.249 2010/02/02 04:28:56 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.250 2010/02/05 12:04:10 martin Exp $);
 
 #undef	NO_VCACHE /* Don't forget the locked TLB in dostart */
 #define	HWREF
@@ -354,6 +354,7 @@
  * Global pmap lock.
  */
 static kmutex_t pmap_lock;
+static bool lock_available = false;
 
 /*
  * Support for big page sizes.  This maps the page size to the
@@ -1270,6 +1271,7 @@
 	vm_num_phys = avail_end - avail_start;
 
 	mutex_init(pmap_lock, MUTEX_DEFAULT, IPL_NONE);
+	lock_available = true;
 }
 
 /*
@@ -1310,7 +1312,7 @@
 		   (void *)KERNEND, (void *)maxkvaddr);
 		return (kbreak);
 	}
-	mutex_enter(pmap_lock);
+	if (__predict_true(lock_available)) mutex_enter(pmap_lock);
 	DPRINTF(PDB_GROW, (pmap_growkernel(%lx...%lx)\n, kbreak, maxkvaddr));
 	/* Align with the start of a page table */
 	for (kbreak = (-1  PDSHIFT); kbreak  maxkvaddr;
@@ -1328,7 +1330,7 @@
 			ENTER_STAT(ptpneeded);
 		}
 	}
-	mutex_exit(pmap_lock);
+	if (__predict_true(lock_available)) mutex_exit(pmap_lock);
 	return (kbreak);
 }
 



CVS commit: src/sys/arch/amigappc/amigappc

2010-02-05 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Feb  5 12:05:26 UTC 2010

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

Log Message:
dma_cachectl() flushes the data cache for Amiga SCSI drivers.
Drop into the debugger after oea_dumpsys(), which doesn't dump anything ATM.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/amigappc/amigappc/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/amigappc/amigappc/machdep.c
diff -u src/sys/arch/amigappc/amigappc/machdep.c:1.40 src/sys/arch/amigappc/amigappc/machdep.c:1.41
--- src/sys/arch/amigappc/amigappc/machdep.c:1.40	Tue Feb  2 19:15:33 2010
+++ src/sys/arch/amigappc/amigappc/machdep.c	Fri Feb  5 12:05:25 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.40 2010/02/02 19:15:33 phx Exp $ */
+/* $NetBSD: machdep.c,v 1.41 2010/02/05 12:05:25 phx Exp $ */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.40 2010/02/02 19:15:33 phx Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.41 2010/02/05 12:05:25 phx Exp $);
 
 #include opt_ddb.h
 #include opt_ipkdb.h
@@ -682,8 +682,11 @@
 	splhigh();
 
 	/* Do dump if requested */
-	if ((howto  (RB_DUMP | RB_HALT)) == RB_DUMP)
+	if ((howto  (RB_DUMP | RB_HALT)) == RB_DUMP) {
 		oea_dumpsys();
+		/* XXX dumpsys doesn't work, so give a chance to debug */
+		Debugger();
+	}
 
 halt_sys:
 	doshutdownhooks();
@@ -707,25 +710,30 @@
 
 /*
  * Try to emulate the functionality from m68k/m68k/sys_machdep.c
- * used by several amiga drivers.
+ * used by several amiga scsi drivers.
  */
 int
 dma_cachectl(void *addr, int len)
 {
-#if 0 /* XXX */
 	paddr_t pa, end;
-	int inc = curcpu()-ci_ci.dcache_line_size;
+	int inc;
+
+	if (addr == NULL || len == 0)
+		return 0;
 
 	pa = kvtop(addr);
+	inc = curcpu()-ci_ci.dcache_line_size;
+
 	for (end = pa + len; pa  end; pa += inc)
 		__asm volatile(dcbf 0,%0 :: r(pa));
 	__asm volatile(sync);
 
+#if 0 /* XXX not needed, we don't have instructions in DMA buffers */
 	pa = kvtop(addr);
 	for (end = pa + len; pa  end; pa += inc)
 		__asm volatile(icbi 0,%0 :: r(pa));
 	__asm volatile(isync);
-
 #endif
+
 	return 0;
 }



CVS commit: src/sys/arch/amiga

2010-02-05 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Feb  5 12:13:36 UTC 2010

Modified Files:
src/sys/arch/amiga/amiga: device.h
src/sys/arch/amiga/dev: ahsc.c atzsc.c cbiiisc.c grf_cv.c grf_cvreg.h
gtsc.c sbic.c sbicreg.h siop2.c

Log Message:
Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amiga/amiga/device.h
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/amiga/dev/ahsc.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/amiga/dev/atzsc.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amiga/dev/cbiiisc.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/amiga/dev/grf_cv.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/amiga/dev/grf_cvreg.h
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/amiga/dev/gtsc.c
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/amiga/dev/sbic.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/dev/sbicreg.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amiga/dev/siop2.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/amiga/amiga/device.h
diff -u src/sys/arch/amiga/amiga/device.h:1.11 src/sys/arch/amiga/amiga/device.h:1.12
--- src/sys/arch/amiga/amiga/device.h:1.11	Wed Jun 11 12:59:10 2008
+++ src/sys/arch/amiga/amiga/device.h	Fri Feb  5 12:13:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: device.h,v 1.11 2008/06/11 12:59:10 tsutsui Exp $	*/
+/*	$NetBSD: device.h,v 1.12 2010/02/05 12:13:36 phx Exp $	*/
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -49,4 +49,22 @@
 
 #define getsoftc(cdnam, unit)	device_lookup_private((cdnam), (unit))
 
+/*
+ * Reorder protection when accessing device registers.
+ */
+#if defined(__m68k__)
+#define amiga_membarrier()
+#elif defined(__powerpc__)
+#define amiga_membarrier() __asm volatile (eieio)
+#endif
+
+/*
+ * Finish all bus operations and flush pipelines.
+ */
+#if defined(__m68k__)
+#define amiga_cpu_sync() __asm volatile (nop)
+#elif defined(__powerpc__)
+#define amiga_cpu_sync() __asm volatile (sync; isync)
+#endif
+
 #endif /* _AMIGA_DEVICE_H_ */

Index: src/sys/arch/amiga/dev/ahsc.c
diff -u src/sys/arch/amiga/dev/ahsc.c:1.36 src/sys/arch/amiga/dev/ahsc.c:1.37
--- src/sys/arch/amiga/dev/ahsc.c:1.36	Fri Jun 13 08:13:37 2008
+++ src/sys/arch/amiga/dev/ahsc.c	Fri Feb  5 12:13:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahsc.c,v 1.36 2008/06/13 08:13:37 cegger Exp $ */
+/*	$NetBSD: ahsc.c,v 1.37 2010/02/05 12:13:36 phx Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ahsc.c,v 1.36 2008/06/13 08:13:37 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: ahsc.c,v 1.37 2010/02/05 12:13:36 phx Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -144,7 +144,9 @@
 	 * disable ints and reset bank register
 	 */
 	rp-CNTR = CNTR_PDMD;
+	amiga_membarrier();
 	rp-DAWR = DAWR_AHSC;
+	amiga_membarrier();
 	sc-sc_enintr = ahsc_enintr;
 	sc-sc_dmago = ahsc_dmago;
 	sc-sc_dmanext = ahsc_dmanext;
@@ -212,6 +214,7 @@
 
 	dev-sc_flags |= SBICF_INTR;
 	sdp-CNTR = CNTR_PDMD | CNTR_INTEN;
+	amiga_membarrier();
 }
 
 int
@@ -233,8 +236,11 @@
 
 	dev-sc_flags |= SBICF_INTR;
 	sdp-CNTR = dev-sc_dmacmd;
+	amiga_membarrier();
 	sdp-ACR = (u_int) dev-sc_cur-dc_addr;
+	amiga_membarrier();
 	sdp-ST_DMA = 1;
+	amiga_membarrier();
 
 	return(dev-sc_tcnt);
 }
@@ -244,6 +250,7 @@
 {
 	volatile struct sdmac *sdp;
 	int s;
+	vu_short istr;
 
 	sdp = dev-sc_cregs;
 
@@ -259,14 +266,19 @@
 			 * and reading from peripheral
 			 */
 			sdp-FLUSH = 1;
-			while ((sdp-ISTR  ISTR_FE_FLG) == 0)
-;
+			amiga_membarrier();
+			do {
+istr = sdp-ISTR;
+amiga_membarrier();
+			} while ((istr  ISTR_FE_FLG) == 0);
 		}
 		/*
 		 * clear possible interrupt and stop DMA
 		 */
 		sdp-CINT = 1;
+		amiga_membarrier();
 		sdp-SP_DMA = 1;
+		amiga_membarrier();
 		dev-sc_dmacmd = 0;
 		splx(s);
 	}
@@ -281,6 +293,7 @@
 
 	sdp = dev-sc_cregs;
 	stat = sdp-ISTR;
+	amiga_membarrier();
 
 	if ((stat  (ISTR_INT_F|ISTR_INT_P)) == 0)
 		return (0);
@@ -300,6 +313,7 @@
 		++found;
 
 		sdp-CINT = 1;	/* clear possible interrupt */
+		amiga_membarrier();
 
 		/*
 		 * check for SCSI ints in the same go and
@@ -317,6 +331,7 @@
 ahsc_dmanext(struct sbic_softc *dev)
 {
 	volatile struct sdmac *sdp;
+	vu_short istr;
 
 	sdp = dev-sc_cregs;
 
@@ -332,17 +347,25 @@
 		   * and reading from peripheral
 		   */
 		sdp-FLUSH = 1;
-		while ((sdp-ISTR  ISTR_FE_FLG) == 0)
-			;
+		amiga_membarrier();
+		do {
+			istr = sdp-ISTR;
+			

CVS commit: src

2010-02-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb  5 12:31:57 UTC 2010

Modified Files:
src/lib/libterminfo: term.c term_private.h
src/usr.bin/infocmp: infocmp.c
src/usr.bin/tic: tic.c

Log Message:
Store the aliases against the entry, so that infocmp can reproduce them.
Handy for creating smaller terminfo databases.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libterminfo/term.c \
src/lib/libterminfo/term_private.h
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/infocmp/infocmp.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/tic/tic.c

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

Modified files:

Index: src/lib/libterminfo/term.c
diff -u src/lib/libterminfo/term.c:1.2 src/lib/libterminfo/term.c:1.3
--- src/lib/libterminfo/term.c:1.2	Fri Feb  5 09:42:21 2010
+++ src/lib/libterminfo/term.c	Fri Feb  5 12:31:56 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: term.c,v 1.2 2010/02/05 09:42:21 roy Exp $ */
+/* $NetBSD: term.c,v 1.3 2010/02/05 12:31:56 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: term.c,v 1.2 2010/02/05 09:42:21 roy Exp $);
+__RCSID($NetBSD: term.c,v 1.3 2010/02/05 12:31:56 roy Exp $);
 
 #include sys/stat.h
 
@@ -53,12 +53,14 @@
 static int
 _ti_readterm(TERMINAL *term, char *cap, size_t caplen, int flags)
 {
+	uint8_t ver;
 	uint16_t ind, num;
 	size_t len;
 	TERMUSERDEF *ud;
 
-	/* Only read version 1 structures */
-	if (*cap++ != 1) {
+	ver = *cap++;
+	/* Only read version 1 and 2 structures */
+	if (ver != 1  ver != 2) {
 		errno = EINVAL;
 		return -1;
 	}
@@ -83,6 +85,18 @@
 	cap += sizeof(uint16_t);
 	term-name = cap;
 	cap += len;
+	if (ver == 1)
+		term-_alias = NULL;
+	else {
+		len = le16dec(cap);
+		cap += sizeof(uint16_t);
+		if (len == 0)
+			term-_alias = NULL;
+		else {
+			term-_alias = cap;
+			cap += len;
+		}
+	}
 	len = le16dec(cap);
 	cap += sizeof(uint16_t);
 	term-desc = cap;
Index: src/lib/libterminfo/term_private.h
diff -u src/lib/libterminfo/term_private.h:1.2 src/lib/libterminfo/term_private.h:1.3
--- src/lib/libterminfo/term_private.h:1.2	Wed Feb  3 18:49:23 2010
+++ src/lib/libterminfo/term_private.h	Fri Feb  5 12:31:56 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: term_private.h,v 1.2 2010/02/03 18:49:23 snj Exp $ */
+/* $NetBSD: term_private.h,v 1.3 2010/02/05 12:31:56 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -99,6 +99,8 @@
 	size_t _bufpos;
 	/* A-Z static variables for tparm  */
 	long _snums[26];
+	/* aliases of the terminal, | separated */
+	char *_alias;
 } TERMINAL;
 
 extern const char *	_ti_database;

Index: src/usr.bin/infocmp/infocmp.c
diff -u src/usr.bin/infocmp/infocmp.c:1.2 src/usr.bin/infocmp/infocmp.c:1.3
--- src/usr.bin/infocmp/infocmp.c:1.2	Fri Feb  5 10:10:04 2010
+++ src/usr.bin/infocmp/infocmp.c	Fri Feb  5 12:31:56 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: infocmp.c,v 1.2 2010/02/05 10:10:04 roy Exp $ */
+/* $NetBSD: infocmp.c,v 1.3 2010/02/05 12:31:56 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: infocmp.c,v 1.2 2010/02/05 10:10:04 roy Exp $);
+__RCSID($NetBSD: infocmp.c,v 1.3 2010/02/05 12:31:56 roy Exp $);
 
 #include sys/ioctl.h
 
@@ -721,6 +721,8 @@
 		if (uflag == 0)
 			printf(# Reconstructed from %s.db\n, _ti_database);
 		printf(%s, t-name);
+		if (t-_alias != NULL  *t-_alias != '\0')
+			printf(|%s, t-_alias);
 		if (t-desc != NULL  *t-desc != '\0')
 			printf(|%s, t-desc);
 		printf(,\n);
@@ -750,7 +752,7 @@
 		}
 		return EXIT_SUCCESS;
 	}
-		
+
 	if (Barg == NULL)
 		unsetenv(TERMINFO);
 	else

Index: src/usr.bin/tic/tic.c
diff -u src/usr.bin/tic/tic.c:1.1 src/usr.bin/tic/tic.c:1.2
--- src/usr.bin/tic/tic.c:1.1	Wed Feb  3 15:16:32 2010
+++ src/usr.bin/tic/tic.c	Fri Feb  5 12:31:56 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tic.c,v 1.1 2010/02/03 15:16:32 roy Exp $ */
+/* $NetBSD: tic.c,v 1.2 2010/02/05 12:31:56 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tic.c,v 1.1 2010/02/03 15:16:32 roy Exp $);
+__RCSID($NetBSD: tic.c,v 1.2 2010/02/05 12:31:56 roy Exp $);
 
 #include sys/types.h
 
@@ -61,6 +61,7 @@
 
 typedef struct tic {
 	char *name;
+	char *alias;
 	char *desc;
 	TBUF flags;
 	TBUF nums;
@@ -239,7 +240,7 @@
 static int
 save_term(DBM *db, TERM *term)
 {
-	size_t buflen, len, dlen;
+	size_t buflen, len, alen, dlen;
 	char *cap;
 	datum key, value;
 	TIC *tic;
@@ -247,12 +248,17 @@
 	scratch.bufpos = 0;
 	tic = term-tic;
 	len = strlen(tic-name) + 1;
+	if (tic-alias == NULL)
+		alen = 0;
+	else
+		alen = strlen(tic-alias) + 1;
 	if (tic-desc == NULL)
 		dlen = 0;
 	else
 		dlen = strlen(tic-desc) + 1;
 	buflen = sizeof(char) +
 	sizeof(uint16_t) + len +
+	//sizeof(uint16_t) + alen +
 	sizeof(uint16_t) + dlen +
 	(sizeof(uint16_t) * 2) + 

CVS commit: src/distrib/sets/lists/comp

2010-02-05 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Feb  5 12:46:33 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
+infocmp.debug +tic.debug


To generate a diff of this commit:
cvs rdiff -u -r1.1383 -r1.1384 src/distrib/sets/lists/comp/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1383 src/distrib/sets/lists/comp/mi:1.1384
--- src/distrib/sets/lists/comp/mi:1.1383	Wed Feb  3 23:13:28 2010
+++ src/distrib/sets/lists/comp/mi	Fri Feb  5 12:46:33 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1383 2010/02/03 23:13:28 pooka Exp $
+#	$NetBSD: mi,v 1.1384 2010/02/05 12:46:33 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3000,6 +3000,7 @@
 ./usr/libdata/debug/usr/bin/indent.debug	comp-c-debug		debug
 ./usr/libdata/debug/usr/bin/indxbib.debug	comp-groff-debug	debug
 ./usr/libdata/debug/usr/bin/info.debug		comp-texinfo-debug	debug
+./usr/libdata/debug/usr/bin/infocmp.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/infokey.debug	comp-texinfo-debug	debug
 ./usr/libdata/debug/usr/bin/innetgr.debug	comp-nis-debug		debug
 ./usr/libdata/debug/usr/bin/install-info.debug	comp-texinfo-debug	debug
@@ -3187,6 +3188,7 @@
 ./usr/libdata/debug/usr/bin/texindex.debug	comp-texinfo-debug	debug
 ./usr/libdata/debug/usr/bin/tfmtodit.debug	comp-groff-debug	debug
 ./usr/libdata/debug/usr/bin/tftp.debug		comp-netutil-debug	debug
+./usr/libdata/debug/usr/bin/tic.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/time.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/tip.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/tn3270.debug	comp-obsolete		obsolete



CVS commit: src/lib/libterminfo

2010-02-05 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Feb  5 14:39:07 UTC 2010

Modified Files:
src/lib/libterminfo: term.h term_private.h

Log Message:
More adaptation for ports with unsigned char as char.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libterminfo/term.h
cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/term_private.h

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

Modified files:

Index: src/lib/libterminfo/term.h
diff -u src/lib/libterminfo/term.h:1.2 src/lib/libterminfo/term.h:1.3
--- src/lib/libterminfo/term.h:1.2	Thu Feb  4 09:46:26 2010
+++ src/lib/libterminfo/term.h	Fri Feb  5 14:39:07 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: term.h,v 1.2 2010/02/04 09:46:26 roy Exp $ */
+/* $NetBSD: term.h,v 1.3 2010/02/05 14:39:07 he Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -1454,7 +1454,7 @@
 	/* We need to expose these so that the macros work */
 	char *name;
 	char *desc;
-	char *flags;
+	signed char *flags;
 	short *nums;
 	const char **strs;
 } TERMINAL;

Index: src/lib/libterminfo/term_private.h
diff -u src/lib/libterminfo/term_private.h:1.3 src/lib/libterminfo/term_private.h:1.4
--- src/lib/libterminfo/term_private.h:1.3	Fri Feb  5 12:31:56 2010
+++ src/lib/libterminfo/term_private.h	Fri Feb  5 14:39:07 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: term_private.h,v 1.3 2010/02/05 12:31:56 roy Exp $ */
+/* $NetBSD: term_private.h,v 1.4 2010/02/05 14:39:07 he Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -84,7 +84,7 @@
 	/* We need to expose these so that the macros work */
 	char *name;
 	char *desc;
-	char *flags;
+	signed char *flags;
 	short *nums;
 	const char **strs;
 	/* Storage area for terminfo data */



CVS commit: src/usr.bin/tic

2010-02-05 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Feb  5 14:40:07 UTC 2010

Modified Files:
src/usr.bin/tic: tic.c

Log Message:
More adaptation for ports where char is unsigned char.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/tic/tic.c

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

Modified files:

Index: src/usr.bin/tic/tic.c
diff -u src/usr.bin/tic/tic.c:1.2 src/usr.bin/tic/tic.c:1.3
--- src/usr.bin/tic/tic.c:1.2	Fri Feb  5 12:31:56 2010
+++ src/usr.bin/tic/tic.c	Fri Feb  5 14:40:07 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tic.c,v 1.2 2010/02/05 12:31:56 roy Exp $ */
+/* $NetBSD: tic.c,v 1.3 2010/02/05 14:40:07 he Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tic.c,v 1.2 2010/02/05 12:31:56 roy Exp $);
+__RCSID($NetBSD: tic.c,v 1.3 2010/02/05 14:40:07 he Exp $);
 
 #include sys/types.h
 
@@ -471,7 +471,8 @@
 static int
 process_entry(TBUF *buf)
 {
-	char *cap, *capstart, *p, *e, *name, *desc, *alias, flag;
+	char *cap, *capstart, *p, *e, *name, *desc, *alias;
+	signed char flag;
 	long num;
 	int slash;
 	ssize_t ind;



CVS commit: src/etc

2010-02-05 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Fri Feb  5 16:29:02 UTC 2010

Modified Files:
src/etc: daily security
src/etc/defaults: daily.conf security.conf

Log Message:
Deprecate the pkgdb_dir settings from daily.conf and security.conf in
favor of the PKG_DBDIR variable in /etc/pkg_install.conf.  The purpose
of this is to only have to define the location of the packages database
in a single place and have all other system components pick it up.

pkgdb_dir is still honored if defined and the scripts will spit out a
warning in that case, asking the administrator to migrate to the
PKG_DBDIR setting.  We can't remove this compatibility workaround until,
at least, after NetBSD 6 is released.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/etc/daily
cvs rdiff -u -r1.107 -r1.108 src/etc/security
cvs rdiff -u -r1.13 -r1.14 src/etc/defaults/daily.conf
cvs rdiff -u -r1.22 -r1.23 src/etc/defaults/security.conf

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

Modified files:

Index: src/etc/daily
diff -u src/etc/daily:1.75 src/etc/daily:1.76
--- src/etc/daily:1.75	Wed Jan 27 16:22:41 2010
+++ src/etc/daily	Fri Feb  5 16:29:02 2010
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: daily,v 1.75 2010/01/27 16:22:41 jmmv Exp $
+#	$NetBSD: daily,v 1.76 2010/02/05 16:29:02 jmmv Exp $
 #	@(#)daily	8.2 (Berkeley) 1/25/94
 #
 
@@ -30,6 +30,12 @@
 	MAILTO=root
 fi
 
+if [ -n ${pkgdb_dir} ]; then
+echo WARNING: Setting pkgdb_dir in daily.conf(5) is deprecated
+echo WARNING: Please define PKG_DBDIR in pkg_install.conf(5) instead
+_compat_K_flag=-K ${pkgdb_dir}
+fi
+
 echo 
 echo Uptime:  `uptime`
 
@@ -242,13 +248,11 @@
 	fi
 fi
 
-: ${pkgdb_dir:=/var/db/pkg}
-
-if pkg_info -K ${pkgdb_dir} -q -E '*'; then
+if pkg_info ${_compat_K_flag} -q -E '*'; then
 	echo 
 	echo Fetching package vulnerabilities database:
 	if checkyesno fetch_pkg_vulnerabilities; then
-		( umask 022  pkg_admin -K ${pkgdb_dir} \
+		( umask 022  pkg_admin ${_compat_K_flag} \
 		fetch-pkg-vulnerabilities -u )
 	else
 		echo fetch_pkg_vulnerabilities is set to NO in daily.conf(5).

Index: src/etc/security
diff -u src/etc/security:1.107 src/etc/security:1.108
--- src/etc/security:1.107	Tue Jan 19 22:08:11 2010
+++ src/etc/security	Fri Feb  5 16:29:02 2010
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: security,v 1.107 2010/01/19 22:08:11 jmmv Exp $
+#	$NetBSD: security,v 1.108 2010/02/05 16:29:02 jmmv Exp $
 #	from: @(#)security	8.1 (Berkeley) 6/9/93
 #
 
@@ -25,7 +25,6 @@
 # Set reasonable defaults (if they're not set in security.conf)
 #
 backup_dir=${backup_dir:-/var/backups}
-pkgdb_dir=${pkgdb_dir:-/var/db/pkg} # TODO Inherit from daily.conf.
 max_loginlen=${max_loginlen:-8}
 max_grouplen=${max_grouplen:-8}
 pkg_info=${pkg_info:-/usr/sbin/pkg_info}
@@ -63,6 +62,16 @@
 CHANGEFILES=changefiles.$$
 SPECIALSPEC=specialspec.$$
 
+if [ -n ${pkgdb_dir} ]; then
+echo WARNING: Setting pkgdb_dir in security.conf(5) is deprecated
+echo WARNING: Please define PKG_DBDIR in pkg_install.conf(5) instead
+_compat_K_flag=-K ${pkgdb_dir}
+fi
+
+have_pkgs() {
+	$pkg_info ${_compat_K_flag} -q -E '*'
+}
+
 # migrate_file old new
 #	Determine if the ${old} path name needs to be migrated to the
 #	${new} path. Also checks if ${old}.current needs migrating,
@@ -910,10 +919,12 @@
 
 # Check for changes in the list of installed pkgs
 #
-if checkyesno check_pkgs  [ -d $pkgdb_dir ]; then
+if checkyesno check_pkgs  have_pkgs; then
 	pkgs=$work_dir/pkgs
 	migrate_file $backup_dir/pkgs $pkgs
-	(	cd $pkgdb_dir
+	pkg_dbdir=$(pkg_admin config-var PKG_DBDIR)
+	: ${pkg_dbdir:=/var/db/pkg}
+	(	cd $pkg_dbdir
 		$pkg_info | sort
 		echo 
 		find . \( -name +REQUIRED_BY -o -name +CONTENTS \) -print0 |
@@ -992,9 +1003,9 @@
 	done
 fi
 
-if pkg_info -K ${pkgdb_dir} -q -E '*'; then
+if have_pkgs; then
 	if checkyesno check_pkg_vulnerabilities; then
-		pkg_admin -K ${pkgdb_dir} audit ${OUTPUT} 21
+		pkg_admin ${_compat_K_flag} audit ${OUTPUT} 21
 		if [ -s ${OUTPUT} ]; then
 			printf \nInstalled vulnerable packages:\n
 			cat ${OUTPUT}
@@ -1002,7 +1013,7 @@
 	fi
 
 	if checkyesno check_pkg_signatures; then
-		pkg_admin -K ${pkgdb_dir} check ${OUTPUT} 21
+		pkg_admin ${_compat_K_flag} check ${OUTPUT} 21
 		if [ $? -ne 0 ]; then
 			printf \nFiles with invalid signatures:\n
 			cat ${OUTPUT}

Index: src/etc/defaults/daily.conf
diff -u src/etc/defaults/daily.conf:1.13 src/etc/defaults/daily.conf:1.14
--- src/etc/defaults/daily.conf:1.13	Wed Jan 20 22:19:20 2010
+++ src/etc/defaults/daily.conf	Fri Feb  5 16:29:02 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: daily.conf,v 1.13 2010/01/20 22:19:20 jmmv Exp $
+#	$NetBSD: daily.conf,v 1.14 2010/02/05 16:29:02 jmmv Exp $
 #
 # /etc/defaults/daily.conf --
 #	default configuration of /etc/daily.conf
@@ -28,7 +28,6 @@
 run_rdist=YES
 run_security=YES
 run_skeyaudit=YES
-pkgdb_dir=/var/db/pkg
 fetch_pkg_vulnerabilities=NO
 
 

CVS commit: src/share/man/man5

2010-02-05 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Fri Feb  5 16:32:20 UTC 2010

Modified Files:
src/share/man/man5: daily.conf.5 security.conf.5

Log Message:
Note that pkgdb_dir is deprecated and point to the alternative setting.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/share/man/man5/daily.conf.5
cvs rdiff -u -r1.35 -r1.36 src/share/man/man5/security.conf.5

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/man5/daily.conf.5
diff -u src/share/man/man5/daily.conf.5:1.25 src/share/man/man5/daily.conf.5:1.26
--- src/share/man/man5/daily.conf.5:1.25	Tue Jan 19 22:08:52 2010
+++ src/share/man/man5/daily.conf.5	Fri Feb  5 16:32:19 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: daily.conf.5,v 1.25 2010/01/19 22:08:52 jmmv Exp $
+.\	$NetBSD: daily.conf.5,v 1.26 2010/02/05 16:32:19 jmmv Exp $
 .\
 .\ Copyright (c) 1996 Matthew R. Green
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd January 19, 2010
+.Dd February 5, 2010
 .Dt DAILY.CONF 5
 .Os
 .Sh NAME
@@ -169,7 +169,14 @@
 .Sy run_security
 phase will always be sent, even if it is empty.
 .It Sy pkgdb_dir
-Location of the packages database.
+.Em DEPRECATED .
+Please set
+.Sq PKGDB_DIR
+in
+.Xr pkg_install.conf 5
+instead.
+.Pp
+If defined, points to the location of the packages database.
 Defaults to
 .Pa /var/db/pkg .
 .El

Index: src/share/man/man5/security.conf.5
diff -u src/share/man/man5/security.conf.5:1.35 src/share/man/man5/security.conf.5:1.36
--- src/share/man/man5/security.conf.5:1.35	Wed Jan 20 07:33:25 2010
+++ src/share/man/man5/security.conf.5	Fri Feb  5 16:32:20 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: security.conf.5,v 1.35 2010/01/20 07:33:25 wiz Exp $
+.\	$NetBSD: security.conf.5,v 1.36 2010/02/05 16:32:20 jmmv Exp $
 .\
 .\ Copyright (c) 1996 Matthew R. Green
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd January 19, 2010
+.Dd February 5, 2010
 .Dt SECURITY.CONF 5
 .Os
 .Sh NAME
@@ -253,11 +253,16 @@
 .Dq -u ,
 for unified-format context-diffs.
 .It Sy pkgdb_dir
-Change the pkg database directory from
-.Pa /var/db/pkg
-when
-.Sy check_pkgs
-is enabled.
+.Em DEPRECATED .
+Please set
+.Sq PKGDB_DIR
+in
+.Xr pkg_install.conf 5
+instead.
+.Pp
+If defined, points to the location of the packages database.
+Defaults to
+.Pa /var/db/pkg .
 .It Sy backup_uses_rcs
 Use
 .Xr rcs 1



CVS commit: src/share/terminfo

2010-02-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb  5 16:34:04 UTC 2010

Modified Files:
src/share/terminfo: Makefile

Log Message:
Retain commented out capabilities by default.


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

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

Modified files:

Index: src/share/terminfo/Makefile
diff -u src/share/terminfo/Makefile:1.1 src/share/terminfo/Makefile:1.2
--- src/share/terminfo/Makefile:1.1	Wed Feb  3 15:16:32 2010
+++ src/share/terminfo/Makefile	Fri Feb  5 16:34:04 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2010/02/03 15:16:32 roy Exp $
+#	$NetBSD: Makefile,v 1.2 2010/02/05 16:34:04 roy Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/8/93
 
 CLEANFILES= terminfo.db
@@ -8,6 +8,6 @@
 
 terminfo.db: terminfo
 	${_MKTARGET_CREATE}
-	${TOOL_TIC} -x -o ${.OBJDIR}/terminfo ${.CURDIR}/terminfo 
+	${TOOL_TIC} -ax -o ${.OBJDIR}/terminfo ${.CURDIR}/terminfo 
 
 .include bsd.prog.mk



CVS commit: src/usr.bin/tic

2010-02-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb  5 16:36:09 UTC 2010

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

Log Message:
Note that -a no longer sets -x.


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

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

Modified files:

Index: src/usr.bin/tic/tic.1
diff -u src/usr.bin/tic/tic.1:1.2 src/usr.bin/tic/tic.1:1.3
--- src/usr.bin/tic/tic.1:1.2	Wed Feb  3 15:51:09 2010
+++ src/usr.bin/tic/tic.1	Fri Feb  5 16:36:09 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: tic.1,v 1.2 2010/02/03 15:51:09 wiz Exp $
+.\	$NetBSD: tic.1,v 1.3 2010/02/05 16:36:09 roy Exp $
 .\
 .\ Copyright (c) 2009 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 17, 2009
+.Dd February 5, 2009
 .Dt TIC 1
 .Os
 .Sh NAME
@@ -50,11 +50,6 @@
 .Bl -tag -width Fl
 .It Fl a
 Do not discard commented out capabilities.
-This also sets the
-.Fl x
-flag as
-.Nm
-retains commented out capabilities as non standard.
 .It Fl c
 Only check for errors, don't write the final database.
 .It Fl o Ar file

Index: src/usr.bin/tic/tic.c
diff -u src/usr.bin/tic/tic.c:1.3 src/usr.bin/tic/tic.c:1.4
--- src/usr.bin/tic/tic.c:1.3	Fri Feb  5 14:40:07 2010
+++ src/usr.bin/tic/tic.c	Fri Feb  5 16:36:09 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tic.c,v 1.3 2010/02/05 14:40:07 he Exp $ */
+/* $NetBSD: tic.c,v 1.4 2010/02/05 16:36:09 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tic.c,v 1.3 2010/02/05 14:40:07 he Exp $);
+__RCSID($NetBSD: tic.c,v 1.4 2010/02/05 16:36:09 roy Exp $);
 
 #include sys/types.h
 
@@ -886,20 +886,19 @@
 	while ((ch = getopt(argc, argv, aco:sx)) != -1)
 	switch (ch) {
 	case 'a':
-		aflag++;
-		xflag++;
+		aflag = 1;
 		break;
 	case 'c':
-		cflag++;
+		cflag = 1;
 		break;
 	case 'o':
 		ofile = optarg;
 		break;
 	case 's':
-		sflag++;
+		sflag = 1;
 		break;
 	case 'x':
-		xflag++;
+		xflag = 1;
 		break;
 	case '?': /* FALLTHROUGH */
 	default:



CVS commit: src/usr.bin/infocmp

2010-02-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb  5 16:43:46 UTC 2010

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

Log Message:
Fix infocmp when both -a and -x are given as arguments.


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

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

Modified files:

Index: src/usr.bin/infocmp/infocmp.1
diff -u src/usr.bin/infocmp/infocmp.1:1.2 src/usr.bin/infocmp/infocmp.1:1.3
--- src/usr.bin/infocmp/infocmp.1:1.2	Wed Feb  3 15:51:51 2010
+++ src/usr.bin/infocmp/infocmp.1	Fri Feb  5 16:43:46 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: infocmp.1,v 1.2 2010/02/03 15:51:51 wiz Exp $
+.\	$NetBSD: infocmp.1,v 1.3 2010/02/05 16:43:46 roy Exp $
 .\
 .\ Copyright (c) 2009 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 18, 2009
+.Dd February 5, 2010
 .Dt INFOCMP 1
 .Os
 .Sh NAME
@@ -86,6 +86,9 @@
 .It Fl u
 Build a new terminal description for the first terminal description,
 using subsequent terminal descriptions.
+This also sets the
+.Fl a
+flag.
 .It Fl w Ar cols
 Limit the width to
 .Ar cols .

Index: src/usr.bin/infocmp/infocmp.c
diff -u src/usr.bin/infocmp/infocmp.c:1.3 src/usr.bin/infocmp/infocmp.c:1.4
--- src/usr.bin/infocmp/infocmp.c:1.3	Fri Feb  5 12:31:56 2010
+++ src/usr.bin/infocmp/infocmp.c	Fri Feb  5 16:43:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: infocmp.c,v 1.3 2010/02/05 12:31:56 roy Exp $ */
+/* $NetBSD: infocmp.c,v 1.4 2010/02/05 16:43:46 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: infocmp.c,v 1.3 2010/02/05 12:31:56 roy Exp $);
+__RCSID($NetBSD: infocmp.c,v 1.4 2010/02/05 16:43:46 roy Exp $);
 
 #include sys/ioctl.h
 
@@ -52,7 +52,7 @@
 } TIENT;
 
 static size_t cols;
-static int aflag, cflag, nflag, qflag, xflag, raw;
+static int aflag, cflag, nflag, qflag, xflag;
 
 static size_t
 outstr(FILE *f, const char *str)
@@ -232,40 +232,35 @@
 	}
 	
 	n = 0;
-	if (xflag  2) {
-		for (i = 0; i = max; i++) {
-			switch (type) {
-			case 'f':
-if (t-flags[i] == 1 ||
-(raw != 0 
-	t-flags[i] == CANCELLED_BOOLEAN))
-{
-	ents[n].id = _ti_flagid(i);
-	ents[n].type = 'f';
-	ents[n++].flag = t-flags[i];
-}
-break;
-			case 'n':
-if (VALID_NUMERIC(t-nums[i]) ||
-(raw != 0 
-	t-nums[i] == CANCELLED_NUMERIC))
-{
-	ents[n].id = _ti_numid(i);
-	ents[n].type = 'n';
-	ents[n++].num = t-nums[i];
-}
-break;
-			default:
-if (VALID_STRING(t-strs[i]) ||
-(raw != 0 
-	t-strs[i] == CANCELLED_STRING))
-{
-	ents[n].id = _ti_strid(i);
-	ents[n].type = 's';
-	ents[n++].str = t-strs[i];
-}
-break;
+	for (i = 0; i = max; i++) {
+		switch (type) {
+		case 'f':
+			if (t-flags[i] == 1 ||
+			(aflag  t-flags[i] == CANCELLED_BOOLEAN))
+			{
+ents[n].id = _ti_flagid(i);
+ents[n].type = 'f';
+ents[n++].flag = t-flags[i];
+			}
+			break;
+		case 'n':
+			if (VALID_NUMERIC(t-nums[i]) ||
+			(aflag  t-nums[i] == CANCELLED_NUMERIC))
+			{
+ents[n].id = _ti_numid(i);
+ents[n].type = 'n';
+ents[n++].num = t-nums[i];
+			}
+			break;
+		default:
+			if (VALID_STRING(t-strs[i]) ||
+			(aflag  t-strs[i] == CANCELLED_STRING))
+			{
+ents[n].id = _ti_strid(i);
+ents[n].type = 's';
+ents[n++].str = t-strs[i];
 			}
+			break;
 		}
 	}
 	
@@ -275,17 +270,17 @@
 			if (ud-type == type) {
 switch (type) {
 case 'f':
-	if (raw == 0 
+	if (!aflag 
 	!VALID_BOOLEAN(ud-flag))
 		continue;
 	break;
 case 'n':
-	if (raw == 0 
+	if (!aflag 
 	!VALID_NUMERIC(ud-num))
 		continue;
 	break;
 case 's':
-	if (raw == 0 
+	if (!aflag 
 	!VALID_STRING(ud-str))
 		continue;
 	break;
@@ -674,26 +669,26 @@
 			Barg = optarg;
 			break;
 		case 'a':
-			aflag++;
-			xflag++;
+			aflag = 1;
 			break;
 		case 'c':
-			cflag++;
+			cflag = 1;
 			break;
 		case 'n':
-			nflag++;
+			nflag = 1;
 			break;
 		case 'q':
-			qflag++;
+			qflag = 1;
 			break;
 		case 'u':
-			uflag++;
+			uflag = 1;
+			aflag = 1;
 			break;
 		case 'w':
 			cols = strtoul(optarg, NULL, 10);
 			break;
 		case 'x':
-			xflag++;
+			xflag = 1;
 			break;
 		case '?':
 		default:
@@ -706,7 +701,7 @@
 	cols--;
 
 	if (optind + 1  argc)
-		raw = 1;
+		aflag = 1;
 
 	if (optind  argc)
 		term = argv[optind++];



CVS commit: src/usr.bin/tic

2010-02-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb  5 16:54:12 UTC 2010

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

Log Message:
Fix year.


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

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

Modified files:

Index: src/usr.bin/tic/tic.1
diff -u src/usr.bin/tic/tic.1:1.3 src/usr.bin/tic/tic.1:1.4
--- src/usr.bin/tic/tic.1:1.3	Fri Feb  5 16:36:09 2010
+++ src/usr.bin/tic/tic.1	Fri Feb  5 16:54:11 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: tic.1,v 1.3 2010/02/05 16:36:09 roy Exp $
+.\	$NetBSD: tic.1,v 1.4 2010/02/05 16:54:11 roy Exp $
 .\
 .\ Copyright (c) 2009 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 February 5, 2009
+.Dd February 5, 2010
 .Dt TIC 1
 .Os
 .Sh NAME



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

2010-02-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb  5 17:16:05 UTC 2010

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

Log Message:
remove a debugging printf.  cleanup the reinit of the lwp.


To generate a diff of this commit:
cvs rdiff -u -r1.121.6.1.2.10 -r1.121.6.1.2.11 \
src/sys/arch/mips/mips/vm_machdep.c

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

Modified files:

Index: src/sys/arch/mips/mips/vm_machdep.c
diff -u src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.10 src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.11
--- src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.10	Fri Feb  5 07:36:50 2010
+++ src/sys/arch/mips/mips/vm_machdep.c	Fri Feb  5 17:16:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.121.6.1.2.10 2010/02/05 07:36:50 matt Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.121.6.1.2.11 2010/02/05 17:16:05 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -80,7 +80,7 @@
 #include opt_coredump.h
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
-__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.121.6.1.2.10 2010/02/05 07:36:50 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.121.6.1.2.11 2010/02/05 17:16:05 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -151,7 +151,7 @@
 	 * Copy l1 trapframe atop on l2 stack space, so return to user mode
 	 * will be to right address, with correct registers.
 	 */
-	memcpy(l2-l_addr-u_pcb, l1-l_addr-u_pcb, sizeof(struct pcb));
+	l2-l_addr-u_pcb = l1-l_addr-u_pcb;
 	tf = (struct trapframe *)((char *)l2-l_addr + USPACE) - 1;
 	*tf = *l1-l_md.md_utf;
 
@@ -248,11 +248,7 @@
 	 */
 	uarea_ok = uarea_ok  (pa + USPACE - 1 = MIPS_PHYS_MASK);
 #endif
-	printf(ctx=%#PRIxVADDR utf=%p\n, 
-	(vaddr_t)l-l_addr-u_pcb.pcb_context.val[_L_SP],
-	l-l_md.md_utf);
 	KASSERT((vaddr_t)l-l_addr-u_pcb.pcb_context.val[_L_SP] == (vaddr_t)l-l_md.md_utf);
-	vaddr_t sp = l-l_addr-u_pcb.pcb_context.val[_L_SP] - (vaddr_t)l-l_addr;
 
 	if (!uarea_ok) {
 		struct pglist pglist;
@@ -290,8 +286,11 @@
 	va = MIPS_PHYS_TO_KSEG0(pa);
 #endif
 	if (!uarea_ok) {
+		/*
+		 * Copy the trapframe and pcb from the old uarea to the new.
+		 */
 		((struct trapframe *)(va + USPACE))[-1] = *l-l_md.md_utf;
-		*(struct pcb *)va = l-l_addr-u_pcb;
+		((struct user *)va)-u_pcb = l-l_addr-u_pcb;
 		/*
 		 * Discard the old uarea.
 		 */
@@ -300,8 +299,8 @@
 	}
 
 	l-l_addr = (struct user *)va;
-	l-l_addr-u_pcb.pcb_context.val[_L_SP] = sp + va;
-	l-l_md.md_utf = (struct trapframe *)((char *)l-l_addr + USPACE) - 1;
+	l-l_md.md_utf = (struct trapframe *)(va + USPACE) - 1;
+	l-l_addr-u_pcb.pcb_context.val[_L_SP] = (vaddr_t)l-l_md.md_utf;
 	uarea_remapped.ev_count++;
 }
 



CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 17:18:31 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile.inc config.h

Log Message:
when making VERSSTR, provide the target os/machine rather than the host.
have the CVS checkout date in the PACKAGE_STRING rather than in a separate
definition


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pcc/Makefile.inc \
src/external/bsd/pcc/config.h

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

Modified files:

Index: src/external/bsd/pcc/Makefile.inc
diff -u src/external/bsd/pcc/Makefile.inc:1.5 src/external/bsd/pcc/Makefile.inc:1.6
--- src/external/bsd/pcc/Makefile.inc:1.5	Fri Feb  5 08:58:47 2010
+++ src/external/bsd/pcc/Makefile.inc	Fri Feb  5 17:18:31 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.5 2010/02/05 08:58:47 plunky Exp $
+#	$NetBSD: Makefile.inc,v 1.6 2010/02/05 17:18:31 plunky Exp $
 
 PCC_DIR:=${.PARSEDIR}
 PCC_DIST=${PCC_DIR}/dist/pcc
@@ -16,7 +16,7 @@
 ERROR!= echo ERROR: ${TARGMACH} not yet supported - write code! 2;echo
 .endif
 
-VERSSTR = PACKAGE_STRING  [ PACKAGE_CHECKOUT ] for ${HOST_OSTYPE}
+VERSSTR = PACKAGE_STRING  for ${TARGOS}-${TARGMACH}
 
 libexecdir = /usr/libexec
 includedir = /usr/include
Index: src/external/bsd/pcc/config.h
diff -u src/external/bsd/pcc/config.h:1.5 src/external/bsd/pcc/config.h:1.6
--- src/external/bsd/pcc/config.h:1.5	Fri Feb  5 08:52:25 2010
+++ src/external/bsd/pcc/config.h	Fri Feb  5 17:18:31 2010
@@ -137,7 +137,7 @@
 #define PACKAGE_NAME pcc
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING pcc 0.9.9
+#define PACKAGE_STRING pcc 0.9.9 [20090902]
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME pcc
@@ -189,9 +189,6 @@
 /* Version string */
 /* #define VERSSTR pcc 0.9.9 for i386-pc-netbsdelf, g...@sparky Wed Aug 13 22:19:18 EST 2008 */
 
-/* PCC checkout date */
-#define PACKAGE_CHECKOUT 20090902
-
 /* Size of wide character type */
 #define WCHAR_SIZE 4
 



CVS commit: src/share/man/man5

2010-02-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb  5 17:23:47 UTC 2010

Modified Files:
src/share/man/man5: daily.conf.5 security.conf.5

Log Message:
Mark up PKGDB_DIR with Dv (same as in pkg_install.conf).


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/share/man/man5/daily.conf.5
cvs rdiff -u -r1.36 -r1.37 src/share/man/man5/security.conf.5

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/man5/daily.conf.5
diff -u src/share/man/man5/daily.conf.5:1.26 src/share/man/man5/daily.conf.5:1.27
--- src/share/man/man5/daily.conf.5:1.26	Fri Feb  5 16:32:19 2010
+++ src/share/man/man5/daily.conf.5	Fri Feb  5 17:23:47 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: daily.conf.5,v 1.26 2010/02/05 16:32:19 jmmv Exp $
+.\	$NetBSD: daily.conf.5,v 1.27 2010/02/05 17:23:47 wiz Exp $
 .\
 .\ Copyright (c) 1996 Matthew R. Green
 .\ All rights reserved.
@@ -171,7 +171,7 @@
 .It Sy pkgdb_dir
 .Em DEPRECATED .
 Please set
-.Sq PKGDB_DIR
+.Dv PKGDB_DIR
 in
 .Xr pkg_install.conf 5
 instead.

Index: src/share/man/man5/security.conf.5
diff -u src/share/man/man5/security.conf.5:1.36 src/share/man/man5/security.conf.5:1.37
--- src/share/man/man5/security.conf.5:1.36	Fri Feb  5 16:32:20 2010
+++ src/share/man/man5/security.conf.5	Fri Feb  5 17:23:47 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: security.conf.5,v 1.36 2010/02/05 16:32:20 jmmv Exp $
+.\	$NetBSD: security.conf.5,v 1.37 2010/02/05 17:23:47 wiz Exp $
 .\
 .\ Copyright (c) 1996 Matthew R. Green
 .\ All rights reserved.
@@ -255,7 +255,7 @@
 .It Sy pkgdb_dir
 .Em DEPRECATED .
 Please set
-.Sq PKGDB_DIR
+.Dv PKGDB_DIR
 in
 .Xr pkg_install.conf 5
 instead.



CVS commit: src/sys/dev/sysmon

2010-02-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Feb  5 17:44:27 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
One more callback of sme_refresh() routine needs to check first that
there is a routine to be called!


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/sysmon/sysmon_envsys.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/sysmon/sysmon_envsys.c
diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.93 src/sys/dev/sysmon/sysmon_envsys.c:1.94
--- src/sys/dev/sysmon/sysmon_envsys.c:1.93	Sun Jan 31 22:53:56 2010
+++ src/sys/dev/sysmon/sysmon_envsys.c	Fri Feb  5 17:44:27 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_envsys.c,v 1.93 2010/01/31 22:53:56 martin Exp $	*/
+/*	$NetBSD: sysmon_envsys.c,v 1.94 2010/02/05 17:44:27 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.93 2010/01/31 22:53:56 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.94 2010/02/05 17:44:27 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -987,7 +987,8 @@
 	mutex_enter(sme-sme_mtx);
 	sysmon_envsys_acquire(sme, true);
 	TAILQ_FOREACH(edata, sme-sme_sensors_list, sensors_head)
-		(*sme-sme_refresh)(sme, edata);
+		if ((sme-sme_flags  SME_DISABLE_REFRESH) == 0)
+			(*sme-sme_refresh)(sme, edata);
 	sysmon_envsys_release(sme, true);
 	mutex_exit(sme-sme_mtx);
 }



CVS commit: src/sys/dev/wscons

2010-02-05 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb  5 18:26:38 UTC 2010

Modified Files:
src/sys/dev/wscons: wskbdutil.c

Log Message:
add some missing (mostly hungarian or polish) dead accent combinations,
from lkundrak's netbsd-sk_cz-howto


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/wscons/wskbdutil.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/wscons/wskbdutil.c
diff -u src/sys/dev/wscons/wskbdutil.c:1.17 src/sys/dev/wscons/wskbdutil.c:1.18
--- src/sys/dev/wscons/wskbdutil.c:1.17	Thu Jan 28 22:36:19 2010
+++ src/sys/dev/wscons/wskbdutil.c	Fri Feb  5 18:26:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: wskbdutil.c,v 1.17 2010/01/28 22:36:19 drochner Exp $	*/
+/*	$NetBSD: wskbdutil.c,v 1.18 2010/02/05 18:26:38 drochner Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wskbdutil.c,v 1.17 2010/01/28 22:36:19 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: wskbdutil.c,v 1.18 2010/02/05 18:26:38 drochner Exp $);
 
 #include sys/param.h
 #include sys/errno.h
@@ -255,10 +255,20 @@
 	{ { KS_dead_diaeresis,		KS_e },			KS_ediaeresis },
 	{ { KS_dead_diaeresis,		KS_o },			KS_odiaeresis },
 	{ { KS_dead_diaeresis,		KS_u },			KS_udiaeresis },
+	{ { KS_dead_dotaccent,		KS_Z },			KS_Zabovedot },
+	{ { KS_dead_dotaccent,		KS_z },			KS_zabovedot },
+	{ { KS_dead_hungarumlaut,	KS_O },			KS_Odoubleacute },
+	{ { KS_dead_hungarumlaut,	KS_U },			KS_Udoubleacute },
+	{ { KS_dead_hungarumlaut,	KS_o },			KS_odoubleacute },
+	{ { KS_dead_hungarumlaut,	KS_u },			KS_udoubleacute },
 	{ { KS_dead_ogonek,		KS_A },			KS_Aogonek },
 	{ { KS_dead_ogonek,		KS_a },			KS_aogonek },
 	{ { KS_dead_ogonek,		KS_E },			KS_Eogonek },
-	{ { KS_dead_ogonek,		KS_e },			KS_eogonek }
+	{ { KS_dead_ogonek,		KS_e },			KS_eogonek },
+	{ { KS_dead_abovering,		KS_U },			KS_Uabovering },
+	{ { KS_dead_abovering,		KS_u },			KS_uabovering },
+	{ { KS_dead_slash,		KS_L },			KS_Lstroke },
+	{ { KS_dead_slash,		KS_l },			KS_lstroke }
 };
 
 #define COMPOSE_SIZE	sizeof(compose_tab)/sizeof(compose_tab[0])



CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 18:41:25 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile.inc

Log Message:
amd64 provides MACHINE_ARCH=x86_64 but pcc wants TARGMACH=amd64. handle that


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pcc/Makefile.inc

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

Modified files:

Index: src/external/bsd/pcc/Makefile.inc
diff -u src/external/bsd/pcc/Makefile.inc:1.6 src/external/bsd/pcc/Makefile.inc:1.7
--- src/external/bsd/pcc/Makefile.inc:1.6	Fri Feb  5 17:18:31 2010
+++ src/external/bsd/pcc/Makefile.inc	Fri Feb  5 18:41:25 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.6 2010/02/05 17:18:31 plunky Exp $
+#	$NetBSD: Makefile.inc,v 1.7 2010/02/05 18:41:25 plunky Exp $
 
 PCC_DIR:=${.PARSEDIR}
 PCC_DIST=${PCC_DIR}/dist/pcc
@@ -8,6 +8,8 @@
 
 .if ${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb
 TARGMACH = mips
+.elif ${MACHINE_ARCH} == x86_64
+TARGMACH = amd64
 .else
 TARGMACH = ${MACHINE_ARCH}
 .endif



CVS commit: src/distrib/sets/lists

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 19:08:26 UTC 2010

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/comp: mi shl.mi
src/distrib/sets/lists/man: mi

Log Message:
add PCC commands and manpages [pcc(1), pcpp(1) and ccom(1)] and libpcc


To generate a diff of this commit:
cvs rdiff -u -r1.857 -r1.858 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1384 -r1.1385 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.102 -r1.103 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.1186 -r1.1187 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.857 src/distrib/sets/lists/base/mi:1.858
--- src/distrib/sets/lists/base/mi:1.857	Thu Feb  4 14:04:59 2010
+++ src/distrib/sets/lists/base/mi	Fri Feb  5 19:08:25 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.857 2010/02/04 14:04:59 roy Exp $
+# $NetBSD: mi,v 1.858 2010/02/05 19:08:25 plunky Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -872,7 +872,6 @@
 ./usr/libexec/atrunbase-cron-bin
 ./usr/libexec/chingbase-games-usr
 ./usr/libexec/comsatbase-mail-bin
-./usr/libexec/cppbase-obsolete		obsolete
 ./usr/libexec/cpp0base-obsolete		obsolete
 ./usr/libexec/dnskeygenbase-obsolete		obsolete
 ./usr/libexec/fingerdbase-netutil-bin

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1384 src/distrib/sets/lists/comp/mi:1.1385
--- src/distrib/sets/lists/comp/mi:1.1384	Fri Feb  5 12:46:33 2010
+++ src/distrib/sets/lists/comp/mi	Fri Feb  5 19:08:26 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1384 2010/02/05 12:46:33 njoly Exp $
+#	$NetBSD: mi,v 1.1385 2010/02/05 19:08:26 plunky Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -61,6 +61,7 @@
 ./usr/bin/nm	comp-util-bin		binutils
 ./usr/bin/objcopycomp-util-bin		binutils
 ./usr/bin/objdumpcomp-util-bin		binutils
+./usr/bin/pcc	comp-c-bin		pcccmds
 ./usr/bin/protoizecomp-c-bin		gcccmds
 ./usr/bin/ranlibcomp-util-bin		binutils
 ./usr/bin/rcs2logcomp-cvs-bin		cvs
@@ -2519,6 +2520,9 @@
 ./usr/lib/libpcap.acomp-c-lib
 ./usr/lib/libpcap_g.a-unknown-		debuglib
 ./usr/lib/libpcap_p.acomp-c-proflib		profile
+./usr/lib/libpcc.acomp-c-lib		pcc
+./usr/lib/libpcc_g.a-unknown-		pcc,debuglib
+./usr/lib/libpcc_p.acomp-c-proflib		pcc,profile
 ./usr/lib/libpci.acomp-c-lib
 ./usr/lib/libpci_g.a-unknown-		debuglib
 ./usr/lib/libpci_p.acomp-c-proflib		profile
@@ -3109,6 +3113,7 @@
 ./usr/libdata/debug/usr/bin/pathchk.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/pawd.debug		comp-amd-debug		debug
 ./usr/libdata/debug/usr/bin/paxctl.debug	comp-obsolete		obsolete
+./usr/libdata/debug/usr/bin/pcc.debug		comp-c-debug		pcccmds,debug
 ./usr/libdata/debug/usr/bin/pfbtops.debug	comp-groff-debug	debug
 ./usr/libdata/debug/usr/bin/pic.debug		comp-groff-debug	debug
 ./usr/libdata/debug/usr/bin/pkill.debug		comp-util-debug		debug
@@ -3303,9 +3308,11 @@
 ./usr/libdata/debug/usr/libexec/cc1.debug	comp-c-debug		gcccmds,debug
 ./usr/libdata/debug/usr/libexec/cc1obj.debug	comp-objc-debug		gcccmds,debug
 ./usr/libdata/debug/usr/libexec/cc1plus.debug	comp-cxx-debug		gcccmds,debug
+./usr/libdata/debug/usr/libexec/ccom.debug	comp-c-debug		pcccmds,debug
 ./usr/libdata/debug/usr/libexec/ching/castching.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/libexec/ching/printching.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/libexec/comsat.debug	comp-mail-debug		debug
+./usr/libdata/debug/usr/libexec/cpp.debug	comp-c-debug		pcccmds,debug
 ./usr/libdata/debug/usr/libexec/f771.debug	comp-fortran-debug	gcc=3,gcccmds,debug
 ./usr/libdata/debug/usr/libexec/f771.debug	comp-obsolete		gcc=4,obsolete
 ./usr/libdata/debug/usr/libexec/fingerd.debug	comp-netutil-debug	debug
@@ -3697,6 +3704,7 @@
 ./usr/libdata/lint/llib-lp2k.ln			comp-puffs-lintlib	lint
 ./usr/libdata/lint/llib-lpam.ln			comp-c-lintlib		lint,pam
 ./usr/libdata/lint/llib-lpcap.ln		comp-c-lintlib		lint
+./usr/libdata/lint/llib-lpcc.ln			comp-c-lintlib		lint,pcc
 ./usr/libdata/lint/llib-lpci.ln			comp-c-lintlib		lint
 ./usr/libdata/lint/llib-lposix.ln		comp-c-lintlib		lint
 ./usr/libdata/lint/llib-lprop.ln		comp-c-lintlib		lint
@@ -3730,7 +3738,9 @@
 ./usr/libexec/cc1comp-c-bin		gcccmds
 ./usr/libexec/cc1objcomp-objc-bin		gcccmds
 ./usr/libexec/cc1pluscomp-cxx-bin		gcccmds
+./usr/libexec/ccomcomp-c-bin		pcccmds
 ./usr/libexec/collect2comp-obsolete		obsolete
+./usr/libexec/cppcomp-c-bin		pcccmds
 ./usr/libexec/f771comp-fortran-bin	gcc=3,gcccmds
 ./usr/libexec/f771comp-obsolete		gcc=4,obsolete
 ./usr/libexec/lint1comp-c-bin

Index: src/distrib/sets/lists/comp/shl.mi
diff -u 

CVS commit: src/lib/libterminfo

2010-02-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Feb  5 19:21:02 UTC 2010

Modified Files:
src/lib/libterminfo: term.c terminfo.5

Log Message:
Don't look in /etc for a terminfo database.
Don't report the rescue database if we did not find the terminal in
there AND we were able to access prior databases.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/term.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libterminfo/terminfo.5

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

Modified files:

Index: src/lib/libterminfo/term.c
diff -u src/lib/libterminfo/term.c:1.3 src/lib/libterminfo/term.c:1.4
--- src/lib/libterminfo/term.c:1.3	Fri Feb  5 12:31:56 2010
+++ src/lib/libterminfo/term.c	Fri Feb  5 19:21:02 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: term.c,v 1.3 2010/02/05 12:31:56 roy Exp $ */
+/* $NetBSD: term.c,v 1.4 2010/02/05 19:21:02 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: term.c,v 1.3 2010/02/05 12:31:56 roy Exp $);
+__RCSID($NetBSD: term.c,v 1.4 2010/02/05 19:21:02 roy Exp $);
 
 #include sys/stat.h
 
@@ -44,7 +44,8 @@
 #include term_private.h
 #include term.h
 
-#define TERMINFO_DIRS /usr/share/misc/terminfo:/etc/terminfo:/rescue/terminfo
+#define TERMINFO_DIRS		/usr/share/misc/terminfo
+#define TERMINFO_RESCUE		/rescue/terminfo
 
 static char database[PATH_MAX];
 static char pathbuf[PATH_MAX];
@@ -283,6 +284,7 @@
 	_DIAGASSERT(term != NULL);
 	_DIAGASSERT(name != NULL);
 
+	database[0] = '\0';
 	_ti_database = NULL;
 	e = getenv(TERMINFO);
 	if (e != NULL)
@@ -295,8 +297,18 @@
 		if (r == 1)
 			return 1;
 	}
-	
-	return _ti_dbgettermp(term, TERMINFO_DIRS, name, flags);
+
+	r = _ti_dbgettermp(term, TERMINFO_DIRS, name, flags);
+	if (r == 1)
+		return 1;
+
+	/* If we don't find the term in the rescue db and there is
+	 * no error, then report the last database accessed. */
+	strlcpy(h, database, sizeof(h));
+	r = _ti_dbgetterm(term, TERMINFO_RESCUE, name, flags);
+	if (r == 0  h[0] != '\0')
+		strlcpy(database, h, sizeof(h));
+	return r;
 }
 
 void

Index: src/lib/libterminfo/terminfo.5
diff -u src/lib/libterminfo/terminfo.5:1.4 src/lib/libterminfo/terminfo.5:1.5
--- src/lib/libterminfo/terminfo.5:1.4	Fri Feb  5 09:42:21 2010
+++ src/lib/libterminfo/terminfo.5	Fri Feb  5 19:21:02 2010
@@ -1,7 +1,7 @@
 .\DO NOT EDIT
 .\Automatically generated from termcap.5.in
 .\
-.\	$NetBSD: terminfo.5,v 1.4 2010/02/05 09:42:21 roy Exp $
+.\	$NetBSD: terminfo.5,v 1.5 2010/02/05 19:21:02 roy Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -669,18 +669,14 @@
 .Pa $HOME/.terminfo.db ,
 followed by
 .Pa /usr/share/misc/terminfo.db ,
-followed by
-.Pa /rescue/terminfo.db
 and
-.Pa /etc/terminfo.db .
+.Pa /rescue/terminfo.db .
 .Sh FILES
 .Bl -tag -width /usr/share/misc/terminfo.db -compact
 .It Pa $HOME/.terminfo.db
 Database of terminal descriptions for personal use.
-.It Pa /etc/terminfo.db
-Database of terminal descriptions for use during boot or single user.
 .It Pa /rescue/terminfo.db
-Database of terminal descriptions for use when rescuing the system.
+Small database of terminal descriptions for use when rescuing the system.
 .It Pa /usr/share/misc/terminfo
 File containing terminal descriptions.
 .It Pa /usr/share/misc/terminfo.db



CVS commit: src/sys/dev/sysmon

2010-02-05 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Feb  5 19:22:25 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Fix a typo in one DPRINTF (s/edata-des/edata-desc/).


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/sysmon/sysmon_envsys_events.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/sysmon/sysmon_envsys_events.c
diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.78 src/sys/dev/sysmon/sysmon_envsys_events.c:1.79
--- src/sys/dev/sysmon/sysmon_envsys_events.c:1.78	Thu Feb  4 18:06:53 2010
+++ src/sys/dev/sysmon/sysmon_envsys_events.c	Fri Feb  5 19:22:25 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_events.c,v 1.78 2010/02/04 18:06:53 pgoyette Exp $ */
+/* $NetBSD: sysmon_envsys_events.c,v 1.79 2010/02/05 19:22:25 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.78 2010/02/04 18:06:53 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.79 2010/02/05 19:22:25 jruoho Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -178,7 +178,7 @@
 			return ENOMEM;
 
 		DPRINTF((%s: dev %s sensor %s: new event\n,
-		__func__, sme-sme_name, edata-des));
+		__func__, sme-sme_name, edata-desc));
 
 		see-see_type = crittype;
 		see-see_sme = sme;



CVS commit: src/sys/ufs/ffs

2010-02-05 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Feb  5 20:03:36 UTC 2010

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Correct addressing of superblock updates.


To generate a diff of this commit:
cvs rdiff -u -r1.256 -r1.257 src/sys/ufs/ffs/ffs_vfsops.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/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.256 src/sys/ufs/ffs/ffs_vfsops.c:1.257
--- src/sys/ufs/ffs/ffs_vfsops.c:1.256	Sun Jan 31 10:54:10 2010
+++ src/sys/ufs/ffs/ffs_vfsops.c	Fri Feb  5 20:03:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.256 2010/01/31 10:54:10 mlelstv Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.257 2010/02/05 20:03:36 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.256 2010/01/31 10:54:10 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.257 2010/02/05 20:03:36 mlelstv Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -1931,7 +1931,7 @@
 	u_int32_t saveflag;
 
 	error = ffs_getblk(mp-um_devvp,
-	fs-fs_sblockloc  (fs-fs_fshift - fs-fs_fsbtodb), FFS_NOBLK,
+	fs-fs_sblockloc / DEV_BSIZE, FFS_NOBLK,
 	fs-fs_sbsize, false, bp);
 	if (error)
 		return error;



CVS commit: src/sys/arch/evbarm/smdk2xx0

2010-02-05 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Feb  5 21:10:58 UTC 2010

Modified Files:
src/sys/arch/evbarm/smdk2xx0: smdk2410_lcd.c

Log Message:
Include locators.h for SSIOCF_ADDR_DEFAULT.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/smdk2xx0/smdk2410_lcd.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/evbarm/smdk2xx0/smdk2410_lcd.c
diff -u src/sys/arch/evbarm/smdk2xx0/smdk2410_lcd.c:1.4 src/sys/arch/evbarm/smdk2xx0/smdk2410_lcd.c:1.5
--- src/sys/arch/evbarm/smdk2xx0/smdk2410_lcd.c:1.4	Wed Jun 11 23:24:43 2008
+++ src/sys/arch/evbarm/smdk2xx0/smdk2410_lcd.c	Fri Feb  5 21:10:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: smdk2410_lcd.c,v 1.4 2008/06/11 23:24:43 cegger Exp $ */
+/*	$NetBSD: smdk2410_lcd.c,v 1.5 2010/02/05 21:10:58 snj Exp $ */
 
 /*
  * Copyright (c) 2004  Genetec Corporation.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smdk2410_lcd.c,v 1.4 2008/06/11 23:24:43 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: smdk2410_lcd.c,v 1.5 2010/02/05 21:10:58 snj Exp $);
 
 /*
  * LCD driver for Samsung SMDK2410.
@@ -60,6 +60,7 @@
 #include arm/s3c2xx0/s3c2410reg.h
 #include arm/s3c2xx0/s3c24x0_lcd.h
 
+#include locators.h
 #include wsdisplay.h
 
 int	lcd_match(struct device *, struct cfdata *, void *);



CVS commit: src/usr.bin/sort

2010-02-05 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Fri Feb  5 21:58:42 UTC 2010

Modified Files:
src/usr.bin/sort: fsort.c msort.c sort.c sort.h

Log Message:
Don't touch past the end of allocated region.  It results segmentation
violation.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/sort/fsort.c
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/sort/msort.c
cvs rdiff -u -r1.57 -r1.58 src/usr.bin/sort/sort.c
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/sort/sort.h

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

Modified files:

Index: src/usr.bin/sort/fsort.c
diff -u src/usr.bin/sort/fsort.c:1.46 src/usr.bin/sort/fsort.c:1.47
--- src/usr.bin/sort/fsort.c:1.46	Fri Nov  6 18:34:22 2009
+++ src/usr.bin/sort/fsort.c	Fri Feb  5 21:58:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsort.c,v 1.46 2009/11/06 18:34:22 joerg Exp $	*/
+/*	$NetBSD: fsort.c,v 1.47 2010/02/05 21:58:41 enami Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
 #include sort.h
 #include fsort.h
 
-__RCSID($NetBSD: fsort.c,v 1.46 2009/11/06 18:34:22 joerg Exp $);
+__RCSID($NetBSD: fsort.c,v 1.47 2010/02/05 21:58:41 enami Exp $);
 
 #include stdlib.h
 #include string.h
@@ -95,7 +95,7 @@
 	int file_no;
 	int max_recs = DEBUG('m') ? 16 : MAXNUM;
 
-	buffer = malloc(bufsize);
+	buffer = allocrec(NULL, bufsize);
 	bufend = (u_char *)buffer + bufsize;
 	/* Allocate double length keymap for radix_sort */
 	keylist = malloc(2 * max_recs * sizeof(*keylist));
@@ -154,7 +154,7 @@
 			/* c == BUFFEND, and we can process more data */
 			/* Allocate a larger buffer for this lot of data */
 			bufsize *= 2;
-			nbuffer = realloc(buffer, bufsize);
+			nbuffer = allocrec(buffer, bufsize);
 			if (!nbuffer) {
 err(2, failed to realloc buffer to %zu bytes,
 	bufsize);

Index: src/usr.bin/sort/msort.c
diff -u src/usr.bin/sort/msort.c:1.29 src/usr.bin/sort/msort.c:1.30
--- src/usr.bin/sort/msort.c:1.29	Fri Nov  6 18:34:22 2009
+++ src/usr.bin/sort/msort.c	Fri Feb  5 21:58:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: msort.c,v 1.29 2009/11/06 18:34:22 joerg Exp $	*/
+/*	$NetBSD: msort.c,v 1.30 2010/02/05 21:58:42 enami Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
 #include sort.h
 #include fsort.h
 
-__RCSID($NetBSD: msort.c,v 1.29 2009/11/06 18:34:22 joerg Exp $);
+__RCSID($NetBSD: msort.c,v 1.30 2010/02/05 21:58:42 enami Exp $);
 
 #include stdlib.h
 #include string.h
@@ -206,7 +206,7 @@
 	for (nfiles = i = 0; i  fstack_count; i++) {
 		cfile = fstack[i];
 		if (cfile-rec == NULL) {
-			cfile-rec = emalloc(DEFLLEN);
+			cfile-rec = allocrec(NULL, DEFLLEN);
 			cfile-end = (u_char *)cfile-rec + DEFLLEN;
 		}
 		rewind(cfile-fp);
@@ -219,7 +219,7 @@
 			if (c == BUFFEND) {
 /* Double buffer size */
 sz = (cfile-end - (u_char *)cfile-rec) * 2;
-cfile-rec = erealloc(cfile-rec, sz);
+cfile-rec = allocrec(cfile-rec, sz);
 cfile-end = (u_char *)cfile-rec + sz;
 continue;
 			}
@@ -245,7 +245,7 @@
 	 * output file - maintaining one record from each file in the sorted
 	 * list.
 	 */
-	new_rec = emalloc(DEFLLEN);
+	new_rec = allocrec(NULL, DEFLLEN);
 	new_end = (u_char *)new_rec + DEFLLEN;
 	for (;;) {
 		cfile = flist[0];
@@ -263,7 +263,7 @@
 		if (c == BUFFEND) {
 			/* Buffer not large enough - double in size */
 			sz = (new_end - (u_char *)new_rec) * 2;
-			new_rec = erealloc(new_rec, sz);
+			new_rec = allocrec(new_rec, sz);
 			new_end = (u_char *)new_rec +sz;
 			continue;
 		}

Index: src/usr.bin/sort/sort.c
diff -u src/usr.bin/sort/sort.c:1.57 src/usr.bin/sort/sort.c:1.58
--- src/usr.bin/sort/sort.c:1.57	Fri Nov  6 18:34:22 2009
+++ src/usr.bin/sort/sort.c	Fri Feb  5 21:58:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sort.c,v 1.57 2009/11/06 18:34:22 joerg Exp $	*/
+/*	$NetBSD: sort.c,v 1.58 2010/02/05 21:58:42 enami Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  The Regents of the University of California.  All rights reserved.);
 #endif /* not lint */
 
-__RCSID($NetBSD: sort.c,v 1.57 2009/11/06 18:34:22 joerg Exp $);
+__RCSID($NetBSD: sort.c,v 1.58 2010/02/05 21:58:42 enami Exp $);
 
 #include sys/types.h
 #include sys/time.h
@@ -402,3 +402,10 @@
 	 [-t char] [file ...]\n);
 	exit(2);
 }
+
+RECHEADER *
+allocrec(RECHEADER *rec, size_t size)
+{
+
+	return (erealloc(rec, size + sizeof(long) - 1));
+}

Index: src/usr.bin/sort/sort.h
diff -u src/usr.bin/sort/sort.h:1.30 src/usr.bin/sort/sort.h:1.31
--- src/usr.bin/sort/sort.h:1.30	Mon Sep 28 20:30:01 2009
+++ src/usr.bin/sort/sort.h	Fri Feb  5 21:58:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sort.h,v 1.30 2009/09/28 20:30:01 dsl Exp $	*/
+/*	$NetBSD: sort.h,v 1.31 2010/02/05 21:58:42 enami Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -174,6 +174,7 @@
 #define DEBUG(ch) (debug_flags  (1  ((ch)  31)))
 extern unsigned int debug_flags;
 

CVS commit: src/sys/rump

2010-02-05 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb  5 22:01:38 UTC 2010

Modified Files:
src/sys/rump/dev/wip: Makefile
src/sys/rump/net: Makefile.rumpnet
Added Files:
src/sys/rump/net/lib/libnet80211: Makefile shlib_version
Removed Files:
src/sys/rump/dev/wip/libnet80211: Makefile shlib_version

Log Message:
Move the net80211 support component into the proper place in net
and install as rumpnet_net80211.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/wip/Makefile
cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/wip/libnet80211/Makefile \
src/sys/rump/dev/wip/libnet80211/shlib_version
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/net/Makefile.rumpnet
cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libnet80211/Makefile \
src/sys/rump/net/lib/libnet80211/shlib_version

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/dev/wip/Makefile
diff -u src/sys/rump/dev/wip/Makefile:1.4 src/sys/rump/dev/wip/Makefile:1.5
--- src/sys/rump/dev/wip/Makefile:1.4	Mon Jan 11 02:15:38 2010
+++ src/sys/rump/dev/wip/Makefile	Fri Feb  5 22:01:38 2010
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.4 2010/01/11 02:15:38 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2010/02/05 22:01:38 pooka Exp $
 #
 
-SUBDIR=	libnet80211 librumpusbhc libucom libumass libulpt libusb libusbrum
+SUBDIR=	librumpusbhc libucom libumass libulpt libusb libusbrum
 SUBDIR+=libums libukbd
 
 SUBDIR+=libwscons

Index: src/sys/rump/net/Makefile.rumpnet
diff -u src/sys/rump/net/Makefile.rumpnet:1.5 src/sys/rump/net/Makefile.rumpnet:1.6
--- src/sys/rump/net/Makefile.rumpnet:1.5	Sat Feb 28 15:28:45 2009
+++ src/sys/rump/net/Makefile.rumpnet	Fri Feb  5 22:01:38 2010
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile.rumpnet,v 1.5 2009/02/28 15:28:45 pooka Exp $
+#	$NetBSD: Makefile.rumpnet,v 1.6 2010/02/05 22:01:38 pooka Exp $
 #
 
-RUMPNETLIST=	sockin shmif virtif net netinet local
+RUMPNETLIST=	net net80211 netinet local sockin shmif virtif
 
 .for var in ${RUMPNETLIST}
 RUMPNETLIBS+=lib${var}

Added files:

Index: src/sys/rump/net/lib/libnet80211/Makefile
diff -u /dev/null src/sys/rump/net/lib/libnet80211/Makefile:1.1
--- /dev/null	Fri Feb  5 22:01:38 2010
+++ src/sys/rump/net/lib/libnet80211/Makefile	Fri Feb  5 22:01:38 2010
@@ -0,0 +1,18 @@
+#	$NetBSD: Makefile,v 1.1 2010/02/05 22:01:38 pooka Exp $
+#
+
+.PATH:	${.CURDIR}/../../../../net80211
+
+LIB=	rumpnet_net80211
+
+SRCS=   ieee80211.c ieee80211_acl.c ieee80211_amrr.c ieee80211_crypto.c	\
+	ieee80211_crypto_ccmp.c ieee80211_crypto_none.c			\
+	ieee80211_crypto_tkip.c ieee80211_crypto_wep.c ieee80211_input.c\
+	ieee80211_ioctl.c ieee80211_netbsd.c ieee80211_node.c		\
+	ieee80211_output.c ieee80211_proto.c ieee80211_rssadapt.c	\
+	ieee80211_xauth.c
+
+CFLAGS+=	-Wno-pointer-sign
+
+.include bsd.lib.mk
+.include bsd.klinks.mk
Index: src/sys/rump/net/lib/libnet80211/shlib_version
diff -u /dev/null src/sys/rump/net/lib/libnet80211/shlib_version:1.1
--- /dev/null	Fri Feb  5 22:01:38 2010
+++ src/sys/rump/net/lib/libnet80211/shlib_version	Fri Feb  5 22:01:38 2010
@@ -0,0 +1,4 @@
+#	$NetBSD: shlib_version,v 1.1 2010/02/05 22:01:38 pooka Exp $
+#
+major=0
+minor=0



CVS commit: src/distrib/sets/lists

2010-02-05 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb  5 22:07:14 UTC 2010

Modified Files:
src/distrib/sets/lists/base: shl.elf shl.mi
src/distrib/sets/lists/comp: mi shl.mi

Log Message:
add rumpnet_net80211 to lists


To generate a diff of this commit:
cvs rdiff -u -r1.200 -r1.201 src/distrib/sets/lists/base/shl.elf
cvs rdiff -u -r1.519 -r1.520 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.1385 -r1.1386 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.103 -r1.104 src/distrib/sets/lists/comp/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/shl.elf
diff -u src/distrib/sets/lists/base/shl.elf:1.200 src/distrib/sets/lists/base/shl.elf:1.201
--- src/distrib/sets/lists/base/shl.elf:1.200	Wed Feb  3 15:34:37 2010
+++ src/distrib/sets/lists/base/shl.elf	Fri Feb  5 22:07:14 2010
@@ -1,4 +1,4 @@
-# $NetBSD: shl.elf,v 1.200 2010/02/03 15:34:37 roy Exp $
+# $NetBSD: shl.elf,v 1.201 2010/02/05 22:07:14 pooka Exp $
 #
 # Note:	Do not mark old major and major.minor shared libraries as
 #	obsolete; just remove the entry, as third-party applications
@@ -298,6 +298,8 @@
 ./usr/lib/librumpnet_local.so.0			base-rump-shlib
 ./usr/lib/librumpnet_net.so			base-rump-shlib
 ./usr/lib/librumpnet_net.so.0			base-rump-shlib
+./usr/lib/librumpnet_net80211.so		base-rump-shlib
+./usr/lib/librumpnet_net80211.so.0		base-rump-shlib
 ./usr/lib/librumpnet_netinet.so			base-rump-shlib
 ./usr/lib/librumpnet_netinet.so.0		base-rump-shlib
 ./usr/lib/librumpnet_shmif.so			base-rump-shlib

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.519 src/distrib/sets/lists/base/shl.mi:1.520
--- src/distrib/sets/lists/base/shl.mi:1.519	Wed Feb  3 15:34:37 2010
+++ src/distrib/sets/lists/base/shl.mi	Fri Feb  5 22:07:14 2010
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.519 2010/02/03 15:34:37 roy Exp $
+# $NetBSD: shl.mi,v 1.520 2010/02/05 22:07:14 pooka Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -156,6 +156,7 @@
 ./usr/lib/librumpnet.so.0.0			base-rump-shlib
 ./usr/lib/librumpnet_local.so.0.0		base-rump-shlib
 ./usr/lib/librumpnet_net.so.0.0			base-rump-shlib
+./usr/lib/librumpnet_net80211.so.0.0		base-rump-shlib
 ./usr/lib/librumpnet_netinet.so.0.0		base-rump-shlib
 ./usr/lib/librumpnet_shmif.so.0.0		base-rump-shlib
 ./usr/lib/librumpnet_sockin.so.0.0		base-rump-shlib

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1385 src/distrib/sets/lists/comp/mi:1.1386
--- src/distrib/sets/lists/comp/mi:1.1385	Fri Feb  5 19:08:26 2010
+++ src/distrib/sets/lists/comp/mi	Fri Feb  5 22:07:14 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1385 2010/02/05 19:08:26 plunky Exp $
+#	$NetBSD: mi,v 1.1386 2010/02/05 22:07:14 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2653,6 +2653,9 @@
 ./usr/lib/librumpnet_net.a			comp-c-lib
 ./usr/lib/librumpnet_net_g.a			-unknown-		debuglib
 ./usr/lib/librumpnet_net_p.a			comp-c-proflib		profile
+./usr/lib/librumpnet_net80211.a			comp-c-lib
+./usr/lib/librumpnet_net80211_g.a		-unknown-		debuglib
+./usr/lib/librumpnet_net80211_p.a		comp-c-proflib		profile
 ./usr/lib/librumpnet_netinet.a			comp-c-lib
 ./usr/lib/librumpnet_netinet_g.a		-unknown-		debuglib
 ./usr/lib/librumpnet_netinet_p.a		comp-c-proflib		profile

Index: src/distrib/sets/lists/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.103 src/distrib/sets/lists/comp/shl.mi:1.104
--- src/distrib/sets/lists/comp/shl.mi:1.103	Fri Feb  5 19:08:26 2010
+++ src/distrib/sets/lists/comp/shl.mi	Fri Feb  5 22:07:14 2010
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.103 2010/02/05 19:08:26 plunky Exp $
+# $NetBSD: shl.mi,v 1.104 2010/02/05 22:07:14 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -118,6 +118,7 @@
 ./usr/lib/librumpnet_pic.a			comp-c-piclib
 ./usr/lib/librumpnet_local_pic.a		comp-c-piclib
 ./usr/lib/librumpnet_net_pic.a			comp-c-piclib
+./usr/lib/librumpnet_net80211_pic.a		comp-c-piclib
 ./usr/lib/librumpnet_netinet_pic.a		comp-c-piclib
 ./usr/lib/librumpnet_shmif_pic.a		comp-c-piclib
 ./usr/lib/librumpnet_sockin_pic.a		comp-c-piclib



CVS commit: src/share/examples/rump/wirelessconf

2010-02-05 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb  5 22:07:51 UTC 2010

Modified Files:
src/share/examples/rump/wirelessconf: Makefile

Log Message:
The rumpdev_net80211 until-recently-wip component is now rumpnet_net80211.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/examples/rump/wirelessconf/Makefile

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

Modified files:

Index: src/share/examples/rump/wirelessconf/Makefile
diff -u src/share/examples/rump/wirelessconf/Makefile:1.2 src/share/examples/rump/wirelessconf/Makefile:1.3
--- src/share/examples/rump/wirelessconf/Makefile:1.2	Wed Oct 14 23:51:22 2009
+++ src/share/examples/rump/wirelessconf/Makefile	Fri Feb  5 22:07:51 2010
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.2 2009/10/14 23:51:22 pooka Exp $
+#	$NetBSD: Makefile,v 1.3 2010/02/05 22:07:51 pooka Exp $
 #
 
 PROG=	wirelessconf
 
-LDADD+=	-lrumpdev_net80211 -lrumpdev_usbrum -lrumpdev_usbhc
+LDADD+=	-lrumpdev_usbrum -lrumpdev_usbhc
 LDADD+=	-lrumpdev_usb -lrumpdev
-LDADD+=	-lrumpnet_net -lrumpnet
+LDADD+=	-lrumpnet_net80211 -lrumpnet_netinet -lrumpnet_net -lrumpnet
 LDADD+= -lrumpvfs -lrumpcrypto -lrump 
 LDADD+=	-lrumpuser -lpthread
 



CVS commit: src/sys/arch/sparc64

2010-02-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Feb  6 00:23:30 UTC 2010

Modified Files:
src/sys/arch/sparc64/conf: SCHIZO
src/sys/arch/sparc64/dev: schizo.c schizovar.h
src/sys/arch/sparc64/sparc64: locore.s

Log Message:
- properly map the schizo interrupt registers, so we can use the normal
  virtual mappings to access them.
- with the above fxied, kill SCHIZO_BUS_SPACE_BROKEN, and introduce
  an options CHEETAH for now, that disables the SPITFIRE code in locore.
- merge schizo_init() into schizo_attach() and clean up the softc a bit.

with this we are only one more step away from GENERIC booting on USIII
machines.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc64/conf/SCHIZO
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sparc64/dev/schizo.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/dev/schizovar.h
cvs rdiff -u -r1.310 -r1.311 src/sys/arch/sparc64/sparc64/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/sparc64/conf/SCHIZO
diff -u src/sys/arch/sparc64/conf/SCHIZO:1.4 src/sys/arch/sparc64/conf/SCHIZO:1.5
--- src/sys/arch/sparc64/conf/SCHIZO:1.4	Thu Jan 28 06:04:23 2010
+++ src/sys/arch/sparc64/conf/SCHIZO	Sat Feb  6 00:23:30 2010
@@ -1,4 +1,4 @@
-# $NetBSD: SCHIZO,v 1.4 2010/01/28 06:04:23 mrg Exp $
+# $NetBSD: SCHIZO,v 1.5 2010/02/06 00:23:30 mrg Exp $
 #
 # GENERIC with schizo support enabled, with the annoying schizo interupt
 # option
@@ -7,9 +7,9 @@
 include 	arch/sparc64/conf/GENERIC.MP
 #include 	arch/sparc64/conf/GENERIC
 
-#ident		SCHIZO.$Revision: 1.4 $
+#ident		SCHIZO.$Revision: 1.5 $
 
-options 	SCHIZO_BUS_SPACE_BROKEN
+options 	CHEETAH
 
 makeoptions	DEBUG=-g
 options 	DEBUG

Index: src/sys/arch/sparc64/dev/schizo.c
diff -u src/sys/arch/sparc64/dev/schizo.c:1.12 src/sys/arch/sparc64/dev/schizo.c:1.13
--- src/sys/arch/sparc64/dev/schizo.c:1.12	Wed Jan  6 05:55:01 2010
+++ src/sys/arch/sparc64/dev/schizo.c	Sat Feb  6 00:23:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: schizo.c,v 1.12 2010/01/06 05:55:01 mrg Exp $	*/
+/*	$NetBSD: schizo.c,v 1.13 2010/02/06 00:23:30 mrg Exp $	*/
 /*	$OpenBSD: schizo.c,v 1.55 2008/08/18 20:29:37 brad Exp $	*/
 
 /*
@@ -72,7 +72,6 @@
 CFATTACH_DECL(schizo, sizeof(struct schizo_softc),
 schizo_match, schizo_attach, NULL, NULL);
 
-void schizo_init(struct schizo_softc *);
 void schizo_init_iommu(struct schizo_softc *, struct schizo_pbm *);
 
 void schizo_set_intr(struct schizo_softc *, struct schizo_pbm *, int,
@@ -136,7 +135,10 @@
 {
 	struct schizo_softc *sc = (struct schizo_softc *)self;
 	struct mainbus_attach_args *ma = aux;
-	uint64_t eccctrl;
+	struct schizo_pbm *pbm;
+	struct pcibus_attach_args pba;
+	uint64_t reg, eccctrl;
+	int *busranges = NULL, nranges;
 	char *str;
 
 	printf(: addr %lx, ma-ma_reg[0].ur_paddr);
@@ -147,10 +149,8 @@
 	sc-sc_node = ma-ma_node;
 	sc-sc_dmat = ma-ma_dmatag;
 	sc-sc_bustag = ma-ma_bustag;
-	sc-sc_ctrl = ma-ma_reg[1].ur_paddr - 0x1UL;
-	sc-sc_reg0 = ma-ma_reg[0];
 
-	if (bus_space_map(sc-sc_bustag, sc-sc_ctrl,
+	if (bus_space_map(sc-sc_bustag, ma-ma_reg[1].ur_paddr - 0x1UL,
 	sizeof(struct schizo_regs), 0,
 	sc-sc_ctrlh)) {
 		printf(: failed to map registers\n);
@@ -166,17 +166,6 @@
 		   SCZ_ECCCTRL_CE_INTEN;
 	schizo_write(sc, SCZ_ECCCTRL, eccctrl);
 
-	schizo_init(sc);
-}
-
-void
-schizo_init(struct schizo_softc *sc)
-{
-	struct schizo_pbm *pbm;
-	struct pcibus_attach_args pba;
-	int *busranges = NULL, nranges;
-	u_int64_t /*match,*/ reg;
-
 	pbm = malloc(sizeof(*pbm), M_DEVBUF, M_NOWAIT | M_ZERO);
 	if (pbm == NULL)
 		panic(schizo: can't alloc schizo pbm);
@@ -184,11 +173,21 @@
 	pbm-sp_sc = sc;
 	pbm-sp_regt = sc-sc_bustag;
 
-	if ((sc-sc_reg0.ur_paddr  0x0070) == 0x0060)
+	if ((ma-ma_reg[0].ur_paddr  0x0070) == 0x0060)
 		pbm-sp_bus_a = 1;
 	else
 		pbm-sp_bus_a = 0;
 
+	/*
+	 * Map interrupt registers
+	 */
+	if (bus_space_map(sc-sc_bustag, ma-ma_reg[0].ur_paddr,
+			  ma-ma_reg[0].ur_len,
+			  BUS_SPACE_MAP_LINEAR, pbm-sp_intrh)) {
+		printf(: failed to interrupt map registers\n);
+		return;
+	}
+
 	if (prom_getprop(sc-sc_node, ranges, sizeof(struct schizo_range),
 	pbm-sp_nrange, (void **)pbm-sp_range))
 		panic(schizo: can't get ranges);
@@ -382,6 +381,9 @@
 	vaddr_t va;
 	char *name;
 
+	if (prom_getproplen(sc-sc_node, no-streaming-cache)  0) {
+	}
+
 	va = (vaddr_t)pbm-sp_flush[0x40];
 
 	/* punch in our copies */
@@ -483,6 +485,7 @@
 {
 	struct intrhand *ih;
 	u_int64_t mapoff, clroff;
+	uintptr_t intrregs;
 
 	DPRINTF(SDB_INTR, (%s: ino %x ign %x fn %p arg %p, __func__,
 	ino, sc-sc_ign, handler, arg));
@@ -498,8 +501,9 @@
 	if (ih == NULL)
 		return;
 	ih-ih_arg = arg;
-	ih-ih_map = (uint64_t *)((char *)sc-sc_reg0.ur_paddr + mapoff);
-	ih-ih_clr = (uint64_t *)((char *)sc-sc_reg0.ur_paddr + clroff);
+	intrregs = (uintptr_t)bus_space_vaddr(pbm-sp_regt, pbm-sp_intrh);
+	ih-ih_map = (uint64_t 

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

2010-02-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  6 00:39:47 UTC 2010

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: genassym.cf locore.S
mips_softint.c

Log Message:
Allow __HAVE_FAST_SOFTINTS to be optional


To generate a diff of this commit:
cvs rdiff -u -r1.44.12.14 -r1.44.12.15 src/sys/arch/mips/mips/genassym.cf
cvs rdiff -u -r1.167.38.9 -r1.167.38.10 src/sys/arch/mips/mips/locore.S
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/mips/mips_softint.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/genassym.cf
diff -u src/sys/arch/mips/mips/genassym.cf:1.44.12.14 src/sys/arch/mips/mips/genassym.cf:1.44.12.15
--- src/sys/arch/mips/mips/genassym.cf:1.44.12.14	Fri Feb  5 07:36:50 2010
+++ src/sys/arch/mips/mips/genassym.cf	Sat Feb  6 00:39:47 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.44.12.14 2010/02/05 07:36:50 matt Exp $
+#	$NetBSD: genassym.cf,v 1.44.12.15 2010/02/06 00:39:47 matt Exp $
 #
 # Copyright (c) 1992, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -89,6 +89,10 @@
 include mips/pte.h
 include mips/locore.h
 
+ifdef __HAVE_FAST_SOFTINTS
+define	__HAVE_FAST_SOFTINTS	1
+endif
+
 define	PAGE_SIZE		PAGE_SIZE
 define	MIPS_KSEG0_START	MIPS_KSEG0_START
 define	MIPS_KSEG1_START	MIPS_KSEG1_START

Index: src/sys/arch/mips/mips/locore.S
diff -u src/sys/arch/mips/mips/locore.S:1.167.38.9 src/sys/arch/mips/mips/locore.S:1.167.38.10
--- src/sys/arch/mips/mips/locore.S:1.167.38.9	Fri Feb  5 07:36:50 2010
+++ src/sys/arch/mips/mips/locore.S	Sat Feb  6 00:39:46 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.167.38.9 2010/02/05 07:36:50 matt Exp $	*/
+/*	$NetBSD: locore.S,v 1.167.38.10 2010/02/06 00:39:46 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -262,6 +262,7 @@
 	nop
 END(cpu_switchto)
 
+#ifdef __HAVE_FAST_SOFTINTS
 /*
  * void softint_fast_dispatch(struct lwp *l, int s, void *new_sp);
  *
@@ -271,7 +272,7 @@
 softint_cleanup:
 	PTR_L	t0, L_CPU(MIPS_CURLWP)
 	INT_L	t1, CPU_INFO_MTX_COUNT(t0)
-	addi	t1, t1, 1
+	INT_ADDU t1, 1
 	INT_S	t1, CPU_INFO_MTX_COUNT(t0)
 	REG_L	ra, CALLFRAME_RA(sp)
 	PTR_S	zero, L_CTXSWITCH(MIPS_CURLWP)
@@ -351,6 +352,7 @@
 	j	ra
 	 PTR_ADDU sp, CALLFRAME_SIZ
 END(softint_fast_dispatch)
+#endif /* __HAVE_FAST_SOFTINTS */
 
 /*
  * savectx(struct user *up)

Index: src/sys/arch/mips/mips/mips_softint.c
diff -u src/sys/arch/mips/mips/mips_softint.c:1.1.2.1 src/sys/arch/mips/mips/mips_softint.c:1.1.2.2
--- src/sys/arch/mips/mips/mips_softint.c:1.1.2.1	Fri Feb  5 07:36:50 2010
+++ src/sys/arch/mips/mips/mips_softint.c	Sat Feb  6 00:39:47 2010
@@ -29,7 +29,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: mips_softint.c,v 1.1.2.1 2010/02/05 07:36:50 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: mips_softint.c,v 1.1.2.2 2010/02/06 00:39:47 matt Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -42,6 +42,8 @@
 
 #include mips/locore.h
 
+#ifdef __HAVE_FAST_SOFTINTS
+
 #define	SOFTINT_BIO_MASK	(1  SOFTINT_BIO)
 #define	SOFTINT_CLOCK_MASK	(1  SOFTINT_CLOCK)
 #define	SOFTINT_NET_MASK	(1  SOFTINT_NET)
@@ -140,3 +142,5 @@
 	_clrsoftintr(ipending);
 	splx(s);
 }
+
+#endif /* __HAVE_FAST_SOFTINTS */



CVS commit: src/sys/uvm

2010-02-05 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Feb  6 02:56:17 UTC 2010

Modified Files:
src/sys/uvm: uvm_page.h

Log Message:
Make vm_physseg lookup routines take the target vm_physseg.  This is for the
coming managed device segments.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/uvm/uvm_page.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/uvm/uvm_page.h
diff -u src/sys/uvm/uvm_page.h:1.57 src/sys/uvm/uvm_page.h:1.58
--- src/sys/uvm/uvm_page.h:1.57	Tue Aug 18 18:06:54 2009
+++ src/sys/uvm/uvm_page.h	Sat Feb  6 02:56:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.h,v 1.57 2009/08/18 18:06:54 thorpej Exp $	*/
+/*	$NetBSD: uvm_page.h,v 1.58 2010/02/06 02:56:17 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -310,23 +310,49 @@
  * when VM_PHYSSEG_MAX is 1, we can simplify these functions
  */
 
+#if VM_PHYSSEG_MAX == 1
+static __inline int vm_physseg_find_contig(struct vm_physseg *, int, paddr_t, int *);
+#elif (VM_PHYSSEG_STRAT == VM_PSTRAT_BSEARCH)
+static __inline int vm_physseg_find_bsearch(struct vm_physseg *, int, paddr_t, int *);
+#else
+static __inline int vm_physseg_find_linear(struct vm_physseg *, int, paddr_t, int *);
+#endif
+
 /*
  * vm_physseg_find: find vm_physseg structure that belongs to a PA
  */
 static __inline int
 vm_physseg_find(paddr_t pframe, int *offp)
 {
+
 #if VM_PHYSSEG_MAX == 1
+	return vm_physseg_find_contig(vm_physmem, vm_nphysseg, pframe, offp);
+#elif (VM_PHYSSEG_STRAT == VM_PSTRAT_BSEARCH)
+	return vm_physseg_find_bsearch(vm_physmem, vm_nphysseg, pframe, offp);
+#else
+	return vm_physseg_find_linear(vm_physmem, vm_nphysseg, pframe, offp);
+#endif
+}
+
+#if VM_PHYSSEG_MAX == 1
+static __inline int
+vm_physseg_find_contig(struct vm_physseg *segs, int nsegs, paddr_t pframe, int *offp)
+{
 
 	/* 'contig' case */
-	if (pframe = vm_physmem[0].start  pframe  vm_physmem[0].end) {
+	if (pframe = segs[0].start  pframe  segs[0].end) {
 		if (offp)
-			*offp = pframe - vm_physmem[0].start;
+			*offp = pframe - segs[0].start;
 		return(0);
 	}
 	return(-1);
+}
 
 #elif (VM_PHYSSEG_STRAT == VM_PSTRAT_BSEARCH)
+
+static __inline int
+vm_physseg_find_bsearch(struct vm_physseg *segs, int nsegs, paddr_t pframe, int *offp)
+{
 	/* binary search for it */
 	u_int	start, len, try;
 
@@ -343,15 +369,15 @@
 	 * for any value of len we may have
 	 */
 
-	for (start = 0, len = vm_nphysseg ; len != 0 ; len = len / 2) {
+	for (start = 0, len = nsegs ; len != 0 ; len = len / 2) {
 		try = start + (len / 2);	/* try in the middle */
 
 		/* start past our try? */
-		if (pframe = vm_physmem[try].start) {
+		if (pframe = segs[try].start) {
 			/* was try correct? */
-			if (pframe  vm_physmem[try].end) {
+			if (pframe  segs[try].end) {
 if (offp)
-	*offp = pframe - vm_physmem[try].start;
+	*offp = pframe - segs[try].start;
 return(try);/* got it */
 			}
 			start = try + 1;	/* next time, start here */
@@ -364,23 +390,27 @@
 		}
 	}
 	return(-1);
+}
 
 #else
+
+static __inline int
+vm_physseg_find_linear(struct vm_physseg *segs, int nsegs, paddr_t pframe, int *offp)
+{
 	/* linear search for it */
 	int	lcv;
 
-	for (lcv = 0; lcv  vm_nphysseg; lcv++) {
-		if (pframe = vm_physmem[lcv].start 
-		pframe  vm_physmem[lcv].end) {
+	for (lcv = 0; lcv  nsegs; lcv++) {
+		if (pframe = segs[lcv].start 
+		pframe  segs[lcv].end) {
 			if (offp)
-*offp = pframe - vm_physmem[lcv].start;
+*offp = pframe - segs[lcv].start;
 			return(lcv);		   /* got it */
 		}
 	}
 	return(-1);
-
-#endif
 }
+#endif
 
 
 /*



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

2010-02-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  6 02:56:23 UTC 2010

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

Log Message:
Save curlwp in context (even though it should already be there).


To generate a diff of this commit:
cvs rdiff -u -r1.167.38.10 -r1.167.38.11 src/sys/arch/mips/mips/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/mips/mips/locore.S
diff -u src/sys/arch/mips/mips/locore.S:1.167.38.10 src/sys/arch/mips/mips/locore.S:1.167.38.11
--- src/sys/arch/mips/mips/locore.S:1.167.38.10	Sat Feb  6 00:39:46 2010
+++ src/sys/arch/mips/mips/locore.S	Sat Feb  6 02:56:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.167.38.10 2010/02/06 00:39:46 matt Exp $	*/
+/*	$NetBSD: locore.S,v 1.167.38.11 2010/02/06 02:56:23 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -304,7 +304,7 @@
 	REG_S	s5, U_PCB_CONTEXT+SF_REG_S5(t0)
 	REG_S	s6, U_PCB_CONTEXT+SF_REG_S6(t0)
 	REG_S	s7, U_PCB_CONTEXT+SF_REG_S7(t0)
-	#REG_S	t8, U_PCB_CONTEXT+SF_REG_T8(t0) # MIPS_CURLWP
+	REG_S	t8, U_PCB_CONTEXT+SF_REG_T8(t0) # MIPS_CURLWP
 	REG_S	sp, U_PCB_CONTEXT+SF_REG_SP(t0)
 	REG_S	s8, U_PCB_CONTEXT+SF_REG_S8(t0)
 	REG_S	t2, U_PCB_CONTEXT+SF_REG_RA(t0)



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

2010-02-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  6 02:57:44 UTC 2010

Modified Files:
src/sys/arch/algor/include [matt-nb5-mips64]: intr.h
src/sys/arch/arc/include [matt-nb5-mips64]: intr.h
src/sys/arch/cobalt/include [matt-nb5-mips64]: intr.h
src/sys/arch/evbmips/include [matt-nb5-mips64]: intr.h
src/sys/arch/pmax/include [matt-nb5-mips64]: intr.h
src/sys/arch/sgimips/include [matt-nb5-mips64]: intr.h
Removed Files:
src/sys/arch/mips/include [matt-nb5-mips64]: softintr.h

Log Message:
mips/softintr.h is no longer needed.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.18.1 src/sys/arch/algor/include/intr.h
cvs rdiff -u -r1.22 -r1.22.18.1 src/sys/arch/arc/include/intr.h
cvs rdiff -u -r1.32 -r1.32.12.1 src/sys/arch/cobalt/include/intr.h
cvs rdiff -u -r1.16.18.1 -r1.16.18.2 src/sys/arch/evbmips/include/intr.h
cvs rdiff -u -r1.4 -r0 src/sys/arch/mips/include/softintr.h
cvs rdiff -u -r1.32 -r1.32.28.1 src/sys/arch/pmax/include/intr.h
cvs rdiff -u -r1.25 -r1.25.36.1 src/sys/arch/sgimips/include/intr.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/algor/include/intr.h
diff -u src/sys/arch/algor/include/intr.h:1.13 src/sys/arch/algor/include/intr.h:1.13.18.1
--- src/sys/arch/algor/include/intr.h:1.13	Mon Apr 28 20:23:10 2008
+++ src/sys/arch/algor/include/intr.h	Sat Feb  6 02:57:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.13 2008/04/28 20:23:10 martin Exp $	*/
+/*	$NetBSD: intr.h,v 1.13.18.1 2010/02/06 02:57:43 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -96,8 +96,6 @@
 	const void *ih_irqmap;
 };
 
-#include mips/softintr.h
-
 extern struct evcnt mips_int5_evcnt;
 
 void	intr_init(void);

Index: src/sys/arch/arc/include/intr.h
diff -u src/sys/arch/arc/include/intr.h:1.22 src/sys/arch/arc/include/intr.h:1.22.18.1
--- src/sys/arch/arc/include/intr.h:1.22	Mon Apr 28 20:23:13 2008
+++ src/sys/arch/arc/include/intr.h	Sat Feb  6 02:57:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.22 2008/04/28 20:23:13 martin Exp $	*/
+/*	$NetBSD: intr.h,v 1.22.18.1 2010/02/06 02:57:43 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -86,8 +86,6 @@
 
 #include sys/spl.h
 
-#include mips/softintr.h
-
 struct clockframe;
 void arc_set_intr(uint32_t, uint32_t (*)(uint32_t, struct clockframe *), int);
 extern uint32_t cpu_int_mask;

Index: src/sys/arch/cobalt/include/intr.h
diff -u src/sys/arch/cobalt/include/intr.h:1.32 src/sys/arch/cobalt/include/intr.h:1.32.12.1
--- src/sys/arch/cobalt/include/intr.h:1.32	Wed Oct  1 02:44:14 2008
+++ src/sys/arch/cobalt/include/intr.h	Sat Feb  6 02:57:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.32 2008/10/01 02:44:14 uebayasi Exp $	*/
+/*	$NetBSD: intr.h,v 1.32.12.1 2010/02/06 02:57:43 matt Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang.  All rights reserved.
@@ -94,8 +94,6 @@
 #define	COBALT_COOKIE_TYPE_ICU	0x2
 };
 
-#include mips/softintr.h
-
 void intr_init(void);
 void *cpu_intr_establish(int, int, int (*)(void *), void *);
 void *icu_intr_establish(int, int, int, int (*)(void *), void *);

Index: src/sys/arch/evbmips/include/intr.h
diff -u src/sys/arch/evbmips/include/intr.h:1.16.18.1 src/sys/arch/evbmips/include/intr.h:1.16.18.2
--- src/sys/arch/evbmips/include/intr.h:1.16.18.1	Fri Sep 25 22:21:42 2009
+++ src/sys/arch/evbmips/include/intr.h	Sat Feb  6 02:57:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.16.18.1 2009/09/25 22:21:42 cliff Exp $	*/
+/*	$NetBSD: intr.h,v 1.16.18.2 2010/02/06 02:57:43 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -99,8 +99,6 @@
 	int ih_ipl;
 };
 
-#include mips/softintr.h
-
 void	evbmips_intr_init(void);
 void	intr_init(void);
 void	evbmips_iointr(uint32_t, uint32_t, uint32_t, uint32_t);

Index: src/sys/arch/pmax/include/intr.h
diff -u src/sys/arch/pmax/include/intr.h:1.32 src/sys/arch/pmax/include/intr.h:1.32.28.1
--- src/sys/arch/pmax/include/intr.h:1.32	Fri Jan  4 21:54:05 2008
+++ src/sys/arch/pmax/include/intr.h	Sat Feb  6 02:57:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.32 2008/01/04 21:54:05 ad Exp $	*/
+/*	$NetBSD: intr.h,v 1.32.28.1 2010/02/06 02:57:44 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -128,8 +128,6 @@
 	void *ih_arg;
 };
 
-#include mips/softintr.h
-
 extern struct evcnt pmax_clock_evcnt;
 extern struct evcnt pmax_fpu_evcnt;
 extern struct evcnt pmax_memerr_evcnt;

Index: src/sys/arch/sgimips/include/intr.h
diff -u src/sys/arch/sgimips/include/intr.h:1.25 src/sys/arch/sgimips/include/intr.h:1.25.36.1
--- src/sys/arch/sgimips/include/intr.h:1.25	Mon Dec  3 15:34:17 2007
+++ src/sys/arch/sgimips/include/intr.h	Sat Feb  6 02:57:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.25 2007/12/03 15:34:17 ad Exp $	*/
+/*	$NetBSD: intr.h,v 1.25.36.1 2010/02/06 02:57:44 matt Exp $	*/
 
 /*
  * Copyright 

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

2010-02-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  6 02:59:04 UTC 2010

Modified Files:
src/sys/arch/evbmips/malta [matt-nb5-mips64]: malta_intr.c
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_intr.c

Log Message:
A little constification and remove some old softintr cruft.


To generate a diff of this commit:
cvs rdiff -u -r1.19.16.1 -r1.19.16.2 src/sys/arch/evbmips/malta/malta_intr.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/rmi/rmixl_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/evbmips/malta/malta_intr.c
diff -u src/sys/arch/evbmips/malta/malta_intr.c:1.19.16.1 src/sys/arch/evbmips/malta/malta_intr.c:1.19.16.2
--- src/sys/arch/evbmips/malta/malta_intr.c:1.19.16.1	Wed Jan 20 09:04:33 2010
+++ src/sys/arch/evbmips/malta/malta_intr.c	Sat Feb  6 02:59:04 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: malta_intr.c,v 1.19.16.1 2010/01/20 09:04:33 matt Exp $	*/
+/*	$NetBSD: malta_intr.c,v 1.19.16.2 2010/02/06 02:59:04 matt Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: malta_intr.c,v 1.19.16.1 2010/01/20 09:04:33 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: malta_intr.c,v 1.19.16.2 2010/02/06 02:59:04 matt Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -82,16 +82,6 @@
 	MIPS_INT_MASK_5,
 };
 
-/*
- * This is a mask of bits to clear in the SR when we go to a
- * given software interrupt priority level.
- * Hardware ipls are port/board specific.
- */
-const uint32_t mips_ipl_si_to_sr[2] = {
-	MIPS_SOFT_INT_MASK_0,
-	MIPS_SOFT_INT_MASK_1, /* XXX is this right with the new softints? */
-};
-
 struct malta_cpuintr {
 	LIST_HEAD(, evbmips_intrhand) cintr_list;
 	struct evcnt cintr_count;
@@ -99,7 +89,7 @@
 #define	NINTRS		5	/* MIPS INT0 - INT4 */
 
 struct malta_cpuintr malta_cpuintrs[NINTRS];
-const char *malta_cpuintrnames[NINTRS] = {
+const char * const malta_cpuintrnames[NINTRS] = {
 	int 0 (piix4),
 	int 1 (smi),
 	int 2 (uart),

Index: src/sys/arch/mips/rmi/rmixl_intr.c
diff -u src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.8 src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.9
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.8	Fri Jan 29 00:24:14 2010
+++ src/sys/arch/mips/rmi/rmixl_intr.c	Sat Feb  6 02:59:04 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.c,v 1.1.2.8 2010/01/29 00:24:14 cliff Exp $	*/
+/*	$NetBSD: rmixl_intr.c,v 1.1.2.9 2010/02/06 02:59:04 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_intr.c,v 1.1.2.8 2010/01/29 00:24:14 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_intr.c,v 1.1.2.9 2010/02/06 02:59:04 matt Exp $);
 
 #include opt_ddb.h
 
@@ -137,7 +137,7 @@
  * - use for XLS1xx, XLS2xx, XLS4xx-Lite
  */
 #define	NIRQS	32
-static const char *rmixl_irqnames_xls1xx[NIRQS] = {
+static const char * const rmixl_irqnames_xls1xx[NIRQS] = {
 	int 0 (watchdog),	/*  0 */
 	int 1 (timer0),	/*  1 */
 	int 2 (timer1),	/*  2 */
@@ -176,7 +176,7 @@
  * rmixl_irqnames_xls4xx:
  * - use for XLS4xx, XLS6xx
  */
-static const char *rmixl_irqnames_xls4xx[NIRQS] = {
+static const char * const rmixl_irqnames_xls4xx[NIRQS] = {
 	int 0 (watchdog),	/*  0 */
 	int 1 (timer0),	/*  1 */
 	int 2 (timer1),	/*  2 */
@@ -215,7 +215,7 @@
  * rmixl_irqnames_generic:
  * - use for unknown cpu implementation
  */
-static const char *rmixl_irqnames_generic[NIRQS] = {
+static const char * const rmixl_irqnames_generic[NIRQS] = {
 	int 0,	/*  0 */
 	int 1,	/*  1 */
 	int 2,	/*  2 */



CVS commit: src/sys/arch/xen/xen

2010-02-05 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Feb  6 03:06:42 UTC 2010

Modified Files:
src/sys/arch/xen/xen: privcmd.c

Log Message:
Typo in a wchan string.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/xen/xen/privcmd.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/xen/xen/privcmd.c
diff -u src/sys/arch/xen/xen/privcmd.c:1.40 src/sys/arch/xen/xen/privcmd.c:1.41
--- src/sys/arch/xen/xen/privcmd.c:1.40	Sat Jan 23 18:26:37 2010
+++ src/sys/arch/xen/xen/privcmd.c	Sat Feb  6 03:06:42 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: privcmd.c,v 1.40 2010/01/23 18:26:37 bouyer Exp $ */
+/* $NetBSD: privcmd.c,v 1.41 2010/02/06 03:06:42 uebayasi Exp $ */
 
 /*-
  * Copyright (c) 2004 Christian Limpach.
@@ -27,7 +27,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.40 2010/01/23 18:26:37 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.41 2010/02/06 03:06:42 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -513,7 +513,7 @@
 			uvmfault_unlockall(ufi, ufi-entry-aref.ar_amap,
 			uobj, NULL);
 			pmap_update(ufi-orig_map-pmap);
-			uvm_wait(udv_fault);
+			uvm_wait(privpgop_fault);
 			return (ERESTART);
 		}
 		if (error) {



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

2010-02-05 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Feb  6 03:10:14 UTC 2010

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

Log Message:
- when establishing an intr, if malloc fails, be sure to splx on the way out
- in interrupt dispatch, when ack-ing EIRR, preserve the softint bits


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/arch/mips/rmi/rmixl_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/mips/rmi/rmixl_intr.c
diff -u src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.9 src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.10
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.9	Sat Feb  6 02:59:04 2010
+++ src/sys/arch/mips/rmi/rmixl_intr.c	Sat Feb  6 03:10:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.c,v 1.1.2.9 2010/02/06 02:59:04 matt Exp $	*/
+/*	$NetBSD: rmixl_intr.c,v 1.1.2.10 2010/02/06 03:10:14 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_intr.c,v 1.1.2.9 2010/02/06 02:59:04 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_intr.c,v 1.1.2.10 2010/02/06 03:10:14 cliff Exp $);
 
 #include opt_ddb.h
 
@@ -583,7 +583,7 @@
 	 */
 	ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT);
 	if (ih == NULL)
-		return NULL;
+		goto out;
 
 	ih-ih_func = func;
 	ih-ih_arg = arg;
@@ -606,6 +606,7 @@
 	 */
 	rmixl_intr_irt_establish(irq, ipl, trigger, polarity, vec);
 
+ out:
 	splx(s);
 
 	return ih;
@@ -672,7 +673,9 @@
 
 		ivp = rmixl_intrvec[vec];
 
-		eirr = 1ULL  vec;
+		asm volatile(dmfc0 %0, $9, 6; : =r(eirr));
+		eirr = 3;
+		eirr |= 1ULL  vec;
 		asm volatile(dmtc0 %0, $9, 6; :: r(eirr));
 
 #ifdef IOINTR_DEBUG



CVS commit: src/sys

2010-02-05 Thread Quentin Garnier
Module Name:src
Committed By:   cube
Date:   Sat Feb  6 04:50:19 UTC 2010

Modified Files:
src/sys/kern: kern_mutex.c kern_rwlock.c
src/sys/sys: mutex.h rwlock.h

Log Message:
Revert commit from Fri Feb  5 06:43:17 UTC 2010 by skrll:

  Invert the sense of the bit to mark if LOCKDEBUG is enabled to disabled.

  This will help my fellow developers spot use before initialised problems
  that hppa picks up very well.

It has to be done differently, because the semantics of mtx_owner in the non-
LOCKDEBUG case can vary significantly between archs, and thus it is not
possible to simply flip a bit to 1.

Ok core@, as at least i386 is unbootable right now.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/kern/kern_mutex.c
cvs rdiff -u -r1.34 -r1.35 src/sys/kern/kern_rwlock.c
cvs rdiff -u -r1.18 -r1.19 src/sys/sys/mutex.h
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/rwlock.h

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

Modified files:

Index: src/sys/kern/kern_mutex.c
diff -u src/sys/kern/kern_mutex.c:1.47 src/sys/kern/kern_mutex.c:1.48
--- src/sys/kern/kern_mutex.c:1.47	Fri Feb  5 06:43:16 2010
+++ src/sys/kern/kern_mutex.c	Sat Feb  6 04:50:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_mutex.c,v 1.47 2010/02/05 06:43:16 skrll Exp $	*/
+/*	$NetBSD: kern_mutex.c,v 1.48 2010/02/06 04:50:19 cube Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 #define	__MUTEX_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_mutex.c,v 1.47 2010/02/05 06:43:16 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_mutex.c,v 1.48 2010/02/06 04:50:19 cube Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -157,15 +157,15 @@
 
 #define	MUTEX_INITIALIZE_ADAPTIVE(mtx, dodebug)\
 do {	\
-	if (!dodebug)			\
-		(mtx)-mtx_owner |= MUTEX_BIT_NODEBUG;			\
+	if (dodebug)			\
+		(mtx)-mtx_owner |= MUTEX_BIT_DEBUG;			\
 } while (/* CONSTCOND */ 0);
 
 #define	MUTEX_INITIALIZE_SPIN(mtx, dodebug, ipl)			\
 do {	\
 	(mtx)-mtx_owner = MUTEX_BIT_SPIN;\
-	if (!dodebug)			\
-		(mtx)-mtx_owner |= MUTEX_BIT_NODEBUG;			\
+	if (dodebug)			\
+		(mtx)-mtx_owner |= MUTEX_BIT_DEBUG;			\
 	(mtx)-mtx_ipl = makeiplcookie((ipl));\
 	__cpu_simple_lock_init((mtx)-mtx_lock);			\
 } while (/* CONSTCOND */ 0)
@@ -180,10 +180,10 @@
 #define	MUTEX_ADAPTIVE_P(mtx)		\
 (((mtx)-mtx_owner  MUTEX_BIT_SPIN) == 0)
 
-#define	MUTEX_DEBUG_P(mtx)	(((mtx)-mtx_owner  MUTEX_BIT_NODEBUG) == 0)
+#define	MUTEX_DEBUG_P(mtx)	(((mtx)-mtx_owner  MUTEX_BIT_DEBUG) != 0)
 #if defined(LOCKDEBUG)
-#define	MUTEX_OWNED(owner)		(((owner)  ~MUTEX_BIT_NODEBUG) != 0)
-#define	MUTEX_INHERITDEBUG(new, old)	(new) |= (old)  MUTEX_BIT_NODEBUG
+#define	MUTEX_OWNED(owner)		(((owner)  ~MUTEX_BIT_DEBUG) != 0)
+#define	MUTEX_INHERITDEBUG(new, old)	(new) |= (old)  MUTEX_BIT_DEBUG
 #else /* defined(LOCKDEBUG) */
 #define	MUTEX_OWNED(owner)		((owner) != 0)
 #define	MUTEX_INHERITDEBUG(new, old)	/* nothing */

Index: src/sys/kern/kern_rwlock.c
diff -u src/sys/kern/kern_rwlock.c:1.34 src/sys/kern/kern_rwlock.c:1.35
--- src/sys/kern/kern_rwlock.c:1.34	Fri Feb  5 06:43:16 2010
+++ src/sys/kern/kern_rwlock.c	Sat Feb  6 04:50:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rwlock.c,v 1.34 2010/02/05 06:43:16 skrll Exp $	*/
+/*	$NetBSD: kern_rwlock.c,v 1.35 2010/02/06 04:50:19 cube Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_rwlock.c,v 1.34 2010/02/05 06:43:16 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_rwlock.c,v 1.35 2010/02/06 04:50:19 cube Exp $);
 
 #define	__RWLOCK_PRIVATE
 
@@ -103,10 +103,10 @@
 
 #endif	/* DIAGNOSTIC */
 
-#define	RW_SETDEBUG(rw, on)		((rw)-rw_owner |= (on) ? 0 : RW_NODEBUG)
-#define	RW_DEBUG_P(rw)			(((rw)-rw_owner  RW_NODEBUG) == 0)
+#define	RW_SETDEBUG(rw, on)		((rw)-rw_owner |= (on) ? RW_DEBUG : 0)
+#define	RW_DEBUG_P(rw)			(((rw)-rw_owner  RW_DEBUG) != 0)
 #if defined(LOCKDEBUG)
-#define	RW_INHERITDEBUG(new, old)	(new) |= (old)  RW_NODEBUG
+#define	RW_INHERITDEBUG(new, old)	(new) |= (old)  RW_DEBUG
 #else /* defined(LOCKDEBUG) */
 #define	RW_INHERITDEBUG(new, old)	/* nothing */
 #endif /* defined(LOCKDEBUG) */
@@ -218,7 +218,7 @@
 rw_destroy(krwlock_t *rw)
 {
 
-	RW_ASSERT(rw, (rw-rw_owner  ~RW_NODEBUG) == 0);
+	RW_ASSERT(rw, (rw-rw_owner  ~RW_DEBUG) == 0);
 	LOCKDEBUG_FREE(RW_DEBUG_P(rw), rw);
 }
 

Index: src/sys/sys/mutex.h
diff -u src/sys/sys/mutex.h:1.18 src/sys/sys/mutex.h:1.19
--- src/sys/sys/mutex.h:1.18	Fri Feb  5 06:43:17 2010
+++ src/sys/sys/mutex.h	Sat Feb  6 04:50:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mutex.h,v 1.18 2010/02/05 06:43:17 skrll Exp $	*/
+/*	$NetBSD: mutex.h,v 1.19 2010/02/06 04:50:19 cube Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -160,7 +160,7 @@
 
 #define	

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

2010-02-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  6 04:55:01 UTC 2010

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

Log Message:
When choosing a msgbuf for a LP32 kernel, make sure it's mappable via KSEG0


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

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

Modified files:

Index: src/sys/arch/mips/mips/mips_machdep.c
diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.31 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.32
--- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.31	Mon Feb  1 06:52:59 2010
+++ src/sys/arch/mips/mips/mips_machdep.c	Sat Feb  6 04:55:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.31 2010/02/01 06:52:59 matt Exp $	*/
+/*	$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.32 2010/02/06 04:55:01 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.31 2010/02/01 06:52:59 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.32 2010/02/06 04:55:01 matt Exp $);
 
 #include opt_cputype.h
 #include opt_compat_netbsd32.h
@@ -1593,6 +1593,15 @@
 	struct vm_physseg *vps;
 
 	vps = vm_physmem[vm_nphysseg - 1];
+#ifndef _LP64
+	/*
+	 * Fist the physical segment that can be mapped to KSEG0
+	 */
+	for (; vps = vm_physmem; vps--) {
+		if (vps-avail_start + atop(sz) = atop(MIPS_PHYS_MASK))
+			break;
+	}
+#endif
 
 	/* shrink so that it'll fit in the last segment */
 	if ((vps-avail_end - vps-avail_start)  atop(sz))
@@ -1607,9 +1616,12 @@
 #endif
 	initmsgbuf(msgbufaddr, sz);
 
-	/* Remove the last segment if it now has no pages. */
-	if (vps-start == vps-end)
+	/* Remove the [last] segment if it now has no pages. */
+	if (vps-start == vps-end) {
+		for (; vps != vm_physmem[vm_nphysseg - 1]; vps++)
+			vps[0] = vps[1];
 		vm_nphysseg--;
+	}
 
 	/* warn if the message buffer had to be shrunk */
 	if (sz != reqsz)



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

2010-02-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  6 05:28:30 UTC 2010

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: vmparam.h
src/sys/uvm [matt-nb5-mips64]: uvm_km.c

Log Message:
Allow uvm_km_alloc to allocate from a specific vm freelist if the port wants
it to.


To generate a diff of this commit:
cvs rdiff -u -r1.41.28.10 -r1.41.28.11 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.101.4.2.4.2 -r1.101.4.2.4.3 src/sys/uvm/uvm_km.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/vmparam.h
diff -u src/sys/arch/mips/include/vmparam.h:1.41.28.10 src/sys/arch/mips/include/vmparam.h:1.41.28.11
--- src/sys/arch/mips/include/vmparam.h:1.41.28.10	Tue Jan 26 21:19:25 2010
+++ src/sys/arch/mips/include/vmparam.h	Sat Feb  6 05:28:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.41.28.10 2010/01/26 21:19:25 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.41.28.11 2010/02/06 05:28:30 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -261,4 +261,9 @@
 #define VM_FREELIST_MAX		1
 #endif
 
+#ifdef _KERNEL
+#define	UVM_KM_VMFREELIST	mips_poolpage_vmfreelist
+extern int mips_poolpage_vmfreelist;
+#endif
+
 #endif /* ! _MIPS_VMPARAM_H_ */

Index: src/sys/uvm/uvm_km.c
diff -u src/sys/uvm/uvm_km.c:1.101.4.2.4.2 src/sys/uvm/uvm_km.c:1.101.4.2.4.3
--- src/sys/uvm/uvm_km.c:1.101.4.2.4.2	Tue Jan 26 21:26:28 2010
+++ src/sys/uvm/uvm_km.c	Sat Feb  6 05:28:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_km.c,v 1.101.4.2.4.2 2010/01/26 21:26:28 matt Exp $	*/
+/*	$NetBSD: uvm_km.c,v 1.101.4.2.4.3 2010/02/06 05:28:30 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -128,7 +128,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.101.4.2.4.2 2010/01/26 21:26:28 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.101.4.2.4.3 2010/02/06 05:28:30 matt Exp $);
 
 #include opt_uvmhist.h
 
@@ -600,7 +600,13 @@
 	while (loopsize) {
 		KASSERT(!pmap_extract(pmap_kernel(), loopva, NULL));
 
-		pg = uvm_pagealloc(NULL, offset, NULL, pgaflags);
+		pg = uvm_pagealloc_strat(NULL, offset, NULL, pgaflags,
+#ifdef UVM_KM_VMFREELIST
+		   UVM_PGA_STRAT_ONLY, UVM_KM_VMFREELIST
+#else
+		   UVM_PGA_STRAT_NORMAL, 0
+#endif
+		   );
 
 		/*
 		 * out of memory?



CVS commit: [netbsd-5-0] src/doc

2010-02-05 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Feb  6 05:54:14 UTC 2010

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.2

Log Message:
Note notes.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.52 -r1.1.2.53 src/doc/CHANGES-5.0.2

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

Modified files:

Index: src/doc/CHANGES-5.0.2
diff -u src/doc/CHANGES-5.0.2:1.1.2.52 src/doc/CHANGES-5.0.2:1.1.2.53
--- src/doc/CHANGES-5.0.2:1.1.2.52	Thu Feb  4 19:50:20 2010
+++ src/doc/CHANGES-5.0.2	Sat Feb  6 05:54:13 2010
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.2,v 1.1.2.52 2010/02/04 19:50:20 snj Exp $
+# $NetBSD: CHANGES-5.0.2,v 1.1.2.53 2010/02/06 05:54:13 snj Exp $
 
 A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2
 release:
@@ -1158,3 +1158,8 @@
 	  overwrite soon.
 	[rmind, ticket #1288]
 
+distrib/notes/common/main			patch
+
+	Update for 5.0.2.
+	[snj]
+



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

2010-02-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  6 06:02:29 UTC 2010

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

Log Message:
Add some prelim poolpage debugging code.
Don't use ptoa to expand pfns to paddrs since it's cast with a vaddr_t.


To generate a diff of this commit:
cvs rdiff -u -r1.179.16.14 -r1.179.16.15 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.179.16.14 src/sys/arch/mips/mips/pmap.c:1.179.16.15
--- src/sys/arch/mips/mips/pmap.c:1.179.16.14	Tue Jan 26 22:49:58 2010
+++ src/sys/arch/mips/mips/pmap.c	Sat Feb  6 06:02:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.179.16.14 2010/01/26 22:49:58 snj Exp $	*/
+/*	$NetBSD: pmap.c,v 1.179.16.15 2010/02/06 06:02:29 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.14 2010/01/26 22:49:58 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.179.16.15 2010/02/06 06:02:29 matt Exp $);
 
 /*
  *	Manages physical address maps.
@@ -264,6 +264,15 @@
 pt_entry_t	*Sysmap;		/* kernel pte table */
 unsigned int	Sysmapsize;		/* number of pte's in Sysmap */
 
+#ifdef PMAP_POOLPAGE_DEBUG
+struct poolpage_info {
+	vaddr_t base;
+	vaddr_t size;
+	vaddr_t hint;
+	pt_entry_t *sysmap;
+} poolpage;
+#endif
+
 /*
  * The pools from which pmap structures and sub-structures are allocated.
  */
@@ -463,6 +472,10 @@
 #ifdef KSEG2IOBUFSIZE
 	Sysmapsize += (KSEG2IOBUFSIZE  PGSHIFT);
 #endif
+#ifdef PMAP_POOLPAGE_DEBUG
+	poolpage.size = nkmempages + MCLBYTES * nmbclusters;
+	Sysmapsize += poolpage.size;
+#endif
 	/* XXX: else runs out of space on 256MB sbmips!! */
 	Sysmapsize += 2;
 
@@ -472,8 +485,8 @@
 	 * for us.  Must do this before uvm_pageboot_alloc()
 	 * can be called.
 	 */
-	mips_avail_start = ptoa(vm_physmem[0].start);
-	mips_avail_end = ptoa(vm_physmem[vm_nphysseg - 1].end);
+	mips_avail_start = vm_physmem[0].start  PGSHIFT;
+	mips_avail_end = vm_physmem[vm_nphysseg - 1].end  PGSHIFT;
 	mips_virtual_end = VM_MIN_KERNEL_ADDRESS + Sysmapsize * NBPG;
 #ifndef _LP64
 	if (mips_virtual_end  VM_MAX_KERNEL_ADDRESS) {
@@ -490,6 +503,11 @@
 	Sysmap = (pt_entry_t *)
 	uvm_pageboot_alloc(sizeof(pt_entry_t) * Sysmapsize);
 
+#ifdef PMAP_POOLPAGE_DEBUG
+	mips_virtual_end -= poolpage.limit;
+	poolpage.base = mips_virtual_end;
+	poolpage.sysmap += Sysmap + atop(poolpage.size);
+#endif
 	/*
 	 * Initialize the pools.
 	 */
@@ -654,8 +672,10 @@
 	if (mips_avail_end  MIPS_KSEG1_START - MIPS_KSEG0_START) {
 		curcpu()-ci_pmap_dstbase = uvm_km_alloc(kernel_map,
 		uvmexp.ncolors * PAGE_SIZE, 0, UVM_KMF_VAONLY);
+		KASSERT(curcpu()-ci_pmap_dstbase);
 		curcpu()-ci_pmap_srcbase = uvm_km_alloc(kernel_map,
 		uvmexp.ncolors * PAGE_SIZE, 0, UVM_KMF_VAONLY);
+		KASSERT(curcpu()-ci_pmap_srcbase);
 	}
 #endif
 	
@@ -2178,6 +2198,35 @@
 {
 	vaddr_t va;
 
+	struct vm_page *pg = PHYS_TO_VM_PAGE(pa);
+	KASSERT(pg);
+	pmap_set_page_attributes(pg, PG_MD_POOLPAGE);
+
+#ifdef PMAP_POOLPAGE_DEBUG
+	KASSERT((poolpage.hint  MIPS_CACHE_ALIAS_MASK) == 0);
+	vaddr_t va_offset = poolpage.hint + mips_cache_indexof(pa);
+	pt_entry_t *pte = poolpage.sysmap + atop(va_offset);
+	const size_t va_inc = MIPS_CACHE_ALIAS_MASK + PAGE_SIZE;
+	const size_t pte_inc = atop(va_inc);
+
+	for (; va_offset  poolpage.size;
+	 va_offset += va_inc, pte += pte_inc) {
+		if (!mips_pg_v(pte-pt_entry))
+			break;
+	}
+	if (va_offset = poolpage.size) {
+		for (va_offset -= poolpage.size, pte -= atop(poolpage.size);
+		 va_offset  poolpage.hint;
+		 va_offset += va_inc, pte += pte_inc) {
+			if (!mips_pg_v(pte-pt_entry))
+break;
+		}
+	}
+	KASSERT(!mips_pg_v(pte-pt_entry));
+	va = poolpage.base + va_offset;
+	poolpage.hint = roundup2(va_offset + 1, va_inc);
+	pmap_kenter_pa(va, pa, VM_PROT_READ|VM_PORT_WRITE);
+#else
 #ifdef _LP64
 	KASSERT(mips_options.mips3_xkphys_cached);
 	va = MIPS_PHYS_TO_XKPHYS_CACHED(pa);
@@ -2188,10 +2237,8 @@
 
 	va = MIPS_PHYS_TO_KSEG0(pa);
 #endif
-	struct vm_page *pg = PHYS_TO_VM_PAGE(pa);
-	KASSERT(pg);
-	pmap_set_page_attributes(pg, PG_MD_POOLPAGE);
-#if defined(MIPS3_PLUS)
+#endif
+#if !defined(_LP64) || defined(PMAP_POOLPAGE_DEBUG)
 	if (MIPS_CACHE_VIRTUAL_ALIAS) {
 		/*
 		 * If this page was last mapped with an address that might
@@ -2211,8 +2258,10 @@
 mips_pmap_unmap_poolpage(vaddr_t va)
 {
 	paddr_t pa;
-
-#ifdef _LP64
+#ifdef PMAP_POOLPAGE_DEBUG
+	KASSERT(poolpage.start = va  va  poolpage.start + poolpage.size);
+	pa = mips_tlbpfn_to_paddr(kvtopte(va)-pt_entry);
+#elif defined(_LP64)
 	KASSERT(MIPS_XKPHYS_P(va));
 	pa = MIPS_XKPHYS_TO_PHYS(va);
 #else
@@ -2220,12 +2269,19 @@
 	pa = MIPS_KSEG0_TO_PHYS(va);
 #endif
 	struct vm_page *pg = PHYS_TO_VM_PAGE(pa);
+	KASSERT(pg);
 	pmap_clear_page_attributes(pg, 

CVS commit: src/lib/libterminfo

2010-02-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Feb  6 07:12:25 UTC 2010

Modified Files:
src/lib/libterminfo: terminfo.5.in

Log Message:
Sync with terminfo(5): Remove /etc/terminfo.db.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libterminfo/terminfo.5.in

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

Modified files:

Index: src/lib/libterminfo/terminfo.5.in
diff -u src/lib/libterminfo/terminfo.5.in:1.6 src/lib/libterminfo/terminfo.5.in:1.7
--- src/lib/libterminfo/terminfo.5.in:1.6	Fri Feb  5 09:42:21 2010
+++ src/lib/libterminfo/terminfo.5.in	Sat Feb  6 07:12:25 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: terminfo.5.in,v 1.6 2010/02/05 09:42:21 roy Exp $
+.\	$NetBSD: terminfo.5.in,v 1.7 2010/02/06 07:12:25 wiz Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -205,18 +205,14 @@
 .Pa $HOME/.terminfo.db ,
 followed by
 .Pa /usr/share/misc/terminfo.db ,
-followed by
-.Pa /rescue/terminfo.db
 and
-.Pa /etc/terminfo.db .
+.Pa /rescue/terminfo.db .
 .Sh FILES
 .Bl -tag -width /usr/share/misc/terminfo.db -compact
 .It Pa $HOME/.terminfo.db
 Database of terminal descriptions for personal use.
-.It Pa /etc/terminfo.db
-Database of terminal descriptions for use during boot or single user.
 .It Pa /rescue/terminfo.db
-Database of terminal descriptions for use when rescuing the system.
+Small database of terminal descriptions for use when rescuing the system.
 .It Pa /usr/share/misc/terminfo
 File containing terminal descriptions.
 .It Pa /usr/share/misc/terminfo.db