PERFORCE change 36030 for review

Marcel Moolenaar marcel at FreeBSD.org
Tue Aug 12 20:25:04 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=36030

Change 36030 by marcel at marcel_nfs on 2003/08/12 20:24:03

	IFC @36029

Affected files ...

.. //depot/projects/ia64/etc/mtree/BSD.usr.dist#26 integrate
.. //depot/projects/ia64/etc/pccard_ether#10 integrate
.. //depot/projects/ia64/lib/libpthread/arch/amd64/amd64/pthread_md.c#2 integrate
.. //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#30 integrate
.. //depot/projects/ia64/rescue/rescue/Makefile#10 integrate
.. //depot/projects/ia64/sbin/atm/Makefile#3 integrate
.. //depot/projects/ia64/sbin/atm/atmconfig/Makefile#1 branch
.. //depot/projects/ia64/sbin/atm/atmconfig/atmconfig.8#1 branch
.. //depot/projects/ia64/sbin/atm/atmconfig/atmconfig.h#1 branch
.. //depot/projects/ia64/sbin/atm/atmconfig/atmconfig.help#1 branch
.. //depot/projects/ia64/sbin/atm/atmconfig/diag.c#1 branch
.. //depot/projects/ia64/sbin/atm/atmconfig/diag.h#1 branch
.. //depot/projects/ia64/sbin/atm/atmconfig/main.c#1 branch
.. //depot/projects/ia64/sbin/atm/atmconfig/natm.c#1 branch
.. //depot/projects/ia64/sbin/atm/atmconfig/private.h#1 branch
.. //depot/projects/ia64/sbin/mount_msdosfs/mount_msdosfs.8#6 integrate
.. //depot/projects/ia64/sbin/mount_msdosfs/mount_msdosfs.c#4 integrate
.. //depot/projects/ia64/sbin/nfsiod/nfsiod.8#6 integrate
.. //depot/projects/ia64/share/man/man4/natmip.4#5 integrate
.. //depot/projects/ia64/sys/alpha/alpha/critical.c#4 integrate
.. //depot/projects/ia64/sys/alpha/alpha/mp_machdep.c#14 integrate
.. //depot/projects/ia64/sys/alpha/alpha/swtch.s#4 integrate
.. //depot/projects/ia64/sys/alpha/include/critical.h#3 integrate
.. //depot/projects/ia64/sys/amd64/amd64/critical.c#4 integrate
.. //depot/projects/ia64/sys/amd64/include/critical.h#3 integrate
.. //depot/projects/ia64/sys/conf/NOTES#63 integrate
.. //depot/projects/ia64/sys/conf/files#93 integrate
.. //depot/projects/ia64/sys/conf/options#63 integrate
.. //depot/projects/ia64/sys/contrib/dev/acpica/osunixxf.c#3 integrate
.. //depot/projects/ia64/sys/ddb/db_access.c#3 integrate
.. //depot/projects/ia64/sys/dev/bge/if_bge.c#38 integrate
.. //depot/projects/ia64/sys/dev/bge/if_bgereg.h#19 integrate
.. //depot/projects/ia64/sys/dev/bktr/bktr_audio.c#3 integrate
.. //depot/projects/ia64/sys/dev/bktr/bktr_audio.h#2 integrate
.. //depot/projects/ia64/sys/dev/bktr/bktr_core.c#10 integrate
.. //depot/projects/ia64/sys/dev/bktr/bktr_os.c#12 integrate
.. //depot/projects/ia64/sys/dev/bktr/bktr_reg.h#3 integrate
.. //depot/projects/ia64/sys/dev/bktr/msp34xx.c#1 branch
.. //depot/projects/ia64/sys/dev/ciss/ciss.c#23 integrate
.. //depot/projects/ia64/sys/dev/firewire/fwohci.c#32 integrate
.. //depot/projects/ia64/sys/dev/mii/brgphy.c#14 integrate
.. //depot/projects/ia64/sys/dev/trm/trm.c#13 integrate
.. //depot/projects/ia64/sys/dev/twe/twe.c#7 integrate
.. //depot/projects/ia64/sys/dev/twe/twe_compat.h#7 integrate
.. //depot/projects/ia64/sys/dev/twe/twe_freebsd.c#18 integrate
.. //depot/projects/ia64/sys/dev/twe/twevar.h#5 integrate
.. //depot/projects/ia64/sys/dev/tx/if_tx.c#13 integrate
.. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_vfsops.c#20 integrate
.. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_vnops.c#21 integrate
.. //depot/projects/ia64/sys/fs/msdosfs/msdosfsmount.h#5 integrate
.. //depot/projects/ia64/sys/i386/conf/PAE#6 integrate
.. //depot/projects/ia64/sys/i386/i386/critical.c#9 integrate
.. //depot/projects/ia64/sys/i386/i386/exception.s#11 integrate
.. //depot/projects/ia64/sys/i386/i386/mp_machdep.c#27 integrate
.. //depot/projects/ia64/sys/i386/include/critical.h#4 integrate
.. //depot/projects/ia64/sys/ia64/ia64/critical.c#3 integrate
.. //depot/projects/ia64/sys/ia64/ia64/machdep.c#89 integrate
.. //depot/projects/ia64/sys/ia64/ia64/syscall.S#4 integrate
.. //depot/projects/ia64/sys/ia64/ia64/trap.c#62 integrate
.. //depot/projects/ia64/sys/ia64/include/critical.h#3 integrate
.. //depot/projects/ia64/sys/kern/kern_synch.c#42 integrate
.. //depot/projects/ia64/sys/kern/kern_tc.c#26 integrate
.. //depot/projects/ia64/sys/kern/kern_thr.c#11 integrate
.. //depot/projects/ia64/sys/kern/kern_thread.c#64 integrate
.. //depot/projects/ia64/sys/kern/subr_blist.c#8 integrate
.. //depot/projects/ia64/sys/modules/bktr/bktr/Makefile#4 integrate
.. //depot/projects/ia64/sys/netinet/if_atm.c#5 integrate
.. //depot/projects/ia64/sys/powerpc/include/critical.h#4 integrate
.. //depot/projects/ia64/sys/powerpc/powerpc/critical.c#3 integrate
.. //depot/projects/ia64/sys/sparc64/include/critical.h#3 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/critical.c#4 integrate
.. //depot/projects/ia64/sys/sys/blist.h#6 integrate
.. //depot/projects/ia64/sys/sys/proc.h#73 integrate
.. //depot/projects/ia64/sys/vm/vm_map.h#25 integrate
.. //depot/projects/ia64/sys/vm/vm_object.h#24 integrate
.. //depot/projects/ia64/sys/vm/vm_pageq.c#11 integrate
.. //depot/projects/ia64/sys/vm/vm_zeroidle.c#9 integrate
.. //depot/projects/ia64/usr.sbin/Makefile#47 integrate
.. //depot/projects/ia64/usr.sbin/rtadvd/config.c#10 integrate

