Any restrictions on DMA address boundry?

Matt Porter mporter at kernel.crashing.org
Tue Sep 23 02:59:52 EST 2003


On Mon, Sep 22, 2003 at 10:13:26AM -0500, Bret Indrelee wrote:
>
> Are there alignment restrictions on the address boundry your can
> start a DMA with when using the pci_map_single() / pci_unmap_single()
> calls?
>
> For some reason, I thought they had to be cache line aligned, but when
> I went back through the documentation I couldn't find any such
> restriction.

cache line alignment is an unwritten requirement that hasn't yet been
addressed in DMA-mapping.txt.  Unfortunately, kmalloc() doesn't
guarantee this so it's necessary to overallocate and align.
You can use L1_CACHE_BYTES for this.

Roland Dreier had a patch which added a little helper for this
stuff as well as docs.  Unfortunately, it's been dropped on the
floor until somebody with interest and time in non-coherent
platforms picks it up. http://lwn.net/Articles/2482/

-Matt

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list