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

From: Christoph Hellwig <[email-masked]>
Date: Mon, 17 Dec 2018 08:35:43 +0100

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 <[email-masked]>
>> Acked-by: Benjamin Herrenschmidt <[email-masked]>
>> ---
>>   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.