Differences ...

==== //depot/projects/ia64/etc/mtree/BSD.usr.dist#26 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.279 2003/08/08 13:43:48 ache Exp $
+# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.280 2003/08/12 14:26:57 harti Exp $
 #
 # Please see the file src/etc/mtree/README before making changes to this file.
 #
@@ -67,6 +67,8 @@
         doc
             IPv6
             ..
+            atm
+            ..
             bind
                 html
                 ..

==== //depot/projects/ia64/etc/pccard_ether#10 (text+ko) ====

@@ -1,51 +1,83 @@
 #!/bin/sh -
 #
-# $FreeBSD: src/etc/pccard_ether,v 1.33 2003/08/11 20:32:00 mbr Exp $
+# $FreeBSD: src/etc/pccard_ether,v 1.37 2003/08/12 22:44:48 mbr Exp $
 #
 # pccard_ether interfacename [start|stop] [ifconfig option]
 #
 # example: pccard_ether fxp0 start link0
 #
 
+. /etc/network.subr
+
 stop_dhcp() {
-	if [ -s /var/run/dhclient.${interface}.pid ]; then
-		pidfile="/var/run/dhclient.${interface}.pid"
-	elif [ -s /var/run/dhcpc.${interface}.pid ]; then
-		pidfile="/var/run/dhcpc.${interface}.pid"
-	elif [ -s /var/run/dhclient.pid ]; then
-		# If dhclient is already running, record
-		# it's interfaces.
-		if [ -x /usr/bin/grep ]; then
-			eval _active_list=\"`/bin/ps -axwww | \
-				/usr/bin/grep dhclient | \
-				/usr/bin/grep -v grep | \
-				/usr/bin/sed -e 's|^.*dhclient||' | \
-				/usr/bin/awk '{for (i=1;i<=NF;i++) \
-					{ if ($i~/[a-zA-Z].[0-9]$/) \
-					{ printf(" %s",$i) } }}'` \
-				\"
-		fi
+	# If dhclient is already running, record
+	# its interfaces.
+	if [ -x /usr/bin/grep ]; then
+		eval _active_list=\"`/bin/ps -axwww | \
+			/usr/bin/grep dhclient | \
+			/usr/bin/grep -v grep | \
+			/usr/bin/sed -e 's|^.*dhclient||' | \
+			/usr/bin/awk '{for (i=1;i<=NF;i++) \
+				{ if ($i~/[a-zA-Z].[0-9]$/) \
+				{ printf(" %s",$i) } }}'` \
+			\"
+	fi
+
+	# Get the rc.conf list of dhcp configured interfaces
+	static_dhcp_list="`list_net_interfaces dhcp`"
 
-		_aprefix=
-		for _if in _active_list ; do
-			_test_if=`ifconfig ${_if} 2>&1`
-			case "$_test_if" in
-			"ifconfig: interface $_if does not exist")
-				;;
-			*)
-				_dhcplist="${_dhcplist}${_aprefix}${_if}"
-				[ -z "$_aprefix" ] && _aprefix=' '
-				;;
-			esac
-		done
+	# Get the current ifconfig list of interfaces
+	_aprefix=
+	_nlist=
+	for _if in ${_active_list} ; do
+		_test_if=`ifconfig ${_if} 2>&1`
+		case "$_test_if" in
+		"ifconfig: interface $_if does not exist")
+			;;
+		${interface})
+			# Don't record the same device twice.
+			;;
+		*)
+			#
+			# Catch devices which were specified before,
+			# but have not been part of the rc. We need
+			# them again for the restart.
+			#
+			for _cif in ${static_dhcp_list} ; do
+				case "$_cif" in
+				${_if})
+					# Nothing to add
+					;;
+				*)
+					# Found interface beside rc.conf
+					_nlist="${_nlist}${_aprefix}${_if}"
+					;;
+				esac
+			done
+			_dhcplist="${_dhcplist}${_aprefix}${_if}"
+			[ -z "$_aprefix" ] && _aprefix=' '
+			;;
+		esac
+	done
 
