CVS commit: src/share/mk

2009-12-11 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 11 08:52:37 UTC 2009

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
${GENCMD}:
Prefix tmp directories as /tmp/_gencmd.XX to give users a clue when it's
left accidentally.


To generate a diff of this commit:
cvs rdiff -u -r1.604 -r1.605 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.604 src/share/mk/bsd.own.mk:1.605
--- src/share/mk/bsd.own.mk:1.604	Fri Dec 11 08:37:34 2009
+++ src/share/mk/bsd.own.mk	Fri Dec 11 08:52:37 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.604 2009/12/11 08:37:34 uebayasi Exp $
+#	$NetBSD: bsd.own.mk,v 1.605 2009/12/11 08:52:37 uebayasi Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -987,7 +987,7 @@
 GENCMD=\
 	@_gencmd() { \
 		local _dst=$$1; shift; local _src=$$1; shift; local _gen=$$1; shift; \
-		local _tmp=$$( ${TOOL_MKTEMP} -d /tmp/XX ); \
+		local _tmp=$$( ${TOOL_MKTEMP} -d /tmp/_gencmd.XX ); \
 		local _opwd=$$PWD; \
 		local _exit; \
 		cp $$_src $$_tmp; \



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2009-12-11 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Fri Dec 11 09:04:04 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: Makefile.am

Log Message:
From Paul Wernau: vmbuf.h was defined twice in the headers. Remove the
redundant entry so new install tool does not complain about overwriting
just installed file.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/crypto/dist/ipsec-tools/src/racoon/Makefile.am

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/Makefile.am
diff -u src/crypto/dist/ipsec-tools/src/racoon/Makefile.am:1.8 src/crypto/dist/ipsec-tools/src/racoon/Makefile.am:1.9
--- src/crypto/dist/ipsec-tools/src/racoon/Makefile.am:1.8	Wed Jul 23 13:53:08 2008
+++ src/crypto/dist/ipsec-tools/src/racoon/Makefile.am	Fri Dec 11 09:04:04 2009
@@ -3,7 +3,7 @@
 sbin_PROGRAMS = racoon racoonctl plainrsa-gen
 noinst_PROGRAMS = eaytest
 include_racoon_HEADERS = racoonctl.h var.h vmbuf.h misc.h gcmalloc.h admin.h \
-	schedule.h sockmisc.h vmbuf.h isakmp_var.h isakmp.h isakmp_xauth.h \
+	schedule.h sockmisc.h isakmp_var.h isakmp.h isakmp_xauth.h \
 	isakmp_cfg.h isakmp_unity.h ipsec_doi.h evt.h
 lib_LTLIBRARIES = libracoon.la
 



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

2009-12-11 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri Dec 11 09:37:10 UTC 2009

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

Log Message:
Pull up the following revisions(s) (requested by tron in ticket #1191):
sbin/raidctl/raidctl.c: revision 1.43

Slight change to the wording of the parity map info: the parity is
marked clean after however much inactivity; it is *actually* clean
as soon as the component disks all do their thing (on the order of ms,
usually), just the same as before.


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

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

Modified files:

Index: src/sbin/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.39.4.2 src/sbin/raidctl/raidctl.c:1.39.4.3
--- src/sbin/raidctl/raidctl.c:1.39.4.2	Thu Dec 10 22:59:16 2009
+++ src/sbin/raidctl/raidctl.c	Fri Dec 11 09:37:09 2009
@@ -1,4 +1,4 @@
-/*  $NetBSD: raidctl.c,v 1.39.4.2 2009/12/10 22:59:16 snj Exp $   */
+/*  $NetBSD: raidctl.c,v 1.39.4.3 2009/12/11 09:37:09 sborrill Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: raidctl.c,v 1.39.4.2 2009/12/10 22:59:16 snj Exp $);
+__RCSID($NetBSD: raidctl.c,v 1.39.4.3 2009/12/11 09:37:09 sborrill Exp $);
 #endif
 
 
@@ -498,7 +498,7 @@
 
 		printf(raid%d: parity map enabled with %u regions of %s\n,
 		raidID, st.params.regions, srs);
-		printf(raid%d: parity cleaned after %d intervals of
+		printf(raid%d: regions marked clean after %d intervals of
 		 %d.%03ds\n, raidID, st.params.cooldown,
 		st.params.tickms / 1000, st.params.tickms % 1000);
 		printf(raid%d: write/sync/clean counters 



CVS commit: src/distrib/sets

2009-12-11 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 11 11:48:41 UTC 2009

Modified Files:
src/distrib/sets: checkflist

Log Message:
Put intermediate lists on the top of ${DESTDIR} (${DESTDIR}/SETS.*) and leave
them.  Teach list generators to ignore them.  Always generate metalog
missing/extra lists too, but don't check it (for now).  I'll change flist
to be generated only when set lists have changed.

No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/distrib/sets/checkflist

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/checkflist
diff -u src/distrib/sets/checkflist:1.41 src/distrib/sets/checkflist:1.42
--- src/distrib/sets/checkflist:1.41	Thu Dec 10 17:18:33 2009
+++ src/distrib/sets/checkflist	Fri Dec 11 11:48:41 2009
@@ -1,6 +1,6 @@
 #! /bin/sh --
 #
-#	$NetBSD: checkflist,v 1.41 2009/12/10 17:18:33 uebayasi Exp $
+#	$NetBSD: checkflist,v 1.42 2009/12/11 11:48:41 uebayasi Exp $
 #
 # Verify output of makeflist against contents of ${DESTDIR} and ${metalog}.
 
@@ -13,12 +13,29 @@
 rundir=$(dirname $0) # ${0%/*} isn't good enough when there's no /
 . ${rundir}/sets.subr
 
-SDIR=$(${MKTEMP} -d /tmp/${prog}.XX)
+#
+# * ${SETS_DLIST}: files present in DESTDIR.
+# * ${SETS_FLIST}: files mentioned in flist;
+# * ${SETS_MLIST}: files mentioned in metalog;
+#
+SETS_DLIST=${DESTDIR}/SETS.dlist
+SETS_FLIST=${DESTDIR}/SETS.flist
+SETS_MLIST=${DESTDIR}/SETS.mlist
+
+#
+# * ${SETS_METALOG_EXTRA}: Files in METALOG but missing from DESTDIR.
+# * ${SETS_METALOG_MISSING}: Files in DESTDIR but missing from METALOG.
+# * ${SETS_DESTDIR_EXTRA}: Files in DESTDIR but missing from setlist.
+# * ${SETS_DESTDIR_MISSING}: Files in setlist but missing from DESTDIR.
+#
+SETS_METALOG_EXTRA=${DESTDIR}/SETS.metalog.extra
+SETS_METALOG_MISSING=${DESTDIR}/SETS.metalog.missing
+SETS_DESTDIR_EXTRA=${DESTDIR}/SETS.destdir.extra
+SETS_DESTDIR_MISSING=${DESTDIR}/SETS.destdir.missing
 
 es=0
 cleanup()
 {
-	/bin/rm -rf ${SDIR}
 	if [ ${es} -gt 255 ]; then
 		es=255
 	fi
@@ -88,11 +105,13 @@
 {
 IGNORE_REGEXP_SYSPKG=^\./var/db/syspkg(\$|/)
 IGNORE_REGEXP_METALOG=^\./METALOG(\..*)?\$
+IGNORE_REGEXP_SETS=^\./SETS\..*\$
 IGNORE_REGEXP_MTREE=^\./etc/mtree/set\.[a-z]*\$
 
 	${EGREP} -v \
 		-e ${IGNORE_REGEXP_SYSPKG} \
 		-e ${IGNORE_REGEXP_METALOG} \
+		-e ${IGNORE_REGEXP_SETS} \
 		-e ${IGNORE_REGEXP_MTREE}
 }
 
@@ -102,52 +121,49 @@
 
 #
 # Make three lists:
-# * ${SDIR}/files: files present in DESTDIR.
-# * ${SDIR}/flist: files mentioned in flist;
-# * ${SDIR}/mlist: files mentioned in metalog;
 #
 # All three lists are filtered against ${IGNORE_REGEXP}.
 #
 
-generate_files()
+generate_dlist()
 {
 ( cd ${DESTDIR}  ${FIND} ${origin} \
 	\( -type d -o -type f -o -type l \) -print ) \
-	| ${SORT} -u | ignore_exceptions ${SDIR}/files
+	| ${SORT} -u | ignore_exceptions ${SETS_DLIST}
 }
 
 generate_flist()
 {
 ${HOST_SH} ${rundir}/makeflist ${xargs} ${dargs} \
-	| ${SORT} -u | ignore_exceptions ${SDIR}/flist
+	| ${SORT} -u | ignore_exceptions ${SETS_FLIST}
 }
 
 generate_mlist()
 {
 if [ -n ${metalog} ]; then
 	${AWK} '{print $1}' ${metalog} \
-	| ${SORT} -u | ignore_exceptions ${SDIR}/mlist
+	| ${SORT} -u | ignore_exceptions ${SETS_MLIST}
 fi
 }
 
 generate_mlist_missing()
 {
-	${COMM} -23 ${SDIR}/files ${SDIR}/mlist  ${SDIR}/missing
+	${COMM} -23 ${SETS_DLIST} ${SETS_MLIST}  ${SETS_METALOG_MISSING}
 }
 
 generate_mlist_extra()
 {
-	${COMM} -13 ${SDIR}/files ${SDIR}/mlist  ${SDIR}/extra
+	${COMM} -13 ${SETS_DLIST} ${SETS_MLIST}  ${SETS_METALOG_EXTRA}
 }
 
-generate_files_missing()
+generate_dlist_missing()
 {
-	${COMM} -23 ${SDIR}/flist ${SDIR}/files  ${SDIR}/missing
+	${COMM} -23 ${SETS_FLIST} ${SETS_DLIST}  ${SETS_DESTDIR_MISSING}
 }
 
-generate_files_extra()
+generate_dlist_extra()
 {
-	${COMM} -13 ${SDIR}/flist ${SDIR}/files  ${SDIR}/extra
+	${COMM} -13 ${SETS_FLIST} ${SETS_DLIST}  ${SETS_DESTDIR_EXTRA}
 }
 
 exist_case_insensitive()
@@ -166,8 +182,9 @@
 compare_metalog()
 {
 # Handle case insensitive filesystems
-mv -f ${SDIR}/extra ${SDIR}/extra.all
-exist_case_insensitive  ${SDIR}/extra.all  ${SDIR}/extra
+mv -f ${SETS_METALOG_EXTRA} ${SETS_METALOG_EXTRA}.all
+exist_case_insensitive  ${SETS_METALOG_EXTRA}.all  ${SETS_METALOG_EXTRA}
+rm -f ${SETS_METALOG_EXTRA}.all
 
 check_metalog_extra
 check_metalog_missing
@@ -175,14 +192,14 @@
 
 check_metalog_extra()
 {
-if [ -s ${SDIR}/extra ]; then
-	count=$(${AWK} 'END {print NR}' ${SDIR}/extra)
+if [ -s ${SETS_METALOG_EXTRA} ]; then
+	count=$(${AWK} 'END {print NR}' ${SETS_METALOG_EXTRA})
 	echo 
 	echo ===  ${count} extra files in METALOG  =
 	echo Files in METALOG but missing from DESTDIR.
 	echo File was deleted after installation ?
 	echo --
-	cat ${SDIR}/extra
+	cat ${SETS_METALOG_EXTRA}
 	echo =  end of ${count} extra 

CVS commit: src/distrib/sets

2009-12-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Dec 11 12:07:58 UTC 2009

Modified Files:
src/distrib/sets: sets.subr

Log Message:
Prefix mkvars.mk with ${rundir}/, so that the scripts from this
dir using sets.subr can be run from another directory, as is done
e.g. during make release via the mksums script.

OK'ed by uebayasi@


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/distrib/sets/sets.subr

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.108 src/distrib/sets/sets.subr:1.109
--- src/distrib/sets/sets.subr:1.108	Thu Dec 10 15:51:24 2009
+++ src/distrib/sets/sets.subr	Fri Dec 11 12:07:58 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.108 2009/12/10 15:51:24 uebayasi Exp $
+#	$NetBSD: sets.subr,v 1.109 2009/12/11 12:07:58 he Exp $
 #
 
 #
@@ -118,13 +118,13 @@
 IFS=
 
 
-for x in $( ${MAKE} -B -f mkvars.mk mkvars ); do
+for x in $( ${MAKE} -B -f ${rundir}/mkvars.mk mkvars ); do
 	eval export $x
 done
 
 IFS=$oIFS
 
-MKVARS=$( ${MAKE} -B -f mkvars.mk mkvars | sed -e 's,=.*,,' | xargs )
+MKVARS=$( ${MAKE} -B -f ${rundir}/mkvars.mk mkvars | sed -e 's,=.*,,' | xargs )
 
 if [ $SETS_SUBR_DEBUG = dumpmkvars ]; then
 	for v in $MKVARS; do
@@ -178,7 +178,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.108 2009/12/10 15:51:24 uebayasi Exp $
+# 	# $NetBSD: sets.subr,v 1.109 2009/12/11 12:07:58 he Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root



CVS commit: src/distrib/sets

2009-12-11 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 11 12:57:39 UTC 2009

Modified Files:
src/distrib/sets: sets.subr

Log Message:
Replace many if [ -f $x ]; then echo $x; fi instances with function.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/distrib/sets/sets.subr

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.109 src/distrib/sets/sets.subr:1.110
--- src/distrib/sets/sets.subr:1.109	Fri Dec 11 12:07:58 2009
+++ src/distrib/sets/sets.subr	Fri Dec 11 12:57:39 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.109 2009/12/11 12:07:58 he Exp $
+#	$NetBSD: sets.subr,v 1.110 2009/12/11 12:57:39 uebayasi Exp $
 #
 
 #
@@ -178,7 +178,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.109 2009/12/11 12:07:58 he Exp $
+# 	# $NetBSD: sets.subr,v 1.110 2009/12/11 12:57:39 uebayasi Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -386,98 +386,73 @@
 	setname=$1
 
 	setdir=$setsdir/lists/$setname
+
 	echo $setdir/mi
-	for _extsrc_pkg in ${EXTSRCS}; do
-		if [ -f $setdir/mi.ext.${_extsrc_pkg} ]; then
-			echo $setdir/mi.ext.${_extsrc_pkg}
-		fi
-	done
+
 	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
 		# Prefer an ad.${MACHINE_ARCH} over an ad.${MACHINE_CPU},
 		# since the arch-specific one will be more specific than
 		# the cpu-specific one.
-		if [ -f $setdir/ad.${MACHINE_ARCH} ]; then
-			echo $setdir/ad.${MACHINE_ARCH}
-		elif [ -f $setdir/ad.${MACHINE_CPU} ]; then
-			echo $setdir/ad.${MACHINE_CPU}
+		echo_if_exist $setdir/ad.${MACHINE_ARCH} || \
+		echo_if_exist $setdir/ad.${MACHINE_CPU}
+		if [ $shlib != no ]; then
+			echo_if_exist $setdir/ad.${MACHINE_CPU}.shl
 		fi
-		if [ $shlib != no -a \
-		 -f $setdir/ad.${MACHINE_CPU}.shl ]; then
-			echo $setdir/ad.${MACHINE_CPU}.shl
-		fi
-	fi
-	if [ -f $setdir/md.${MACHINE}.${MACHINE_ARCH} ]; then
-		echo $setdir/md.${MACHINE}.${MACHINE_ARCH}
-	elif [ -f $setdir/md.${MACHINE} ]; then
-		echo $setdir/md.${MACHINE}
-	fi
-	if [ -f $setdir/stl.mi ]; then
-		echo $setdir/stl.mi
-	fi
-	if [ -f $setdir/stl.${stlib} ]; then
-		echo $setdir/stl.${stlib}
 	fi
+
+	echo_if_exist $setdir/md.${MACHINE}.${MACHINE_ARCH} || \
+	echo_if_exist $setdir/md.${MACHINE}
+
+	echo_if_exist $setdir/stl.mi
+	echo_if_exist $setdir/stl.${stlib}
+
 	if [ $shlib != no ]; then
-		if [ -f $setdir/shl.mi ]; then
-			echo $setdir/shl.mi
-		fi
-		for _extsrc_pkg in ${EXTSRCS}; do
-			if [ -f $setdir/shl.mi.ext.${_extsrc_pkg} ]; then
-echo $setdir/shl.mi.ext.${_extsrc_pkg}
-			fi
-		done
-		if [ -f $setdir/shl.${shlib} ]; then
-			echo $setdir/shl.${shlib}
-		fi
-		for _extsrc_pkg in ${EXTSRCS}; do
-			if [ -f $setdir/shl.${shlib}.ext.${_extsrc_pkg} ]; then
-echo $setdir/shl.${shlib}.ext.${_extsrc_pkg}
-			fi
-		done
+		echo_if_exist $setdir/shl.mi
+		echo_if_exist $setdir/shl.${shlib}
 	fi
+
 	if [ $module != no ]; then
-		if [ -f $setdir/module.mi ]; then
-			echo $setdir/module.mi
-		fi
-		if [ -f $setdir/module.${MACHINE} ]; then
-			echo $setdir/module.${MACHINE}
-		fi
+		echo_if_exist $setdir/module.mi
+		echo_if_exist $setdir/module.${MACHINE}
 		if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
 			# Prefer a module.ad.${MACHINE_ARCH} over a
 			# module.ad.${MACHINE_CPU}, since the arch-
 			# specific one will be more specific than the
 			# cpu-specific one.
-			if [ -f $setdir/module.ad.${MACHINE_ARCH} ]; then
-echo $setdir/module.ad.${MACHINE_ARCH}
-			elif [ -f $setdir/module.ad.${MACHINE_CPU} ]; then
-echo $setdir/module.ad.${MACHINE_CPU}
-			fi
+			echo_if_exist $setdir/module.ad.${MACHINE_ARCH} || \
+			echo_if_exist $setdir/module.ad.${MACHINE_CPU}
 		fi
 	fi
 
-	if [ -f $setdir/rescue.mi ]; then
-		echo $setdir/rescue.mi
-	fi
-	if [ -f $setdir/rescue.${MACHINE} ]; then
-		echo $setdir/rescue.${MACHINE}
-	fi
+	echo_if_exist $setdir/rescue.mi
+	echo_if_exist $setdir/rescue.${MACHINE}
 	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
 		# Prefer a rescue.ad.${MACHINE_ARCH} over a
 		# rescue.ad.${MACHINE_CPU}, since the arch-
 		# specific one will be more specific than the
 		# cpu-specific one.
-		if [ -f $setdir/rescue.ad.${MACHINE_ARCH} ]; then
-			echo $setdir/rescue.ad.${MACHINE_ARCH}
-		elif [ -f $setdir/rescue.ad.${MACHINE_CPU} ]; then
-			echo $setdir/rescue.ad.${MACHINE_CPU}
-		fi
-		if [ $shlib != no -a \
-		 -f $setdir/rescue.ad.${MACHINE_CPU}.shl ]; then
-			echo $setdir/rescue.ad.${MACHINE_CPU}.shl
+		echo_if_exist $setdir/rescue.ad.${MACHINE_ARCH} || \
+		echo_if_exist $setdir/rescue.ad.${MACHINE_CPU}
+		if [ $shlib != no ]; then
+			echo_if_exist $setdir/rescue.ad.${MACHINE_CPU}.shl
 		fi
 	fi
 }
 
+echo_if_exist()
+{
+	[ -f $1 ]  echo $1
+	return $?
+}
+
+echo_if_exist_foreach()
+{
+	local _list=$1; shift
+	for _suffix 

CVS commit: src/distrib/sets

2009-12-11 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 11 13:10:07 UTC 2009

Modified Files:
src/distrib/sets: sets.subr

Log Message:
Refactor list_set_lists using more functions.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/distrib/sets/sets.subr

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.110 src/distrib/sets/sets.subr:1.111
--- src/distrib/sets/sets.subr:1.110	Fri Dec 11 12:57:39 2009
+++ src/distrib/sets/sets.subr	Fri Dec 11 13:10:06 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.110 2009/12/11 12:57:39 uebayasi Exp $
+#	$NetBSD: sets.subr,v 1.111 2009/12/11 13:10:06 uebayasi Exp $
 #
 
 #
@@ -178,7 +178,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.110 2009/12/11 12:57:39 uebayasi Exp $
+# 	# $NetBSD: sets.subr,v 1.111 2009/12/11 13:10:06 uebayasi Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -385,11 +385,33 @@
 {
 	setname=$1
 
-	setdir=$setsdir/lists/$setname
+	list_set_lists_mi $setname
+	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
+		list_set_lists_ad $setname
+	fi
+	list_set_lists_md $setname
+	list_set_lists_stl $setname
+	if [ $shlib != no ]; then
+		list_set_lists_shl $setname
+	fi
+	if [ $module != no ]; then
+		list_set_lists_module $setname
+	fi
+	list_set_lists_rescue $setname
+	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
+		list_set_lists_rescue_ad $setname
+	fi
+}
 
+list_set_lists_mi()
+{
+	setdir=$setsdir/lists/$1
 	echo $setdir/mi
+}
 
-	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
+list_set_lists_ad()
+{
+	setdir=$setsdir/lists/$1
 		# Prefer an ad.${MACHINE_ARCH} over an ad.${MACHINE_CPU},
 		# since the arch-specific one will be more specific than
 		# the cpu-specific one.
@@ -398,20 +420,32 @@
 		if [ $shlib != no ]; then
 			echo_if_exist $setdir/ad.${MACHINE_CPU}.shl
 		fi
-	fi
+}
 
+list_set_lists_md()
+{
+	setdir=$setsdir/lists/$1
 	echo_if_exist $setdir/md.${MACHINE}.${MACHINE_ARCH} || \
 	echo_if_exist $setdir/md.${MACHINE}
+}
 
+list_set_lists_stl()
+{
+	setdir=$setsdir/lists/$1
 	echo_if_exist $setdir/stl.mi
 	echo_if_exist $setdir/stl.${stlib}
+}
 
-	if [ $shlib != no ]; then
+list_set_lists_shl()
+{
+	setdir=$setsdir/lists/$1
 		echo_if_exist $setdir/shl.mi
 		echo_if_exist $setdir/shl.${shlib}
-	fi
+}
 
-	if [ $module != no ]; then
+list_set_lists_module()
+{
+	setdir=$setsdir/lists/$1
 		echo_if_exist $setdir/module.mi
 		echo_if_exist $setdir/module.${MACHINE}
 		if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
@@ -422,11 +456,18 @@
 			echo_if_exist $setdir/module.ad.${MACHINE_ARCH} || \
 			echo_if_exist $setdir/module.ad.${MACHINE_CPU}
 		fi
-	fi
+}
 
+list_set_lists_rescue()
+{
+	setdir=$setsdir/lists/$1
 	echo_if_exist $setdir/rescue.mi
 	echo_if_exist $setdir/rescue.${MACHINE}
-	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
+}
+
+list_set_lists_rescue_ad()
+{
+	setdir=$setsdir/lists/$1
 		# Prefer a rescue.ad.${MACHINE_ARCH} over a
 		# rescue.ad.${MACHINE_CPU}, since the arch-
 		# specific one will be more specific than the
@@ -436,7 +477,6 @@
 		if [ $shlib != no ]; then
 			echo_if_exist $setdir/rescue.ad.${MACHINE_CPU}.shl
 		fi
-	fi
 }
 
 echo_if_exist()



CVS commit: src/distrib/sets

2009-12-11 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 11 13:10:47 UTC 2009

Modified Files:
src/distrib/sets: sets.subr

Log Message:
Indent.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/distrib/sets/sets.subr

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.111 src/distrib/sets/sets.subr:1.112
--- src/distrib/sets/sets.subr:1.111	Fri Dec 11 13:10:06 2009
+++ src/distrib/sets/sets.subr	Fri Dec 11 13:10:47 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.111 2009/12/11 13:10:06 uebayasi Exp $
+#	$NetBSD: sets.subr,v 1.112 2009/12/11 13:10:47 uebayasi Exp $
 #
 
 #
@@ -178,7 +178,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.111 2009/12/11 13:10:06 uebayasi Exp $
+# 	# $NetBSD: sets.subr,v 1.112 2009/12/11 13:10:47 uebayasi Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -412,14 +412,14 @@
 list_set_lists_ad()
 {
 	setdir=$setsdir/lists/$1
-		# Prefer an ad.${MACHINE_ARCH} over an ad.${MACHINE_CPU},
-		# since the arch-specific one will be more specific than
-		# the cpu-specific one.
-		echo_if_exist $setdir/ad.${MACHINE_ARCH} || \
-		echo_if_exist $setdir/ad.${MACHINE_CPU}
-		if [ $shlib != no ]; then
-			echo_if_exist $setdir/ad.${MACHINE_CPU}.shl
-		fi
+	# Prefer an ad.${MACHINE_ARCH} over an ad.${MACHINE_CPU},
+	# since the arch-specific one will be more specific than
+	# the cpu-specific one.
+	echo_if_exist $setdir/ad.${MACHINE_ARCH} || \
+	echo_if_exist $setdir/ad.${MACHINE_CPU}
+	if [ $shlib != no ]; then
+		echo_if_exist $setdir/ad.${MACHINE_CPU}.shl
+	fi
 }
 
 list_set_lists_md()
@@ -439,23 +439,23 @@
 list_set_lists_shl()
 {
 	setdir=$setsdir/lists/$1
-		echo_if_exist $setdir/shl.mi
-		echo_if_exist $setdir/shl.${shlib}
+	echo_if_exist $setdir/shl.mi
+	echo_if_exist $setdir/shl.${shlib}
 }
 
 list_set_lists_module()
 {
 	setdir=$setsdir/lists/$1
-		echo_if_exist $setdir/module.mi
-		echo_if_exist $setdir/module.${MACHINE}
-		if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
-			# Prefer a module.ad.${MACHINE_ARCH} over a
-			# module.ad.${MACHINE_CPU}, since the arch-
-			# specific one will be more specific than the
-			# cpu-specific one.
-			echo_if_exist $setdir/module.ad.${MACHINE_ARCH} || \
-			echo_if_exist $setdir/module.ad.${MACHINE_CPU}
-		fi
+	echo_if_exist $setdir/module.mi
+	echo_if_exist $setdir/module.${MACHINE}
+	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
+		# Prefer a module.ad.${MACHINE_ARCH} over a
+		# module.ad.${MACHINE_CPU}, since the arch-
+		# specific one will be more specific than the
+		# cpu-specific one.
+		echo_if_exist $setdir/module.ad.${MACHINE_ARCH} || \
+		echo_if_exist $setdir/module.ad.${MACHINE_CPU}
+	fi
 }
 
 list_set_lists_rescue()
@@ -468,15 +468,15 @@
 list_set_lists_rescue_ad()
 {
 	setdir=$setsdir/lists/$1
-		# Prefer a rescue.ad.${MACHINE_ARCH} over a
-		# rescue.ad.${MACHINE_CPU}, since the arch-
-		# specific one will be more specific than the
-		# cpu-specific one.
-		echo_if_exist $setdir/rescue.ad.${MACHINE_ARCH} || \
-		echo_if_exist $setdir/rescue.ad.${MACHINE_CPU}
-		if [ $shlib != no ]; then
-			echo_if_exist $setdir/rescue.ad.${MACHINE_CPU}.shl
-		fi
+	# Prefer a rescue.ad.${MACHINE_ARCH} over a
+	# rescue.ad.${MACHINE_CPU}, since the arch-
+	# specific one will be more specific than the
+	# cpu-specific one.
+	echo_if_exist $setdir/rescue.ad.${MACHINE_ARCH} || \
+	echo_if_exist $setdir/rescue.ad.${MACHINE_CPU}
+	if [ $shlib != no ]; then
+		echo_if_exist $setdir/rescue.ad.${MACHINE_CPU}.shl
+	fi
 }
 
 echo_if_exist()



CVS commit: src/distrib/sets

2009-12-11 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 11 13:30:11 UTC 2009

Modified Files:
src/distrib/sets: sets.subr

Log Message:
list_set_lists() - Share code of handling *.ad.* set lists.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/distrib/sets/sets.subr

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.112 src/distrib/sets/sets.subr:1.113
--- src/distrib/sets/sets.subr:1.112	Fri Dec 11 13:10:47 2009
+++ src/distrib/sets/sets.subr	Fri Dec 11 13:30:11 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.112 2009/12/11 13:10:47 uebayasi Exp $
+#	$NetBSD: sets.subr,v 1.113 2009/12/11 13:30:11 uebayasi Exp $
 #
 
 #
@@ -178,7 +178,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.112 2009/12/11 13:10:47 uebayasi Exp $
+# 	# $NetBSD: sets.subr,v 1.113 2009/12/11 13:30:11 uebayasi Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -386,40 +386,26 @@
 	setname=$1
 
 	list_set_lists_mi $setname
-	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
-		list_set_lists_ad $setname
-	fi
+	list_set_lists_ad $setname
 	list_set_lists_md $setname
 	list_set_lists_stl $setname
-	if [ $shlib != no ]; then
-		list_set_lists_shl $setname
-	fi
-	if [ $module != no ]; then
-		list_set_lists_module $setname
-	fi
+	list_set_lists_shl $setname
+	list_set_lists_module $setname
 	list_set_lists_rescue $setname
-	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
-		list_set_lists_rescue_ad $setname
-	fi
 }
 
 list_set_lists_mi()
 {
 	setdir=$setsdir/lists/$1
+	# always exist!
 	echo $setdir/mi
 }
 
 list_set_lists_ad()
 {
 	setdir=$setsdir/lists/$1
-	# Prefer an ad.${MACHINE_ARCH} over an ad.${MACHINE_CPU},
-	# since the arch-specific one will be more specific than
-	# the cpu-specific one.
-	echo_if_exist $setdir/ad.${MACHINE_ARCH} || \
-	echo_if_exist $setdir/ad.${MACHINE_CPU}
-	if [ $shlib != no ]; then
-		echo_if_exist $setdir/ad.${MACHINE_CPU}.shl
-	fi
+	[ ${MACHINE} != ${MACHINE_ARCH} ]  \
+	list_set_lists_common_ad $1
 }
 
 list_set_lists_md()
@@ -439,6 +425,7 @@
 list_set_lists_shl()
 {
 	setdir=$setsdir/lists/$1
+	[ $shlib != no ] || return
 	echo_if_exist $setdir/shl.mi
 	echo_if_exist $setdir/shl.${shlib}
 }
@@ -446,16 +433,12 @@
 list_set_lists_module()
 {
 	setdir=$setsdir/lists/$1
+	[ $module != no ] || return
 	echo_if_exist $setdir/module.mi
 	echo_if_exist $setdir/module.${MACHINE}
-	if [ ${MACHINE} != ${MACHINE_ARCH} ]; then
-		# Prefer a module.ad.${MACHINE_ARCH} over a
-		# module.ad.${MACHINE_CPU}, since the arch-
-		# specific one will be more specific than the
-		# cpu-specific one.
-		echo_if_exist $setdir/module.ad.${MACHINE_ARCH} || \
-		echo_if_exist $setdir/module.ad.${MACHINE_CPU}
-	fi
+	# XXX module never has .shl
+	[ ${MACHINE} != ${MACHINE_ARCH} ]  \
+	list_set_lists_common_ad $1 module
 }
 
 list_set_lists_rescue()
@@ -463,20 +446,24 @@
 	setdir=$setsdir/lists/$1
 	echo_if_exist $setdir/rescue.mi
 	echo_if_exist $setdir/rescue.${MACHINE}
+	[ ${MACHINE} != ${MACHINE_ARCH} ]  \
+	list_set_lists_common_ad $1 rescue
 }
 
-list_set_lists_rescue_ad()
+list_set_lists_common_ad()
 {
-	setdir=$setsdir/lists/$1
-	# Prefer a rescue.ad.${MACHINE_ARCH} over a
-	# rescue.ad.${MACHINE_CPU}, since the arch-
+	setdir=$setsdir/lists/$1; _prefix=$2
+
+	[ -n $_prefix ]  prefix=$_prefix.
+
+	# Prefer a prefix.ad.${MACHINE_ARCH} over a
+	# prefix.ad.${MACHINE_CPU}, since the arch-
 	# specific one will be more specific than the
 	# cpu-specific one.
-	echo_if_exist $setdir/rescue.ad.${MACHINE_ARCH} || \
-	echo_if_exist $setdir/rescue.ad.${MACHINE_CPU}
-	if [ $shlib != no ]; then
-		echo_if_exist $setdir/rescue.ad.${MACHINE_CPU}.shl
-	fi
+	echo_if_exist $setdir/${prefix}ad.${MACHINE_ARCH} || \
+	echo_if_exist $setdir/${prefix}ad.${MACHINE_CPU}
+	[ $shlib != no ]  \
+	echo_if_exist $setdir/${prefix}ad.${MACHINE_CPU}.shl
 }
 
 echo_if_exist()



CVS commit: src/sys/arch/sun3

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 13:52:58 UTC 2009

Modified Files:
src/sys/arch/sun3/include: param3.h param3x.h pmap3.h pmap3x.h
src/sys/arch/sun3/sun3: dvma.c pmap.c

Log Message:
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from machine/param.h
  to machine/pmap.h where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun3 pmap sources
  and instead define and use sun3_round_seg() and sun3_trunc_seg()
  since they are quite pmap implementation dependent


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/sun3/include/param3.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sun3/include/param3x.h
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sun3/include/pmap3.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sun3/include/pmap3x.h
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sun3/sun3/dvma.c
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/sun3/sun3/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/sun3/include/param3.h
diff -u src/sys/arch/sun3/include/param3.h:1.51 src/sys/arch/sun3/include/param3.h:1.52
--- src/sys/arch/sun3/include/param3.h:1.51	Sun Dec 11 12:19:21 2005
+++ src/sys/arch/sun3/include/param3.h	Fri Dec 11 13:52:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param3.h,v 1.51 2005/12/11 12:19:21 christos Exp $	*/
+/*	$NetBSD: param3.h,v 1.52 2009/12/11 13:52:57 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -82,9 +82,5 @@
 #define	KERNTEXTOFF	0x0E004000	/* start of kernel text */
 #define	KERN_END	0x0FE0	/* end of kernel virtual */
 
-#define SEGSHIFT	17	/* LOG2(NBSG) */
-#define NBSG		(1  SEGSHIFT)	/* bytes/segment */
-#define	SEGOFSET	(NBSG-1)	/* byte offset into segment */
-
 #define	MAXBSIZE	0x8000		/* max FS block size */
 #define	MAXPHYS		0xe000

Index: src/sys/arch/sun3/include/param3x.h
diff -u src/sys/arch/sun3/include/param3x.h:1.14 src/sys/arch/sun3/include/param3x.h:1.15
--- src/sys/arch/sun3/include/param3x.h:1.14	Sun Dec 11 12:19:21 2005
+++ src/sys/arch/sun3/include/param3x.h	Fri Dec 11 13:52:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param3x.h,v 1.14 2005/12/11 12:19:21 christos Exp $	*/
+/*	$NetBSD: param3x.h,v 1.15 2009/12/11 13:52:57 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -82,9 +82,5 @@
 #define	KERNTEXTOFF	0xF8004000	/* start of kernel text */
 #define	KERN_END	0xFE00	/* end of kernel virtual */
 
-#define SEGSHIFT	19	/* LOG2(NBSG) */
-#define NBSG		(1  SEGSHIFT)	/* bytes/segment */
-#define	SEGOFSET	(NBSG-1)	/* byte offset into segment */
-
 #define	MAXBSIZE	0x8000		/* max FS block size */
 

Index: src/sys/arch/sun3/include/pmap3.h
diff -u src/sys/arch/sun3/include/pmap3.h:1.45 src/sys/arch/sun3/include/pmap3.h:1.46
--- src/sys/arch/sun3/include/pmap3.h:1.45	Tue Dec  9 20:45:45 2008
+++ src/sys/arch/sun3/include/pmap3.h	Fri Dec 11 13:52:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3.h,v 1.45 2008/12/09 20:45:45 pooka Exp $	*/
+/*	$NetBSD: pmap3.h,v 1.46 2009/12/11 13:52:57 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -95,4 +95,13 @@
 #define	PMAP_NC		0x10	/* tells pmap_enter to set PG_NC */
 #define	PMAP_SPEC	0x1C	/* mask to get all above. */
 
+/* MMU specific segment size */
+#define	SEGSHIFT	17	/* LOG2(NBSG) */
+#define	NBSG		(1  SEGSHIFT)	/* bytes/segment */
+#define	SEGOFSET	(NBSG - 1)	/* byte offset into segment */
+
+#define	sun3_round_seg(x)	vaddr_t)(x)) + SEGOFSET)  ~SEGOFSET)
+#define	sun3_trunc_seg(x)	((vaddr_t)(x)  ~SEGOFSET)
+#define	sun3_seg_offset(x)	((vaddr_t)(x)  SEGOFSET)
+
 #endif	/* _KERNEL */

Index: src/sys/arch/sun3/include/pmap3x.h
diff -u src/sys/arch/sun3/include/pmap3x.h:1.26 src/sys/arch/sun3/include/pmap3x.h:1.27
--- src/sys/arch/sun3/include/pmap3x.h:1.26	Tue Dec  9 20:45:45 2008
+++ src/sys/arch/sun3/include/pmap3x.h	Fri Dec 11 13:52:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3x.h,v 1.26 2008/12/09 20:45:45 pooka Exp $	*/
+/*	$NetBSD: pmap3x.h,v 1.27 2009/12/11 13:52:57 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -80,4 +80,13 @@
 #define	PMAP_NC		0x40	/* tells pmap_enter to set PTE_CI */
 #define	PMAP_SPEC	0xFF	/* mask to get all above. */
 
+/* MMU specific segment size */
+#define	SEGSHIFT	19	/* LOG2(NBSG) */
+#define	NBSG		(1  SEGSHIFT)	/* bytes/segment */
+#define	SEGOFSET	(NBSG - 1)	/* byte offset into segment */
+
+#define	sun3x_round_seg(x)	vaddr_t)(x)) + SEGOFSET)  ~SEGOFSET)
+#define	sun3x_trunc_seg(x)	((vaddr_t)(x)  ~SEGOFSET)
+#define	sun3x_seg_offset(x)	((vaddr_t)(x)  SEGOFSET)
+ 
 #endif	/* _KERNEL */

Index: src/sys/arch/sun3/sun3/dvma.c
diff -u src/sys/arch/sun3/sun3/dvma.c:1.35 src/sys/arch/sun3/sun3/dvma.c:1.36
--- src/sys/arch/sun3/sun3/dvma.c:1.35	Sat Nov 21 04:16:52 2009
+++ src/sys/arch/sun3/sun3/dvma.c	Fri Dec 11 13:52:57 2009
@@ -1,4 +1,4 @@
-/*	

CVS commit: src/sys/arch/sun2

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 13:56:16 UTC 2009

Modified Files:
src/sys/arch/sun2/include: param.h pmap.h
src/sys/arch/sun2/sun2: pmap.c

Log Message:
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from machine/param.h
  to machine/pmap.h where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun2 pmap sources
  and instead define and use sun2_round_seg() and sun2_trunc_seg()
  since they are quite pmap implementation dependent


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sun2/include/param.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sun2/include/pmap.h
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/sun2/sun2/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/sun2/include/param.h
diff -u src/sys/arch/sun2/include/param.h:1.10 src/sys/arch/sun2/include/param.h:1.11
--- src/sys/arch/sun2/include/param.h:1.10	Wed Jul  2 17:28:57 2008
+++ src/sys/arch/sun2/include/param.h	Fri Dec 11 13:56:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.10 2008/07/02 17:28:57 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.11 2009/12/11 13:56:15 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -102,10 +102,6 @@
 #define	KERNBASE	0x6000	/* start of kernel virtual */
 #define	KERN_END	0x00E0	/* end of kernel virtual */
 
-#define SEGSHIFT	15	/* LOG2(NBSG) */
-#define NBSG		(1  SEGSHIFT)	/* bytes/segment */
-#define	SEGOFSET	(NBSG-1)	/* byte offset into segment */
-
 #define	MAXBSIZE	0x4000		/* max FS block size */
 #define	MAXPHYS		0xe000
 

Index: src/sys/arch/sun2/include/pmap.h
diff -u src/sys/arch/sun2/include/pmap.h:1.21 src/sys/arch/sun2/include/pmap.h:1.22
--- src/sys/arch/sun2/include/pmap.h:1.21	Tue Dec  9 20:45:45 2008
+++ src/sys/arch/sun2/include/pmap.h	Fri Dec 11 13:56:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.21 2008/12/09 20:45:45 pooka Exp $	*/
+/*	$NetBSD: pmap.h,v 1.22 2009/12/11 13:56:15 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -104,4 +104,13 @@
 
 void pmap_procwr(struct proc *, vaddr_t, size_t);
 
+/* MMU specific segment value */
+#define	SEGSHIFT	15	/* LOG2(NBSG) */
+#define	NBSG		(1  SEGSHIFT)	/* bytes/segment */
+#define	SEGOFSET	(NBSG - 1)	/* byte offset into segment */
+
+#define	sun2_round_seg(x)	vaddr_t)(x)) + SEGOFSET)  ~SEGOFSET)
+#define	sun2_trunc_seg(x)	((vaddr_t)(x)  ~SEGOFSET)
+#define	sun2_seg_offset(x)	((vaddr_t)(x)  SEGOFSET)
+
 #endif	/* _MACHINE_PMAP_H */

Index: src/sys/arch/sun2/sun2/pmap.c
diff -u src/sys/arch/sun2/sun2/pmap.c:1.42 src/sys/arch/sun2/sun2/pmap.c:1.43
--- src/sys/arch/sun2/sun2/pmap.c:1.42	Sat Nov 21 04:16:52 2009
+++ src/sys/arch/sun2/sun2/pmap.c	Fri Dec 11 13:56:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.42 2009/11/21 04:16:52 rmind Exp $	*/
+/*	$NetBSD: pmap.c,v 1.43 2009/12/11 13:56:16 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.42 2009/11/21 04:16:52 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43 2009/12/11 13:56:16 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_pmap_debug.h
@@ -1510,7 +1510,7 @@
 	 * Determine the range of kernel virtual space available.
 	 * It is segment-aligned to simplify PMEG management.
 	 */
-	virtual_avail = m68k_round_seg(nextva);
+	virtual_avail = sun2_round_seg(nextva);
 	virtual_end = VM_MAX_KERNEL_ADDRESS;
 
 	/*
@@ -2029,7 +2029,7 @@
 		new_pte |= PG_NC;
 	}
 
-	segva = m68k_trunc_seg(pgva);
+	segva = sun2_trunc_seg(pgva);
 	do_pv = true;
 
 	/* Do we have a PMEG? */
@@ -2173,7 +2173,7 @@
 		return;
 	}
 
-	segva = m68k_trunc_seg(pgva);
+	segva = sun2_trunc_seg(pgva);
 	do_pv = true;
 
 	/*
@@ -2365,7 +2365,7 @@
 		new_pte |= PG_NC;
 	}
 
-	segva = m68k_trunc_seg(va);
+	segva = sun2_trunc_seg(va);
 
 	s = splvm();
 
@@ -2437,7 +2437,7 @@
 	set_context(KERNEL_CONTEXT);
 	segnum = VA_SEGNUM(va);
 	for (eva = va + len; va  eva; va = neva, segnum++) {
-		neva = m68k_trunc_seg(va) + NBSG;
+		neva = sun2_trunc_seg(va) + NBSG;
 		if (neva  eva) {
 			neva = eva;
 		}
@@ -2445,7 +2445,7 @@
 			continue;
 		}
 
-		segva = m68k_trunc_seg(va);
+		segva = sun2_trunc_seg(va);
 		sme = get_segmap(segva);
 		pmegp = pmeg_p(sme);
 
@@ -2594,7 +2594,7 @@
 	if (pmap-pm_segmap[VA_SEGNUM(pgva)] == SEGINV)
 		return (0);
 
-	segva = m68k_trunc_seg(pgva);
+	segva = sun2_trunc_seg(pgva);
 	chkpte = PG_VALID;
 	if (ftype  VM_PROT_WRITE)
 		chkpte |= PG_WRITE;
@@ -3006,7 +3006,7 @@
 	va = sva;
 	segnum = VA_SEGNUM(va);
 	while (va  eva) {
-		neva = m68k_trunc_seg(va) + NBSG;
+		neva = sun2_trunc_seg(va) + NBSG;
 		if (neva  eva)
 			neva = eva;
 		if (pmap-pm_segmap[segnum] != SEGINV)
@@ -3030,7 +3030,7 @@
 	s = splvm();
 
 #ifdef	DIAGNOSTIC
-	if (m68k_trunc_seg(sva) != 

CVS commit: src

2009-12-11 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Dec 11 15:22:33 UTC 2009

Modified Files:
src/distrib/sets: sets.subr
src/distrib/sets/lists/base: mi
src/etc: Makefile
src/share/mk: bsd.own.mk
Added Files:
src/distrib/sets/lists/base: module.mi

Log Message:
Move the test for evbppc out of sets.subr and into bsd.own.mk, to
decide whether to make kernel modules: set MKKMOD to no for evbppc.
Use this in etc/Makefile to decide whether to do the modules
obsolete sets.  Move the ./var/db/obsolete/modules entry from the
mi to the module.mi file set.

Fixes the build for evbppc.

Discussed with uebayasi@


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/distrib/sets/sets.subr
cvs rdiff -u -r1.847 -r1.848 src/distrib/sets/lists/base/mi
cvs rdiff -u -r0 -r1.13 src/distrib/sets/lists/base/module.mi
cvs rdiff -u -r1.375 -r1.376 src/etc/Makefile
cvs rdiff -u -r1.605 -r1.606 src/share/mk/bsd.own.mk

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.113 src/distrib/sets/sets.subr:1.114
--- src/distrib/sets/sets.subr:1.113	Fri Dec 11 13:30:11 2009
+++ src/distrib/sets/sets.subr	Fri Dec 11 15:22:33 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.113 2009/12/11 13:30:11 uebayasi Exp $
+#	$NetBSD: sets.subr,v 1.114 2009/12/11 15:22:33 he Exp $
 #
 
 #
@@ -140,8 +140,6 @@
 module=yes
 if [ ${MKKMOD} = no ]; then
 	module=no			# MODULEs are off.
-elif [ ${MACHINE} = evbppc ]; then
-	module=no			# Turn off MODULEs for some ports.
 fi
 # Determine lib type. Do this first so stlib also gets set.
 if [ ${OBJECT_FMT} = ELF ]; then
@@ -178,7 +176,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.113 2009/12/11 13:30:11 uebayasi Exp $
+# 	# $NetBSD: sets.subr,v 1.114 2009/12/11 15:22:33 he Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.847 src/distrib/sets/lists/base/mi:1.848
--- src/distrib/sets/lists/base/mi:1.847	Sat Dec  5 20:11:01 2009
+++ src/distrib/sets/lists/base/mi	Fri Dec 11 15:22:33 2009
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.847 2009/12/05 20:11:01 pooka Exp $
+# $NetBSD: mi,v 1.848 2009/12/11 15:22:33 he Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -4701,7 +4701,6 @@
 ./var/db/obsolete/gamesbase-sys-root
 ./var/db/obsolete/manbase-sys-root
 ./var/db/obsolete/miscbase-sys-root
-./var/db/obsolete/modules			base-sys-root
 ./var/db/obsolete/testsbase-sys-root
 ./var/db/obsolete/textbase-sys-root
 ./var/db/postfixbase-postfix-root

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.375 src/etc/Makefile:1.376
--- src/etc/Makefile:1.375	Sat Dec  5 19:14:39 2009
+++ src/etc/Makefile	Fri Dec 11 15:22:33 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.375 2009/12/05 19:14:39 pooka Exp $
+#	$NetBSD: Makefile,v 1.376 2009/12/11 15:22:33 he Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -364,7 +364,10 @@
 #	Install var/db/obsolete set lists; this is performed by make build
 #
 OBSOLETE.dir=		${.OBJDIR}/obsolete.dir
-OBSOLETE.files=		base comp etc games man misc modules tests text
+OBSOLETE.files=		base comp etc games man misc tests text
+.if ${MKKMOD} != no
+OBSOLETE.files+=	modules
+.endif
 .if ${MKX11} != no
 OBSOLETE.files+=	xbase xcomp xetc xfont xserver
 .endif

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.605 src/share/mk/bsd.own.mk:1.606
--- src/share/mk/bsd.own.mk:1.605	Fri Dec 11 08:52:37 2009
+++ src/share/mk/bsd.own.mk	Fri Dec 11 15:22:33 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.605 2009/12/11 08:52:37 uebayasi Exp $
+#	$NetBSD: bsd.own.mk,v 1.606 2009/12/11 15:22:33 he Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -697,6 +697,13 @@
 .endfor
 
 #
+# Exceptions to the above:
+#
+.if ${MACHINE} == evbppc
+MKKMOD=		no
+.endif
+
+#
 # MK* options which default to no.
 #
 _MKVARS.no= \

Added files:

Index: src/distrib/sets/lists/base/module.mi
diff -u /dev/null src/distrib/sets/lists/base/module.mi:1.13
--- /dev/null	Fri Dec 11 15:22:33 2009
+++ src/distrib/sets/lists/base/module.mi	Fri Dec 11 15:22:33 2009
@@ -0,0 +1,2 @@
+# $NetBSD: module.mi,v 1.13 2009/12/11 15:22:33 he Exp $
+./var/db/obsolete/modules			base-sys-root



CVS commit: src/distrib/sets

2009-12-11 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 11 15:25:05 UTC 2009

Modified Files:
src/distrib/sets: Makefile

Log Message:
Set $rundir before calling sets.subr as other scripts do.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/distrib/sets/Makefile

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

Modified files:

Index: src/distrib/sets/Makefile
diff -u src/distrib/sets/Makefile:1.76 src/distrib/sets/Makefile:1.77
--- src/distrib/sets/Makefile:1.76	Thu Dec 10 13:29:14 2009
+++ src/distrib/sets/Makefile	Fri Dec 11 15:25:05 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.76 2009/12/10 13:29:14 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.77 2009/12/11 15:25:05 uebayasi Exp $
 
 # The `all' target must appear before bsd.own.mk is pulled in.
 all:
@@ -69,7 +69,7 @@
 	@echo ${TOOLCHAIN_MISSING}
 
 print_mkvars: .PHONY
-	@env SETS_SUBR_DEBUG=dumpmkvars ${HOST_SH} sets.subr
+	@env SETS_SUBR_DEBUG=dumpmkvars rundir=${.CURDIR} ${HOST_SH} sets.subr
 
 #
 # METALOG MANIPULATION TARGETS



CVS commit: xsrc/external/mit/xf86-input-ws/dist/src

2009-12-11 Thread Marc Balmer
Module Name:xsrc
Committed By:   mbalmer
Date:   Fri Dec 11 16:04:30 UTC 2009

Modified Files:
xsrc/external/mit/xf86-input-ws/dist/src: ws.c

Log Message:
Fix SwapXY and rotation support. From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xf86-input-ws/dist/src/ws.c

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

Modified files:

Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c
diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.2 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.3
--- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.2	Tue Dec  8 09:55:38 2009
+++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c	Fri Dec 11 16:04:30 2009
@@ -13,7 +13,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-/* $OpenBSD: ws.c,v 1.26 2009/11/26 18:18:34 matthieu Exp $ */
+/* $OpenBSD: ws.c,v 1.28 2009/12/10 22:32:02 matthieu Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -422,6 +422,15 @@
 		ymax = -1;
 	}
 
+	if (priv-swap_axes) {
+		int tmp;
+		tmp = xmin;
+		xmin = ymin;
+		ymin = tmp;
+		tmp = xmax;
+		xmax = ymax;
+		ymax = tmp;
+	}
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) = 7
 	if ((priv-type == WSMOUSE_TYPE_TPANEL)) {
 		axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X);
@@ -459,6 +468,7 @@
 #endif
 	ymin, ymax, 1, 0, 1);
 	xf86InitValuatorDefaults(pWS, 1);
+
 	xf86MotionHistoryAllocate(pInfo);
 	AssignTypeAndName(pWS, pInfo-atom, pInfo-name);
 	pWS-public.on = FALSE;
@@ -603,11 +613,11 @@
 			break;
 		case WSCONS_EVENT_MOUSE_ABSOLUTE_X:
 			DBG(4, ErrorF(Absolute X %d\n, event-value));
-			if (event-value != 4095) {
-ax = event-value;
-if (priv-inv_x)
-	ax = priv-max_x - ax + priv-min_x;
-			}
+			if (event-value == 4095) 
+break;
+			ax = event-value;
+			if (priv-inv_x)
+ax = priv-max_x - ax + priv-min_x;
 			break;
 		case WSCONS_EVENT_MOUSE_ABSOLUTE_Y:
 			DBG(4, ErrorF(Absolute Y %d\n, event-value));
@@ -687,6 +697,13 @@
 			buttons = ~zbutton;
 			wsSendButtons(pInfo, buttons);
 		}
+		if (priv-swap_axes) {
+			int tmp;
+
+			tmp = ax;
+			ax = ay;
+			ay = tmp;
+		}
 		if (ax) {
 			/* absolute position event */
 			DBG(3, ErrorF(postMotionEvent X %d\n, ax));
@@ -851,10 +868,17 @@
 need_update++;
 			}
 			/* Update axes descriptors */
