PERFORCE change 120931 for review

Ulf Lilleengen lulf at FreeBSD.org
Mon Jun 4 21:04:50 UTC 2007


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

Change 120931 by lulf at lulf_carrot on 2007/06/04 21:04:41

	- Import new changes.

Affected files ...

.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files#6 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.amd64#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.i386#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.pc98#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/kern.mk#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/support.s#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/linux/linux_support.s#1 branch
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_clock.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_malloc.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_sig.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_bus.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/uipc_mqueue.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/vfs_cache.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/lock_profile.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/vnode.h#3 integrate

Differences ...

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files#6 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1210 2007/05/22 12:00:31 mav Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1211 2007/05/25 09:48:18 kmacy Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -514,6 +514,8 @@
 dev/cs/if_cs_isa.c		optional cs isa
 dev/cs/if_cs_pccard.c		optional cs pccard
 dev/cxgb/cxgb_main.c		optional cxgb pci
+dev/cxgb/cxgb_offload.c		optional cxgb pci
+dev/cxgb/cxgb_l2t.c		optional cxgb pci
 dev/cxgb/cxgb_lro.c		optional cxgb pci
 dev/cxgb/cxgb_sge.c		optional cxgb pci
 dev/cxgb/common/cxgb_mc5.c	optional cxgb pci

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.amd64#2 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.amd64,v 1.101 2007/04/06 04:51:50 kan Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.103 2007/05/23 15:45:51 kib Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -231,9 +231,11 @@
 amd64/linux32/linux32_locore.s	optional	compat_linux32		\
 	dependency 	"linux32_assym.h"
 amd64/linux32/linux32_machdep.c	optional	compat_linux32
+amd64/linux32/linux32_support.s	optional	compat_linux32		\
+	dependency 	"linux32_assym.h"
 amd64/linux32/linux32_sysent.c	optional	compat_linux32
 amd64/linux32/linux32_sysvec.c	optional	compat_linux32
-compat/linux/linux_emul.c       optional	compat_linux32
+compat/linux/linux_emul.c	optional	compat_linux32
 compat/linux/linux_file.c	optional	compat_linux32
 compat/linux/linux_futex.c	optional	compat_linux32
 compat/linux/linux_getcwd.c	optional	compat_linux32

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.i386#2 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.i386,v 1.574 2007/04/06 11:29:52 nyan Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.576 2007/05/23 15:45:51 kib Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -345,6 +345,8 @@
 	dependency 	"linux_assym.h"
 i386/linux/linux_machdep.c	optional compat_linux
 i386/linux/linux_ptrace.c	optional compat_linux
+i386/linux/linux_support.s	optional compat_linux		\
+	dependency 	"linux_assym.h"
 i386/linux/linux_sysent.c	optional compat_linux
 i386/linux/linux_sysvec.c	optional compat_linux
 i386/pci/pci_bus.c		optional pci

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.pc98#2 (text+ko) ====

@@ -3,7 +3,7 @@
 #
 # modified for PC-9801/PC-9821
 #
-# $FreeBSD: src/sys/conf/files.pc98,v 1.352 2007/04/06 11:30:31 nyan Exp $
+# $FreeBSD: src/sys/conf/files.pc98,v 1.354 2007/05/23 15:45:51 kib Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -221,6 +221,8 @@
 	dependency 	"linux_assym.h"
 i386/linux/linux_machdep.c	optional compat_linux
 i386/linux/linux_ptrace.c	optional compat_linux
+i386/linux/linux_support.s	optional compat_linux		\
+	dependency 	"linux_assym.h"
 i386/linux/linux_sysent.c	optional compat_linux
 i386/linux/linux_sysvec.c	optional compat_linux
 i386/pci/pci_bus.c		optional pci

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/kern.mk#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.mk,v 1.51 2007/05/19 04:45:54 kan Exp $
+# $FreeBSD: src/sys/conf/kern.mk,v 1.52 2007/05/24 21:53:42 obrien Exp $
 
 #
 # Warning flags for compiling the kernel and components of the kernel.
@@ -12,7 +12,10 @@
 .else
 CWARNFLAGS?=	-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
 		-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-		${_wundef} -Wno-pointer-sign -fformat-extensions
+		${_wundef} ${_Wno_pointer_sign} -fformat-extensions
+.if !defined(WITH_GCC3)
+_Wno_pointer_sign=-Wno-pointer-sign
+.endif
 .if !defined(NO_UNDEF)
 _wundef=	-Wundef
 .endif

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/support.s#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/i386/support.s,v 1.117 2007/03/31 01:47:37 jkim Exp $
+ * $FreeBSD: src/sys/i386/i386/support.s,v 1.118 2007/05/23 08:33:05 kib Exp $
  */
 
 #include "opt_npx.h"
@@ -1513,51 +1513,6 @@
 	incl	%eax
 	ret
 
