Re: [PATCH] arc: Implement arch-specific dma_map_ops.mmap

2016-11-02 Thread Catalin Marinas
On Wed, Nov 02, 2016 at 03:19:43PM +0300, Alexey Brodkin wrote: > diff --git a/arch/arc/mm/dma.c b/arch/arc/mm/dma.c > index 20afc65e22dc..034ec6a8a764 100644 > --- a/arch/arc/mm/dma.c > +++ b/arch/arc/mm/dma.c > @@ -105,6 +105,31 @@ static void arc_dma_free(struct device *dev, size_t > size,

Re: [PATCH] arc: Implement arch-specific dma_map_ops.mmap

2016-11-02 Thread Catalin Marinas
On Wed, Nov 02, 2016 at 03:19:43PM +0300, Alexey Brodkin wrote: > diff --git a/arch/arc/mm/dma.c b/arch/arc/mm/dma.c > index 20afc65e22dc..034ec6a8a764 100644 > --- a/arch/arc/mm/dma.c > +++ b/arch/arc/mm/dma.c > @@ -105,6 +105,31 @@ static void arc_dma_free(struct device *dev, size_t > size,

[PATCH] arc: Implement arch-specific dma_map_ops.mmap

2016-11-02 Thread Alexey Brodkin
We used to use generic implementation of dma_map_ops.mmap which is dma_common_mmap() but that only worked for simpler cached mappings when vaddr = paddr. If a driver requests uncached DMA buffer kernel maps it to virtual address so that MMU gets involved and page uncached status takes into

[PATCH] arc: Implement arch-specific dma_map_ops.mmap

2016-11-02 Thread Alexey Brodkin
We used to use generic implementation of dma_map_ops.mmap which is dma_common_mmap() but that only worked for simpler cached mappings when vaddr = paddr. If a driver requests uncached DMA buffer kernel maps it to virtual address so that MMU gets involved and page uncached status takes into