[RFC] ARM: dma_map|unmap_sg plus iommu

Ramirez Luna, Omar omar.ramirez at ti.com
Mon Aug 8 11:21:46 EDT 2011


Hi,

On Sun, Jul 31, 2011 at 7:57 PM, KyongHo Cho <pullip.cho at samsung.com> wrote:
> On Fri, Jul 29, 2011 at 11:24 PM, Marek Szyprowski
...
>> Right now I have no idea how to handle this better. Perhaps with should be
>> possible
>> to specify somehow the target dma_address when doing memory allocation, but I'm
>> not
>> really convinced yet if this is really required.
>>
> What about using 'dma_handle' argument of alloc_coherent callback of
> dma_map_ops?
> Although it is an output argument, I think we can convey a hint or
> start address to map
> to the IO memory manager that resides behind dma API.

I also thought on this one, even dma_map_single receives a void *ptr
which could be casted into a struct with both physical and virtual
addresses to be mapped, but IMHO, this starts to add twists into the
dma map parameters which might create confusion.

> DMA API is so abstract that it cannot cover all requirements by
> various device drivers;;

Agree.

Regards,

Omar



More information about the linux-arm-kernel mailing list