+	if [ -s /var/run/dhclient.pid ]; then
 		pidfile="/var/run/dhclient.pid"
 	else
 		return
 	fi
 	kill `cat ${pidfile}`
 	rm -f ${pidfile}
-	sh `/etc/rc.d/dhclient start`
+	case ${startstop} in
+	[Ss][Tt][Oo][Pp])
+		if [ -z "${_nlist}" ]; then
+			sh `/etc/rc.d/dhclient start`
+		else
+			start_dhcp_keep_current
+		fi
+		;;
+	*)
+		;;
+	esac
 }
 
 start_dhcp() {
@@ -60,11 +92,20 @@
 	[ -n "$dhcp_program" ] && dhclient_program="$dhcp_program"
 	[ -n "$dhcp_flags" ] && dhclient_flags="$dhcp_flags"
 	if [ -x "${dhclient_program}" ]; then
-		if [ `basename ${dhclient_program}` = "dhclient" ]; then
-			pidfile="/var/run/dhclient.${interface}.pid"
-			dhclient_flags="${dhclient_flags} -pf ${pidfile}"
-		fi
-		${dhclient_program} ${dhclient_flags} $_dhcplist ${interface}
+		${dhclient_program} ${dhclient_flags}  $_dhcplist ${interface}
+	else
+		echo "${dhclient_program}: DHCP client software not available"
+	fi
+}
+
+# Called after detaching a card, if dhclient has been
+# used for more than one interface.
+start_dhcp_keep_current() {
+	[ -n "$dhcp_program" ] && dhclient_program="$dhcp_program"
+	[ -n "$dhcp_flags" ] && dhclient_flags="$dhcp_flags"
+	if [ -x "${dhclient_program}" ]; then
+		${dhclient_program} ${dhclient_flags} \
+			${_dhcplist}
 	else
 		echo "${dhclient_program}: DHCP client software not available"
 	fi
@@ -96,9 +137,11 @@
 
 case ${startstop} in
 [Ss][Tt][Aa][Rr][Tt] | '')
-	if ifconfig ${interface} | grep -s UP, > /dev/null 2>&1; then
-	    # Interface is already up, so ignore it.
-	    exit 0
+	if [ -x /usr/bin/grep ]; then
+		if ifconfig ${interface} | grep -s UP, > /dev/null 2>&1; then
+		    # Interface is already up, so ignore it.
+		    exit 0
+		fi
 	fi
 
 	if [ -r /etc/start_if.${interface} ]; then

==== //depot/projects/ia64/lib/libpthread/arch/amd64/amd64/pthread_md.c#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libpthread/arch/amd64/amd64/pthread_md.c,v 1.1 2003/08/05 22:45:59 deischen Exp $
+ * $FreeBSD: src/lib/libpthread/arch/amd64/amd64/pthread_md.c,v 1.2 2003/08/12 22:13:06 davidxu Exp $
  */
 
 #include <stdlib.h>
@@ -61,6 +61,7 @@
 	if ((kcb = malloc(sizeof(struct kcb))) != NULL) {
 		bzero(kcb, sizeof(struct kcb));
 		kcb->kcb_kse = kse;
+		kcb->kcb_self = kcb;
 	}
 	return (kcb);
 }

==== //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#30 (text+ko) ====

@@ -33,7 +33,7 @@
  *
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.84 2003/08/10 22:30:20 davidxu Exp $");
+__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.86 2003/08/13 01:49:07 davidxu Exp $");
 
 #include <sys/types.h>
 #include <sys/kse.h>
@@ -162,16 +162,6 @@
 static void	kse_gc(struct pthread *thread);
 static void	kseg_gc(struct pthread *thread);
 
-static __inline void
-kse_set_curthread(struct kse *kse, struct pthread *td)
-{
-	kse->k_curthread = td;
-	if (td != NULL)
-		_tcb_set(kse->k_kcb, td->tcb);
-	else
-		_tcb_set(kse->k_kcb, NULL);
-}
-
 static void __inline
 thr_accounting(struct pthread *thread)
 {
@@ -681,11 +671,12 @@
 
 			/* Switchout the current thread. */
 			kse_switchout_thread(curkse, curthread);
+			_tcb_set(curkse->k_kcb, NULL);
 
 		 	/* Choose another thread to run. */
 			td = KSE_RUNQ_FIRST(curkse);
 			KSE_RUNQ_REMOVE(curkse, td);
-			kse_set_curthread(curkse, td);
+			curkse->k_curthread = td;
 
 			/*
 			 * Make sure the current thread's kse points to
@@ -708,7 +699,8 @@
 			td->curframe = NULL;
 
 			/*
-			 * Continue the thread at its current frame:
+			 * Continue the thread at its current frame.
+			 * Note: TCB is set in _thread_switch
 			 */
 			ret = _thread_switch(curkse->k_kcb, td->tcb, 0);
 			/* This point should not be reached. */
@@ -791,7 +783,14 @@
 		 * to be cleared.
 		 */
 		(void)_kse_critical_enter();
- 	}
+ 	} else {
+		/*
+		 * Bound thread always has tcb set, this prevent some
+		 * code from blindly setting bound thread tcb to NULL,
+		 * buggy code ?
+		 */
+		_tcb_set(curkse->k_kcb, curthread->tcb);
+	}
 
 	curthread->critical_yield = 0;
 	curthread->need_switchout = 0;