-			ax-min_value = priv-min_x;
-			ax-max_value = priv-max_x;
-			ay-min_value = priv-min_y;
-			ay-max_value = priv-max_y;
+			if (!priv-swap_axes) {
+ax-min_value = priv-min_x;
+ax-max_value = priv-max_x;
+ay-min_value = priv-min_y;
+ay-max_value = priv-max_y;
+			} else {
+ax-min_value = priv-min_y;
+ax-max_value = priv-max_y;
+ay-min_value = priv-min_x;
+ay-max_value = priv-max_x;
+			}
 		}
 	} else if (atom == prop_swap) {
 		if (val-format != 8 || val-type != XA_INTEGER ||



CVS commit: src/share/mk

2009-12-11 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 11 16:09:03 UTC 2009

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
GENCMD: quote the string to eval in case it has spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.606 -r1.607 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.606 src/share/mk/bsd.own.mk:1.607
--- src/share/mk/bsd.own.mk:1.606	Fri Dec 11 15:22:33 2009
+++ src/share/mk/bsd.own.mk	Fri Dec 11 16:09:03 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.606 2009/12/11 15:22:33 he Exp $
+#	$NetBSD: bsd.own.mk,v 1.607 2009/12/11 16:09:03 uebayasi Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -998,7 +998,7 @@
 		local _opwd=$$PWD; \
 		local _exit; \
 		cp $$_src $$_tmp; \
-		{ cd $$_tmp  eval $$@; _exit=$$?; cd $$_opwd; }; \
+		{ cd $$_tmp  eval $$@; _exit=$$?; cd $$_opwd; }; \
 		[ $$_exit = 0 ]  cp $${_tmp}/$${_gen} $$_dst; \
 		rm -fr $$_tmp; \
 		return $$_exit; \



CVS commit: src/usr.bin/ktruss

2009-12-11 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 11 16:10:56 UTC 2009

Modified Files:
src/usr.bin/ktruss: Makefile

Log Message:
Use $GENCMD to generate misc.[ch].  Carefully quote strings.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/ktruss/Makefile

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/ktruss/Makefile
diff -u src/usr.bin/ktruss/Makefile:1.26 src/usr.bin/ktruss/Makefile:1.27
--- src/usr.bin/ktruss/Makefile:1.26	Tue Dec  8 02:56:37 2009
+++ src/usr.bin/ktruss/Makefile	Fri Dec 11 16:10:56 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2009/12/08 02:56:37 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.27 2009/12/11 16:10:56 uebayasi Exp $
 
 NOMAN=		# defined
 
@@ -14,17 +14,13 @@
 LDSTATIC?=-static
 .endif
 
-# Hint for mkdep(1).
 dump.c: misc.h
 
-# Avoid race.
-misc.c: misc.h
-
-# Build-time generation.
 misc.c misc.h: ${DESTDIR}/usr/include/sys/errno.h makeerrnos.sh \
 	   ${DESTDIR}/usr/include/sys/signal.h
 	${_MKTARGET_CREATE}
-	AWK=${TOOL_AWK:Q} CPP=${CPP:Q} CPPFLAGS=${CPPFLAGS:Q} \
+	${GENCMD} ${.TARGET} \
+	AWK=${TOOL_AWK:Q} CPP=${CPP:Q} CPPFLAGS=${CPPFLAGS:Q} \
 	${HOST_SH} ${.CURDIR}/makeerrnos.sh \
 	${DESTDIR}/usr/include/sys/errno.h \
 	${DESTDIR}/usr/include/sys/signal.h misc



CVS commit: src/usr.sbin/puffs/rump_smbfs

2009-12-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Dec 11 16:46:27 UTC 2009

Modified Files:
src/usr.sbin/puffs/rump_smbfs: Makefile

Log Message:
This is linked against rumpnet_sockin, so it should not be linked
against rumpnet_netinet anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/rump_smbfs/Makefile

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

Modified files:

Index: src/usr.sbin/puffs/rump_smbfs/Makefile
diff -u src/usr.sbin/puffs/rump_smbfs/Makefile:1.4 src/usr.sbin/puffs/rump_smbfs/Makefile:1.5
--- src/usr.sbin/puffs/rump_smbfs/Makefile:1.4	Thu Nov  5 13:26:02 2009
+++ src/usr.sbin/puffs/rump_smbfs/Makefile	Fri Dec 11 16:46:27 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2009/11/05 13:26:02 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2009/12/11 16:46:27 pooka Exp $
 #
 
 WARNS=2
@@ -8,7 +8,7 @@
 MOUNTNAME=	smbfs
 SRCS+=		smb_rumpops.c
 
-LDADD+= 	-lrumpnet_netinet -lrumpnet_sockin -lrumpnet
+LDADD+= 	-lrumpnet_sockin -lrumpnet
 LDADD+=		-lrumpcrypto -lrumpdev_netsmb -lrumpdev
 
 ISRUMP=		# it is



CVS commit: src/lib/libukfs

2009-12-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Dec 11 16:47:33 UTC 2009

Modified Files:
src/lib/libukfs: ukfs.c

Log Message:
Init ukfs__part_{na,none} statically instead of at runtime to avoid
init-order lossage from p2k/rump_smbfs, as noted by Tron.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/lib/libukfs/ukfs.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/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.43 src/lib/libukfs/ukfs.c:1.44
--- src/lib/libukfs/ukfs.c:1.43	Thu Dec  3 14:23:49 2009
+++ src/lib/libukfs/ukfs.c	Fri Dec 11 16:47:33 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukfs.c,v 1.43 2009/12/03 14:23:49 pooka Exp $	*/
+/*	$NetBSD: ukfs.c,v 1.44 2009/12/11 16:47:33 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -177,16 +177,8 @@
 	.part_devsize = RUMP_ETFS_SIZE_ENDOFF,
 };
 static struct ukfs_part ukfs__part_na;
-struct ukfs_part *ukfs_part_none;
-struct ukfs_part *ukfs_part_na;
-
-static void
-ukfs_initparts(void)
-{
-
-	ukfs_part_none = ukfs__part_none;
-	ukfs_part_na = ukfs__part_na;
-}
+struct ukfs_part *ukfs_part_none = ukfs__part_none;
+struct ukfs_part *ukfs_part_na = ukfs__part_na;
 
 int
 _ukfs_init(int version)
@@ -200,7 +192,6 @@
 		return -1;
 	}
 
-	ukfs_initparts();
 	if ((rv = rump_init()) != 0) {
 		errno = rv;
 		return -1;
@@ -225,7 +216,6 @@
 	int error = 0;
 	int devfd = -1;
 
-	ukfs_initparts();
 	if ((p = strstr(devpath, UKFS_PARTITION_SCANMAGIC)) != NULL) {
 		fprintf(stderr, ukfs: %%PART is deprecated.  use 
 		%%DISKLABEL instead\n);



CVS commit: src/share/man/man4

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 17:00:49 UTC 2009

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

Log Message:
There is no NetBSD 4.1 (yet?) and 5.0 has been released before it.


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

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

Modified files:

Index: src/share/man/man4/gem.4
diff -u src/share/man/man4/gem.4:1.8 src/share/man/man4/gem.4:1.9
--- src/share/man/man4/gem.4:1.8	Mon Sep 15 20:03:18 2008
+++ src/share/man/man4/gem.4	Fri Dec 11 17:00:49 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: gem.4,v 1.8 2008/09/15 20:03:18 jdc Exp $
+.\ $NetBSD: gem.4,v 1.9 2009/12/11 17:00:49 tsutsui Exp $
 .\
 .\ Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -84,7 +84,7 @@
 device driver appeared in
 .Nx 1.6 .
 Support for PCI SX fibre cards was added in
-.Nx 4.1 .
+.Nx 5.0 .
 Support for SBus SX fibre cards was added in
 .Nx 5.0 .
 .Sh AUTHORS



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

2009-12-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 11 17:17:51 UTC 2009

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

Log Message:
Cleanup/add some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.5.38.5 -r1.5.38.6 src/sys/arch/mips/mips/copy.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/copy.S
diff -u src/sys/arch/mips/mips/copy.S:1.5.38.5 src/sys/arch/mips/mips/copy.S:1.5.38.6
--- src/sys/arch/mips/mips/copy.S:1.5.38.5	Sat Dec  5 07:40:02 2009
+++ src/sys/arch/mips/mips/copy.S	Fri Dec 11 17:17:51 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: copy.S,v 1.5.38.5 2009/12/05 07:40:02 cliff Exp $	*/
+/*	$NetBSD: copy.S,v 1.5.38.6 2009/12/11 17:17:51 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -91,9 +91,9 @@
 
 /*
  * int copyinstr(void *uaddr, void *kaddr, size_t maxlen, size_t *lencopied)
- * Copy a NIL-terminated string, at most maxlen characters long, from the
+ * Copy a NUL-terminated string, at most maxlen characters long, from the
  * user's address space.  Return the number of characters copied (including
- * the NIL) in *lencopied.  If the string is too long, return ENAMETOOLONG;
+ * the NUL) in *lencopied.  If the string is too long, return ENAMETOOLONG;
  * else return 0 or EFAULT.
  */
 LEAF(copyinstr)
@@ -108,7 +108,7 @@
 	lbu	v0, 0(a0)
 	PTR_SUBU a2, a2, 1
 	beq	v0, zero, 2f
-	 sb	v0, 0(a1)
+	 sb	v0, 0(a1)			# write trailing NUL
 	PTR_ADDU a0, a0, 1
 	bne	a2, zero, 1b
 	 PTR_ADDU a1, a1, 1



CVS commit: src/sys/arch

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 17:53:23 UTC 2009

Modified Files:
src/sys/arch/amiga/include: param.h
src/sys/arch/atari/include: param.h
src/sys/arch/cesfic/include: param.h
src/sys/arch/hp300/include: param.h
src/sys/arch/luna68k/include: param.h
src/sys/arch/m68k/include: param.h pmap_motorola.h
src/sys/arch/mac68k/include: param.h
src/sys/arch/mvme68k/include: param.h
src/sys/arch/news68k/include: param.h
src/sys/arch/next68k/include: param.h
src/sys/arch/x68k/include: param.h

Log Message:
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSEG, and SEGOFSET from machine/param.h
  to m68k/pmap_motorola.h where they should belong
- also simplify NBSEG macro for both 020/030 and 040/060 cases
- also move m68k_trunc_seg(), m68k_round_seg(), and m68k_seg_offset()
  (that use SEGOFSET) from m68k/param.h to m68k/pmap_motorola.h
- add comments about each segment size value used on pmap_motorola
  implementation
- add TIA_SIZE, TIA_SHIFT, TIB_SIZE, and TIB_SHIFT macro which can be
  used for ste/pte index sizes
- use proper vaddr_t cast instead of unsigned for SEGOFSET/PGOFSET macro

Tested on atari, hp300, and news68k.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/amiga/include/param.h
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/atari/include/param.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/cesfic/include/param.h
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/hp300/include/param.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/luna68k/include/param.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/m68k/include/param.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/m68k/include/pmap_motorola.h
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/mac68k/include/param.h
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mvme68k/include/param.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/news68k/include/param.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/next68k/include/param.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x68k/include/param.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/amiga/include/param.h
diff -u src/sys/arch/amiga/include/param.h:1.46 src/sys/arch/amiga/include/param.h:1.47
--- src/sys/arch/amiga/include/param.h:1.46	Wed Dec  9 12:21:58 2009
+++ src/sys/arch/amiga/include/param.h	Fri Dec 11 17:53:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.46 2009/12/09 12:21:58 tsutsui Exp $	*/
+/*	$NetBSD: param.h,v 1.47 2009/12/11 17:53:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -88,13 +88,6 @@
 #define	PGSHIFT		13		/* LOG2(NBPG) */
 #define	KERNBASE	0x	/* start of kernel virtual */
 
-#define	SEGSHIFT	24		/* LOG2(NBSEG) [68030 value] */
-
-#define NBSEG		((mmutype == MMU_68040) ? \
-			(1  18 /* SG4_SHIFT2 */) : (1  SEGSHIFT))
-	/* bytes/segment */
-#define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
-
 #define	UPAGES		2		/* pages of u-area */
 
 #include m68k/param.h

Index: src/sys/arch/atari/include/param.h
diff -u src/sys/arch/atari/include/param.h:1.32 src/sys/arch/atari/include/param.h:1.33
--- src/sys/arch/atari/include/param.h:1.32	Wed Dec  9 12:21:58 2009
+++ src/sys/arch/atari/include/param.h	Fri Dec 11 17:53:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.32 2009/12/09 12:21:58 tsutsui Exp $	*/
+/*	$NetBSD: param.h,v 1.33 2009/12/11 17:53:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -88,13 +88,6 @@
 #define	PGSHIFT		13		/* LOG2(NBPG) */
 #define	KERNBASE	0x	/* start of kernel virtual */
 
-#define	SEGSHIFT	24		/* LOG2(NBSEG) [68030 value] */
-
-#define	NBSEG		((mmutype == MMU_68040) \
-			? (1  18 /* SG4_SHIFT2 */) : (1  SEGSHIFT))
-	/* bytes/segment */
-#define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
-
 #define	UPAGES		2		/* pages of u-area */
 
 #include m68k/param.h

