Re: [PATCH] asm-generic: add dma-mapping-linear.h

Geert Uytterhoeven
2009-06-04T20:11:20Z

On Thu, Jun 4, 2009 at 18:47, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 04 June 2009, FUJITA Tomonori wrote:
>> On Thu, 4 Jun 2009 12:35:34 +0000
>> Arnd Bergmann <arnd@arndb.de> wrote:
>> If I correctly understand DMA-API.txt, dma_alloc_noncoherent can
>> return either consistent or non-consistent memory. On architectures
>> that return consistent memory via dma_alloc_noncoherent,
>> dma_cache_sync should be null. dma_cache_sync() is supposed to be used
>> only with the returned buffers of dma_alloc_noncoherent().
>
> Good point. This is unfortunately not what is implemented on many
> architectures, which #define dma_alloc_noncoherent dma_alloc_coherent
> but still provide a synchronizing operation in dma_cache_sync().
>
> dma_alloc_noncoherent is actually only implemented on parisc, mips
> and m68k.

And m68k is a false positive, as it just uses a static inline wrapper
instead of a
define to map it to dma_alloc_coherent().

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds