[PATCH 6/8] common: dma-mapping: change alloc/free_coherent method to more generic alloc/free_attrs
From: Stephen Rothwell <hidden>
Date: 2011-12-11 22:46:17
Also in:
linux-arch, linux-mm, linux-samsung-soc
Hi Marek, On Fri, 09 Dec 2011 17:39:56 +0100 Marek Szyprowski [off-list ref] wrote:
Introduce new alloc/free/mmap methods that take attributes argument. alloc/free_coherent can be implemented on top of the new alloc/free calls with NULL attributes. dma_alloc_non_coherent can be implemented using DMA_ATTR_NONCOHERENT attribute, dma_alloc_writecombine can also use separate DMA_ATTR_WRITECOMBINE attribute. This way the drivers will get more generic, platform independent way of allocating dma memory buffers with specific parameters. One more attribute can be usefull: DMA_ATTR_NOKERNELVADDR. Buffers with such attribute will not have valid kernel virtual address. They might be usefull for drivers that only exports the DMA buffers to userspace (like for example V4L2 or ALSA). mmap method is introduced to let the drivers create a user space mapping for a DMA buffer in generic, architecture independent way. TODO: update all dma_map_ops clients for all architectures
To give everyone some chance, you should come up with a transition plan rather than this "attempt to fix everyone at once" approach. You could (for example) just add the new methods now and only remove them in the following merge window when all the architectures have had a chance to migrate. And, in fact, (as I presume you know) this patch just breaks everyone with no attempt to cope. -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111212/bd42b5fd/attachment.sig>