@@ -958,13 +957,19 @@
 		curkse->k_flags |= KF_INITIALIZED;
 	}
 
+	/*
+	 * No current thread anymore, calling _get_curthread in UTS
+	 * should dump core
+	 */
+	_tcb_set(curkse->k_kcb, NULL);
+
 	/* This may have returned from a kse_release(). */
 	if (KSE_WAITING(curkse)) {
 		DBG_MSG("Entered upcall when KSE is waiting.");
 		KSE_CLEAR_WAIT(curkse);
 	}
 
-	/*If this is an upcall; take the scheduler lock. */
+	/* If this is an upcall; take the scheduler lock. */
 	if (curkse->k_switch == 0)
 		KSE_SCHED_LOCK(curkse, curkse->k_kseg);
 	curkse->k_switch = 0;
@@ -1022,7 +1027,7 @@
 		curthread->active = 1;
 		if ((curthread->flags & THR_FLAGS_IN_RUNQ) != 0)
 			KSE_RUNQ_REMOVE(curkse, curthread);
-		kse_set_curthread(curkse, curthread);
+		curkse->k_curthread = curthread;
 		curthread->kse = curkse;
 		DBG_MSG("Continuing thread %p in critical region\n",
 		    curthread);
@@ -1034,7 +1039,7 @@
 	}
 	else if ((curthread->flags & THR_FLAGS_IN_RUNQ) == 0)
 		kse_switchout_thread(curkse, curthread);
-	kse_set_curthread(curkse, NULL);
+	curkse->k_curthread = NULL;
 
 	kse_wakeup_multi(curkse);
 
@@ -1080,7 +1085,7 @@
 	/*
 	 * Make the selected thread the current thread.
 	 */
-	kse_set_curthread(curkse, curthread);
+	curkse->k_curthread = curthread;
 
 	/*
 	 * Make sure the current thread's kse points to this kse.
@@ -1544,7 +1549,7 @@
 					 * previous KSE so that it (the KSE)
 					 * doesn't think it is still active.
 					 */
-					kse_set_curthread(thread->kse, NULL);
+					thread->kse->k_curthread = NULL;
 					thread->active = 0;
 				}
 			}

==== //depot/projects/ia64/rescue/rescue/Makefile#10 (text+ko) ====

@@ -1,4 +1,4 @@
-#$FreeBSD: src/rescue/rescue/Makefile,v 1.15 2003/08/01 09:04:32 gordon Exp $
+#$FreeBSD: src/rescue/rescue/Makefile,v 1.16 2003/08/12 14:33:48 harti Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/2/93
 
 PROG=	rescue
@@ -102,8 +102,8 @@
 # headers in addition to the standard 'paths.h' header.
 #
 CRUNCH_SRCDIRS+= sbin
-CRUNCH_PROGS_sbin= atm atacontrol badsect bsdlabel camcontrol 		\
-	ccdconfig clri devfs dmesg dump					\
+CRUNCH_PROGS_sbin= atm atmconfig atacontrol badsect bsdlabel		\
+	camcontrol ccdconfig clri devfs dmesg dump			\
 	dumpfs dumpon fore_dnld fsck fsck_ffs fsck_msdosfs fsdb		\
 	fsirand gbde ifconfig ilmid init 				\
 	kldconfig kldload kldstat kldunload ldconfig 			\
@@ -153,6 +153,7 @@
 .endif
 
 CRUNCH_SRCDIR_atm= $(.CURDIR)/../../sbin/atm/atm
+CRUNCH_SRCDIR_atmconfig= $(.CURDIR)/../../sbin/atm/atmconfig
 CRUNCH_SRCDIR_fore_dnld= $(.CURDIR)/../../sbin/atm/fore_dnld
 CRUNCH_SRCDIR_ilmid= $(.CURDIR)/../../sbin/atm/ilmid
 CRUNCH_SRCDIR_rtquery= $(.CURDIR)/../../sbin/routed/rtquery

==== //depot/projects/ia64/sbin/atm/Makefile#3 (text+ko) ====

@@ -20,9 +20,10 @@
 # Copies of this Software may be made, however, the above copyright
 # notice must be reproduced on all copies.
 #
-#	@(#) $FreeBSD: src/sbin/atm/Makefile,v 1.3 2003/08/03 15:17:27 obrien Exp $
+#	@(#) $FreeBSD: src/sbin/atm/Makefile,v 1.4 2003/08/12 14:25:56 harti Exp $
 
 SUBDIR=	atm \
+	atmconfig \
 	fore_dnld \
 	ilmid
 

==== //depot/projects/ia64/sbin/mount_msdosfs/mount_msdosfs.8#6 (text+ko) ====

