Re: [PATCH v2 14/31] arm64: DMA mapping API

2012-08-21 Thread Catalin Marinas
On Wed, Aug 15, 2012 at 01:40:06AM +0100, Olof Johansson wrote: > On Tue, Aug 14, 2012 at 06:52:15PM +0100, Catalin Marinas wrote: > > +static inline struct dma_map_ops *get_dma_ops(struct device *dev) > > +{ > > + if (unlikely(!dev) || !dev->archdata.dma_ops) > > + return dma_ops; > >

Re: [PATCH v2 14/31] arm64: DMA mapping API

2012-08-21 Thread Catalin Marinas
On Wed, Aug 15, 2012 at 05:16:00PM +0100, Arnd Bergmann wrote: > On Tuesday 14 August 2012, Catalin Marinas wrote: > > +static struct dma_map_ops arm64_swiotlb_dma_ops = { > > + .alloc = arm64_swiotlb_alloc_coherent, > > + .free = arm64_swiotlb_free_coherent, > > + .map_page =

Re: [PATCH v2 14/31] arm64: DMA mapping API

2012-08-21 Thread Catalin Marinas
On Wed, Aug 15, 2012 at 05:16:00PM +0100, Arnd Bergmann wrote: On Tuesday 14 August 2012, Catalin Marinas wrote: +static struct dma_map_ops arm64_swiotlb_dma_ops = { + .alloc = arm64_swiotlb_alloc_coherent, + .free = arm64_swiotlb_free_coherent, + .map_page =

Re: [PATCH v2 14/31] arm64: DMA mapping API

2012-08-21 Thread Catalin Marinas
On Wed, Aug 15, 2012 at 01:40:06AM +0100, Olof Johansson wrote: On Tue, Aug 14, 2012 at 06:52:15PM +0100, Catalin Marinas wrote: +static inline struct dma_map_ops *get_dma_ops(struct device *dev) +{ + if (unlikely(!dev) || !dev-archdata.dma_ops) + return dma_ops; + else

Re: [PATCH v2 14/31] arm64: DMA mapping API

2012-08-15 Thread Arnd Bergmann
On Tuesday 14 August 2012, Catalin Marinas wrote: > +static struct dma_map_ops arm64_swiotlb_dma_ops = { > + .alloc = arm64_swiotlb_alloc_coherent, > + .free = arm64_swiotlb_free_coherent, > + .map_page = arm64_swiotlb_map_page, > + .unmap_page = arm64_swiotlb_unmap_page, >

Re: [PATCH v2 14/31] arm64: DMA mapping API

2012-08-15 Thread Arnd Bergmann
On Tuesday 14 August 2012, Catalin Marinas wrote: +static struct dma_map_ops arm64_swiotlb_dma_ops = { + .alloc = arm64_swiotlb_alloc_coherent, + .free = arm64_swiotlb_free_coherent, + .map_page = arm64_swiotlb_map_page, + .unmap_page = arm64_swiotlb_unmap_page, +

Re: [PATCH v2 14/31] arm64: DMA mapping API

2012-08-14 Thread Olof Johansson
Hi, On Tue, Aug 14, 2012 at 06:52:15PM +0100, Catalin Marinas wrote: > This patch adds support for the DMA mapping API. It uses dma_map_ops for > flexibility and it currently supports swiotlb. This patch could be > simplified further if the DMA accesses are coherent (not mandated by the >

[PATCH v2 14/31] arm64: DMA mapping API

2012-08-14 Thread Catalin Marinas
This patch adds support for the DMA mapping API. It uses dma_map_ops for flexibility and it currently supports swiotlb. This patch could be simplified further if the DMA accesses are coherent (not mandated by the architecture) or if corresponding hooks are placed in the generic swiotlb code to

[PATCH v2 14/31] arm64: DMA mapping API

2012-08-14 Thread Catalin Marinas
This patch adds support for the DMA mapping API. It uses dma_map_ops for flexibility and it currently supports swiotlb. This patch could be simplified further if the DMA accesses are coherent (not mandated by the architecture) or if corresponding hooks are placed in the generic swiotlb code to

Re: [PATCH v2 14/31] arm64: DMA mapping API

2012-08-14 Thread Olof Johansson
Hi, On Tue, Aug 14, 2012 at 06:52:15PM +0100, Catalin Marinas wrote: This patch adds support for the DMA mapping API. It uses dma_map_ops for flexibility and it currently supports swiotlb. This patch could be simplified further if the DMA accesses are coherent (not mandated by the