Index: src/sys/arch/cesfic/include/param.h
diff -u src/sys/arch/cesfic/include/param.h:1.9 src/sys/arch/cesfic/include/param.h:1.10
--- src/sys/arch/cesfic/include/param.h:1.9	Wed Dec  9 12:21:58 2009
+++ src/sys/arch/cesfic/include/param.h	Fri Dec 11 17:53:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.9 2009/12/09 12:21:58 tsutsui Exp $	*/
+/*	$NetBSD: param.h,v 1.10 2009/12/11 17:53:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -97,17 +97,6 @@
 #define	PGSHIFT		12		/* LOG2(NBPG) */
 #define	NPTEPG		(NBPG/(sizeof (pt_entry_t)))
 
-#define	SEGSHIFT	22		/* LOG2(NBSEG) */
-#if defined(M68030)  !defined(M68040)  !defined(M68060)
-#define NBSEG		(1  SEGSHIFT)	/* bytes/segment */
-#elif (defined(M68040) || defined(M68060))  !defined(M68030)
-#define	NBSEG		(1  18 /* SG4_SHIFT2 */)
-#else
-#define	NBSEG		((mmutype == MMU_68040) ? \
-			(1  18 /* SG4_SHIFT2 */) : (1  SEGSHIFT))
-#endif
-#define	SEGOFSET	

