minimum guaranteed alignment of dma_alloc_coherent?

Tabi Timur-B04825 B04825 at freescale.com
Sat Feb 5 13:04:40 EST 2011


Dan Malek wrote:
>
>
>> On a side note, do I really need to pass GFP_DMA ....
>
> The GFP_DMA is architecture dependent.  Are you writing
> a driver to be used across multiple architectures?

It's conceivable that the driver could work on PowerPC and ARM.

> If it's
> necessary, I'd document why you are using it (an ISA device
> on x86 for example) and then let other architectures
> determine if it's necessary for them.

I guess I'm not clear.  I was wondering why an API called "dma_alloc_coherent" (that has the word "dma" in it) needs to be told to allocate DMA-safe memory.  When would it make sense to call dma_alloc_cohernet without GFP_DMA?  If you don't want DMA-able memory, then you shouldn't be calling dma_alloc_anything.

-- 
Timur Tabi
Linux kernel developer


More information about the Linuxppc-dev mailing list