@@ -28,7 +28,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sbin/mount_msdosfs/mount_msdosfs.8,v 1.26 2003/08/09 04:21:18 bms Exp $
+.\" $FreeBSD: src/sbin/mount_msdosfs/mount_msdosfs.8,v 1.27 2003/08/12 20:06:55 trhodes Exp $
 .\"
 .Dd April 7, 1994
 .Dt MOUNT_MSDOSFS 8
@@ -42,6 +42,7 @@
 .Op Fl u Ar uid
 .Op Fl g Ar gid
 .Op Fl m Ar mask
+.Op Fl M Ar mask
 .Op Fl s
 .Op Fl l
 .Op Fl 9
@@ -104,14 +105,28 @@
 others should only have read and execute permissions.
 See
 .Xr chmod 1
-for more information about octal file modes.)
+for more information about octal file modes.
 Only the nine low-order bits of
 .Ar mask
 are used.
+The value of
+.Ar -M
+is used if it is supplied and
+.Ar -m
+is omitted.
 The default
 .Ar mask
 is taken from the
 directory on which the file system is being mounted.
+.It Fl M Ar mask
+Specify the maximum file permissions for directories
+in the file system.
+The value of
+.Ar -m
+is used if it is supplied and
+.Ar -M
+is omitted.
+See the previous option's description for details.
 .It Fl s
 Force behaviour to
 ignore and not generate Win'95 long filenames.

==== //depot/projects/ia64/sbin/mount_msdosfs/mount_msdosfs.c#4 (text+ko) ====