CVS commit: src/sys/arch

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 18:28:35 UTC 2009

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

Log Message:
Move uvm_setpagesize() calls from locore.s to pmap_bootstrap_finalize().
Also explicitly set uvmexp.pagesize to prepare 8KB/page settings.

XXX: There is #ifdef !defined(amiga)  !defined(atari) workaround
XXX: because they have different pmap initialization functions.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cesfic/cesfic/locore.s
cvs rdiff -u -r1.148 -r1.149 src/sys/arch/hp300/hp300/locore.s
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/luna68k/luna68k/locore.s
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/m68k/m68k/pmap_motorola.c
cvs rdiff -u -r1.157 -r1.158 src/sys/arch/mac68k/mac68k/locore.s
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/mvme68k/mvme68k/locore.s
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/next68k/next68k/locore.s
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/x68k/x68k/locore.s

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

Modified files:

Index: src/sys/arch/cesfic/cesfic/locore.s
diff -u src/sys/arch/cesfic/cesfic/locore.s:1.19 src/sys/arch/cesfic/cesfic/locore.s:1.20
--- src/sys/arch/cesfic/cesfic/locore.s:1.19	Fri Dec  4 18:06:28 2009
+++ src/sys/arch/cesfic/cesfic/locore.s	Fri Dec 11 18:28:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.19 2009/12/04 18:06:28 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.20 2009/12/11 18:28:35 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -331,10 +331,8 @@
 	.long	0x4e7b0006		| movc d0,dtt0
 	.long	0x4e7b0007		| movc d0,dtt1
 
-/* select the software page size now */
 	lea	_ASM_LABEL(tmpstk),%sp	| temporary stack
-	jbsr	_C_LABEL(uvm_setpagesize)  | select software page size
-/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
+/* call final pmap setup */
 	jbsr	_C_LABEL(pmap_bootstrap_finalize)
 /* set kernel stack, user SP */
 	movl	_C_LABEL(lwp0uarea),%a1	| get lwp0 uarea

Index: src/sys/arch/hp300/hp300/locore.s
diff -u src/sys/arch/hp300/hp300/locore.s:1.148 src/sys/arch/hp300/hp300/locore.s:1.149
--- src/sys/arch/hp300/hp300/locore.s:1.148	Wed Dec  2 15:51:12 2009
+++ src/sys/arch/hp300/hp300/locore.s	Fri Dec 11 18:28:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.148 2009/12/02 15:51:12 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.149 2009/12/11 18:28:35 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -549,10 +549,8 @@
  * Should be running mapped from this point on
  */
 Lenab1:
-/* select the software page size now */
 	lea	_ASM_LABEL(tmpstk),%sp		| temporary stack
-	jbsr	_C_LABEL(uvm_setpagesize)  	| select software page size
-/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
+/* call final pmap setup */
 	jbsr	_C_LABEL(pmap_bootstrap_finalize)
 /* set kernel stack, user SP */
 	movl	_C_LABEL(lwp0uarea),%a1	|

