dma-mapping: support for DMA_ATTR_NON_CONSISTENT DMA attribute

Sylvain Munaut s.munaut at
Sun Jun 28 22:24:15 PDT 2015


> ... and then using the *streaming* API dma_sync_* calls on it.  That
> is invalid, and will lead to undefined results on implementations of
> dma_alloc_coherent() which return remapped memory (as for older ARMs.)
> This is an abuse of the API.

Ok, fine, but then

_How_ do I do it properly ?  From a driver module, how do I allocate a
large chunk ( > 4M so no alloc_pages and no kmalloc ) of contiguous
memory that's cacheable and that I can use with the streaming API ?

Or alternatively, what are the correct "sync points" that the doc refers to ?

""" By using this API, you are guaranteeing to the platform that you
have all the correct and necessary sync points for this memory in the
driver should it choose to return non-consistent memory."""

I had assumed it was the dma_sync_* calls, but apparently not.



More information about the linux-arm-kernel mailing list