From owner-p4-projects@FreeBSD.ORG Wed Mar 16 07:27:17 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8039F16A4CE; Wed, 16 Mar 2005 07:27:16 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2998A16A4CE for ; Wed, 16 Mar 2005 07:27:16 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59A2D43D48 for ; Wed, 16 Mar 2005 07:27:15 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j2G7RFaa045729 for ; Wed, 16 Mar 2005 07:27:15 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j2G7RF6B045726 for perforce@freebsd.org; Wed, 16 Mar 2005 07:27:15 GMT (envelope-from jmg@freebsd.org) Date: Wed, 16 Mar 2005 07:27:15 GMT Message-Id: <200503160727.j2G7RF6B045726@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Subject: PERFORCE change 73280 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2005 07:27:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=73280 Change 73280 by jmg@jmg_carbon on 2005/03/16 07:26:14 hopefully bring in a fix for my vm panic.. Affected files ... .. //depot/projects/arm/src/sys/amd64/conf/GENERIC#4 integrate .. //depot/projects/arm/src/sys/amd64/include/ieeefp.h#3 integrate .. //depot/projects/arm/src/sys/arm/arm/busdma_machdep.c#5 integrate .. //depot/projects/arm/src/sys/boot/i386/Makefile.inc#2 integrate .. //depot/projects/arm/src/sys/boot/i386/boot2/Makefile#2 integrate .. //depot/projects/arm/src/sys/conf/kern.mk#2 integrate .. //depot/projects/arm/src/sys/dev/pci/pci.c#3 integrate .. //depot/projects/arm/src/sys/fs/hpfs/hpfs.h#3 integrate .. //depot/projects/arm/src/sys/fs/hpfs/hpfs_vfsops.c#3 integrate .. //depot/projects/arm/src/sys/fs/hpfs/hpfs_vnops.c#3 integrate .. //depot/projects/arm/src/sys/fs/msdosfs/msdosfs_denode.c#3 integrate .. //depot/projects/arm/src/sys/fs/msdosfs/msdosfs_vfsops.c#4 integrate .. //depot/projects/arm/src/sys/fs/msdosfs/msdosfsmount.h#3 integrate .. //depot/projects/arm/src/sys/fs/udf/udf.h#3 integrate .. //depot/projects/arm/src/sys/fs/udf/udf_vfsops.c#3 integrate .. //depot/projects/arm/src/sys/fs/udf/udf_vnops.c#3 integrate .. //depot/projects/arm/src/sys/gnu/ext2fs/ext2_alloc.c#3 integrate .. //depot/projects/arm/src/sys/gnu/ext2fs/ext2_inode.c#3 integrate .. //depot/projects/arm/src/sys/gnu/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/arm/src/sys/gnu/ext2fs/ext2_vnops.c#4 integrate .. //depot/projects/arm/src/sys/gnu/ext2fs/inode.h#2 integrate .. //depot/projects/arm/src/sys/i386/conf/GENERIC#3 integrate .. //depot/projects/arm/src/sys/i386/include/ieeefp.h#3 integrate .. //depot/projects/arm/src/sys/isofs/cd9660/cd9660_node.h#3 integrate .. //depot/projects/arm/src/sys/isofs/cd9660/cd9660_vfsops.c#3 integrate .. //depot/projects/arm/src/sys/isofs/cd9660/cd9660_vnops.c#3 integrate .. //depot/projects/arm/src/sys/kern/kern_lockf.c#2 integrate .. //depot/projects/arm/src/sys/kern/subr_rman.c#3 integrate .. //depot/projects/arm/src/sys/kern/vfs_hash.c#2 integrate .. //depot/projects/arm/src/sys/kern/vfs_subr.c#4 integrate .. //depot/projects/arm/src/sys/netinet/ip_input.c#3 integrate .. //depot/projects/arm/src/sys/netinet6/ip6_input.c#2 integrate .. //depot/projects/arm/src/sys/sys/bus_dma.h#2 integrate .. //depot/projects/arm/src/sys/sys/lockmgr.h#2 integrate .. //depot/projects/arm/src/sys/sys/vnode.h#4 integrate .. //depot/projects/arm/src/sys/ufs/ffs/ffs_vfsops.c#4 integrate .. //depot/projects/arm/src/sys/ufs/ufs/ufs_inode.c#4 integrate .. //depot/projects/arm/src/sys/vm/vm_page.c#2 integrate Differences ... ==== //depot/projects/arm/src/sys/amd64/conf/GENERIC#4 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.430 2005/03/12 00:29:29 obrien Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.431 2005/03/16 02:34:50 iedowse Exp $ machine amd64 cpu HAMMER @@ -244,6 +244,7 @@ # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface +device ehci # EHCI PCI->USB interface (USB 2.0) device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices device ugen # Generic ==== //depot/projects/arm/src/sys/amd64/include/ieeefp.h#3 (text+ko) ==== @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#) ieeefp.h 1.0 (Berkeley) 9/23/93 - * $FreeBSD: src/sys/amd64/include/ieeefp.h,v 1.12 2005/03/02 21:33:21 joerg Exp $ + * $FreeBSD: src/sys/amd64/include/ieeefp.h,v 1.13 2005/03/15 15:53:39 das Exp $ */ /* @@ -249,25 +249,6 @@ return (_ex); } -/* Note that this should really be called fpresetsticky() */ -static __inline__ fp_except_t -__fpsetsticky(fp_except_t _m) -{ - unsigned _env[7]; - unsigned int _mxcsr; - fp_except_t _p; - - __fnstenv(_env); - _p = _env[FP_STKY_REG] & _m; - __stmxcsr(&_mxcsr); - _p |= _mxcsr & SSE_STKY_FLD; - _env[FP_STKY_REG] &= ~_m; - __fldenv(_env); - _mxcsr &= ~_m; - __ldmxcsr(&_mxcsr); - return (_p); -} - #endif /* __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE__ && !__cplusplus */ #if !defined(__IEEEFP_NOINLINES__) && !defined(__cplusplus) \ @@ -280,7 +261,6 @@ #define fpgetmask() __fpgetmask() #define fpsetmask(_m) __fpsetmask(_m) #define fpgetsticky() __fpgetsticky() -#define fpsetsticky(_m) __fpsetsticky(_m) /* Suppress prototypes in the MI header. */ #define _IEEEFP_INLINED_ 1 ==== //depot/projects/arm/src/sys/arm/arm/busdma_machdep.c#5 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.18 2005/03/08 14:49:05 mux Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.20 2005/03/16 00:35:59 jmg Exp $"); /* * MacPPC bus dma support routines @@ -332,18 +332,16 @@ if (flags & BUS_DMA_ZERO) mflags |= M_ZERO; - if (!*mapp) { - newmap = malloc(sizeof(*newmap), M_DEVBUF, M_NOWAIT | M_ZERO); - if (newmap == NULL) { - CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", - __func__, dmat, dmat->flags, ENOMEM); - return (ENOMEM); - } - dmat->map_count++; - newmap->flags = 0; - *mapp = newmap; - newmap->dmat = dmat; + newmap = malloc(sizeof(*newmap), M_DEVBUF, M_NOWAIT | M_ZERO); + if (newmap == NULL) { + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", + __func__, dmat, dmat->flags, ENOMEM); + return (ENOMEM); } + dmat->map_count++; + newmap->flags = 0; + *mapp = newmap; + newmap->dmat = dmat; if (dmat->maxsize <= PAGE_SIZE) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); @@ -536,6 +534,8 @@ bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; #endif + KASSERT(dmat != NULL, ("dmatag is NULL")); + KASSERT(map != NULL, ("dmamap is NULL")); map->flags &= ~DMAMAP_TYPE_MASK; map->flags |= DMAMAP_LINEAR|DMAMAP_COHERENT; map->buffer = buf; @@ -709,7 +709,7 @@ * Release the mapping held by map. */ void -bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) +_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) { map->flags &= ~DMAMAP_TYPE_MASK; return; @@ -735,7 +735,7 @@ } void -bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { struct mbuf *m; struct uio *uio; ==== //depot/projects/arm/src/sys/boot/i386/Makefile.inc#2 (text+ko) ==== @@ -1,11 +1,12 @@ # Common defines for all of /sys/boot/i386/ # -# $FreeBSD: src/sys/boot/i386/Makefile.inc,v 1.9 2004/02/09 14:11:55 ru Exp $ +# $FreeBSD: src/sys/boot/i386/Makefile.inc,v 1.10 2005/03/15 18:43:36 obrien Exp $ BINDIR?= /boot LOADER_ADDRESS?=0x200000 -CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 +CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \ + -mno-mmx -mno-3dnow -mno-sse -mno-sse2 LDFLAGS+= -nostdlib .if ${MACHINE_ARCH} == "amd64" ==== //depot/projects/arm/src/sys/boot/i386/boot2/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.57 2004/08/27 15:01:56 yar Exp $ +# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.58 2005/03/15 18:43:36 obrien Exp $ FILES= boot boot1 boot2 @@ -26,6 +26,7 @@ -fno-unit-at-a-time \ -mno-align-long-strings \ -mrtd \ + -mno-mmx -mno-3dnow -mno-sse -mno-sse2 \ -D${BOOT2_UFS} \ -DFLAGS=${BOOT_BOOT1_FLAGS} \ -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ ==== //depot/projects/arm/src/sys/conf/kern.mk#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.mk,v 1.42 2004/05/14 13:35:46 cognet Exp $ +# $FreeBSD: src/sys/conf/kern.mk,v 1.44 2005/03/15 18:44:51 obrien Exp $ # # Warning flags for compiling the kernel and components of the kernel. @@ -28,7 +28,8 @@ # cache tag lines) # .if ${MACHINE_ARCH} == "i386" && ${CC} != "icc" -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 +CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 \ + -mno-mmx -mno-3dnow -mno-sse -mno-sse2 INLINE_LIMIT?= 8000 .endif @@ -65,8 +66,7 @@ .endif # -# For AMD64, use a medium model for now. We'll switch to "kernel" -# once pmap is ready. Be excessively careful to not generate FPU code. +# For AMD64, be excessively careful to not generate FPU code. # .if ${MACHINE_ARCH} == "amd64" CFLAGS+= -mcmodel=kernel -mno-red-zone \ ==== //depot/projects/arm/src/sys/dev/pci/pci.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.280 2005/02/28 01:14:15 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.281 2005/03/15 22:53:31 imp Exp $"); #include "opt_bus.h" @@ -1059,8 +1059,10 @@ /* Suspend devices before potentially powering them down. */ error = bus_generic_suspend(dev); - if (error) + if (error) { + free(devlist, M_TEMP); return (error); + } /* * Always set the device to D3. If ACPI suggests a different ==== //depot/projects/arm/src/sys/fs/hpfs/hpfs.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/hpfs/hpfs.h,v 1.17 2005/03/14 14:41:37 phk Exp $ + * $FreeBSD: src/sys/fs/hpfs/hpfs.h,v 1.18 2005/03/15 20:50:24 phk Exp $ */ /*#define HPFS_DEBUG 10*/ @@ -311,7 +311,7 @@ struct sublock hpm_su; struct spblock hpm_sp; struct mount * hpm_mp; - struct vnode * hpm_devvp; + struct vnode * hpm_devvp; /* XXX: loose this, it's in hpfsmount */ struct g_consumer *hpm_cp; struct bufobj *hpm_bo; struct cdev *hpm_dev; ==== //depot/projects/arm/src/sys/fs/hpfs/hpfs_vfsops.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/hpfs/hpfs_vfsops.c,v 1.49 2005/03/15 10:01:14 phk Exp $ + * $FreeBSD: src/sys/fs/hpfs/hpfs_vfsops.c,v 1.51 2005/03/15 20:50:24 phk Exp $ */ @@ -514,12 +514,8 @@ hp->h_devvp = hpmp->hpm_devvp; error = vfs_hash_insert(vp, ino, flags, curthread, vpp); - if (error || *vpp != NULL) { - vput(vp); + if (error || *vpp != NULL) return (error); - } - - VREF(hp->h_devvp); error = bread(hpmp->hpm_devvp, ino, FNODESIZE, NOCRED, &bp); if (error) { ==== //depot/projects/arm/src/sys/fs/hpfs/hpfs_vnops.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/hpfs/hpfs_vnops.c,v 1.61 2005/03/14 14:41:37 phk Exp $ + * $FreeBSD: src/sys/fs/hpfs/hpfs_vnops.c,v 1.62 2005/03/15 20:50:24 phk Exp $ */ #include @@ -602,12 +602,6 @@ vfs_hash_remove(vp); - /* Purge old data structures associated with the inode. */ - if (hp->h_devvp) { - vrele(hp->h_devvp); - hp->h_devvp = NULL; - } - mtx_destroy(&hp->h_interlock); vp->v_data = NULL; ==== //depot/projects/arm/src/sys/fs/msdosfs/msdosfs_denode.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_denode.c,v 1.83 2005/03/15 08:07:06 phk Exp $ */ +/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_denode.c,v 1.85 2005/03/15 20:57:25 phk Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */ /*- @@ -75,7 +75,7 @@ * If deget() succeeds it returns with the gotten denode locked(). * * pmp - address of msdosfsmount structure of the filesystem containing - * the denode of interest. The pm_dev field and the address of + * the denode of interest. The address of * the msdosfsmount structure are used. * dirclust - which cluster bp contains, if dirclust is 0 (root directory) * diroffset is relative to the beginning of the root directory, @@ -92,7 +92,6 @@ { int error; u_int hash; - struct cdev *dev = pmp->pm_dev; struct mount *mntp = pmp->pm_mountp; struct direntry *direntptr; struct denode *ldep; @@ -155,20 +154,17 @@ nvp->v_data = ldep; ldep->de_vnode = nvp; ldep->de_flag = 0; - ldep->de_dev = dev; ldep->de_dirclust = dirclust; ldep->de_diroffset = diroffset; fc_purge(ldep, 0); /* init the fat cache for this denode */ error = vfs_hash_insert(nvp, hash, 0, curthread, &xvp); if (error) { - vput(nvp); *depp = NULL; return (error); } if (xvp != NULL) { /* XXX: Not sure this is right */ - vput(nvp); nvp = xvp; ldep->de_vnode = nvp; } ==== //depot/projects/arm/src/sys/fs/msdosfs/msdosfs_vfsops.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.142 2005/03/14 12:24:35 phk Exp $ */ +/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.143 2005/03/15 20:57:25 phk Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -676,7 +676,6 @@ /* * fillinusemap() needs pm_devvp. */ - pmp->pm_dev = dev; pmp->pm_devvp = devvp; /* ==== //depot/projects/arm/src/sys/fs/msdosfs/msdosfsmount.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/fs/msdosfs/msdosfsmount.h,v 1.36 2005/03/14 12:24:35 phk Exp $ */ +/* $FreeBSD: src/sys/fs/msdosfs/msdosfsmount.h,v 1.37 2005/03/15 20:57:25 phk Exp $ */ /* $NetBSD: msdosfsmount.h,v 1.17 1997/11/17 15:37:07 ws Exp $ */ /*- @@ -66,7 +66,6 @@ */ struct msdosfsmount { struct mount *pm_mountp;/* vfs mount struct for this fs */ - struct cdev *pm_dev; /* block special device mounted */ struct g_consumer *pm_cp; struct bufobj *pm_bo; uid_t pm_uid; /* uid to set as owner of the files */ ==== //depot/projects/arm/src/sys/fs/udf/udf.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/udf/udf.h,v 1.11 2005/03/14 12:29:39 phk Exp $ + * $FreeBSD: src/sys/fs/udf/udf.h,v 1.12 2005/03/15 21:09:52 phk Exp $ */ #define UDF_HASHTBLSIZE 100 @@ -31,9 +31,7 @@ struct udf_node { LIST_ENTRY(udf_node) le; struct vnode *i_vnode; - struct vnode *i_devvp; struct udf_mnt *udfmp; - struct cdev *i_dev; ino_t hash_id; long diroff; struct file_entry *fentry; ==== //depot/projects/arm/src/sys/fs/udf/udf_vfsops.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/udf/udf_vfsops.c,v 1.29 2005/03/15 08:07:06 phk Exp $ + * $FreeBSD: src/sys/fs/udf/udf_vfsops.c,v 1.31 2005/03/15 21:09:52 phk Exp $ */ /* udf_vfsops.c */ @@ -598,16 +598,12 @@ unode->i_vnode = vp; unode->hash_id = ino; - unode->i_devvp = udfmp->im_devvp; - unode->i_dev = udfmp->im_dev; unode->udfmp = udfmp; vp->v_data = unode; error = vfs_hash_insert(vp, ino, flags, curthread, vpp); - if (error || *vpp != NULL) { - vput(vp); + if (error || *vpp != NULL) return (error); - } /* * Copy in the file entry. Per the spec, the size can only be 1 block. @@ -641,7 +637,6 @@ return (ENOMEM); } - VREF(udfmp->im_devvp); bcopy(bp->b_data, unode->fentry, size); brelse(bp); ==== //depot/projects/arm/src/sys/fs/udf/udf_vnops.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/udf/udf_vnops.c,v 1.51 2005/03/14 12:29:39 phk Exp $ + * $FreeBSD: src/sys/fs/udf/udf_vnops.c,v 1.52 2005/03/15 21:09:52 phk Exp $ */ /* udf_vnops.c */ @@ -252,7 +252,6 @@ node = VTON(vp); fentry = node->fentry; - vap->va_fsid = dev2udev(node->i_dev); vap->va_fileid = node->hash_id; vap->va_mode = udf_permtomode(node); vap->va_nlink = le16toh(fentry->link_cnt); @@ -802,7 +801,7 @@ node = VTON(a->a_vp); if (a->a_bop != NULL) - *a->a_bop = &node->i_devvp->v_bufobj; + *a->a_bop = &node->udfmp->im_devvp->v_bufobj; if (a->a_bnp == NULL) return (0); if (a->a_runb) @@ -968,10 +967,6 @@ if (unode != NULL) { vfs_hash_remove(vp); - if (unode->i_devvp) { - vrele(unode->i_devvp); - unode->i_devvp = 0; - } if (unode->fentry != NULL) FREE(unode->fentry, M_UDFFENTRY); ==== //depot/projects/arm/src/sys/gnu/ext2fs/ext2_alloc.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)ffs_alloc.c 8.8 (Berkeley) 2/21/94 - * $FreeBSD: src/sys/gnu/ext2fs/ext2_alloc.c,v 1.40 2005/02/27 21:14:38 phk Exp $ + * $FreeBSD: src/sys/gnu/ext2fs/ext2_alloc.c,v 1.41 2005/03/16 07:13:09 phk Exp $ */ #include @@ -104,8 +104,8 @@ fs = ip->i_e2fs; #if DIAGNOSTIC if ((u_int)size > fs->s_blocksize || blkoff(fs, size) != 0) { - printf("dev = %s, bsize = %lu, size = %d, fs = %s\n", - devtoname(ip->i_dev), fs->s_blocksize, size, fs->fs_fsmnt); + vn_printf(ip->i_devvp, "bsize = %lu, size = %d, fs = %s\n", + fs->s_blocksize, size, fs->fs_fsmnt); panic("ext2_alloc: bad size"); } if (cred == NOCRED) @@ -499,8 +499,8 @@ pip = VTOI(pvp); fs = pip->i_e2fs; if ((u_int)ino > fs->s_inodes_per_group * fs->s_groups_count) - panic("ext2_vfree: range: dev = %s, ino = %d, fs = %s", - devtoname(pip->i_dev), ino, fs->fs_fsmnt); + panic("ext2_vfree: range: devvp = %p, ino = %d, fs = %s", + pip->i_devvp, ino, fs->fs_fsmnt); /* ext2_debug("ext2_vfree (%d, %d) called\n", pip->i_number, mode); */ ==== //depot/projects/arm/src/sys/gnu/ext2fs/ext2_inode.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)ffs_inode.c 8.5 (Berkeley) 12/30/93 - * $FreeBSD: src/sys/gnu/ext2fs/ext2_inode.c,v 1.54 2005/03/14 13:30:05 phk Exp $ + * $FreeBSD: src/sys/gnu/ext2fs/ext2_inode.c,v 1.55 2005/03/16 07:13:09 phk Exp $ */ #include @@ -529,13 +529,6 @@ ext2_update(vp, 0); } vfs_hash_remove(vp); - /* - * Purge old data structures associated with the inode. - */ - if (ip->i_devvp) { - vrele(ip->i_devvp); - ip->i_devvp = 0; - } FREE(vp->v_data, M_EXT2NODE); vp->v_data = 0; vnode_destroy_vobject(vp); ==== //depot/projects/arm/src/sys/gnu/ext2fs/ext2_vfsops.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94 - * $FreeBSD: src/sys/gnu/ext2fs/ext2_vfsops.c,v 1.145 2005/03/15 08:07:06 phk Exp $ + * $FreeBSD: src/sys/gnu/ext2fs/ext2_vfsops.c,v 1.147 2005/03/16 07:13:09 phk Exp $ */ #include @@ -940,14 +940,11 @@ vp->v_data = ip; ip->i_vnode = vp; ip->i_e2fs = fs = ump->um_e2fs; - ip->i_dev = dev; ip->i_number = ino; error = vfs_hash_insert(vp, ino, flags, curthread, vpp); - if (error || *vpp != NULL) { - vput(vp); + if (error || *vpp != NULL) return (error); - } /* Read in the disk contents for the inode, copy into the inode. */ #if 0 @@ -1001,7 +998,6 @@ * Finish inode initialization now that aliasing has been resolved. */ ip->i_devvp = ump->um_devvp; - VREF(ip->i_devvp); /* * Set up a generation number for this inode if it does not * already have one. This should only happen on old filesystems. ==== //depot/projects/arm/src/sys/gnu/ext2fs/ext2_vnops.c#4 (text+ko) ==== @@ -39,7 +39,7 @@ * * @(#)ufs_vnops.c 8.7 (Berkeley) 2/3/94 * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 - * $FreeBSD: src/sys/gnu/ext2fs/ext2_vnops.c,v 1.99 2005/03/13 12:13:55 jeff Exp $ + * $FreeBSD: src/sys/gnu/ext2fs/ext2_vnops.c,v 1.100 2005/03/16 07:13:09 phk Exp $ */ #include "opt_suiddir.h" @@ -346,7 +346,6 @@ /* * Copy from inode table */ - vap->va_fsid = dev2udev(ip->i_dev); vap->va_fileid = ip->i_number; vap->va_mode = ip->i_mode & ~IFMT; vap->va_nlink = ip->i_nlink; @@ -898,7 +897,7 @@ * expunge the original entry's existence. */ if (xp == NULL) { - if (dp->i_dev != ip->i_dev) + if (dp->i_devvp != ip->i_devvp) panic("ext2_rename: EXDEV"); /* * Account for ".." in new directory. @@ -927,7 +926,7 @@ } vput(tdvp); } else { - if (xp->i_dev != dp->i_dev || xp->i_dev != ip->i_dev) + if (xp->i_devvp != dp->i_devvp || xp->i_devvp != ip->i_devvp) panic("ext2_rename: EXDEV"); /* * Short circuit rename(foo, foo). @@ -1428,8 +1427,7 @@ struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); - printf("\tino %lu, on dev %s", (u_long)ip->i_number, - devtoname(ip->i_dev)); + vn_printf(ip->i_devvp, "\tino %lu", (u_long)ip->i_number); if (vp->v_type == VFIFO) fifo_printinfo(vp); printf("\n"); ==== //depot/projects/arm/src/sys/gnu/ext2fs/inode.h#2 (text+ko) ==== @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)inode.h 8.9 (Berkeley) 5/14/95 - * $FreeBSD: src/sys/gnu/ext2fs/inode.h,v 1.42 2005/01/06 18:27:30 imp Exp $ + * $FreeBSD: src/sys/gnu/ext2fs/inode.h,v 1.43 2005/03/16 07:13:09 phk Exp $ */ #ifndef _SYS_GNU_EXT2FS_INODE_H_ @@ -65,7 +65,6 @@ struct vnode *i_vnode;/* Vnode associated with this inode. */ struct vnode *i_devvp;/* Vnode for block I/O. */ u_int32_t i_flag; /* flags, see below */ - struct cdev *i_dev; /* Device associated with the inode. */ ino_t i_number; /* The identity of the inode. */ struct ext2_sb_info *i_e2fs; /* EXT2FS */ ==== //depot/projects/arm/src/sys/i386/conf/GENERIC#3 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.423 2005/03/12 00:29:30 obrien Exp $ +# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.424 2005/03/16 02:34:49 iedowse Exp $ machine i386 cpu I486_CPU @@ -266,6 +266,7 @@ # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface +device ehci # EHCI PCI->USB interface (USB 2.0) device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices device ugen # Generic ==== //depot/projects/arm/src/sys/i386/include/ieeefp.h#3 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#) ieeefp.h 1.0 (Berkeley) 9/23/93 - * $FreeBSD: src/sys/i386/include/ieeefp.h,v 1.10 2005/03/02 21:33:26 joerg Exp $ + * $FreeBSD: src/sys/i386/include/ieeefp.h,v 1.11 2005/03/15 15:53:39 das Exp $ */ /* @@ -177,7 +177,6 @@ ((__fpgetreg(FP_STKY_REG) & FP_STKY_FLD) >> FP_STKY_OFF)) #define fpresetsticky(m) ((fp_except_t) \ __fpsetreg(0, FP_STKY_REG, (m), FP_STKY_OFF)) -#define fpsetsticky(m) fpresetsticky(m) /* Suppress prototypes in the MI header. */ #define _IEEEFP_INLINED_ 1 ==== //depot/projects/arm/src/sys/isofs/cd9660/cd9660_node.h#3 (text+ko) ==== @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)cd9660_node.h 8.6 (Berkeley) 5/14/95 - * $FreeBSD: src/sys/isofs/cd9660/cd9660_node.h,v 1.29 2005/03/14 13:22:41 phk Exp $ + * $FreeBSD: src/sys/isofs/cd9660/cd9660_node.h,v 1.30 2005/03/16 07:17:39 phk Exp $ */ /* @@ -60,7 +60,6 @@ struct iso_node *i_next, **i_prev; /* hash chain */ struct vnode *i_vnode; /* vnode associated with this inode */ u_long i_flag; /* see below */ - struct cdev *i_dev; /* device where inode resides */ ino_t i_number; /* the identity of the inode */ /* we use the actual starting block of the file */ struct iso_mnt *i_mnt; /* filesystem associated with this inode */ ==== //depot/projects/arm/src/sys/isofs/cd9660/cd9660_vfsops.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/isofs/cd9660/cd9660_vfsops.c,v 1.136 2005/03/15 08:07:07 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/isofs/cd9660/cd9660_vfsops.c,v 1.138 2005/03/16 07:17:39 phk Exp $"); #include #include @@ -677,14 +677,11 @@ M_WAITOK | M_ZERO); vp->v_data = ip; ip->i_vnode = vp; - ip->i_dev = dev; ip->i_number = ino; error = vfs_hash_insert(vp, ino, flags, curthread, vpp); - if (error || *vpp != NULL) { - vput(vp); + if (error || *vpp != NULL) return (error); - } if (isodir == 0) { int lbn, off; ==== //depot/projects/arm/src/sys/isofs/cd9660/cd9660_vnops.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/isofs/cd9660/cd9660_vnops.c,v 1.108 2005/03/14 13:22:41 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/isofs/cd9660/cd9660_vnops.c,v 1.109 2005/03/16 07:17:39 phk Exp $"); #include #include @@ -188,7 +188,6 @@ struct vattr *vap = ap->a_vap; struct iso_node *ip = VTOI(vp); - vap->va_fsid = dev2udev(ip->i_dev); /* XXX WRONG! */ vap->va_fileid = ip->i_number; vap->va_mode = ip->inode.iso_mode; ==== //depot/projects/arm/src/sys/kern/kern_lockf.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_lockf.c,v 1.52 2005/01/25 10:15:26 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_lockf.c,v 1.53 2005/03/15 14:08:10 phk Exp $"); #include "opt_debug_lockf.h" @@ -794,10 +794,9 @@ else printf("id %p", (void *)lock->lf_id); if (lock->lf_inode != (struct inode *)0) - printf(" in ino %ju on dev <%d, %d>, %s, start %jd, end %jd", + printf(" in ino %ju on dev <%s>, %s, start %jd, end %jd", (uintmax_t)lock->lf_inode->i_number, - major(lock->lf_inode->i_dev), - minor(lock->lf_inode->i_dev), + devtoname(lock->lf_inode->i_dev), lock->lf_type == F_RDLCK ? "shared" : lock->lf_type == F_WRLCK ? "exclusive" : lock->lf_type == F_UNLCK ? "unlock" : "unknown", ==== //depot/projects/arm/src/sys/kern/subr_rman.c#3 (text+ko) ==== @@ -56,7 +56,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_rman.c,v 1.38 2005/01/06 23:35:39 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_rman.c,v 1.40 2005/03/15 20:28:51 imp Exp $"); #define __RMAN_RESOURCE_VISIBLE #include @@ -218,8 +218,9 @@ */ for (s = r; s; s = TAILQ_NEXT(s, r_link)) { DPRINTF(("considering [%#lx, %#lx]\n", s->r_start, s->r_end)); - if (s->r_start > end) { - DPRINTF(("s->r_start (%#lx) > end (%#lx)\n", s->r_start, end)); + if (s->r_start + count - 1 > end) { + DPRINTF(("s->r_start (%#lx) + count - 1> end (%#lx)\n", + s->r_start, end)); break; } if (s->r_flags & RF_ALLOCATED) { @@ -248,7 +249,7 @@ if ((rend - rstart + 1) >= count) { DPRINTF(("candidate region: [%#lx, %#lx], size %#lx\n", - rend, rstart, (rend - rstart + 1))); + rstart, rend, (rend - rstart + 1))); if ((s->r_end - s->r_start + 1) == count) { DPRINTF(("candidate region is entire chunk\n")); rv = s; ==== //depot/projects/arm/src/sys/kern/vfs_hash.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_hash.c,v 1.3 2005/03/15 08:07:07 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_hash.c,v 1.4 2005/03/15 20:00:03 phk Exp $"); #include #include @@ -117,10 +117,10 @@ error = vget(vp2, flags | LK_INTERLOCK, td); if (error == ENOENT) break; - if (error) - return (error); - *vpp = vp2; - return (0); + vput(vp); + if (!error) + *vpp = vp2; + return (error); } if (vp2 == NULL) break; ==== //depot/projects/arm/src/sys/kern/vfs_subr.c#4 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.595 2005/03/15 13:43:10 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.596 2005/03/15 14:38:16 jeff Exp $"); #include "opt_ddb.h" #include "opt_mac.h" @@ -92,6 +92,7 @@ static void vdropl(struct vnode *vp); static void vinactive(struct vnode *, struct thread *); static void v_incr_usecount(struct vnode *, int); +static void vfree(struct vnode *); /* * Enable Giant pushdown based on whether or not the vm is mpsafe in this @@ -149,8 +150,6 @@ */ static int reassignbufcalls; SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, ""); -static int nameileafonly; -SYSCTL_INT(_vfs, OID_AUTO, nameileafonly, CTLFLAG_RW, &nameileafonly, 0, ""); /* * Cache for the mount type id assigned to NFS. This is used for @@ -263,6 +262,15 @@ int (*softdep_process_worklist_hook)(struct mount *); /* + * Macros to control when a vnode is freed and recycled. All require + * the vnode interlock. + */ +#define VCANRECYCLE(vp) (((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcnt) +#define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcnt) +#define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_holdcnt) + + +/* * Initialize the vnode management data structures. */ #ifndef MAXVNODES_MAX @@ -657,7 +665,6 @@ vtryrecycle(struct vnode *vp) { struct thread *td = curthread; - vm_object_t object; struct mount *vnmp; int error; @@ -676,53 +683,10 @@ VOP_UNLOCK(vp, 0, td); return (EBUSY); } - - /* - * Don't recycle if we still have cached pages. - */ - object = vp->v_object; - if (object != NULL) { - VM_OBJECT_LOCK(object); - if (object->resident_page_count) { - VM_OBJECT_UNLOCK(object); - error = EBUSY; - goto done; - } - VM_OBJECT_UNLOCK(object); - } - if (LIST_FIRST(&vp->v_cache_src)) { - /* - * note: nameileafonly sysctl is temporary, - * for debugging only, and will eventually be - * removed. - */ - if (nameileafonly > 0) { - /* - * Do not reuse namei-cached directory - * vnodes that have cached - * subdirectories. - */ - if (cache_leaf_test(vp) < 0) { - error = EISDIR; - goto done; - } - } else if (nameileafonly < 0 || - vmiodirenable == 0) { - /* - * Do not reuse namei-cached directory - * vnodes if nameileafonly is -1 or - * if VMIO backing for directories is - * turned off (otherwise we reuse them - * too quickly). - */ - error = EBUSY; - goto done; - } - } /* * If we got this far, we need to acquire the interlock and see if * anyone picked up this vnode from another list. If not, we will - * mark it with XLOCK via vgonel() so that anyone who does find it + * mark it with DOOMED via vgonel() so that anyone who does find it * will skip over it. */ VI_LOCK(vp); @@ -2744,7 +2708,7 @@ /* * Mark a vnode as free, putting it up for recycling. */ -void +static void vfree(struct vnode *vp) { ==== //depot/projects/arm/src/sys/netinet/ip_input.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * >>> TRUNCATED FOR MAIL (1000 lines) <<<