Index: src/sys/arch/luna68k/luna68k/locore.s
diff -u src/sys/arch/luna68k/luna68k/locore.s:1.31 src/sys/arch/luna68k/luna68k/locore.s:1.32
--- src/sys/arch/luna68k/luna68k/locore.s:1.31	Fri Dec  4 18:06:28 2009
+++ src/sys/arch/luna68k/luna68k/locore.s	Fri Dec 11 18:28:35 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.31 2009/12/04 18:06:28 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.32 2009/12/11 18:28:35 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -309,10 +309,8 @@
  * Should be running mapped from this point on
  */
 Lenab1:
-/* select the software page size now */
 	lea	_ASM_LABEL(tmpstk),%sp	| temporary stack
-	jbsr	_C_LABEL(uvm_setpagesize) | select software page size
-/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
+/* call final pmap setup */
 	jbsr	_C_LABEL(pmap_bootstrap_finalize)
 /* set kernel stack, user SP */
 	movl	_C_LABEL(lwp0uarea),%a1	| get lwp0 uarea

Index: src/sys/arch/m68k/m68k/pmap_motorola.c
diff -u src/sys/arch/m68k/m68k/pmap_motorola.c:1.54 src/sys/arch/m68k/m68k/pmap_motorola.c:1.55
--- src/sys/arch/m68k/m68k/pmap_motorola.c:1.54	Sun Dec  6 06:41:30 2009
+++ src/sys/arch/m68k/m68k/pmap_motorola.c	Fri Dec 11 18:28:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_motorola.c,v 1.54 2009/12/06 06:41:30 tsutsui Exp $*/
+/*	$NetBSD: pmap_motorola.c,v 1.55 2009/12/11 18:28:35 tsutsui Exp $*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -117,7 +117,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_motorola.c,v 1.54 2009/12/06 06:41:30 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_motorola.c,v 1.55 2009/12/11 

CVS commit: src/sys/arch

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 18:31:27 UTC 2009

Modified Files:
src/sys/arch/sun2/include: pmap.h
src/sys/arch/sun3/include: pmap.h

Log Message:
Export pmap_procwr() declaration only #ifdef _KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sun2/include/pmap.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sun3/include/pmap.h

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

Modified files:

Index: src/sys/arch/sun2/include/pmap.h
diff -u src/sys/arch/sun2/include/pmap.h:1.22 src/sys/arch/sun2/include/pmap.h:1.23
--- src/sys/arch/sun2/include/pmap.h:1.22	Fri Dec 11 13:56:15 2009
+++ src/sys/arch/sun2/include/pmap.h	Fri Dec 11 18:31:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.22 2009/12/11 13:56:15 tsutsui Exp $	*/
+/*	$NetBSD: pmap.h,v 1.23 2009/12/11 18:31:27 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -100,10 +100,10 @@
 #define	PMAP_NC		0x00	/* tells pmap_enter to set PG_NC */
 #define	PMAP_SPEC	0x0C	/* mask to get all above. */
 
-#endif	/* _KERNEL */
-
 void pmap_procwr(struct proc *, vaddr_t, size_t);
 
+#endif	/* _KERNEL */
+
 /* MMU specific segment value */
 #define	SEGSHIFT	15	/* LOG2(NBSG) */
 #define	NBSG		(1  SEGSHIFT)	/* bytes/segment */

Index: src/sys/arch/sun3/include/pmap.h
diff -u src/sys/arch/sun3/include/pmap.h:1.31 src/sys/arch/sun3/include/pmap.h:1.32
--- src/sys/arch/sun3/include/pmap.h:1.31	Tue Dec  9 20:45:45 2008
+++ src/sys/arch/sun3/include/pmap.h	Fri Dec 11 18:31:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.31 2008/12/09 20:45:45 pooka Exp $	*/
+/*	$NetBSD: pmap.h,v 1.32 2009/12/11 18:31:27 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -36,6 +36,8 @@
 #include machine/pmap3x.h
 #endif	/* SUN3X */
 
+#ifdef _KERNEL
 void pmap_procwr(struct proc *, vaddr_t, size_t);
+#endif
 
 #endif	/* _MACHINE_PMAP_H */



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

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 18:40:08 UTC 2009

Modified Files:
src/sys/arch/sun3/include: pmap3.h pmap3x.h

Log Message:
Export NBSG for bootloaders. MMU is enabled even on PROM on sun68k machines.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sun3/include/pmap3.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sun3/include/pmap3x.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/sun3/include/pmap3.h
diff -u src/sys/arch/sun3/include/pmap3.h:1.46 src/sys/arch/sun3/include/pmap3.h:1.47
--- src/sys/arch/sun3/include/pmap3.h:1.46	Fri Dec 11 13:52:57 2009
+++ src/sys/arch/sun3/include/pmap3.h	Fri Dec 11 18:40:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3.h,v 1.46 2009/12/11 13:52:57 tsutsui Exp $	*/
+/*	$NetBSD: pmap3.h,v 1.47 2009/12/11 18:40:08 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -95,6 +95,8 @@
 #define	PMAP_NC		0x10	/* tells pmap_enter to set PG_NC */
 #define	PMAP_SPEC	0x1C	/* mask to get all above. */
 
+#endif	/* _KERNEL */
+
 /* MMU specific segment size */
 #define	SEGSHIFT	17	/* LOG2(NBSG) */
 #define	NBSG		(1  SEGSHIFT)	/* bytes/segment */
@@ -103,5 +105,3 @@
 #define	sun3_round_seg(x)	vaddr_t)(x)) + SEGOFSET)  ~SEGOFSET)
 #define	sun3_trunc_seg(x)	((vaddr_t)(x)  ~SEGOFSET)
 #define	sun3_seg_offset(x)	((vaddr_t)(x)  SEGOFSET)
-
-#endif	/* _KERNEL */

Index: src/sys/arch/sun3/include/pmap3x.h
diff -u src/sys/arch/sun3/include/pmap3x.h:1.27 src/sys/arch/sun3/include/pmap3x.h:1.28
--- src/sys/arch/sun3/include/pmap3x.h:1.27	Fri Dec 11 13:52:57 2009
+++ src/sys/arch/sun3/include/pmap3x.h	Fri Dec 11 18:40:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3x.h,v 1.27 2009/12/11 13:52:57 tsutsui Exp $	*/
+/*	$NetBSD: pmap3x.h,v 1.28 2009/12/11 18:40:08 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -79,6 +79,8 @@
 #define	PMAP_VME32	0x20	/* etc. */
 #define	PMAP_NC		0x40	/* tells pmap_enter to set PTE_CI */
 #define	PMAP_SPEC	0xFF	/* mask to get all above. */
+ 
+#endif	/* _KERNEL */
 
 /* MMU specific segment size */
 #define	SEGSHIFT	19	/* LOG2(NBSG) */
@@ -88,5 +90,3 @@
 #define	sun3x_round_seg(x)	vaddr_t)(x)) + SEGOFSET)  ~SEGOFSET)
 #define	sun3x_trunc_seg(x)	((vaddr_t)(x)  ~SEGOFSET)
 #define	sun3x_seg_offset(x)	((vaddr_t)(x)  SEGOFSET)
- 
-#endif	/* _KERNEL */



CVS commit: src/sys/arch/sun68k/stand/libsa

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 18:42:05 UTC 2009

Modified Files:
src/sys/arch/sun68k/stand/libsa: sun2.c sun3.c

Log Message:
Include pmap.h or pmap3.h instead of param.h for NBSG to handle MMU.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sun68k/stand/libsa/sun2.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sun68k/stand/libsa/sun3.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/sun68k/stand/libsa/sun2.c
diff -u src/sys/arch/sun68k/stand/libsa/sun2.c:1.10 src/sys/arch/sun68k/stand/libsa/sun2.c:1.11
--- src/sys/arch/sun68k/stand/libsa/sun2.c:1.10	Mon Jan 12 07:00:59 2009
+++ src/sys/arch/sun68k/stand/libsa/sun2.c	Fri Dec 11 18:42:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sun2.c,v 1.10 2009/01/12 07:00:59 tsutsui Exp $	*/
+/*	$NetBSD: sun2.c,v 1.11 2009/12/11 18:42:05 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
  * We need to get the sun2 NBSG definition, even if we're 
  * building this with a different sun68k target.
  */
-#include arch/sun2/include/param.h
+#include arch/sun2/include/pmap.h
 
 #include sys/param.h
 #include machine/idprom.h

Index: src/sys/arch/sun68k/stand/libsa/sun3.c
diff -u src/sys/arch/sun68k/stand/libsa/sun3.c:1.8 src/sys/arch/sun68k/stand/libsa/sun3.c:1.9
--- src/sys/arch/sun68k/stand/libsa/sun3.c:1.8	Mon Jan 12 07:00:59 2009
+++ src/sys/arch/sun68k/stand/libsa/sun3.c	Fri Dec 11 18:42:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sun3.c,v 1.8 2009/01/12 07:00:59 tsutsui Exp $	*/
+/*	$NetBSD: sun3.c,v 1.9 2009/12/11 18:42:05 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  * We need to get the sun3 NBSG definition, even if we're
  * building this with a different sun68k target.
  */
-#include arch/sun3/include/param.h
+#include arch/sun3/include/pmap3.h
 
 #include sys/param.h
 #include machine/idprom.h



CVS commit: src/sys/arch/sun68k/stand/libsa

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 18:45:06 UTC 2009

Modified Files:
src/sys/arch/sun68k/stand/libsa: sun3x.c

Log Message:
NBSG is not used in this file so remove unnecessary comment and include.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sun68k/stand/libsa/sun3x.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/sun68k/stand/libsa/sun3x.c
diff -u src/sys/arch/sun68k/stand/libsa/sun3x.c:1.11 src/sys/arch/sun68k/stand/libsa/sun3x.c:1.12
--- src/sys/arch/sun68k/stand/libsa/sun3x.c:1.11	Mon Jan 12 07:00:59 2009
+++ src/sys/arch/sun68k/stand/libsa/sun3x.c	Fri Dec 11 18:45:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sun3x.c,v 1.11 2009/01/12 07:00:59 tsutsui Exp $	*/
+/*	$NetBSD: sun3x.c,v 1.12 2009/12/11 18:45:05 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -39,12 +39,6 @@
 #define get_pte sun3x_get_pte
 #define set_pte sun3x_set_pte
 
-/*
- * We need to get the sun3x NBSG definition, even if we're
- * building this with a different sun68k target.
- */
-#include arch/sun3/include/param.h
-
 #include sys/param.h
 #include machine/mon.h
 



CVS commit: src/sys/arch

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 18:57:44 UTC 2009

Modified Files:
src/sys/arch/luna68k/include: vmparam.h
src/sys/arch/m68k/include: pmap_motorola.h

Log Message:
Define SYSMAP_VA in m68k/pmap_motorola.h
where the Sysmap pointer is declared.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/luna68k/include/vmparam.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/m68k/include/pmap_motorola.h

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

Modified files:

Index: src/sys/arch/luna68k/include/vmparam.h
diff -u src/sys/arch/luna68k/include/vmparam.h:1.14 src/sys/arch/luna68k/include/vmparam.h:1.15
--- src/sys/arch/luna68k/include/vmparam.h:1.14	Tue Dec  8 13:47:27 2009
+++ src/sys/arch/luna68k/include/vmparam.h	Fri Dec 11 18:57:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.14 2009/12/08 13:47:27 tsutsui Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.15 2009/12/11 18:57:44 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -136,7 +136,6 @@
 #define VM_MAX_ADDRESS		((vaddr_t)0xFFFC)
 #define VM_MIN_KERNEL_ADDRESS	((vaddr_t)0)
 #define VM_MAX_KERNEL_ADDRESS	((vaddr_t)(0x4000-PAGE_SIZE*NPTEPG))
-#define	SYSMAP_VA		(VM_MAX_KERNEL_ADDRESS)
 
 /* virtual sizes (bytes) for various kernel submaps */
 #define VM_MBUF_SIZE		(NMBCLUSTERS*MCLBYTES)

Index: src/sys/arch/m68k/include/pmap_motorola.h
diff -u src/sys/arch/m68k/include/pmap_motorola.h:1.26 src/sys/arch/m68k/include/pmap_motorola.h:1.27
--- src/sys/arch/m68k/include/pmap_motorola.h:1.26	Fri Dec 11 17:53:22 2009
+++ src/sys/arch/m68k/include/pmap_motorola.h	Fri Dec 11 18:57:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_motorola.h,v 1.26 2009/12/11 17:53:22 tsutsui Exp $	*/
+/*	$NetBSD: pmap_motorola.h,v 1.27 2009/12/11 18:57:44 tsutsui Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -232,6 +232,7 @@
 extern paddr_t		Sysseg_pa;
 extern st_entry_t	*Sysseg;
 extern pt_entry_t	*Sysmap, *Sysptmap;
+#define	SYSMAP_VA	VM_MAX_KERNEL_ADDRESS
 extern vsize_t		Sysptsize;
 extern vsize_t		mem_size;
 extern vaddr_t		virtual_avail, virtual_end;



CVS commit: src/sys/arch/x68k/x68k

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 19:36:05 UTC 2009

Modified Files:
src/sys/arch/x68k/x68k: pmap_bootstrap.c

Log Message:
Fix leftover botch in rev 1.48:
 Remove initialization of protection_codes[] which has been movde into
 pmap_bootstrap_finalize().


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x68k/x68k/pmap_bootstrap.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/x68k/x68k/pmap_bootstrap.c
diff -u src/sys/arch/x68k/x68k/pmap_bootstrap.c:1.48 src/sys/arch/x68k/x68k/pmap_bootstrap.c:1.49
--- src/sys/arch/x68k/x68k/pmap_bootstrap.c:1.48	Sun Dec  6 06:41:31 2009
+++ src/sys/arch/x68k/x68k/pmap_bootstrap.c	Fri Dec 11 19:36:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.48 2009/12/06 06:41:31 tsutsui Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.49 2009/12/11 19:36:05 tsutsui Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.48 2009/12/06 06:41:31 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.49 2009/12/11 19:36:05 tsutsui Exp $);
 
 #include opt_m680x0.h
 
@@ -408,26 +408,6 @@
 	RELOC(virtual_end, vaddr_t) = VM_MAX_KERNEL_ADDRESS;
 
 	/*
-	 * Initialize protection array.
-	 * XXX don't use a switch statement, it might produce an
-	 * absolute jmp table.
-	 */
-	{
-		u_int *kp;
-
-		kp = RELOC(protection_codes, u_int);
-		kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0;
-		kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO;
-		kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO;
-		kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO;
-		kp[VM_PROT_NONE|VM_PROT_WRITE|VM_PROT_NONE] = PG_RW;
-		kp[VM_PROT_NONE|VM_PROT_WRITE|VM_PROT_EXECUTE] = PG_RW;
-		kp[VM_PROT_READ|VM_PROT_WRITE|VM_PROT_NONE] = PG_RW;
-		kp[VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE] = PG_RW;
-	}
-
-
-	/*
 	 * Allocate some fixed, special purpose kernel virtual addresses
 	 */
 	{



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

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 19:43:19 UTC 2009

Modified Files:
src/sys/arch/hp300/include: cpu.h

Log Message:
MAXADDR used for PA == VA mapping should be page size dependent.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/hp300/include/cpu.h

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

Modified files:

Index: src/sys/arch/hp300/include/cpu.h
diff -u src/sys/arch/hp300/include/cpu.h:1.61 src/sys/arch/hp300/include/cpu.h:1.62
--- src/sys/arch/hp300/include/cpu.h:1.61	Wed Oct 21 21:11:59 2009
+++ src/sys/arch/hp300/include/cpu.h	Fri Dec 11 19:43:18 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.61 2009/10/21 21:11:59 rmind Exp $	*/
+/*	$NetBSD: cpu.h,v 1.62 2009/12/11 19:43:18 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -215,7 +215,7 @@
 #define	INTIOTOP	(0x0060)
 #define	EXTIOBASE	(0x0060)
 #define	EXTIOTOP	(0x2000)
-#define	MAXADDR		(0xF000)
+#define	MAXADDR		(0 - NBPG)
 
 /*
  * Internal IO space:



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

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 20:00:49 UTC 2009

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

Log Message:
Fix (probably fatal) typo on yamt-km merge back on 2005.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c

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

Modified files:

Index: src/sys/arch/luna68k/luna68k/pmap_bootstrap.c
diff -u src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.25 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.26
--- src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.25	Sun Dec  6 06:41:30 2009
+++ src/sys/arch/luna68k/luna68k/pmap_bootstrap.c	Fri Dec 11 20:00:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.25 2009/12/06 06:41:30 tsutsui Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.26 2009/12/11 20:00:49 tsutsui Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.25 2009/12/06 06:41:30 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.26 2009/12/11 20:00:49 tsutsui Exp $);
 
 #include sys/param.h
 
@@ -290,10 +290,10 @@
 		ste = (st_entry_t *)kstpa;
 		pte = (pt_entry_t *)kptmpa;
 		/* XXX should be (TIA_SIZE * PAGE_SIZE) */
-		pte[SYSMAP_VA / (NPTEPG * PAGE_SIZE)] =
+		ste[SYSMAP_VA / (NPTEPG * PAGE_SIZE)] =
 		kptmpa | SG_RW | SG_V;
 		/* XXX should be (TIA_SIZE * PAGE_SIZE) */
-		ste[SYSMAP_VA / (NPTEPG * PAGE_SIZE)] =
+		pte[SYSMAP_VA / (NPTEPG * PAGE_SIZE)] =
 		kptmpa | PG_RW | PG_CI | PG_V;
 	}
 



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

2009-12-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 11 20:22:16 UTC 2009

Modified Files:
src/sys/arch/cobalt/include [matt-nb5-mips64]: vmparam.h
src/sys/arch/evbmips/include [matt-nb5-mips64]: vmparam.h
src/sys/arch/ews4800mips/include [matt-nb5-mips64]: vmparam.h
src/sys/arch/hpcmips/include [matt-nb5-mips64]: vmparam.h
src/sys/arch/mips/include [matt-nb5-mips64]: vmparam.h
src/sys/arch/mipsco/include [matt-nb5-mips64]: vmparam.h
src/sys/arch/newsmips/include [matt-nb5-mips64]: vmparam.h
src/sys/arch/sbmips/include [matt-nb5-mips64]: vmparam.h
src/sys/arch/sgimips/include [matt-nb5-mips64]: vmparam.h

