Date: Tue, 28 Jan 2003 23:25:27 -0800 (PST) From: Scott Long <scottl@FreeBSD.org> 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 ... Message-ID: <200301290725.h0T7PRK6066218@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301290725.h0T7PRK6066218>