@@ -32,7 +32,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$FreeBSD: src/sbin/mount_msdosfs/mount_msdosfs.c,v 1.24 2002/08/03 16:03:19 mux Exp $";
+  "$FreeBSD: src/sbin/mount_msdosfs/mount_msdosfs.c,v 1.25 2003/08/12 20:06:55 trhodes Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -88,14 +88,14 @@
 {
 	struct msdosfs_args args;
 	struct stat sb;
-	int c, mntflags, set_gid, set_uid, set_mask;
+	int c, mntflags, set_gid, set_uid, set_mask, set_dirmask;
 	char *dev, *dir, mntpath[MAXPATHLEN];
 
-	mntflags = set_gid = set_uid = set_mask = 0;
+	mntflags = set_gid = set_uid = set_mask = set_dirmask = 0;
 	(void)memset(&args, '\0', sizeof(args));
 	args.magic = MSDOSFS_ARGSMAGIC;
 
-	while ((c = getopt(argc, argv, "sl9u:g:m:o:L:W:")) != -1) {
+	while ((c = getopt(argc, argv, "sl9u:g:m:M:o:L:W:")) != -1) {
 		switch (c) {
 #ifdef MSDOSFSMNT_GEMDOSFS
 		case 'G':
@@ -123,6 +123,10 @@
 			args.mask = a_mask(optarg);
 			set_mask = 1;
 			break;
+		case 'M':
+			args.dirmask = a_mask(optarg);
+			set_dirmask = 1;
+			break;
 		case 'L':
 			load_ultable(&args, optarg);
 			args.flags |= MSDOSFSMNT_ULTABLE;
@@ -144,6 +148,15 @@
 	if (optind + 2 != argc)
 		usage();
 
+	if (set_mask && !set_dirmask) {
+		args.dirmask = args.mask;
+		set_dirmask = 1;
+	}
+	else if (set_dirmask && !set_mask) {
+		args.mask = args.dirmask;
+		set_mask = 1;
+	}
+
 	dev = argv[optind];
 	dir = argv[optind + 1];
 
@@ -169,7 +182,8 @@
 		if (!set_gid)
 			args.gid = sb.st_gid;
 		if (!set_mask)
-			args.mask = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
+			args.mask = args.dirmask =
+				sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
 	}
 
 	if (mount("msdosfs", mntpath, mntflags, &args) < 0)

==== //depot/projects/ia64/sbin/nfsiod/nfsiod.8#6 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     From: @(#)nfsiod.8	8.2 (Berkeley) 2/22/94
-.\" $FreeBSD: src/sbin/nfsiod/nfsiod.8,v 1.16 2002/08/10 20:19:04 mux Exp $
+.\" $FreeBSD: src/sbin/nfsiod/nfsiod.8,v 1.17 2003/08/12 20:01:10 ceri Exp $
 .\"
 .Dd September 22, 1994
 .Dt NFSIOD 8
@@ -46,7 +46,7 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility is a kernel process which run on an
+utility is a kernel process which runs on an
 .Tn NFS
 client machine to service asynchronous I/O requests to its server.
 It improves performance but is not required for correct operation.

==== //depot/projects/ia64/share/man/man4/natmip.4#5 (text+ko) ====

@@ -1,6 +1,6 @@
-.\" $FreeBSD: src/share/man/man4/natmip.4,v 1.4 2003/07/15 12:07:45 harti Exp $
+.\" $FreeBSD: src/share/man/man4/natmip.4,v 1.5 2003/08/12 14:20:32 harti Exp $
 .\"
-.Dd June 13, 2003
+.Dd August 11, 2003
 .Dt NATMIP 4
 .Os
 .Sh NAME
@@ -19,15 +19,103 @@
 .Pp
 .Dl # ifconfig en0 128.252.200.1 netmask 0xffffff00 up
 .Pp
-A PVC is added with the
+IP routing is done with special interface routes (routes with directly
+reachable destinations) with a link layer gateway address.
+The link layer address specifies the ATM interface through which the
+destination can be reached, the virtual channel that connects to the
+destination and the ATM characteristics of this channel.
+The address part of the link layer address (see
+.Xr link_addr 3 )
+consists of a fixed part (the first 5 bytes) and a part that
+depends on the kind of the PVC (UBR, CBR, VBR, ABR). Multi-byte values
+are big-endian encoded: the bytes with the lower numbers contain the
+higher order bits.
+.Bl -tag -width "bytes 12...12" -offset indent
+.It byte 0
+Is a flag byte. Currently only flag 0x20 is used.
+When set, all IP frames are LLC/SNAP encapsulated before putting them into
+an AAL5 frame.
+Setting this flag is recommended and allows interoperability with other
+CLIP implementations.
+Note that BPF works only with LLC/SNAP encapsulation.
+.It byte 1
+This is the VPI of the channel.
+.It bytes 2...3
+VCI of the channel. Must not be zero.
+.It byte 4
+Traffic type. One of 0 (UBR), 1 (CBR), 2 (ABR), 3 (VBR).
+.El
+.Pp
+The variable part for UBR connections may be either empty or three bytes:
+.Bl -tag -width "bytes 12...12" -offset indent
+.It bytes 5...7
+Specifies the peak cell rate for UBR.
+.El
+.Pp
+The variable part for CBR connections must be three bytes:
+.Bl -tag -width "bytes 12...12" -offset indent
+.It bytes 5...7
+Specifies the peak cell rate for CBR.
+.El
+.Pp
+The variable part for VBR connections must be 9 bytes long and specifies three
+values:
+.Bl -tag -width "bytes 12...12" -offset indent
+.It bytes 5...7
+Specifies the peak cell rate for VBR.
+.It bytes 8...10
+This is the sustainable cell rate.
+.It bytes 11...13
+The maximum burst size.
+.El
+.Pp
+The variable part for ABR connections must be 19 bytes long and specifies the
+following values:
+.Bl -tag -width "bytes 12...12" -offset indent
+.It bytes 5...7
+Specifies the peak cell rate for ABR.
+.It bytes 8...10
+The minimum cell rate.
+.It bytes 11...13
+The initial cell rate.
+.It bytes 14...16
+The transient buffer exposure.
+.It byte 17
+The NRM value.
+.It byte 18
+The TRM value.
+.It bytes 19...20
+The ADTF value.
+.It byte 21
+The rate increase factor (RIF).
+.It byte 22
+The rate decrease factor (RDF).
+.It byte 23
+The cutoff decrease factor (CDF).
+.El
+.Pp
+To add a PVC the
 .Dq route
-utility:
+utility can be used:
 .Pp
-.Dl # route add -iface <remote IP address> -link en0:z.0.x.y
+.Ic # route add -iface
+.Ar <remote IP address>
+.Ic -link
+.Ar <iface> Ns Ic \&: Ns Ar <lladdr>
 .Pp
-where x and y are the hexadecimal byte encoding of the VCI to use,
-and z is the byte encoding of the following flags:
+The
+.Ar <iface>
+is the ATM interface through which
+.Ar <remote IP address>
+can be reached and
+.Ar <lladdr>
+is the link layer address as a string of dot-separated, hexadecimal bytes.
 .Pp
+NATM also supports the old, original format. This consists of 4 byte
+link layer addresses (and the channels are implicit UBR):
+.Bl -tag -width "bytes 12...12" -offset indent
+.It byte 0
+Flags:
 .Bl -tag -width "0x02" -offset indent -compact
 .It 0x01
 use AAL5.
@@ -38,40 +126,48 @@
 Thus, parameter 3 means AAL5 and LLC/SNAP encapsulation (this is the required
 setting for interworking with other CLIP clients).
 Note that BPF works only with LLC/SNAP encapsulation.
+.It byte 1
+VPI for the channel
+.It bytes 2...3
+VCI for the channel
+.El
 .Sh EXAMPLES
 Suppose you have 3 hosts 128.252.200.1, 128.252.200.2 and
 128.252.200.3 connected by ATM through PVCs:
 .Pp
 .Bl -item -offset indent -compact
 .It
-between 128.252.200.1 and 128.252.200.2: 0xc9
+between 128.252.200.1 and 128.252.200.2: 0xc9 UBR
 .It
-between 128.252.200.1 and 128.252.200.3: 0xca
+between 128.252.200.1 and 128.252.200.3: 0xca VBR
 .It
-between 128.252.200.2 and 128.252.200.3: 0xcb
+between 128.252.200.2 and 128.252.200.3: 0xcb CBR
 .El
 .Pp
+The parameters for the VBR channel are: PCR 50000, SCR 10000, MBS 10.
+The peak cell rate for the CBR channel is 100000.
+.Pp
 To enable the links use the following commands:
 .Pp
 on host 128.252.200.1:
 .Bd -literal -offset indent -compact
 # ifconfig en0 128.252.200.1 netmask 0xffffff00 up
-# route add -iface 128.252.200.2 -link en0:3.0.0.c9
-# route add -iface 128.252.200.3 -link en0:3.0.0.ca
+# route add -iface 128.252.200.2 -link en0:3.0.0.c9.0
+# route add -iface 128.252.200.3 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a
 .Ed
 .Pp
 on host 128.252.200.2:
 .Bd -literal -offset indent -compact
 # ifconfig en0 128.252.200.2 netmask 0xffffff00 up
-# route add -iface 128.252.200.1 -link en0:3.0.0.c9
-# route add -iface 128.252.200.3 -link en0:3.0.0.cb
+# route add -iface 128.252.200.1 -link en0:3.0.0.c9.0
+# route add -iface 128.252.200.3 -link en0:3.0.0.cb.1.1.86.a0
 .Ed
 .Pp
 on host 128.252.200.3:
 .Bd -literal -offset indent -compact
 # ifconfig en0 128.252.200.3 netmask 0xffffff00 up
-# route add -iface 128.252.200.1 -link en0:3.0.0.ca
-# route add -iface 128.252.200.2 -link en0:3.0.0.cb
+# route add -iface 128.252.200.1 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a
+# route add -iface 128.252.200.2 -link en0:3.0.0.cb.1.1.86.a0
 .Ed
 .Pp
 This can also be done in
@@ -82,8 +178,8 @@
 network_interfaces="lo0 en0"
 ifconfig_en0="inet 128.252.200.1 netmask 255.255.255.0"
 static_routes="host2 host3"
-route_host2="-iface 128.252.200.2 -link en0:3.0.0.c9"
-route_host3="-iface 128.252.200.3 -link en0:3.0.0.ca"
+route_host2="-iface 128.252.200.2 -link en0:3.0.0.c9.0"
+route_host3="-iface 128.252.200.3 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a"
 .Ed
 .Pp
 on host 128.252.200.2:
@@ -91,8 +187,8 @@
 network_interfaces="lo0 en0"
 ifconfig_en0="inet 128.252.200.2 netmask 255.255.255.0"
 static_routes="host1 host3"
-route_host1="-iface 128.252.200.1 -link en0:3.0.0.c9"
-route_host3="-iface 128.252.200.3 -link en0:3.0.0.cb"
+route_host1="-iface 128.252.200.1 -link en0:3.0.0.c9.0"
+route_host3="-iface 128.252.200.3 -link en0:3.0.0.cb.1.1.86.a0"
 .Ed
 .Pp
 on host 128.252.200.3:
@@ -100,8 +196,8 @@
 network_interfaces="lo0 en0"
 ifconfig_en0="inet 128.252.200.3 netmask 255.255.255.0"
 static_routes="host1 host2"
-route_host1="-iface 128.252.200.1 -link en0:3.0.0.ca"
-route_host2="-iface 128.252.200.2 -link en0:3.0.0.cb"
+route_host1="-iface 128.252.200.1 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a"
+route_host2="-iface 128.252.200.2 -link en0:3.0.0.cb.1.1.86.a0"
 .Ed
 .Sh SEE ALSO
 .Xr en 4 ,

==== //depot/projects/ia64/sys/alpha/alpha/critical.c#4 (text+ko) ====

@@ -1,10 +1,32 @@
 /*-
- * Copyright (c) 2001 Matthew Dillon.  This code is distributed under
- * the BSD copyright, /usr/src/COPYRIGHT.
+ * Copyright (c) 2002 Matthew Dillon.  All Rights Reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/critical.c,v 1.5 2003/08/04 20:32:44 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/critical.c,v 1.6 2003/08/12 23:24:03 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/ia64/sys/alpha/alpha/mp_machdep.c#14 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.46 2003/07/31 01:31:31 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.47 2003/08/12 19:33:35 jhb Exp $");
 
 #include "opt_kstack_pages.h"
 
@@ -208,7 +208,7 @@
 
 	/* ok, now grab sched_lock and enter the scheduler */
 	mtx_lock_spin(&sched_lock);
-	cpu_throw();	/* doesn't return */
+	cpu_throw(NULL, choosethread());	/* doesn't return */
 
 	panic("scheduler returned us to %s", __func__);
 }

==== //depot/projects/ia64/sys/alpha/alpha/swtch.s#4 (text+ko) ====

@@ -25,7 +25,7 @@
  * rights to redistribute these changes.
  *
  *	$NetBSD: locore.s,v 1.47 1998/03/22 07:26:32 thorpej Exp $
- * $FreeBSD: src/sys/alpha/alpha/swtch.s,v 1.33 2002/07/12 18:34:21 jhb Exp $
+ * $FreeBSD: src/sys/alpha/alpha/swtch.s,v 1.34 2003/08/12 19:33:35 jhb Exp $
  */
 
 #define _LOCORE
@@ -49,7 +49,7 @@
 /*
  * savectx: save process context, i.e. callee-saved registers
  *
- * Note that savectx() only works for processes other than curthread,
+ * Note that savectx() only works for threads other than curthread,
  * since cpu_switch will copy over the info saved here.  (It _can_
  * sanely be used for curthread iff cpu_switch won't be called again, e.g.
  * from if called from boot().)
@@ -88,58 +88,67 @@
 
 /*
  * cpu_throw()
- * Switch to a new task discarding our current state.
+ * Switch to a new thread discarding our current state.
+ *
+ * Arguments:
+ *	a0	'struct thread *' of the old thread
+ *	a1	'struct thread *' of the new thread
  */
 LEAF(cpu_throw, 0)
 	LDGP(pv)
-	mov	zero, s0			/* ensure newproc != oldproc */
 	CALL(Lcs1)
 	END(cpu_throw)
 
 /*
  * cpu_switch()
- * Find the highest priority process and resume it.
+ * Switch to a new thread saving the current state in the old thread.
+ *
+ * Arguments:
+ *	a0	'struct thread *' of the old thread
+ *	a1	'struct thread *' of the new thread
  */
 LEAF(cpu_switch, 1)
 	LDGP(pv)
 	/* do an inline savectx(), to save old context */
-	ldq	a0, PC_CURTHREAD(pcpup)
-	ldq	a1, TD_PCB(a0)
+	ldq	a2, TD_PCB(a0)
 	/* NOTE: ksp is stored by the swpctx */
-	stq	s0, PCB_CONTEXT+(0 * 8)(a1)	/* store s0 - s6 */
-	stq	s1, PCB_CONTEXT+(1 * 8)(a1)
-	stq	s2, PCB_CONTEXT+(2 * 8)(a1)
-	stq	s3, PCB_CONTEXT+(3 * 8)(a1)
-	stq	s4, PCB_CONTEXT+(4 * 8)(a1)
-	stq	s5, PCB_CONTEXT+(5 * 8)(a1)
-	stq	s6, PCB_CONTEXT+(6 * 8)(a1)
-	stq	ra, PCB_CONTEXT+(7 * 8)(a1)	/* store ra */
+	stq	s0, PCB_CONTEXT+(0 * 8)(a2)	/* store s0 - s6 */
+	stq	s1, PCB_CONTEXT+(1 * 8)(a2)
+	stq	s2, PCB_CONTEXT+(2 * 8)(a2)
+	stq	s3, PCB_CONTEXT+(3 * 8)(a2)
+	stq	s4, PCB_CONTEXT+(4 * 8)(a2)
+	stq	s5, PCB_CONTEXT+(5 * 8)(a2)
+	stq	s6, PCB_CONTEXT+(6 * 8)(a2)
+	stq	ra, PCB_CONTEXT+(7 * 8)(a2)	/* store ra */
 	call_pal PAL_OSF1_rdps			/* NOTE: doesn't kill a0 */
-	stq	v0, PCB_CONTEXT+(8 * 8)(a1)	/* store ps, for ipl */
+	stq	v0, PCB_CONTEXT+(8 * 8)(a2)	/* store ps, for ipl */
 
 	mov	a0, s0				/* s0 = old curthread */
-	mov	a1, s1				/* s1 = old pcb */
+	mov	a2, s1				/* s1 = old pcb */
+
+	/*
+	 * Deactivate the old address space before activating the
+	 * new one.  We need to do this before activating the
+	 * new thread's address space in the event that new
+	 * thread is using the same vmspace as the old.  If we
+	 * do this after we activate, then we might end up
+	 * incorrectly marking the pmap inactive!
+	 *
+	 * We don't deactivate if we came here from switch_exit
+	 * (old pmap no longer exists; vmspace has been freed).
+	 * oldproc will be NULL in this case.  We have actually
+	 * taken care of calling pmap_deactivate() in cpu_exit(),
+	 * before the vmspace went away.
+	 */
+	beq	a0, sw1
+	CALL(pmap_deactivate)			/* pmap_deactivate(oldthread) */
 
 sw1:
 	br	pv, Lcs1
 Lcs1:	LDGP(pv)
-	CALL(choosethread)			/* can't return NULL */
-	mov	v0, s2				/* s2 = new thread */
+	mov	a1, s2				/* s2 = new thread */
 	ldq	s3, TD_MD_PCBPADDR(s2)		/* s3 = new pcbpaddr */
 
-	/*
-	 * Check to see if we're switching to ourself.  If we are,
-	 * don't bother loading the new context.
-	 *
-	 * Note that even if we re-enter cpu_switch() from idle(),
-	 * s0 will still contain the old curthread value because any
-	 * users of that register between then and now must have
-	 * saved it.  Also note that switch_exit() ensures that
-	 * s0 is clear before jumping here to find a new process.
-	 */
-	cmpeq	s0, s2, t0			/* oldthread == newthread? */
-	bne	t0, Lcs7			/* Yes!  Skip! */
-
 #ifdef SMP
 	/*
 	 * Save fp state if we have some.
@@ -150,27 +159,7 @@
 #endif
 
 	/*
-	 * Deactivate the old address space before activating the
-	 * new one.  We need to do this before activating the
-	 * new process's address space in the event that new
-	 * process is using the same vmspace as the old.  If we
-	 * do this after we activate, then we might end up
-	 * incorrectly marking the pmap inactive!
-	 *
-	 * We don't deactivate if we came here from switch_exit
-	 * (old pmap no longer exists; vmspace has been freed).
-	 * oldproc will be NULL in this case.  We have actually
-	 * taken care of calling pmap_deactivate() in cpu_exit(),
-	 * before the vmspace went away.
-	 */
-	beq	s0, Lcs6

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list