diff options
author | scottl <scottl@FreeBSD.org> | 2003-01-29 07:25:27 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2003-01-29 07:25:27 +0000 |
commit | 27cbbd88a297ee95096971d969fc28f1f2c7a09c (patch) | |
tree | d21203bdfa9f1d0c2ea53afbd752b1326d109e6c /sys/alpha/pci/t2_pci.c | |
parent | 1bc11f23c6b4c14967b2c1745df47caa7147c66e (diff) | |
download | FreeBSD-src-27cbbd88a297ee95096971d969fc28f1f2c7a09c.zip FreeBSD-src-27cbbd88a297ee95096971d969fc28f1f2c7a09c.tar.gz |
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)
Diffstat (limited to 'sys/alpha/pci/t2_pci.c')
0 files changed, 0 insertions, 0 deletions