-/*****************************************************************************/
-/* linux_futex support                                                       */
-/*****************************************************************************/
-
-futex_fault:
-	movl	$0,PCB_ONFAULT(%ecx)
-	movl	$-EFAULT,%eax
-	ret
-
-ENTRY(futex_xchgl)
-	movl	PCPU(CURPCB),%ecx
-	movl	$futex_fault,PCB_ONFAULT(%ecx)
-	movl	4(%esp),%eax
-	movl	8(%esp),%edx
-	cmpl    $VM_MAXUSER_ADDRESS-4,%edx
-	ja     	futex_fault
-
-#ifdef SMP
-	lock
-#endif
-	xchgl	%eax,(%edx)
-	movl	12(%esp),%edx
-	movl	%eax,(%edx)
-	xorl	%eax,%eax
-	movl	$0,PCB_ONFAULT(%ecx)
-	ret
-
-ENTRY(futex_addl)
-	movl	PCPU(CURPCB),%ecx
-	movl	$futex_fault,PCB_ONFAULT(%ecx)
-	movl	4(%esp),%eax
-	movl	8(%esp),%edx
-	cmpl    $VM_MAXUSER_ADDRESS-4,%edx
-	ja     	futex_fault
-
-#ifdef SMP
-	lock
-#endif
-	xaddl	%eax,(%edx)
-	movl	12(%esp),%edx
-	movl	%eax,(%edx)
-	xorl	%eax,%eax
-	movl	$0,PCB_ONFAULT(%ecx)
-	ret
-
 /*
  * Support for BB-profiling (gcc -a).  The kernbb program will extract
  * the data from the kernel.

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_clock.c#3 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_clock.c,v 1.195 2007/05/20 22:11:49 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_clock.c,v 1.196 2007/05/23 17:27:01 rwatson Exp $");
 
 #include "opt_device_polling.h"
 #include "opt_hwpmc_hooks.h"
@@ -174,8 +174,8 @@
 	 * Set divisors to 1 (normal case) and let the machine-specific
 	 * code do its bit.
 	 */
+	mtx_init(&time_lock, "time lock", NULL, MTX_SPIN);
 	cpu_initclocks();
-	mtx_init(&time_lock, "time lock", NULL, MTX_SPIN);
 
 	/*
 	 * Compute profhz/stathz, and fix profhz if needed.

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_malloc.c#4 (text+ko) ====

@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_malloc.c,v 1.158 2007/05/18 07:10:45 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_malloc.c,v 1.159 2007/05/27 13:13:46 rwatson Exp $");
 
 #include "opt_ddb.h"
 #include "opt_vm.h"
@@ -321,10 +321,6 @@
 		}
 	}
 #endif
-#if 0
-	if (size == 0)
-		kdb_enter("zero size malloc");
-#endif
 #ifdef MALLOC_MAKE_FAILURES
 	if ((flags & M_NOWAIT) && (malloc_failure_rate != 0)) {
 		atomic_add_int(&malloc_nowait_count, 1);

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_sig.c#2 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.342 2007/03/21 21:20:50 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.343 2007/05/23 17:27:42 rwatson Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -1977,6 +1977,10 @@
  *     regardless of the signal action (eg, blocked or ignored).
  *
  * Other ignored signals are discarded immediately.
+ * 
+ * NB: This function may be entered from the debugger via the "kill" DDB
+ * command.  There is little that can be done to mitigate the possibly messy
+ * side effects of this unwise possibility.
  */
 void
 psignal(struct proc *p, int sig)

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_bus.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.199 2007/02/26 19:28:18 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.200 2007/05/23 17:28:21 sam Exp $");
 
 #include "opt_bus.h"
 