Log Message:
Use the default set of VM_FREELISTs in mips/vmparam.h but allow them to
be overridden (for pmax).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.154.1 src/sys/arch/cobalt/include/vmparam.h
cvs rdiff -u -r1.1.142.1 -r1.1.142.2 src/sys/arch/evbmips/include/vmparam.h
cvs rdiff -u -r1.1 -r1.1.98.1 src/sys/arch/ews4800mips/include/vmparam.h
cvs rdiff -u -r1.4 -r1.4.140.1 src/sys/arch/hpcmips/include/vmparam.h
cvs rdiff -u -r1.41.28.6 -r1.41.28.7 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.1 -r1.1.150.1 src/sys/arch/mipsco/include/vmparam.h
cvs rdiff -u -r1.4 -r1.4.148.1 src/sys/arch/newsmips/include/vmparam.h
cvs rdiff -u -r1.1 -r1.1.142.1 src/sys/arch/sbmips/include/vmparam.h
cvs rdiff -u -r1.1 -r1.1.154.1 src/sys/arch/sgimips/include/vmparam.h

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

Modified files:

Index: src/sys/arch/cobalt/include/vmparam.h
diff -u src/sys/arch/cobalt/include/vmparam.h:1.2 src/sys/arch/cobalt/include/vmparam.h:1.2.154.1
--- src/sys/arch/cobalt/include/vmparam.h:1.2	Fri Mar 31 14:51:53 2000
+++ src/sys/arch/cobalt/include/vmparam.h	Fri Dec 11 20:22:15 2009
@@ -1,8 +1,5 @@
-/*	$NetBSD: vmparam.h,v 1.2 2000/03/31 14:51:53 soren Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.2.154.1 2009/12/11 20:22:15 matt Exp $	*/
 
 #include mips/vmparam.h
 
 #define	VM_PHYSSEG_MAX		1
-
-#define	VM_NFREELIST		1
-#define	VM_FREELIST_DEFAULT	0

Index: src/sys/arch/evbmips/include/vmparam.h
diff -u src/sys/arch/evbmips/include/vmparam.h:1.1.142.1 src/sys/arch/evbmips/include/vmparam.h:1.1.142.2
--- src/sys/arch/evbmips/include/vmparam.h:1.1.142.1	Sun Sep 13 03:33:08 2009
+++ src/sys/arch/evbmips/include/vmparam.h	Fri Dec 11 20:22:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.1.142.1 2009/09/13 03:33:08 cliff Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.1.142.2 2009/12/11 20:22:15 matt Exp $	*/
 
 #ifndef _EVBMIPS_VMPARAM_H_
 #define _EVBMIPS_VMPARAM_H_
@@ -7,7 +7,4 @@
 
 #define	VM_PHYSSEG_MAX		32
  
-#define	VM_NFREELIST		1
-#define	VM_FREELIST_DEFAULT	0
-
 #endif	/* !_EVBMIPS_VMPARAM_H_ */

Index: src/sys/arch/ews4800mips/include/vmparam.h
diff -u src/sys/arch/ews4800mips/include/vmparam.h:1.1 src/sys/arch/ews4800mips/include/vmparam.h:1.1.98.1
--- src/sys/arch/ews4800mips/include/vmparam.h:1.1	Thu Dec 29 15:20:09 2005
+++ src/sys/arch/ews4800mips/include/vmparam.h	Fri Dec 11 20:22:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.1 2005/12/29 15:20:09 tsutsui Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.1.98.1 2009/12/11 20:22:15 matt Exp $	*/
 
 #ifndef _EWS4800MIPS_VMPARAM_H_
 #define _EWS4800MIPS_VMPARAM_H_
@@ -14,9 +14,6 @@
 
 #define VM_PHYSSEG_MAX		9	/* M0-M8 */
 
-#define VM_NFREELIST		1
-#define VM_FREELIST_DEFAULT	0
-
 #ifndef KSEG2IOBUFSIZE
 /* reserve PTEs for KSEG2 I/O space */
 #define KSEG2IOBUFSIZE		kseg2iobufsize

Index: src/sys/arch/hpcmips/include/vmparam.h
diff -u src/sys/arch/hpcmips/include/vmparam.h:1.4 src/sys/arch/hpcmips/include/vmparam.h:1.4.140.1
--- src/sys/arch/hpcmips/include/vmparam.h:1.4	Thu Jan 31 17:56:34 2002
+++ src/sys/arch/hpcmips/include/vmparam.h	Fri Dec 11 20:22:15 2009
@@ -1,12 +1,9 @@
-/*	$NetBSD: vmparam.h,v 1.4 2002/01/31 17:56:34 uch Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.4.140.1 2009/12/11 20:22:15 matt Exp $	*/
 
 #include mips/vmparam.h
 #include sys/kcore.h
 
 #define	VM_PHYSSEG_MAX		5
 
-#define	VM_NFREELIST		1
-#define	VM_FREELIST_DEFAULT	0
-
 extern phys_ram_seg_t mem_clusters[];
 extern int mem_cluster_cnt;

Index: src/sys/arch/mips/include/vmparam.h
diff -u src/sys/arch/mips/include/vmparam.h:1.41.28.6 src/sys/arch/mips/include/vmparam.h:1.41.28.7
--- src/sys/arch/mips/include/vmparam.h:1.41.28.6	Tue Dec  8 18:10:54 2009
+++ src/sys/arch/mips/include/vmparam.h	Fri Dec 11 20:22:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.41.28.6 2009/12/08 18:10:54 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.41.28.7 2009/12/11 20:22:15 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -219,11 +219,13 @@
 	(pg)-mdpage.pvh_list = NULL;	\
 } while (/* CONSTCOND */ 0)
 
+#ifndef VM_NFREELIST
 #define	VM_NFREELIST		16	/* 16 distinct memory segments */
 #define VM_FREELIST_DEFAULT	0
 #define VM_FREELIST_FIRST16M	1	/* ISA DMA range */
 #define VM_FREELIST_FIRST512M	2	/* KSEG0/1 */
 #define 

CVS commit: [matt-nb5-mips64] src/usr.bin/elf2ecoff

2009-12-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 11 20:26:21 UTC 2009

Modified Files:
src/usr.bin/elf2ecoff [matt-nb5-mips64]: elf2ecoff.c

Log Message:
Use z format for size_t ...


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.32.1 src/usr.bin/elf2ecoff/elf2ecoff.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/elf2ecoff/elf2ecoff.c
diff -u src/usr.bin/elf2ecoff/elf2ecoff.c:1.22 src/usr.bin/elf2ecoff/elf2ecoff.c:1.22.32.1
--- src/usr.bin/elf2ecoff/elf2ecoff.c:1.22	Wed May 31 08:09:55 2006
+++ src/usr.bin/elf2ecoff/elf2ecoff.c	Fri Dec 11 20:26:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf2ecoff.c,v 1.22 2006/05/31 08:09:55 simonb Exp $	*/
+/*	$NetBSD: elf2ecoff.c,v 1.22.32.1 2009/12/11 20:26:21 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Jonathan Stone
@@ -399,16 +399,16 @@
 	/* Write the headers... */
 	safewrite(outfile, ep.f, sizeof(ep.f), ep.f: write: %s\n);
 	if (debug)
-		fprintf(stderr, wrote %d byte file header.\n, sizeof(ep.f));
+		fprintf(stderr, wrote %zu byte file header.\n, sizeof(ep.f));
 
 	safewrite(outfile, ep.a, sizeof(ep.a), ep.a: write: %s\n);
 	if (debug)
-		fprintf(stderr, wrote %d byte a.out header.\n, sizeof(ep.a));
+		fprintf(stderr, wrote %zu byte a.out header.\n, sizeof(ep.a));
 
 	safewrite(outfile, esecs, sizeof(esecs[0]) * nsecs,
 	esecs: write: %s\n);
 	if (debug)
-		fprintf(stderr, wrote %d bytes of section headers.\n,
+		fprintf(stderr, wrote %zu bytes of section headers.\n,
 		sizeof(esecs[0]) * nsecs);
 
 
@@ -660,7 +660,7 @@
 	symhdrp-issExtMax = strsize;
 	if (debug)
 		fprintf(stderr,
-		ECOFF symhdr: symhdr %x, strsize %lx, symsize %lx\n,
+		ECOFF symhdr: symhdr %zx, strsize %lx, symsize %lx\n,
 		sizeof(*symhdrp), strsize,
 		(nesyms * sizeof(struct ecoff_extsym)));
 



CVS commit: [matt-nb5-mips64] src

2009-12-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 11 20:33:08 UTC 2009

Modified Files:
src/gnu/dist/gcc4/gcc/config/mips [matt-nb5-mips64]: netbsd.h
src/sys/arch/mips/include [matt-nb5-mips64]: ansi.h int_fmtio.h
int_types.h
src/usr.bin/xlint [matt-nb5-mips64]: Makefile.inc

Log Message:
Unless we are in O32, use long int for size_t/ptrdiff_t/intptr_t.  This
allows N32 and N64 use both use the same type.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.32.4 -r1.1.1.1.32.5 \
src/gnu/dist/gcc4/gcc/config/mips/netbsd.h
cvs rdiff -u -r1.23 -r1.23.38.1 src/sys/arch/mips/include/ansi.h
cvs rdiff -u -r1.4 -r1.4.18.1 src/sys/arch/mips/include/int_fmtio.h
cvs rdiff -u -r1.10 -r1.10.96.1 src/sys/arch/mips/include/int_types.h
cvs rdiff -u -r1.9 -r1.9.48.1 src/usr.bin/xlint/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/gnu/dist/gcc4/gcc/config/mips/netbsd.h
diff -u src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.4 src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.5
--- src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.4	Sat Sep  5 03:26:20 2009
+++ src/gnu/dist/gcc4/gcc/config/mips/netbsd.h	Fri Dec 11 20:33:07 2009
@@ -246,6 +246,14 @@
 
 /* Make gcc agree with machine/ansi.h */
 
+#undef SIZE_TYPE
+#define SIZE_TYPE ((POINTER_SIZE == 64 || TARGET_NEWABI) \
+		   ? long unsigned int : unsigned int)
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE ((POINTER_SIZE == 64 || TARGET_NEWABI) \
+		  ? long int : int)
+
 #undef WCHAR_TYPE
 #define WCHAR_TYPE int
 

Index: src/sys/arch/mips/include/ansi.h
diff -u src/sys/arch/mips/include/ansi.h:1.23 src/sys/arch/mips/include/ansi.h:1.23.38.1
--- src/sys/arch/mips/include/ansi.h:1.23	Wed Oct 17 19:55:36 2007
+++ src/sys/arch/mips/include/ansi.h	Fri Dec 11 20:33:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ansi.h,v 1.23 2007/10/17 19:55:36 garbled Exp $	*/
+/*	$NetBSD: ansi.h,v 1.23.38.1 2009/12/11 20:33:08 matt Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -47,7 +47,7 @@
  *	#endif
  */
 #define	_BSD_CLOCK_T_		unsigned long	/* clock() */
-#ifdef _LP64
+#ifndef __mips_o32
 #define	_BSD_PTRDIFF_T_		long		/* ptr1 - ptr2 */
 #define	_BSD_SIZE_T_		unsigned long	/* sizeof() */
 #define	_BSD_SSIZE_T_		long		/* byte count or error */
@@ -57,7 +57,7 @@
 #define	_BSD_SIZE_T_		unsigned int	/* sizeof() */
 #define	_BSD_SSIZE_T_		int		/* byte count or error */
 #define	_BSD_TIME_T_		long		/* time() */
-#endif /* _LP64 */
+#endif /* !__mips_o32 */
 #if __GNUC_PREREQ__(3, 0)
 #define	_BSD_VA_LIST_		__builtin_va_list /* GCC builtin type */
 #else

Index: src/sys/arch/mips/include/int_fmtio.h
diff -u src/sys/arch/mips/include/int_fmtio.h:1.4 src/sys/arch/mips/include/int_fmtio.h:1.4.18.1
--- src/sys/arch/mips/include/int_fmtio.h:1.4	Mon Apr 28 20:23:28 2008
+++ src/sys/arch/mips/include/int_fmtio.h	Fri Dec 11 20:33:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: int_fmtio.h,v 1.4 2008/04/28 20:23:28 martin Exp $	*/
+/*	$NetBSD: int_fmtio.h,v 1.4.18.1 2009/12/11 20:33:08 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -64,9 +64,12 @@
 #endif
 #ifdef _LP64
 #define	PRIdMAX		ld	/* intmax_t		*/
-#define	PRIdPTR		ld	/* intptr_t		*/
 #else
 #define	PRIdMAX		lld	/* intmax_t		*/
+#endif
+#ifndef __mips_o32
+#define	PRIdPTR		ld	/* intptr_t		*/
+#else
 #define	PRIdPTR		d	/* intptr_t		*/
 #endif
 
@@ -92,10 +95,13 @@
 #ifdef _LP64
 #define	PRIiFAST64	li	/* int_fast64_t		*/
 #define	PRIiMAX		li	/* intmax_t		*/
-#define	PRIiPTR		li	/* intptr_t		*/
 #else
 #define	PRIiFAST64	lli	/* int_fast64_t		*/
 #define	PRIiMAX		lli	/* intmax_t		*/
+#endif
+#ifndef __mips_o32
+#define	PRIiPTR		li	/* intptr_t		*/
+#else
 #define	PRIiPTR		i	/* intptr_t		*/
 #endif
 
@@ -123,11 +129,14 @@
 #ifdef _LP64
 #define	PRIoFAST64	lo	/* uint_fast64_t	*/
 #define	PRIoMAX		lo	/* uintmax_t		*/
-#define	PRIoPTR		lo	/* uintptr_t		*/
 #else
 #define	PRIoFAST64	llo	/* uint_fast64_t	*/
 #define	PRIoMAX		llo	/* uintmax_t		*/
-#define	PRIoPTR		o	/* uintptr_t		*/
+#endif
+#ifndef __mips_o32
+#define	PRIoPTR		lo	/* intptr_t		*/
+#else
+#define	PRIoPTR		o	/* intptr_t		*/
 #endif
 
 #define	PRIu8		u	/* uint8_t		*/
@@ -152,11 +161,14 @@
 #ifdef _LP64
 #define	PRIuFAST64	lu	/* uint_fast64_t	*/
 #define	PRIuMAX		lu	/* uintmax_t		*/
-#define	PRIuPTR		lu	/* uintptr_t		*/
 #else
 #define	PRIuFAST64	llu	/* uint_fast64_t	*/
 #define	PRIuMAX		llu	/* uintmax_t		*/
-#define	PRIuPTR		u	/* uintptr_t		*/
+#endif
+#ifndef __mips_o32
+#define	PRIuPTR		lu	/* intptr_t		*/
+#else
+#define	PRIuPTR		u	/* intptr_t		*/
 #endif
 
 #define	PRIx8		x	/* uint8_t		*/
@@ -181,10 +193,13 @@
 #ifdef _LP64
 #define	PRIxFAST64	lx	/* uint_fast64_t	*/
 #define	PRIxMAX		lx	/* uintmax_t		*/
-#define	PRIxPTR		lx	/* uintptr_t		*/
 #else
 #define	PRIxFAST64	llx	/* uint_fast64_t	*/
 #define	PRIxMAX		llx	/* uintmax_t		*/
+#endif
+#ifndef __mips_o32
+#define	PRIxPTR		lx	/* uintptr_t		*/
+#else

CVS commit: src/lib/libukfs

2009-12-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Dec 11 21:20:52 UTC 2009

Modified Files:
src/lib/libukfs: Makefile ukfs.c

Log Message:
Use range locking (fnctl(F_SETLK)) instead of file locking (flock()).
This allows to mount multiple (non-overlapping) partitions from the
same disk image.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libukfs/Makefile
cvs rdiff -u -r1.44 -r1.45 src/lib/libukfs/ukfs.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/libukfs/Makefile
diff -u src/lib/libukfs/Makefile:1.3 src/lib/libukfs/Makefile:1.4
--- src/lib/libukfs/Makefile:1.3	Wed Oct  7 20:51:00 2009
+++ src/lib/libukfs/Makefile	Fri Dec 11 21:20:52 2009
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.3 2009/10/07 20:51:00 pooka Exp $
+#	$NetBSD: Makefile,v 1.4 2009/12/11 21:20:52 pooka Exp $
 #
 
 LIB=		ukfs
-LIBDPLIBS+=	rump	${.CURDIR}/../librump		\
-		rumpvfs	${.CURDIR}/../librumpvfs
+#LIBDPLIBS+=	rump	${.CURDIR}/../librump		\
+#		rumpvfs	${.CURDIR}/../librumpvfs
 CPPFLAGS+=	-I${.CURDIR}
 
 INCS=		ukfs.h
@@ -11,5 +11,6 @@
 
 SRCS=		ukfs.c ukfs_disklabel.c
 MAN=		ukfs.3
+DBG=		-g
 
 .include bsd.lib.mk

