From owner-cvs-all Tue Jan 28 23:25:29 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34B4C37B405; Tue, 28 Jan 2003 23:25:28 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CABEF43E4A; Tue, 28 Jan 2003 23:25:27 -0800 (PST) (envelope-from scottl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h0T7PRbv066219; Tue, 28 Jan 2003 23:25:27 -0800 (PST) (envelope-from scottl@repoman.freebsd.org) Received: (from scottl@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h0T7PRK6066218; Tue, 28 Jan 2003 23:25:27 -0800 (PST) Message-Id: <200301290725.h0T7PRK6066218@repoman.freebsd.org> From: Scott Long Date: Tue, 28 Jan 2003 23:25:27 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/i386/i386 busdma_machdep.c src/sys/i386/include bus_dma.h src/sys/alpha/alpha busdma_machdep.c src/sys/alpha/include bus.h src/sys/sparc64/include bus.h iommuvar.h src/sys/sparc64/pci psycho.c src/sys/sparc64/sbus ... X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG scottl 2003/01/28 23:25:27 PST Modified files: sys/i386/i386 busdma_machdep.c sys/i386/include bus_dma.h sys/alpha/alpha busdma_machdep.c sys/alpha/include bus.h sys/sparc64/include bus.h iommuvar.h sys/sparc64/pci psycho.c sys/sparc64/sbus sbus.c sys/sparc64/sparc64 bus_machdep.c iommu.c Log: Implement bus_dmamem_alloc_size() and bus_dmamem_free_size() as counterparts to bus_dmamem_alloc() and bus_dmamem_free(). This allows the caller to specify the size of the allocation instead of it defaulting to the max_size field of the busdma tag. This is intended to aid in converting drivers to busdma. Lots of hardware cannot understand scatter/gather lists, which forces the driver to copy the i/o buffers to a single contiguous region before sending it to the hardware. Without these new methods, this would require a new busdma tag for each operation, or a complex internal allocator/cache for each driver. Allocations greater than PAGE_SIZE are rounded up to the next PAGE_SIZE by contigmalloc(), so this is not suitable for multiple static allocations that would be better served by a single fixed-length subdivided allocation. Reviewed by: jake (sparc64) Revision Changes Path 1.26 +26 -8 src/sys/alpha/alpha/busdma_machdep.c 1.16 +6 -0 src/sys/alpha/include/bus.h 1.30 +26 -8 src/sys/i386/i386/busdma_machdep.c 1.17 +6 -0 src/sys/i386/include/bus_dma.h 1.16 +30 -0 src/sys/sparc64/include/bus.h 1.8 +4 -0 src/sys/sparc64/include/iommuvar.h 1.27 +27 -0 src/sys/sparc64/pci/psycho.c 1.12 +25 -0 src/sys/sparc64/sbus/sbus.c 1.17 +35 -9 src/sys/sparc64/sparc64/bus_machdep.c 1.18 +25 -6 src/sys/sparc64/sparc64/iommu.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message