@@ -3850,7 +3850,7 @@
 /**
  * @brief Enumerate all hinted devices for this bus.
  *
- * Walks throught he hints for this bus and calls the bus_hinted_child
+ * Walks through the hints for this bus and calls the bus_hinted_child
  * routine for each one it fines.  It searches first for the specific
  * bus that's being probed for hinted children (eg isa0), and then for
  * generic children (eg isa).

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/uipc_mqueue.c#2 (text+ko) ====

@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_mqueue.c,v 1.23 2007/04/11 16:22:59 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_mqueue.c,v 1.24 2007/05/23 13:36:02 cognet Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -56,7 +56,6 @@
 #include <sys/fcntl.h>
 #include <sys/file.h>
 #include <sys/filedesc.h>
-#include <sys/limits.h>
 #include <sys/lock.h>
 #include <sys/malloc.h>
 #include <sys/module.h>

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/vfs_cache.c#2 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_cache.c,v 1.108 2007/04/04 09:11:33 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_cache.c,v 1.112 2007/05/25 22:23:38 pjd Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -293,37 +293,6 @@
 }
 
 /*
- * cache_leaf_test()
- *
- *      Test whether this (directory) vnode's namei cache entry contains
- *      subdirectories or not.  Used to determine whether the directory is
- *      a leaf in the namei cache or not.  Note: the directory may still
- *      contain files in the namei cache.
- *
- *      Returns 0 if the directory is a leaf, -1 if it isn't.
- */
-int
-cache_leaf_test(struct vnode *vp)
-{
-	struct namecache *ncpc;
-	int leaf;
-
-	leaf = 0;
-	CACHE_LOCK();
-	for (ncpc = LIST_FIRST(&vp->v_cache_src);
-	     ncpc != NULL;
-	     ncpc = LIST_NEXT(ncpc, nc_src)
-	 ) {
-		if (ncpc->nc_vp != NULL && ncpc->nc_vp->v_type == VDIR) {
-			leaf = -1;
-			break;
-		}
-	}
-	CACHE_UNLOCK();
-	return (leaf);
-}
-
-/*
  * Lookup an entry in the cache
  *
  * Lookup is called with dvp pointing to the directory to search,
@@ -346,7 +315,7 @@
 {
 	struct namecache *ncp;
 	u_int32_t hash;
-	int error;
+	int error, ltype;
 
 	if (!doingcache) {
 		cnp->cn_flags &= ~MAKEENTRY;
@@ -452,13 +421,16 @@
 		CACHE_UNLOCK();
 		return (-1);
 	}
-	if (cnp->cn_flags & ISDOTDOT)
+	ltype = 0;	/* silence gcc warning */
+	if (cnp->cn_flags & ISDOTDOT) {
+		ltype = VOP_ISLOCKED(dvp, cnp->cn_thread);
 		VOP_UNLOCK(dvp, 0, cnp->cn_thread);
+	}
 	VI_LOCK(*vpp);
 	CACHE_UNLOCK();
 	error = vget(*vpp, cnp->cn_lkflags | LK_INTERLOCK, cnp->cn_thread);
 	if (cnp->cn_flags & ISDOTDOT)
-		vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, cnp->cn_thread);
+		vn_lock(dvp, ltype | LK_RETRY, cnp->cn_thread);
 	if (error) {
 		*vpp = NULL;
 		goto retry;
@@ -611,24 +583,15 @@
 {
 	struct nchashhead *ncpp;
 	struct namecache *ncp, *nnp;
-	struct nchashhead mplist;
 
-	LIST_INIT(&mplist);
-	ncp = NULL;
-
 	/* Scan hash tables for applicable entries */
 	CACHE_LOCK();
 	for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) {
-		for (ncp = LIST_FIRST(ncpp); ncp != 0; ncp = nnp) {
-			nnp = LIST_NEXT(ncp, nc_hash);
-			if (ncp->nc_dvp->v_mount == mp) {
-				LIST_REMOVE(ncp, nc_hash);
-				LIST_INSERT_HEAD(&mplist, ncp, nc_hash);
-			}
+		LIST_FOREACH_SAFE(ncp, ncpp, nc_hash, nnp) {
+			if (ncp->nc_dvp->v_mount == mp)
+				cache_zap(ncp);
 		}
 	}
-	while (!LIST_EMPTY(&mplist))
-		cache_zap(LIST_FIRST(&mplist));
 	CACHE_UNLOCK();
 }
 

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/lock_profile.h#2 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sys/lock_profile.h,v 1.12 2007/04/03 18:36:27 kmacy Exp $
+ * $FreeBSD: src/sys/sys/lock_profile.h,v 1.13 2007/05/23 18:46:54 jhb Exp $
  */
 
 
@@ -84,8 +84,6 @@
 	u_int hash = 0;
 	struct lock_profile_object *l = &lo->lo_profile_obj;
 
-	lo->lo_flags = 0;
-	lo->lo_name = name;
 	l->lpo_acqtime = 0;
 	l->lpo_waittime = 0;
 	l->lpo_filename = NULL;

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/vnode.h#3 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)vnode.h	8.7 (Berkeley) 2/4/94
- * $FreeBSD: src/sys/sys/vnode.h,v 1.324 2007/05/18 13:02:13 kib Exp $
+ * $FreeBSD: src/sys/sys/vnode.h,v 1.325 2007/05/25 22:16:17 pjd Exp $
  */
 
 #ifndef _SYS_VNODE_H_
@@ -565,7 +565,6 @@
 	    struct componentname *cnp);
 void	cache_purge(struct vnode *vp);
 void	cache_purgevfs(struct mount *mp);
-int	cache_leaf_test(struct vnode *vp);
 int	change_dir(struct vnode *vp, struct thread *td);
 int	change_root(struct vnode *vp, struct thread *td);
 void	cvtstat(struct stat *st, struct ostat *ost);


More information about the p4-projects mailing list