Re: [PATCH 2/5] dma-mapping: move the dma_coherent flag to struct device

From: Paul Burton
Date: Fri Aug 31 2018 - 16:12:04 EST


Hi Christoph,

On Mon, Aug 27, 2018 at 04:50:29PM +0200, Christoph Hellwig wrote:
> Various architectures support both coherent and non-coherent dma on
> a per-device basis. Move the dma_noncoherent flag from mips the
> mips archdata field to struct device proper to prepare the
> infrastructure for reuse on other architectures.

"mips the mips"

> diff --git a/include/linux/dma-noncoherent.h b/include/linux/dma-noncoherent.h
> index a0aa00cc909d..f99748e9c08e 100644
> --- a/include/linux/dma-noncoherent.h
> +++ b/include/linux/dma-noncoherent.h
> @@ -4,6 +4,24 @@
>
> #include <linux/dma-mapping.h>
>
> +#ifdef CONFIG_ARCH_HAS_DMA_COHERENCE_H
> +#include <asm/dma-coherence.h>
> +#else
> +#if defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \
> + defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU) || \
> + defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL)

#elif ?

Thanks,
Paul