Index: src/lib/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.44 src/lib/libukfs/ukfs.c:1.45
--- src/lib/libukfs/ukfs.c:1.44	Fri Dec 11 16:47:33 2009
+++ src/lib/libukfs/ukfs.c	Fri Dec 11 21:20:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukfs.c,v 1.44 2009/12/11 16:47:33 pooka Exp $	*/
+/*	$NetBSD: ukfs.c,v 1.45 2009/12/11 21:20:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -79,6 +79,7 @@
 	int ukfs_devfd;
 	char *ukfs_devpath;
 	char *ukfs_mountpath;
+	struct ukfs_part *ukfs_part;
 };
 
 static int builddirs(const char *, mode_t,
@@ -180,6 +181,8 @@
 struct ukfs_part *ukfs_part_none = ukfs__part_none;
 struct ukfs_part *ukfs_part_na = ukfs__part_na;
 
+#define PART2LOCKSIZE(len) ((len) == RUMP_ETFS_SIZE_ENDOFF ? 0 : (len))
+
 int
 _ukfs_init(int version)
 {
@@ -387,6 +390,20 @@
 	return rv;
 }
 
+static void
+unlockdev(int fd, struct ukfs_part *part)
+{
+	struct flock flarg;
+
+	memset(flarg, 0, sizeof(flarg));
+	flarg.l_type = F_UNLCK;
+	flarg.l_whence = SEEK_SET;
+	flarg.l_start = part-part_devoff;
+	flarg.l_len = PART2LOCKSIZE(part-part_devsize);
+	if (fcntl(fd, F_SETLK, flarg) == -1)
+		warn(ukfs: cannot unlock device file);
+}
+
 /*
  * Open the disk file and flock it.  Also, if we are operation on
  * an embedded partition, find the partition offset and size from
@@ -395,12 +412,12 @@
  * We hard-fail only in two cases:
  *  1) we failed to get the partition info out (don't know what offset
  * to mount from)
- *  2) we failed to flock the source device (i.e. flock() fails,
+ *  2) we failed to flock the source device (i.e. fcntl() fails,
  * not e.g. open() before it)
  *
  * Otherwise we let the code proceed to mount and let the file system
  * throw the proper error.  The only questionable bit is that if we
- * soft-fail before flock() and mount does succeed...
+ * soft-fail before flock and mount does succeed...
  *
  * Returns: -1 error (errno reports error code)
  *   0 success
@@ -435,10 +452,25 @@
 	 * We also need to close the device for fairly obvious reasons.
 	 */
 	if (!S_ISBLK(sb.st_mode)) {
-		if (flock(devfd, LOCK_NB | (rdonly ? LOCK_SH:LOCK_EX)) == -1) {
-			warnx(ukfs_mount: cannot get %s lock on 
-			device, rdonly ? shared : exclusive);
-			rv = errno;
+		struct flock flarg;
+
+		memset(flarg, 0, sizeof(flarg));
+		flarg.l_type = rdonly ? F_RDLCK : F_WRLCK;
+		flarg.l_whence = SEEK_SET;
+		flarg.l_start = part-part_devoff;
+		flarg.l_len = PART2LOCKSIZE(part-part_devsize);
+		if (fcntl(devfd, F_SETLK, flarg) == -1) {
+			pid_t holder;
+			int sverrno;
+
+			sverrno = errno;
+			if (fcntl(devfd, F_GETLK, flarg) != 1)
+holder = flarg.l_pid;
+			else
+holder = -1;
+			warnx(ukfs_mount: cannot lock device.  held by pid %d,
+			holder);
+			rv = sverrno;
 			goto out;
 		}
 	} else {
@@ -518,10 +550,10 @@
 	fs-ukfs_cdir = ukfs_getrvp(fs);
 	pthread_spin_init(fs-ukfs_spin, PTHREAD_PROCESS_SHARED);
 	fs-ukfs_devfd = devfd;
+	fs-ukfs_part = part;
 	assert(rv == 0);
 
  out:
-	ukfs_part_release(part);
 	if (rv) {
 		if (fs) {
 			if (fs-ukfs_rvp)
@@ -534,9 +566,10 @@
 		if (regged)
 			rump_pub_etfs_remove(devpath);
 		if (devfd != -1) {
-			flock(devfd, LOCK_UN);
+			unlockdev(fs-ukfs_devfd, fs-ukfs_part);
 			close(devfd);
 		}
+		ukfs_part_release(part);
 		errno = rv;
 	}
 
@@ -588,6 +621,7 @@
 		rump_pub_lwp_release(rump_pub_lwp_curlwp());
 	}
 
+	ukfs_part_release(fs-ukfs_part);
 	if (fs-ukfs_devpath) {
 		rump_pub_etfs_remove(fs-ukfs_devpath);
 		free(fs-ukfs_devpath);
@@ -596,7 +630,7 @@
 
 	pthread_spin_destroy(fs-ukfs_spin);
 	if (fs-ukfs_devfd != -1) {
-		flock(fs-ukfs_devfd, LOCK_UN);
+		unlockdev(fs-ukfs_devfd, fs-ukfs_part);
 		close(fs-ukfs_devfd);
 	}
 	free(fs);



CVS commit: src/lib/libukfs

2009-12-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Dec 11 21:21:52 UTC 2009

Modified Files:
src/lib/libukfs: Makefile

Log Message:
uncommit accidental changes


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libukfs/Makefile

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

Modified files:

Index: src/lib/libukfs/Makefile
diff -u src/lib/libukfs/Makefile:1.4 src/lib/libukfs/Makefile:1.5
--- src/lib/libukfs/Makefile:1.4	Fri Dec 11 21:20:52 2009
+++ src/lib/libukfs/Makefile	Fri Dec 11 21:21:52 2009
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.4 2009/12/11 21:20:52 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2009/12/11 21:21:52 pooka Exp $
 #
 
 LIB=		ukfs
-#LIBDPLIBS+=	rump	${.CURDIR}/../librump		\
-#		rumpvfs	${.CURDIR}/../librumpvfs
+LIBDPLIBS+=	rump	${.CURDIR}/../librump		\
+		rumpvfs	${.CURDIR}/../librumpvfs
 CPPFLAGS+=	-I${.CURDIR}
 
 INCS=		ukfs.h
@@ -11,6 +11,5 @@
 
 SRCS=		ukfs.c ukfs_disklabel.c
 MAN=		ukfs.3
-DBG=		-g
 
 .include bsd.lib.mk



CVS commit: src/sys/arch

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 22:23:09 UTC 2009

Modified Files:
src/sys/arch/amiga/amiga: amiga_init.c
src/sys/arch/atari/atari: atari_init.c
src/sys/arch/cesfic/cesfic: pmap_bootstrap.c
src/sys/arch/hp300/hp300: pmap_bootstrap.c
src/sys/arch/luna68k/luna68k: pmap_bootstrap.c
src/sys/arch/mac68k/mac68k: pmap_bootstrap.c
src/sys/arch/mvme68k/mvme68k: pmap_bootstrap.c
src/sys/arch/news68k/news68k: pmap_bootstrap.c
src/sys/arch/next68k/next68k: pmap_bootstrap.c
src/sys/arch/x68k/x68k: pmap_bootstrap.c

Log Message:
Use appropriate macro during pmap initialization:
- use SYSMAP_VA, SEGSHIFT for Sysmap address and table entries
- use TIA_SIZE, TIB_SIZE for sizes of table entries

Now page size dependent numbers are almost replaced with proper macro.

Tested on atari, hp300, and news68k.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/amiga/amiga/amiga_init.c
cvs rdiff -u -r1.91 -r1.92 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/hp300/hp300/pmap_bootstrap.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/mac68k/mac68k/pmap_bootstrap.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/news68k/news68k/pmap_bootstrap.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/next68k/next68k/pmap_bootstrap.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/x68k/x68k/pmap_bootstrap.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/amiga_init.c
diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.116 src/sys/arch/amiga/amiga/amiga_init.c:1.117
--- src/sys/arch/amiga/amiga/amiga_init.c:1.116	Sun Dec  6 06:41:28 2009
+++ src/sys/arch/amiga/amiga/amiga_init.c	Fri Dec 11 22:23:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: amiga_init.c,v 1.116 2009/12/06 06:41:28 tsutsui Exp $	*/
+/*	$NetBSD: amiga_init.c,v 1.117 2009/12/11 22:23:08 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1994 Michael L. Hitch
@@ -36,7 +36,7 @@
 #include opt_devreload.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.116 2009/12/06 06:41:28 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.117 2009/12/11 22:23:08 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -402,7 +402,7 @@
 	/*
 	 * Sysmap is now placed at the end of Supervisor virtual address space.
 	 */
-	RELOC(Sysmap, u_int *) = (u_int *)-(NPTEPG * PAGE_SIZE);
+	RELOC(Sysmap, u_int *) = (u_int *)SYSMAP_VA;
 
 	/*
 	 * initialize segment table and page table map
@@ -488,7 +488,7 @@
 		while (pg  epg)
 			*pg++ = SG_NV;
 		pg = (pt_entry_t *)Sysptmap_pa;
-		pg = pg[256 - 1];		/* XXX */
+		pg = pg[SYSMAP_VA  SEGSHIFT];
 		*pg = Sysptmap_pa | PG_RW | PG_CI | PG_V;
 	} else
 #endif /* M68040 */
@@ -511,12 +511,16 @@
 		/*
 		 * invalidate the remainder of each table
 		 */
-		/* XXX PAGE_SIZE dependent constant: 256 or 1024 */
-		epg = (pt_entry_t *)(Sysptmap_pa + (256 - 1) * sizeof(st_entry_t));
+		epg = (pt_entry_t *)Sysptmap_pa;
+		epg = epg[TIA_SIZE];
 		while (pg  epg) {
 			*sg++ = SG_NV;
 			*pg++ = PG_NV;
 		}
+		sg = (st_entry_t *)RELOC(Sysseg_pa, u_int);
+		sg = sg[SYSMAP_VA  SEGSHIFT];
+		pg = (pt_entry_t *)Sysptmap_pa;
+		pg = pg[SYSMAP_VA  SEGSHIFT];
 		*sg = Sysptmap_pa | SG_RW | SG_V;
 		*pg = Sysptmap_pa | PG_RW | PG_CI | PG_V;
 		/* XXX zero out rest of page? */

Index: src/sys/arch/atari/atari/atari_init.c
diff -u src/sys/arch/atari/atari/atari_init.c:1.91 src/sys/arch/atari/atari/atari_init.c:1.92
--- src/sys/arch/atari/atari/atari_init.c:1.91	Sun Dec  6 06:41:29 2009
+++ src/sys/arch/atari/atari/atari_init.c	Fri Dec 11 22:23:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: atari_init.c,v 1.91 2009/12/06 06:41:29 tsutsui Exp $	*/
+/*	$NetBSD: atari_init.c,v 1.92 2009/12/11 22:23:08 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: atari_init.c,v 1.91 2009/12/06 06:41:29 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: atari_init.c,v 1.92 2009/12/11 22:23:08 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_mbtype.h
@@ -336,7 +336,7 @@
 	/*
 	 * Sysmap is now placed at the end of Supervisor virtual address space.
 	 */
-	Sysmap = (pt_entry_t *)-(NPTEPG * PAGE_SIZE);
+	Sysmap = (pt_entry_t *)SYSMAP_VA;
 
 	/*
 	 * Initialize segment tables
@@ -942,11 +942,11 @@
 	 * Invalidate the remainder of the tables.
 	 */
 	esg = (st_entry_t *)sysseg_pa;
-	esg = esg[256];			/* XXX should be TIA_SIZE */
+	esg = esg[TIA_SIZE];
 	while (sg  esg)
 		*sg++ = SG_NV;
 	epg = (pt_entry_t *)sysptmap_pa;
-	epg = epg[NPTEPG];			/* XXX should be TIB_SIZE */
+	epg = epg[TIB_SIZE];
 	while (pg  epg)
 		*pg++ = PG_NV;
 
@@ -954,9 +954,9 @@
 	 

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

2009-12-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 11 22:34:30 UTC 2009

Modified Files:
src/distrib/sets/lists/xserver: md.netwinder

Log Message:
libint10 is only built on amd64, i386, and macppc.  Update the xorg part
of this setlist to reflect that.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/xserver/md.netwinder

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/xserver/md.netwinder
diff -u src/distrib/sets/lists/xserver/md.netwinder:1.21 src/distrib/sets/lists/xserver/md.netwinder:1.22
--- src/distrib/sets/lists/xserver/md.netwinder:1.21	Sat Nov 28 12:10:25 2009
+++ src/distrib/sets/lists/xserver/md.netwinder	Fri Dec 11 22:34:30 2009
@@ -1,4 +1,4 @@
-# $NetBSD: md.netwinder,v 1.21 2009/11/28 12:10:25 mbalmer Exp $
+# $NetBSD: md.netwinder,v 1.22 2009/12/11 22:34:30 snj Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -354,11 +354,11 @@
 ./usr/X11R7/lib/modules/libi2c.so.0			-unknown-	xorg
 ./usr/X11R7/lib/modules/libi2c_g.a			-unknown-	debuglib,xorg
 ./usr/X11R7/lib/modules/libi2c_pic.a			-unknown-	xorg
-./usr/X11R7/lib/modules/libint10.a			-unknown-	xorg
-./usr/X11R7/lib/modules/libint10.so			-unknown-	xorg
-./usr/X11R7/lib/modules/libint10.so.0			-unknown-	xorg
-./usr/X11R7/lib/modules/libint10_g.a			-unknown-	debuglib,xorg
-./usr/X11R7/lib/modules/libint10_pic.a			-unknown-	xorg
+./usr/X11R7/lib/modules/libint10.a			-unknown-	obsolete
+./usr/X11R7/lib/modules/libint10.so			-unknown-	obsolete
+./usr/X11R7/lib/modules/libint10.so.0			-unknown-	obsolete
+./usr/X11R7/lib/modules/libint10_g.a			-unknown-	obsolete,xorg
+./usr/X11R7/lib/modules/libint10_pic.a			-unknown-	obsolete
 ./usr/X11R7/lib/modules/libpcidata.a			-unknown-	obsolete
 ./usr/X11R7/lib/modules/libpcidata.so			-unknown-	obsolete
 ./usr/X11R7/lib/modules/libpcidata.so.0			-unknown-	obsolete



CVS commit: src/share/mk

2009-12-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 11 22:35:42 UTC 2009

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Switch netwinder to X.Org.


To generate a diff of this commit:
cvs rdiff -u -r1.607 -r1.608 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.607 src/share/mk/bsd.own.mk:1.608
--- src/share/mk/bsd.own.mk:1.607	Fri Dec 11 16:09:03 2009
+++ src/share/mk/bsd.own.mk	Fri Dec 11 22:35:42 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.607 2009/12/11 16:09:03 uebayasi Exp $
+#	$NetBSD: bsd.own.mk,v 1.608 2009/12/11 22:35:42 snj Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -725,7 +725,7 @@
 	${MACHINE} == dreamcast || ${MACHINE} == ews4800mips || \
 	${MACHINE} == hpcarm || ${MACHINE} == hpcmips || \
 	${MACHINE} == hpcsh || ${MACHINE} == mac68k || \
-	${MACHINE} == netwinder || ${MACHINE} == newsmips || \
+	${MACHINE} == newsmips || \
 	${MACHINE} == ofppc || ${MACHINE} == pmax || \
 	${MACHINE} == sun3 || ${MACHINE} == x68k
 X11FLAVOUR?=	XFree86



CVS commit: src/external/mit/xorg/server/drivers

2009-12-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 11 22:37:39 UTC 2009

Modified Files:
src/external/mit/xorg/server/drivers: Makefile

Log Message:
Add commented out xf86-video-igs under netwinder.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/external/mit/xorg/server/drivers/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/mit/xorg/server/drivers/Makefile
diff -u src/external/mit/xorg/server/drivers/Makefile:1.36 src/external/mit/xorg/server/drivers/Makefile:1.37
--- src/external/mit/xorg/server/drivers/Makefile:1.36	Sat Dec  5 09:11:54 2009
+++ src/external/mit/xorg/server/drivers/Makefile	Fri Dec 11 22:37:39 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.36 2009/12/05 09:11:54 snj Exp $
+#	$NetBSD: Makefile,v 1.37 2009/12/11 22:37:39 snj Exp $
 
 SUBDIR= \
 	xf86-input-keyboard \
@@ -64,6 +64,7 @@
 .elif ${MACHINE} == netwinder
 SUBDIR+= \
 	xf86-video-wsfb
+#	xf86-video-igs
 .elif ${MACHINE_ARCH} == sparc64 || ${MACHINE_ARCH} == sparc
 SUBDIR+= \
 	xf86-video-ag10e \



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

2009-12-11 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Fri Dec 11 23:57:38 UTC 2009

Modified Files:
src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c

Log Message:
- add another known/recognized psb_version ID#
- useing comcnfreq instead of -1 in rmixl_com_cnattach now
- MIPS_RESET_EXC_VEC is physical addr, no need for translation to phys
  when reserving from phys memory (should never be in the list anyway).
- in rmixlfw_init(), when untested psb_version, initialize mem_clusters[]
  (to use MEMSIZE)


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/evbmips/rmixl/machdep.c

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

Modified files:

Index: src/sys/arch/evbmips/rmixl/machdep.c
diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.8 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.9
--- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.8	Mon Nov 16 23:57:26 2009
+++ src/sys/arch/evbmips/rmixl/machdep.c	Fri Dec 11 23:57:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.1.2.8 2009/11/16 23:57:26 cliff Exp $	*/
+/*	$NetBSD: machdep.c,v 1.1.2.9 2009/12/11 23:57:38 cliff Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.1.2.8 2009/11/16 23:57:26 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.1.2.9 2009/12/11 23:57:38 cliff Exp $);
 
 #include opt_ddb.h
 #include opt_com.h
@@ -199,6 +199,7 @@
 static uint64_t rmiclfw_psb_versions[] = {
 	0x4958d4fb0056ULL,
 	0x49a5a8fa0056ULL,
+	0x4aacdb6a0056ULL,
 };
 #define RMICLFW_PSB_VERSIONS_LEN \
 	(sizeof(rmiclfw_psb_versions)/sizeof(rmiclfw_psb_versions[0]))
@@ -282,7 +283,7 @@
 
 	rmixl_mtcr(0x400, 0);		/* enable MMU clock gating */
 	/* set single MMU Thread Mode */
-	/* TLB is partitioned (but 1 partition) */
+	/* TLB is partitioned (1 partition) */
 
 	/*
 	 * Clear the BSS segment.
@@ -309,7 +310,7 @@
 	rmixl_obio_bus_mem_init(rcp-rc_obio_memt, rcp); /* need for console */
 
 #if NCOM  0
-	rmixl_com_cnattach(comcnaddr, comcnspeed, -1,
+	rmixl_com_cnattach(comcnaddr, comcnspeed, comcnfreq,
 		COM_TYPE_NORMAL, comcnmode);
 #endif
 
@@ -374,9 +375,9 @@
 		0, round_page(MIPS_KSEG0_TO_PHYS(kernend)));
 
 	/* reserve reset exception vector page */
+	/* should never be in our clusters anyway... */
 	vm_cluster_cnt = ram_seg_resv(vm_clusters, vm_cluster_cnt,
-		MIPS_KSEG1_TO_PHYS(MIPS_RESET_EXC_VEC),
-		MIPS_KSEG1_TO_PHYS(MIPS_RESET_EXC_VEC+NBPG));
+		MIPS_RESET_EXC_VEC, MIPS_RESET_EXC_VEC+NBPG);
 
 	/*
 	 * Load vm_clusters[] into the VM system.
@@ -388,6 +389,7 @@
 		last = round_page(vm_clusters[i].start + vm_clusters[i].size);
 		DPRINTF((%s: %d: %#PRIx64, %#PRIx64\n,
 			__func__, i, first, last));
+
 		uvm_page_physload(atop(first), atop(last), atop(first),
 			atop(last), VM_FREELIST_DEFAULT);
 	}
@@ -428,7 +430,6 @@
 #endif
 }
 
-
 /*
  * ram_seg_resv - cut reserved regions out of segs, fragmenting as needed
  *
@@ -625,6 +626,11 @@
 	rmixl_puthex64(rmixlfw_info.psb_version);
 	rmixl_puts(\r\n);
 #endif
+
+	/* XXX trust and use MEMSIZE */
+	mem_clusters[0].start = 0;
+	mem_clusters[0].size = MEMSIZE;
+	mem_cluster_cnt = 1;
 	return MEMSIZE;
 
  found:



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

2009-12-11 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Dec 12 00:10:44 UTC 2009

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

Log Message:
- use #ifdef MIPS_SYSCALL_DEBUG instead of #if 0
- we should have a runtime switch also (TBD)


To generate a diff of this commit:
cvs rdiff -u -r1.37.12.9 -r1.37.12.10 src/sys/arch/mips/mips/syscall.c

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

Modified files:

Index: src/sys/arch/mips/mips/syscall.c
diff -u src/sys/arch/mips/mips/syscall.c:1.37.12.9 src/sys/arch/mips/mips/syscall.c:1.37.12.10
--- src/sys/arch/mips/mips/syscall.c:1.37.12.9	Sat Sep 12 17:41:10 2009
+++ src/sys/arch/mips/mips/syscall.c	Sat Dec 12 00:10:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall.c,v 1.37.12.9 2009/09/12 17:41:10 matt Exp $	*/
+/*	$NetBSD: syscall.c,v 1.37.12.10 2009/12/12 00:10:44 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -107,7 +107,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.37.12.9 2009/09/12 17:41:10 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.37.12.10 2009/12/12 00:10:44 cliff Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sa.h
@@ -350,7 +350,7 @@
 	} while (/*CONSTCOND*/ 0);	/* avoid a goto */
 #endif
 
