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

2018-09-11 Thread Greg Kroah-Hartman
On Tue, Sep 11, 2018 at 08:46:36AM +0200, Christoph Hellwig wrote: > On Mon, Sep 10, 2018 at 06:13:50PM +0200, Greg Kroah-Hartman wrote: > > > +#if defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \ > > > +defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU) || \ > > > +

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

2018-09-11 Thread Christoph Hellwig
On Mon, Sep 10, 2018 at 04:19:30PM +0100, Robin Murphy wrote: > If we're likely to refer to it more than once, is it worth wrapping that > condition up in something like ARCH_HAS_NONCOHERENT_DMA? Below is what we'd need. Which to me doesn't look wortwhile for just those two conditionals: diff

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

2018-09-11 Thread Christoph Hellwig
On Mon, Sep 10, 2018 at 05:06:40PM +0100, Robin Murphy wrote: >>> Nits aside, this otherwise looks sane to me for factoring out the >>> equivalent Xen and arm64 DMA ops cases. >> >> Like this? :) >> >> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-maybe-coherent > > Man,

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

2018-09-11 Thread Christoph Hellwig
On Mon, Sep 10, 2018 at 06:13:50PM +0200, Greg Kroah-Hartman wrote: > > +#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) > > + booldma_coherent:1; > > +#endif

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

2018-09-10 Thread Greg Kroah-Hartman
On Mon, Sep 10, 2018 at 08:05:30AM +0200, Christoph Hellwig wrote: > diff --git a/include/linux/device.h b/include/linux/device.h > index 8f882549edee..983506789402 100644 > --- a/include/linux/device.h > +++ b/include/linux/device.h > @@ -927,6 +927,8 @@ struct dev_links_info { > * @offline:

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

2018-09-10 Thread Robin Murphy
On 10/09/18 16:47, Christoph Hellwig wrote: --- a/kernel/dma/Kconfig +++ b/kernel/dma/Kconfig @@ -13,6 +13,9 @@ config NEED_DMA_MAP_STATE config ARCH_DMA_ADDR_T_64BIT def_bool 64BIT || PHYS_ADDR_T_64BIT +config ARCH_HAS_DMA_COHERENCE_H + bool This seems a little crude - is

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

2018-09-10 Thread Christoph Hellwig
On Mon, Sep 10, 2018 at 04:19:30PM +0100, Robin Murphy wrote: >> +#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) > > If we're likely to refer to it more than once, is it worth

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

2018-09-10 Thread Robin Murphy
On 10/09/18 07:05, Christoph Hellwig wrote: Various architectures support both coherent and non-coherent dma on a per-device basis. Move the dma_noncoherent flag from the mips archdata field to struct device proper to prepare the infrastructure for reuse on other architectures. Signed-off-by:

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

2018-09-10 Thread Christoph Hellwig
Various architectures support both coherent and non-coherent dma on a per-device basis. Move the dma_noncoherent flag from the mips archdata field to struct device proper to prepare the infrastructure for reuse on other architectures. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton ---

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

2018-08-31 Thread Paul Burton
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

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

2018-08-27 Thread Christoph Hellwig
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. Signed-off-by: Christoph Hellwig --- arch/mips/Kconfig