[PATCH] powerpc: Implement dma_mmap_coherent()
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Mar 25 20:11:57 EST 2011
On Fri, 2011-03-25 at 09:06 +0100, Takashi Iwai wrote:
> > @@ -52,6 +53,7 @@ extern void __dma_sync_page(struct page *page,
> unsigned long offset,
> > #define __dma_free_coherent(size, addr) ((void)0)
> > #define __dma_sync(addr, size, rw) ((void)0)
> > #define __dma_sync_page(pg, off, sz, rw) ((void)0)
> > +#define __dma_get_coherent_pfn(cpu_addr) (0)
>
> Just nitpicking: shouldn't we define some real thing like
> page_to_pfn(virt_to_page(cpu_addr))
> or put something to trigger an error? Setting a bogus zero can be
> easily overlooked, I'm afraid.
Yes, all those variants are bogus if you noticed :-) The trick is that
they aren't actually called when CONFIG_NOT_COHERENT_CACHE is not set
anyways, with the exception of __dma_sync(), so I want to just remove
them all. But I'll do that in a separate patch.
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list