-#if 0
+#ifdef MIPS_SYSCALL_DEBUG
 	if (p-p_emul-e_syscallnames)
 		printf(syscall %s:, p-p_emul-e_syscallnames[code]);
 	else
@@ -386,7 +386,7 @@
 			frame-f_regs[_R_V0 + _QUAD_HIGHWORD] = tmp  32; 
 		}
 #endif
-#if 0
+#ifdef MIPS_SYSCALL_DEBUG
 		if (p-p_emul-e_syscallnames)
 			printf(syscall %s:, p-p_emul-e_syscallnames[code]);
 		else
@@ -408,7 +408,7 @@
 			error = p-p_emul-e_errno[error];
 		frame-f_regs[_R_V0] = error;
 		frame-f_regs[_R_A3] = 1;
-#if 0
+#ifdef MIPS_SYSCALL_DEBUG
 		if (p-p_emul-e_syscallnames)
 			printf(syscall %s:, p-p_emul-e_syscallnames[code]);
 		else



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

2009-12-11 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Dec 12 00:18:34 UTC 2009

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

Log Message:
- in ipl_sr_bits[], ensure ints for unused vectors are always disabled
  and ensure that MIPS_INT_MASK_5 (clock) is enabled as needed
- break IRT entry management out into routines;
  this allows e.g. setup of IRT entry for clock without all the
  rest of rmixl_intr_irt_establish()
- evbmips_intr_init() now creates IRT entry for mips3 clock interrupt


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 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.5 src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.6
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.5	Fri Nov 13 05:27:09 2009
+++ src/sys/arch/mips/rmi/rmixl_intr.c	Sat Dec 12 00:18:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.c,v 1.1.2.5 2009/11/13 05:27:09 cliff Exp $	*/
+/*	$NetBSD: rmixl_intr.c,v 1.1.2.6 2009/12/12 00:18:34 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.5 2009/11/13 05:27:09 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_intr.c,v 1.1.2.6 2009/12/12 00:18:34 cliff Exp $);
 
 #include opt_ddb.h
 
@@ -101,16 +101,21 @@
 /*
  * This is a mask of bits to clear in the SR when we go to a
  * given hardware interrupt priority level.
+ * _SR_BITS_DFLT bits are to be always clear (disabled)
  */
+#define _SR_BITS_DFLT	(MIPS_INT_MASK_2|MIPS_INT_MASK_3|MIPS_INT_MASK_4)
 const uint32_t ipl_sr_bits[_IPL_N] = {
-	[IPL_NONE] = 0,
+	[IPL_NONE] = _SR_BITS_DFLT,
 	[IPL_SOFTCLOCK] =
-		MIPS_SOFT_INT_MASK_0,
+		_SR_BITS_DFLT
+	  | MIPS_SOFT_INT_MASK_0,
 	[IPL_SOFTNET] =
-		MIPS_SOFT_INT_MASK_0
+		_SR_BITS_DFLT
+	  | MIPS_SOFT_INT_MASK_0
 	  | MIPS_SOFT_INT_MASK_1,
 	[IPL_VM] =
-		MIPS_SOFT_INT_MASK_0
+		_SR_BITS_DFLT
+	  | MIPS_SOFT_INT_MASK_0
 	  | MIPS_SOFT_INT_MASK_1
 	  | MIPS_INT_MASK_0,
 	[IPL_SCHED] =
@@ -298,6 +303,13 @@
 static int evbmips_intr_init_done;
 #endif
 
+
+static void rmixl_intr_irt_init(int);
+static void rmixl_intr_irt_disestablish(int);
+static void rmixl_intr_irt_establish(int, int, rmixl_intr_trigger_t,
+		rmixl_intr_polarity_t, int);
+
+
 static inline void
 pic_irt_print(const char *s, const int n, u_int irq)
 {
@@ -348,14 +360,16 @@
 	RMIXL_PICREG_WRITE(RMIXL_PIC_CONTROL, r);
 
 	/*
-	 * invalidate all IRT Entries
-	 * permanently unmask Thread#0 in low word
-	 * (assume we only have 1 thread)
+	 * initialize all IRT Entries
 	 */
-	for (i=0; i  NIRQS; i++) {
-		RMIXL_PICREG_WRITE(RMIXL_PIC_IRTENTRYC1(i), 0);	/* high word */
-		RMIXL_PICREG_WRITE(RMIXL_PIC_IRTENTRYC0(i), 1);	/* low  word */
-	} 
+	for (i=0; i  NIRQS; i++)
+		rmixl_intr_irt_init(i);
+
+	/*
+	 * establish IRT entry for mips3 clock interrupt
+	 */
+	rmixl_intr_irt_establish(7, IPL_CLOCK, RMIXL_INTR_LEVEL,
+		RMIXL_INTR_HIGH, rmixl_iplvec[IPL_CLOCK]);
 
 #ifdef DIAGNOSTIC
 	evbmips_intr_init_done = 1;
@@ -395,13 +409,65 @@
 	return name;
 }
 
+/*
+ * rmixl_intr_irt_init
+ * - invalidate IRT Entry for irq
+ * - unmask Thread#0 in low word (assume we only have 1 thread)
+ */
+static void
+rmixl_intr_irt_init(int irq)
+{
+	RMIXL_PICREG_WRITE(RMIXL_PIC_IRTENTRYC1(irq), 0);	/* high word */
+	RMIXL_PICREG_WRITE(RMIXL_PIC_IRTENTRYC0(irq), 1);	/* low  word */
+}
+
+/*
+ * rmixl_intr_irt_disestablish
+ * - invalidate IRT Entry for irq
+ * - writes to IRTENTRYC1 only; leave IRTENTRYC0 as-is
+ */
+static void
+rmixl_intr_irt_disestablish(int irq)
+{
+	DPRINTF((%s: irq %d, irtc1 %#x\n, __func__, irq, 0));
+	RMIXL_PICREG_WRITE(RMIXL_PIC_IRTENTRYC1(irq), 0);	/* high word */
+}
+
+/*
+ * rmixl_intr_irt_establish
+ * - construct and IRT Entry for irq and write to PIC
+ * - writes to IRTENTRYC1 only; assumes IRTENTRYC0 has been initialized
+ */
+static void
+rmixl_intr_irt_establish(int irq, int ipl, rmixl_intr_trigger_t trigger,
+	rmixl_intr_polarity_t polarity, int vec)
+{
+	uint32_t irtc1;
+
+	irtc1  = RMIXL_PIC_IRTENTRYC1_VALID;
+	irtc1 |= RMIXL_PIC_IRTENTRYC1_GL;	/* local */
+
+	if (trigger == RMIXL_INTR_LEVEL)
+		irtc1 |= RMIXL_PIC_IRTENTRYC1_TRG;
+
+	if ((polarity == RMIXL_INTR_FALLING) || (polarity == RMIXL_INTR_LOW))
+		irtc1 |= RMIXL_PIC_IRTENTRYC1_P;
+
+	irtc1 |= vec;
+
+	/*
+	 * write IRT Entry to PIC (high word only)
+	 */
+	DPRINTF((%s: irq %d, irtc1 %#x\n, __func__, irq, irtc1));
+	RMIXL_PICREG_WRITE(RMIXL_PIC_IRTENTRYC1(irq), irtc1);
+}
+
 void *
 rmixl_intr_establish(int irq, int ipl, rmixl_intr_trigger_t trigger,
 	rmixl_intr_polarity_t polarity, int (*func)(void *), void *arg)
 {
 	struct evbmips_intrhand *ih;
 	struct rmixl_intrvec *ivp;
-	uint32_t irtc1;
 	int vec;
 	int s;
 
@@ -422,14 +488,9 @@
 	if 

CVS commit: src/sys/sys

2009-12-11 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Dec 12 00:24:57 UTC 2009

Modified Files:
src/sys/sys: sysctl.h

Log Message:
Fix comment.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/sys/sysctl.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/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.187 src/sys/sys/sysctl.h:1.188
--- src/sys/sys/sysctl.h:1.187	Wed Sep 16 15:23:05 2009
+++ src/sys/sys/sysctl.h	Sat Dec 12 00:24:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.187 2009/09/16 15:23:05 pooka Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.188 2009/12/12 00:24:57 rmind Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -552,7 +552,7 @@
 	int32_t	p_vm_dsize;		/* SEGSZ_T: data size (pages) */
 	int32_t	p_vm_ssize;		/* SEGSZ_T: stack size (pages) */
 
-	int64_t	p_uvalid;		/* CHAR: following p_u* members from struct user are valid */
+	int64_t	p_uvalid;		/* CHAR: following p_u* parameters are valid */
 	/* XXX 64 bits for alignment */
 	uint32_t p_ustart_sec;		/* STRUCT TIMEVAL: starting time. */
 	uint32_t p_ustart_usec;		/* STRUCT TIMEVAL: starting time. */



CVS commit: src/lib/libukfs

2009-12-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Dec 12 00:46:04 UTC 2009

Modified Files:
src/lib/libukfs: ukfs.c

Log Message:
fix error branch


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libukfs/ukfs.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/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.45 src/lib/libukfs/ukfs.c:1.46
--- src/lib/libukfs/ukfs.c:1.45	Fri Dec 11 21:20:52 2009
+++ src/lib/libukfs/ukfs.c	Sat Dec 12 00:46:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukfs.c,v 1.45 2009/12/11 21:20:52 pooka Exp $	*/
+/*	$NetBSD: ukfs.c,v 1.46 2009/12/12 00:46:04 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -566,7 +566,7 @@
 		if (regged)
 			rump_pub_etfs_remove(devpath);
 		if (devfd != -1) {
-			unlockdev(fs-ukfs_devfd, fs-ukfs_part);
+			unlockdev(devfd, part);
 			close(devfd);
 		}
 		ukfs_part_release(part);



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

2009-12-11 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Dec 12 01:45:01 UTC 2009

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

Log Message:
initialize sc_frequency to CONSFREQ


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/mips/rmi/rmixl_com.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_com.c
diff -u src/sys/arch/mips/rmi/rmixl_com.c:1.1.2.7 src/sys/arch/mips/rmi/rmixl_com.c:1.1.2.8
--- src/sys/arch/mips/rmi/rmixl_com.c:1.1.2.7	Sun Nov 15 23:10:04 2009
+++ src/sys/arch/mips/rmi/rmixl_com.c	Sat Dec 12 01:45:01 2009
@@ -1,4 +1,4 @@
-/* $Id: rmixl_com.c,v 1.1.2.7 2009/11/15 23:10:04 cliff Exp $ */
+/* $Id: rmixl_com.c,v 1.1.2.8 2009/12/12 01:45:01 cliff Exp $ */
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
  * Copyright (c) 2006 Garrett D'Amore.
@@ -101,7 +101,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_com.c,v 1.1.2.7 2009/11/15 23:10:04 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_com.c,v 1.1.2.8 2009/12/12 01:45:01 cliff Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -262,7 +262,7 @@
 	bus_size_t size;
 
 	sc-sc_dev = self;
-	sc-sc_frequency = -1;	/* XXX */
+	sc-sc_frequency = CONSFREQ;
 
 	bst = obio-obio_bst;
 	addr = obio-obio_addr;



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

2009-12-11 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Dec 12 07:49:31 UTC 2009

Modified Files:
src/sys/arch/zaurus/dev: ztp.c

Log Message:
Use tpcalib_ioctl() instead of hpc_tpanel_ioctl().


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/dev/ztp.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/zaurus/dev/ztp.c
diff -u src/sys/arch/zaurus/dev/ztp.c:1.7 src/sys/arch/zaurus/dev/ztp.c:1.8
--- src/sys/arch/zaurus/dev/ztp.c:1.7	Tue Mar  3 18:42:19 2009
+++ src/sys/arch/zaurus/dev/ztp.c	Sat Dec 12 07:49:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ztp.c,v 1.7 2009/03/03 18:42:19 nonaka Exp $	*/
+/*	$NetBSD: ztp.c,v 1.8 2009/12/12 07:49:31 nonaka Exp $	*/
 /* $OpenBSD: zts.c,v 1.9 2005/04/24 18:55:49 uwe Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ztp.c,v 1.7 2009/03/03 18:42:19 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: ztp.c,v 1.8 2009/12/12 07:49:31 nonaka Exp $);
 
 #include lcd.h
 
@@ -535,7 +535,7 @@
 
 	case WSMOUSEIO_SCALIBCOORDS:
 	case WSMOUSEIO_GCALIBCOORDS:
-		return hpc_tpanel_ioctl(sc-sc_tpcalib, cmd, data, flag, l);
+		return tpcalib_ioctl(sc-sc_tpcalib, cmd, data, flag, l);
 	}
 
 	return EPASSTHROUGH;



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2009-12-11 Thread NONAKA Kimihiro
Module Name:xsrc
Committed By:   nonaka
Date:   Sat Dec 12 07:52:36 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb.h wsfb_driver.c

Log Message:
Enable shadowFB for rotate option.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb.h
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb.h
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb.h:1.2 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb.h:1.3
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb.h:1.2	Fri Jun 12 01:53:00 2009
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb.h	Sat Dec 12 07:52:36 2009
@@ -58,7 +58,7 @@
 	unsigned char*		fbstart;
 	unsigned char*		fbmem;
 	size_t			fbmem_len;
-	//void *			shadow;
+	void *			shadow;
 	Bool			shadowFB;
 	Bool			HWCursor;
 	CloseScreenProcPtr	CloseScreen;

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.5 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.6
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.5	Mon Nov  9 05:24:05 2009
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Sat Dec 12 07:52:36 2009
@@ -835,7 +835,6 @@
 
 	fPtr-fbstart = fPtr-fbmem;
 
-#if 0
 	if (fPtr-shadowFB) {
 		fPtr-shadow = xcalloc(1, pScrn-virtualX * pScrn-virtualY *
 		pScrn-bitsPerPixel);
@@ -846,7 +845,6 @@
 			return FALSE;
 		}
 	}
-#endif
 
 	switch (pScrn-bitsPerPixel) {
 	case 1:
@@ -870,7 +868,7 @@
 	case 24:
 	case 32:
 		ret = fbScreenInit(pScreen,
-		/*fPtr-shadowFB ? fPtr-shadow :*/ fPtr-fbstart,
+		fPtr-shadowFB ? fPtr-shadow : fPtr-fbstart,
 		pScrn-virtualX, pScrn-virtualY,
 		pScrn-xDpi, pScrn-yDpi,
 		pScrn-displayWidth, pScrn-bitsPerPixel);