[PATCH 7/8] powerpc/dma: split the two __dma_alloc_coherent implementations

Christoph Hellwig hch at lst.de
Mon Dec 17 18:35:43 AEDT 2018


On Mon, Dec 17, 2018 at 07:51:05AM +0100, Christophe Leroy wrote:
>
>
> Le 16/12/2018 à 18:19, Christoph Hellwig a écrit :
>> The implemementation for the CONFIG_NOT_COHERENT_CACHE case doesn't share
>> any code with the one for systems with coherent caches.  Split it off
>> and merge it with the helpers in dma-noncoherent.c that have no other
>> callers.
>>
>> Signed-off-by: Christoph Hellwig <hch at lst.de>
>> Acked-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
>> ---
>>   arch/powerpc/include/asm/dma-mapping.h |  5 -----
>>   arch/powerpc/kernel/dma.c              | 14 ++------------
>
> Instead of all the ifdefs in dma.c, couldn't we split it
> in two files, ie dma.c for common parts and dma-coherence.c for specific 
> stuff ?

The end goal is to kill dma.c and keep dma-noncoherent.c only with most
of the code moving to common code.  Here is the current state of that:

http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.5

But it still has issues on two tested platforms and isn't ready yet.


More information about the Linuxppc-dev mailing list