Date: Mon, 14 Mar 2005 18:58:45 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 73130 for review Message-ID: <200503141858.j2EIwjSY084434@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=73130 Change 73130 by rwatson@rwatson_zoo on 2005/03/14 18:58:38 Integrate netperf_socket from FreeBSD CVS HEAD: - Busdma API moves MI. - pxeclient now always does a mountroot to get root FH. - Coda now uses the vnode lock not c_lock. - Centralized VFS inode hashes rather than per-fs hashes. - UDF bug involving races on hash insertion fixed. - Various other VFSisms, including ENOVXLOCK. - PSEUDOFS_TRACE - ehci, amr bug fixes. - vgone/vop_close/vop_reclaim/vop_revoke/vop_inactive/... VOP's now require vnode lock. - ng_device uses subr_unit. Affected files ... .. //depot/projects/netperf_socket/sys/alpha/include/bus.h#3 integrate .. //depot/projects/netperf_socket/sys/alpha/include/bus_dma.h#1 branch .. //depot/projects/netperf_socket/sys/amd64/include/bus_dma.h#3 integrate .. //depot/projects/netperf_socket/sys/arm/include/bus.h#5 integrate .. //depot/projects/netperf_socket/sys/arm/include/bus_dma.h#1 branch .. //depot/projects/netperf_socket/sys/boot/i386/libi386/pxe.c#2 integrate .. //depot/projects/netperf_socket/sys/coda/cnode.h#5 integrate .. //depot/projects/netperf_socket/sys/coda/coda_subr.c#4 integrate .. //depot/projects/netperf_socket/sys/coda/coda_vnops.c#7 integrate .. //depot/projects/netperf_socket/sys/conf/NOTES#50 integrate .. //depot/projects/netperf_socket/sys/conf/files#62 integrate .. //depot/projects/netperf_socket/sys/conf/options#37 integrate .. //depot/projects/netperf_socket/sys/dev/amr/amr.c#10 integrate .. //depot/projects/netperf_socket/sys/dev/re/if_re.c#18 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_cpu_sparc64.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/usb/ehci.c#16 integrate .. //depot/projects/netperf_socket/sys/dev/usb/if_axe.c#14 integrate .. //depot/projects/netperf_socket/sys/dev/usb/usbdevs#31 integrate .. //depot/projects/netperf_socket/sys/fs/deadfs/dead_vnops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/devfs/devfs_vnops.c#14 integrate .. //depot/projects/netperf_socket/sys/fs/fdescfs/fdesc_vnops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/fifofs/fifo_vnops.c#17 integrate .. //depot/projects/netperf_socket/sys/fs/hpfs/hpfs.h#5 integrate .. //depot/projects/netperf_socket/sys/fs/hpfs/hpfs_hash.c#5 integrate .. //depot/projects/netperf_socket/sys/fs/hpfs/hpfs_vfsops.c#10 integrate .. //depot/projects/netperf_socket/sys/fs/hpfs/hpfs_vnops.c#8 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/denode.h#5 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/msdosfs_denode.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/msdosfs_vfsops.c#14 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/msdosfsmount.h#7 integrate .. //depot/projects/netperf_socket/sys/fs/ntfs/ntfs_vnops.c#8 integrate .. //depot/projects/netperf_socket/sys/fs/nullfs/null_subr.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/nullfs/null_vnops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/nwfs/nwfs_io.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/nwfs/nwfs_node.c#4 integrate .. //depot/projects/netperf_socket/sys/fs/pseudofs/pseudofs.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/pseudofs/pseudofs_fileno.c#2 integrate .. //depot/projects/netperf_socket/sys/fs/pseudofs/pseudofs_vncache.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/pseudofs/pseudofs_vnops.c#9 integrate .. //depot/projects/netperf_socket/sys/fs/smbfs/smbfs_io.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/smbfs/smbfs_node.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/smbfs/smbfs_vnops.c#8 integrate .. //depot/projects/netperf_socket/sys/fs/udf/udf.h#6 integrate .. //depot/projects/netperf_socket/sys/fs/udf/udf_vfsops.c#9 integrate .. //depot/projects/netperf_socket/sys/fs/udf/udf_vnops.c#10 integrate .. //depot/projects/netperf_socket/sys/fs/umapfs/umap_vnops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/unionfs/union_vnops.c#9 integrate .. //depot/projects/netperf_socket/sys/geom/geom_mbr.c#9 integrate .. //depot/projects/netperf_socket/sys/gnu/ext2fs/ext2_extern.h#7 integrate .. //depot/projects/netperf_socket/sys/gnu/ext2fs/ext2_inode.c#6 integrate .. //depot/projects/netperf_socket/sys/gnu/ext2fs/ext2_vfsops.c#15 integrate .. //depot/projects/netperf_socket/sys/gnu/ext2fs/ext2_vnops.c#14 integrate .. //depot/projects/netperf_socket/sys/i386/conf/PAE#6 integrate .. //depot/projects/netperf_socket/sys/i386/include/bus_dma.h#3 integrate .. //depot/projects/netperf_socket/sys/ia64/include/bus.h#3 integrate .. //depot/projects/netperf_socket/sys/ia64/include/bus_dma.h#1 branch .. //depot/projects/netperf_socket/sys/isofs/cd9660/cd9660_node.c#7 integrate .. //depot/projects/netperf_socket/sys/isofs/cd9660/cd9660_node.h#5 integrate .. //depot/projects/netperf_socket/sys/isofs/cd9660/cd9660_vfsops.c#14 integrate .. //depot/projects/netperf_socket/sys/isofs/cd9660/cd9660_vnops.c#9 integrate .. //depot/projects/netperf_socket/sys/isofs/cd9660/iso.h#6 integrate .. //depot/projects/netperf_socket/sys/kern/kern_exit.c#24 integrate .. //depot/projects/netperf_socket/sys/kern/kern_proc.c#22 integrate .. //depot/projects/netperf_socket/sys/kern/subr_unit.c#5 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_default.c#12 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_hash.c#1 branch .. //depot/projects/netperf_socket/sys/kern/vfs_subr.c#32 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_syscalls.c#18 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_vnops.c#16 integrate .. //depot/projects/netperf_socket/sys/kern/vnode_if.src#7 integrate .. //depot/projects/netperf_socket/sys/modules/ext2fs/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/pseudofs/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/ufs/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_device.c#12 integrate .. //depot/projects/netperf_socket/sys/netinet/if_ether.c#16 integrate .. //depot/projects/netperf_socket/sys/nfs4client/nfs4_vnops.c#12 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_bio.c#16 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_node.c#8 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_subs.c#15 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_vnops.c#13 integrate .. //depot/projects/netperf_socket/sys/powerpc/include/bus.h#3 integrate .. //depot/projects/netperf_socket/sys/powerpc/include/bus_dma.h#1 branch .. //depot/projects/netperf_socket/sys/sparc64/include/bus.h#4 integrate .. //depot/projects/netperf_socket/sys/sparc64/include/bus_dma.h#1 branch .. //depot/projects/netperf_socket/sys/sys/bus_dma.h#1 branch .. //depot/projects/netperf_socket/sys/sys/vnode.h#18 integrate .. //depot/projects/netperf_socket/sys/ufs/ffs/ffs_inode.c#6 integrate .. //depot/projects/netperf_socket/sys/ufs/ffs/ffs_snapshot.c#13 integrate .. //depot/projects/netperf_socket/sys/ufs/ffs/ffs_softdep.c#10 integrate .. //depot/projects/netperf_socket/sys/ufs/ffs/ffs_vfsops.c#19 integrate .. //depot/projects/netperf_socket/sys/ufs/ffs/ffs_vnops.c#14 integrate .. //depot/projects/netperf_socket/sys/ufs/ufs/inode.h#6 integrate .. //depot/projects/netperf_socket/sys/ufs/ufs/ufs_extern.h#8 integrate .. //depot/projects/netperf_socket/sys/ufs/ufs/ufs_inode.c#5 integrate .. //depot/projects/netperf_socket/sys/ufs/ufs/ufs_vfsops.c#6 integrate .. //depot/projects/netperf_socket/sys/ufs/ufs/ufs_vnops.c#16 integrate .. //depot/projects/netperf_socket/sys/vm/vnode_pager.c#12 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/include/bus.h#3 (text+ko) ==== @@ -67,7 +67,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/sys/alpha/include/bus.h,v 1.28 2005/01/29 21:43:33 ru Exp $ */ +/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.29 2005/03/14 16:46:27 scottl Exp $ */ #ifndef _ALPHA_BUS_H_ #define _ALPHA_BUS_H_ @@ -481,195 +481,6 @@ #define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ bus_space_copy_region_4((t), (h1), (o1), (h2), (o2), (c)) -/* - * Flags used in various bus DMA methods. - */ -#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */ -#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */ -#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */ -#define BUS_DMA_COHERENT 0x04 /* hint: map memory in a coherent way */ -#define BUS_DMA_ZERO 0x08 /* allocate zero'ed memory */ -#define BUS_DMA_ISA 0x10 /* map memory for ISA dma */ -#define BUS_DMA_BUS2 0x20 /* placeholders for bus functions... */ -#define BUS_DMA_BUS3 0x40 -#define BUS_DMA_BUS4 0x80 - -/* Forwards needed by prototypes below. */ -struct mbuf; -struct uio; - -/* - * Operations performed by bus_dmamap_sync(). - */ -typedef int bus_dmasync_op_t; -#define BUS_DMASYNC_PREREAD 1 -#define BUS_DMASYNC_POSTREAD 2 -#define BUS_DMASYNC_PREWRITE 4 -#define BUS_DMASYNC_POSTWRITE 8 - -/* - * bus_dma_tag_t - * - * A machine-dependent opaque type describing the characteristics - * of how to perform DMA mappings. This structure encapsultes - * information concerning address and alignment restrictions, number - * of S/G segments, amount of data per S/G segment, etc. - */ -typedef struct bus_dma_tag *bus_dma_tag_t; - -/* - * bus_dmamap_t - * - * DMA mapping instance information. - */ -typedef struct bus_dmamap *bus_dmamap_t; - -/* - * bus_dma_segment_t - * - * Describes a single contiguous DMA transaction. Values - * are suitable for programming into DMA registers. - */ -typedef struct bus_dma_segment { - bus_addr_t ds_addr; /* DMA address */ - bus_size_t ds_len; /* length of transfer */ -} bus_dma_segment_t; - -/* - * A function that returns 1 if the address cannot be accessed by - * a device and 0 if it can be. - */ -typedef int bus_dma_filter_t(void *, bus_addr_t); - -/* - * A function that performs driver-specific syncronization on behalf of - * busdma. - */ -typedef enum { - BUS_DMA_LOCK = 0x01, - BUS_DMA_UNLOCK = 0x02, -} bus_dma_lock_op_t; - -typedef void bus_dma_lock_t(void *, bus_dma_lock_op_t); - -/* - * Allocate a device specific dma_tag encapsulating the constraints of - * the parent tag in addition to other restrictions specified: - * - * alignment: alignment for segments. - * boundary: Boundary that segments cannot cross. - * lowaddr: Low restricted address that cannot appear in a mapping. - * highaddr: High restricted address that cannot appear in a mapping. - * filtfunc: An optional function to further test if an address - * within the range of lowaddr and highaddr cannot appear - * in a mapping. - * filtfuncarg: An argument that will be passed to filtfunc in addition - * to the address to test. - * maxsize: Maximum mapping size supported by this tag. - * nsegments: Number of discontinuities allowed in maps. - * maxsegsz: Maximum size of a segment in the map. - * flags: Bus DMA flags. - * lockfunc: An optional function to handle driver-defined lock - * operations. - * lockfuncarg: An argument that will be passed to lockfunc in addition - * to the lock operation. - * dmat: A pointer to set to a valid dma tag should the return - * value of this function indicate success. - */ -/* XXX Should probably allow specification of alignment */ -int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignemnt, - bus_size_t boundary, bus_addr_t lowaddr, - bus_addr_t highaddr, bus_dma_filter_t *filtfunc, - void *filtfuncarg, bus_size_t maxsize, int nsegments, - bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, - void *lockfuncarg, bus_dma_tag_t *dmat); - -int bus_dma_tag_destroy(bus_dma_tag_t dmat); - -/* - * Allocate a handle for mapping from kva/uva/physical - * address space into bus device space. - */ -int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp); - -/* - * Destroy a handle for mapping from kva/uva/physical - * address space into bus device space. - */ -int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map); - -/* - * Allocate a piece of memory that can be efficiently mapped into - * bus device space based on the constraints lited in the dma tag. - * A dmamap to for use with dmamap_load is also allocated. - */ -int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, - bus_dmamap_t *mapp); - -/* - * Free a piece of memory and it's allociated dmamap, that was allocated - * via bus_dmamem_alloc. - */ -void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); - -/* - * A function that processes a successfully loaded dma map or an error - * from a delayed load map. - */ -typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int); - -/* - * Map the buffer buf into bus space using the dmamap map. - */ -int bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, - bus_size_t buflen, bus_dmamap_callback_t *callback, - void *callback_arg, int flags); - -/* - * Like bus_dmamap_callback but includes map size in bytes. This is - * defined as a separate interface to maintain compatiiblity for users - * of bus_dmamap_callback_t--at some point these interfaces should be merged. - */ -typedef void bus_dmamap_callback2_t(void *, bus_dma_segment_t *, int, bus_size_t, int); -/* - * Like bus_dmamap_load but for mbufs. Note the use of the - * bus_dmamap_callback2_t interface. - */ -int bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map, - struct mbuf *mbuf, - bus_dmamap_callback2_t *callback, void *callback_arg, - int flags); -int bus_dmamap_load_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map, - struct mbuf *mbuf, bus_dma_segment_t *segs, - int *nsegs, int flags); -/* - * Like bus_dmamap_load but for uios. Note the use of the - * bus_dmamap_callback2_t interface. - */ -int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map, - struct uio *ui, - bus_dmamap_callback2_t *callback, void *callback_arg, - int flags); - -/* - * Perform a syncronization operation on the given map. - */ -void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); -#define bus_dmamap_sync(dmat, dmamap, op) \ - if ((dmamap) != NULL) \ - _bus_dmamap_sync(dmat, dmamap, op) - -/* - * Release the mapping held by map. - */ -void _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map); -#define bus_dmamap_unload(dmat, dmamap) \ - if ((dmamap) != NULL) \ - _bus_dmamap_unload(dmat, dmamap) - -/* - * Generic helper function for manipulating mutexes. - */ -void busdma_lock_mutex(void *arg, bus_dma_lock_op_t op); +#include <machine/bus_dma.h> #endif /* _ALPHA_BUS_H_ */ ==== //depot/projects/netperf_socket/sys/amd64/include/bus_dma.h#3 (text+ko) ==== @@ -1,13 +1,7 @@ -/* $NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $ */ - /*- - * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. + * Copyright (c) 2005 Scott Long * All rights reserved. * - * This code is derived from software contributed to The NetBSD Foundation - * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, - * NASA Ames Research Center. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -16,252 +10,24 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``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 FOUNDATION OR CONTRIBUTORS - * 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. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. */ +/* $FreeBSD: src/sys/amd64/include/bus_dma.h,v 1.29 2005/03/14 16:46:27 scottl Exp $ */ -/*- - * Copyright (c) 1996 Charles M. Hannum. All rights reserved. - * Copyright (c) 1996 Christopher G. Demetriou. 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 4. The name of the author may not 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. - */ -/* $FreeBSD: src/sys/amd64/include/bus_dma.h,v 1.28 2005/01/21 05:56:41 peter Exp $ */ - #ifndef _AMD64_BUS_DMA_H_ #define _AMD64_BUS_DMA_H_ -/* - * Flags used in various bus DMA methods. - */ -#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */ -#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */ -#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */ -#define BUS_DMA_COHERENT 0x04 /* hint: map memory in a coherent way */ -#define BUS_DMA_ZERO 0x08 /* allocate zero'ed memory */ -#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */ -#define BUS_DMA_BUS2 0x20 -#define BUS_DMA_BUS3 0x40 -#define BUS_DMA_BUS4 0x80 - -/* Forwards needed by prototypes below. */ -struct mbuf; -struct uio; - -/* - * Operations performed by bus_dmamap_sync(). - */ -typedef int bus_dmasync_op_t; -#define BUS_DMASYNC_PREREAD 1 -#define BUS_DMASYNC_POSTREAD 2 -#define BUS_DMASYNC_PREWRITE 4 -#define BUS_DMASYNC_POSTWRITE 8 - -/* - * bus_dma_tag_t - * - * A machine-dependent opaque type describing the characteristics - * of how to perform DMA mappings. This structure encapsultes - * information concerning address and alignment restrictions, number - * of S/G segments, amount of data per S/G segment, etc. - */ -typedef struct bus_dma_tag *bus_dma_tag_t; - -/* - * bus_dmamap_t - * - * DMA mapping instance information. - */ -typedef struct bus_dmamap *bus_dmamap_t; - -/* - * bus_dma_segment_t - * - * Describes a single contiguous DMA transaction. Values - * are suitable for programming into DMA registers. - */ -typedef struct bus_dma_segment { - bus_addr_t ds_addr; /* DMA address */ - bus_size_t ds_len; /* length of transfer */ -} bus_dma_segment_t; - -/* - * A function that returns 1 if the address cannot be accessed by - * a device and 0 if it can be. - */ -typedef int bus_dma_filter_t(void *, bus_addr_t); - -/* - * A function that performs driver-specific synchronization on behalf of - * busdma. - */ -typedef enum { - BUS_DMA_LOCK = 0x01, - BUS_DMA_UNLOCK = 0x02, -} bus_dma_lock_op_t; - -typedef void bus_dma_lock_t(void *, bus_dma_lock_op_t); - -/* - * Allocate a device specific dma_tag encapsulating the constraints of - * the parent tag in addition to other restrictions specified: - * - * alignment: Alignment for segments. - * boundary: Boundary that segments cannot cross. - * lowaddr: Low restricted address that cannot appear in a mapping. - * highaddr: High restricted address that cannot appear in a mapping. - * filtfunc: An optional function to further test if an address - * within the range of lowaddr and highaddr cannot appear - * in a mapping. - * filtfuncarg: An argument that will be passed to filtfunc in addition - * to the address to test. - * maxsize: Maximum mapping size supported by this tag. - * nsegments: Number of discontinuities allowed in maps. - * maxsegsz: Maximum size of a segment in the map. - * flags: Bus DMA flags. - * lockfunc: An optional function to handle driver-defined lock - * operations. - * lockfuncarg: An argument that will be passed to lockfunc in addition - * to the lock operation. - * dmat: A pointer to set to a valid dma tag should the return - * value of this function indicate success. - */ -/* XXX Should probably allow specification of alignment */ -int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, - bus_size_t boundary, bus_addr_t lowaddr, - bus_addr_t highaddr, bus_dma_filter_t *filtfunc, - void *filtfuncarg, bus_size_t maxsize, int nsegments, - bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, - void *lockfuncarg, bus_dma_tag_t *dmat); - -int bus_dma_tag_destroy(bus_dma_tag_t dmat); - -/* - * Allocate a handle for mapping from kva/uva/physical - * address space into bus device space. - */ -int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp); +#include <sys/bus_dma.h> -/* - * Destroy a handle for mapping from kva/uva/physical - * address space into bus device space. - */ -int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map); - -/* - * Allocate a piece of memory that can be efficiently mapped into - * bus device space based on the constraints listed in the dma tag. - * A dmamap to for use with dmamap_load is also allocated. - */ -int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, - bus_dmamap_t *mapp); - -/* - * Free a piece of memory and its allocated dmamap, that was allocated - * via bus_dmamem_alloc. - */ -void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); - -/* - * A function that processes a successfully loaded dma map or an error - * from a delayed load map. - */ -typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int); - -/* - * Map the buffer buf into bus space using the dmamap map. - */ -int bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, - bus_size_t buflen, bus_dmamap_callback_t *callback, - void *callback_arg, int flags); - -/* - * Like bus_dmamap_callback but includes map size in bytes. This is - * defined as a separate interface to maintain compatibility for users - * of bus_dmamap_callback_t--at some point these interfaces should be merged. - */ -typedef void bus_dmamap_callback2_t(void *, bus_dma_segment_t *, int, bus_size_t, int); -/* - * Like bus_dmamap_load but for mbufs. Note the use of the - * bus_dmamap_callback2_t interface. - */ -int bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map, - struct mbuf *mbuf, - bus_dmamap_callback2_t *callback, void *callback_arg, - int flags); - -int bus_dmamap_load_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map, - struct mbuf *mbuf, bus_dma_segment_t *segs, - int *nsegs, int flags); - -/* - * Like bus_dmamap_load but for uios. Note the use of the - * bus_dmamap_callback2_t interface. - */ -int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map, - struct uio *ui, - bus_dmamap_callback2_t *callback, void *callback_arg, - int flags); - -/* - * Perform a synchronization operation on the given map. - */ -void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); -#define bus_dmamap_sync(dmat, dmamap, op) \ - if ((dmamap) != NULL) \ - _bus_dmamap_sync(dmat, dmamap, op) - -/* - * Release the mapping held by map. - */ -void _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map); -#define bus_dmamap_unload(dmat, dmamap) \ - if ((dmamap) != NULL) \ - _bus_dmamap_unload(dmat, dmamap) - -/* - * Generic helper function for manipulating mutexes. - */ -void busdma_lock_mutex(void *arg, bus_dma_lock_op_t op); #endif /* _AMD64_BUS_DMA_H_ */ ==== //depot/projects/netperf_socket/sys/arm/include/bus.h#5 (text+ko) ==== @@ -67,7 +67,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/sys/arm/include/bus.h,v 1.6 2005/01/15 19:31:08 cognet Exp $ + * $FreeBSD: src/sys/arm/include/bus.h,v 1.7 2005/03/14 16:46:27 scottl Exp $ */ #ifndef _MACHINE_BUS_H_ @@ -592,158 +592,6 @@ #define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t) -/* Bus Space DMA macros */ - -/* - * Flags used in various bus DMA methods. - */ -#define BUS_DMA_WAITOK 0x000 /* safe to sleep (pseudo-flag) */ -#define BUS_DMA_NOWAIT 0x001 /* not safe to sleep */ -#define BUS_DMA_ALLOCNOW 0x002 /* perform resource allocation now */ -#define BUS_DMA_COHERENT 0x004 /* hint: map memory DMA coherent */ -#define BUS_DMA_ZERO 0x008 /* hint: sequential, unidirectional */ -#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */ -#define BUS_DMA_BUS2 0x020 -#define BUS_DMA_BUS3 0x040 -#define BUS_DMA_BUS4 0x080 - -/* Forwards needed by prototypes below. */ -struct mbuf; -struct uio; - -/* - * Operations performed by bus_dmamap_sync(). - */ -#define BUS_DMASYNC_PREREAD 0x01 /* pre-read synchronization */ -#define BUS_DMASYNC_POSTREAD 0x02 /* post-read synchronization */ -#define BUS_DMASYNC_PREWRITE 0x04 /* pre-write synchronization */ -#define BUS_DMASYNC_POSTWRITE 0x08 /* post-write synchronization */ - -typedef struct bus_dma_tag *bus_dma_tag_t; -typedef struct bus_dmamap *bus_dmamap_t; - -#define BUS_DMA_TAG_VALID(t) ((t) != (bus_dma_tag_t)0) - -/* - * bus_dma_segment_t - * - * Describes a single contiguous DMA transaction. Values - * are suitable for programming into DMA registers. - */ -struct bus_dma_segment { - /* - * PUBLIC MEMBERS: these are used by machine-independent code. - */ - bus_addr_t ds_addr; /* DMA address */ - bus_size_t ds_len; /* length of transfer */ -}; -typedef struct bus_dma_segment bus_dma_segment_t; - -/* - * arm32_dma_range - * - * This structure describes a valid DMA range. - */ -struct arm32_dma_range { - bus_addr_t dr_sysbase; /* system base address */ - bus_addr_t dr_busbase; /* appears here on bus */ - bus_size_t dr_len; /* length of range */ -}; - -/* - * bus_dma_tag_t - * - * A machine-dependent opaque type describing the implementation of - * DMA for a given bus. - */ - -typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int); -typedef int bus_dmasync_op_t; -typedef void bus_dmamap_callback2_t(void *, bus_dma_segment_t *, int, bus_size_t, int); - - -#ifdef _ARM32_BUS_DMA_PRIVATE - -/* _dm_buftype */ -#define ARM32_BUFTYPE_INVALID 0 -#define ARM32_BUFTYPE_LINEAR 1 -#define ARM32_BUFTYPE_MBUF 2 -#define ARM32_BUFTYPE_UIO 3 -#define ARM32_BUFTYPE_RAW 4 - -struct arm32_dma_range *bus_dma_get_range(void); -int bus_dma_get_range_nb(void); -#endif /* _ARM32_BUS_DMA_PRIVATE */ - -/* - * A function that returns 1 if the address cannot be accessed by - * a device and 0 if it can be. - */ -typedef int bus_dma_filter_t(void *, bus_addr_t); - -/* - * A function that performs driver-specific syncronization on behalf of - * busdma. - */ -typedef enum { - BUS_DMA_LOCK = 0x01, - BUS_DMA_UNLOCK = 0x02, -} bus_dma_lock_op_t; - -typedef void bus_dma_lock_t(void *, bus_dma_lock_op_t); - -/* - * Allocate a device specific dma_tag encapsulating the constraints of - * the parent tag in addition to other restrictions specified: - * - * alignment: alignment for segments. - * boundary: Boundary that segments cannot cross. - * lowaddr: Low restricted address that cannot appear in a mapping. - * highaddr: High restricted address that cannot appear in a mapping. - * filtfunc: An optional function to further test if an address - * within the range of lowaddr and highaddr cannot appear - * in a mapping. - * filtfuncarg: An argument that will be passed to filtfunc in addition - * to the address to test. - * maxsize: Maximum mapping size supported by this tag. - * nsegments: Number of discontinuities allowed in maps. - * maxsegsz: Maximum size of a segment in the map. - * flags: Bus DMA flags. - * dmat: A pointer to set to a valid dma tag should the return - * value of this function indicate success. - */ -int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, - bus_size_t boundary, bus_addr_t lowaddr, - bus_addr_t highaddr, bus_dma_filter_t *filtfunc, - void *filtfuncarg, bus_size_t maxsize, int nsegments, - bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, - void *lockfuncarg, bus_dma_tag_t *dmat); - -int bus_dma_tag_destroy(bus_dma_tag_t dmat); - -int bus_dmamap_create (bus_dma_tag_t, int, bus_dmamap_t *); -int bus_dmamap_destroy (bus_dma_tag_t, bus_dmamap_t); -int bus_dmamap_load (bus_dma_tag_t, bus_dmamap_t, void *, - bus_size_t, bus_dmamap_callback_t *, void *, int); -int bus_dmamap_load_mbuf (bus_dma_tag_t, bus_dmamap_t, - struct mbuf *, bus_dmamap_callback2_t *, void *, int); -int bus_dmamap_load_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map, - struct mbuf *mbuf, bus_dma_segment_t *segs, - int *nsegs, int flags); -int bus_dmamap_load_uio (bus_dma_tag_t, bus_dmamap_t, - struct uio *, bus_dmamap_callback2_t *, void *, int); -void bus_dmamap_unload (bus_dma_tag_t, bus_dmamap_t); -void bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); - -int bus_dmamem_alloc (bus_dma_tag_t tag, void **vaddr, int flag, - bus_dmamap_t *mapp); -void bus_dmamem_free (bus_dma_tag_t tag, void *vaddr, bus_dmamap_t map); - -/* - * Generic helper function for manipulating mutexes. - */ -void busdma_lock_mutex(void *arg, bus_dma_lock_op_t op); - #define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF #define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF #define BUS_SPACE_MAXADDR 0xFFFFFFFF @@ -778,4 +626,6 @@ bus_space_write_multi_4((t), (h), (o), (a), (c)) +#include <machine/bus_dma.h> + #endif /* _MACHINE_BUS_H_ */ ==== //depot/projects/netperf_socket/sys/boot/i386/libi386/pxe.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/pxe.c,v 1.20 2003/08/25 23:28:31 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/pxe.c,v 1.21 2005/03/12 21:26:53 kan Exp $"); #include <stand.h> #include <string.h> @@ -413,6 +413,22 @@ /* structure truncated here */ }; extern struct nfs_iodesc nfs_root_node; +extern int rpc_port; + +static void +pxe_rpcmountcall() +{ + struct iodesc *d; + int error; + + if (!(d = socktodesc(pxe_sock))) + return; + d->myport = htons(--rpc_port); + d->destip = rootip; + if ((error = nfs_getrootfh(d, rootpath, nfs_root_node.fh)) != 0) + printf("NFS MOUNT RPC error: %d\n", error); + nfs_root_node.iodesc = d; +} static void pxe_setnfshandle(char *rootpath) @@ -421,6 +437,14 @@ u_char *fh; char buf[2 * NFS_FHSIZE + 3], *cp; + /* + * If NFS files were never opened, we need to do mount call + * ourselves. Use nfs_root_node.iodesc as flag indicating + * previous NFS usage. + */ + if (nfs_root_node.iodesc == NULL) + pxe_rpcmountcall(); + fh = &nfs_root_node.fh[0]; buf[0] = 'X'; cp = &buf[1]; ==== //depot/projects/netperf_socket/sys/coda/cnode.h#5 (text+ko) ==== @@ -27,7 +27,7 @@ * Mellon the rights to redistribute these changes without encumbrance. * * @(#) src/sys/coda/cnode.h,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ - * $FreeBSD: src/sys/coda/cnode.h,v 1.16 2005/01/05 23:35:00 imp Exp $ + * $FreeBSD: src/sys/coda/cnode.h,v 1.17 2005/03/13 12:09:34 jeff Exp $ * */ @@ -102,7 +102,6 @@ struct vnode *c_vnode; u_short c_flags; /* flags (see below) */ CodaFid c_fid; /* file handle */ - struct lock c_lock; /* new lock protocol */ struct vnode *c_ovp; /* open vnode pointer */ u_short c_ocount; /* count of openers */ u_short c_owrite; /* count of open for write */ ==== //depot/projects/netperf_socket/sys/coda/coda_subr.c#4 (text+ko) ==== @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/coda/coda_subr.c,v 1.30 2005/01/05 23:35:00 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/coda/coda_subr.c,v 1.31 2005/03/13 12:10:15 jeff Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -315,7 +315,7 @@ MNT_ILOCK(mp); MNT_VNODE_FOREACH(vp, mp, nvp) { VI_LOCK(vp); - if (vp->v_iflag & VI_XLOCK) { + if (vp->v_iflag & VI_DOOMED) { VI_UNLOCK(vp); continue; } ==== //depot/projects/netperf_socket/sys/coda/coda_vnops.c#7 (text+ko) ==== @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/coda/coda_vnops.c,v 1.63 2005/02/07 08:04:24 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/coda/coda_vnops.c,v 1.64 2005/03/13 12:09:34 jeff Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -847,7 +847,6 @@ printf("coda_inactive: cp->ovp != NULL use %d: vp %p, cp %p\n", vrefcnt(vp), vp, cp); #endif - lockmgr(&cp->c_lock, LK_RELEASE, &vp->v_interlock, td); } else { #ifdef OLD_DIAGNOSTIC if (vrefcnt(CTOV(cp))) { @@ -857,7 +856,6 @@ panic("coda_inactive: cp->ovp != NULL"); } #endif - VOP_UNLOCK(vp, 0, td); vgone(vp); } @@ -1630,7 +1628,6 @@ #endif } cache_purge(vp); - lockdestroy(&(VTOC(vp)->c_lock)); coda_free(VTOC(vp)); vp->v_data = NULL; vnode_destroy_vobject(vp); @@ -1643,23 +1640,22 @@ /* true args */ struct vnode *vp = ap->a_vp; struct cnode *cp = VTOC(vp); - struct thread *td = ap->a_td; /* upcall decl */ /* locals */ ENTRY; + if ((ap->a_flags & LK_INTERLOCK) == 0) { + VI_LOCK(vp); + ap->a_flags |= LK_INTERLOCK; + } + if (coda_lockdebug) { myprintf(("Attempting lock on %s\n", coda_f2s(&cp->c_fid))); } -#ifndef DEBUG_LOCKS - return (lockmgr(&cp->c_lock, ap->a_flags, &vp->v_interlock, td)); -#else - return (debuglockmgr(&cp->c_lock, ap->a_flags, &vp->v_interlock, td, - "coda_lock", vp->filename, vp->line)); -#endif + return (vop_stdlock(ap)); } int @@ -1668,7 +1664,6 @@ /* true args */ struct vnode *vp = ap->a_vp; struct cnode *cp = VTOC(vp); - struct thread *td = ap->a_td; /* upcall decl */ /* locals */ @@ -1678,17 +1673,16 @@ coda_f2s(&cp->c_fid))); } - return (lockmgr(&cp->c_lock, ap->a_flags | LK_RELEASE, &vp->v_interlock, td)); + return (vop_stdunlock(ap)); } int coda_islocked(struct vop_islocked_args *ap) { /* true args */ - struct cnode *cp = VTOC(ap->a_vp); ENTRY; - return (lockstatus(&cp->c_lock, ap->a_td)); + return (vop_stdislocked(ap)); } /* How one looks up a vnode given a device/inode pair: */ @@ -1808,7 +1802,6 @@ struct vnode *vp; cp = coda_alloc(); - lockinit(&cp->c_lock, PINOD, "cnode", 0, 0); cp->c_fid = *fid; err = getnewvnode("coda", vfsp, &coda_vnodeops, &vp); ==== //depot/projects/netperf_socket/sys/conf/NOTES#50 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1303 2005/03/07 02:20:14 grog Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1304 2005/03/14 16:04:26 des Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -807,6 +807,7 @@ options PORTALFS #Portal filesystem options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework +options PSEUDOFS_TRACE #Debugging support for PSEUDOFS options SMBFS #SMB/CIFS filesystem options UDF #Universal Disk Format # Broken (seriously (functionally) broken): ==== //depot/projects/netperf_socket/sys/conf/files#62 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503141858.j2EIwjSY084434>