Re: [PATCH 1/7] arm-nommu: remove the partial DMA_ATTR_NON_CONSISTENT support

2019-06-24 Thread Vladimir Murzin
_global_coherent(get_order(size), > -cpu_addr); > - > - WARN_ON_ONCE(ret == 0); > - } > + int ret = dma_release_from_global_coherent(get_order(size), cpu_addr); > > - return; > + WA

Re: [PATCH 29/33] dma-direct: retry allocations using GFP_DMA for small masks

2018-01-10 Thread Vladimir Murzin
ges(page, page_order); > + page = NULL; > + > + if (dev->coherent_dma_mask < DMA_BIT_MASK(32) && > + !(gfp & GFP_DMA)) { > + gfp = (gfp & ~GFP_DMA32) | GFP_DMA; > + got

Re: [PATCH 11/33] dma-mapping: move swiotlb arch helpers to a new header

2018-01-10 Thread Vladimir Murzin
On 10/01/18 08:00, Christoph Hellwig wrote: > index 9110988b92a1..f00833acb626 100644 > --- a/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h > +++ b/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h > @@ -61,6 +61,14 @@ static inline void plat_post_dma_flush(struct device *dev) >

Re: [PATCH 31/67] dma-direct: make dma_direct_{alloc, free} available to other implementations

2018-01-02 Thread Vladimir Murzin
ze_t > size, > return page_address(page); > } > > -static void dma_direct_free(struct device *dev, size_t size, void *cpu_addr, > +void dma_direct_free(struct device *dev, size_t size, void *cpu_addr, > dma_addr_t dma_addr, unsigned long attrs) > { > unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; > Reviewed-by: Vladimir Murzin Thanks Vladimir ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 30/67] dma-direct: retry allocations using GFP_DMA for small masks

2018-01-02 Thread Vladimir Murzin
On 29/12/17 08:18, Christoph Hellwig wrote: > If we got back an allocation that wasn't inside the support coherent mask, > retry the allocation using GFP_DMA. > > Based on the x86 code. > > Signed-off-by: Christoph Hellwig > --- > lib/dma-direct.c | 25 - > 1 file change

Re: [PATCH 26/67] dma-direct: use phys_to_dma

2018-01-02 Thread Vladimir Murzin
g)); > - va = sg_virt(sg); > - sg_dma_address(sg) = (dma_addr_t)virt_to_phys(va) - offset; > + > + sg_dma_address(sg) = phys_to_dma(dev, sg_phys(sg)); > sg_dma_len(sg) = sg->length; > } > > >From ARM NO

Re: [PATCH 25/67] dma-direct: rename dma_noop to dma_direct

2018-01-02 Thread Vladimir Murzin
tion dir, unsigned long attrs) > { > int i; > struct scatterlist *sg; > @@ -58,12 +54,11 @@ static int dma_noop_map_sg(struct device *dev, struct > scatterlist *sgl, int nent > return nents; > } > > -const struct dma_map_ops dma_noop_ops = { > - .alloc = dma_noop_alloc, > - .free = dma_noop_free, > - .map_page = dma_noop_map_page, > - .map_sg = dma_noop_map_sg, > +const struct dma_map_ops dma_direct_ops = { > + .alloc = dma_direct_alloc, > + .free = dma_direct_free, > + .map_page = dma_direct_map_page, > + .map_sg = dma_direct_map_sg, > .is_phys= true, > }; > - > -EXPORT_SYMBOL(dma_noop_ops); > +EXPORT_SYMBOL(dma_direct_ops); > >From ARM NOMMU perspective Reviewed-by: Vladimir Murzin Thanks Vladimir ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: consolidate direct dma mapping and swiotlb support

2017-12-29 Thread Vladimir Murzin
On 29/12/17 08:18, Christoph Hellwig wrote: > Almost every architecture supports a direct dma mapping implementation, > where no iommu is used and the device dma address is a 1:1 mapping to > the physical address or has a simple linear offset. Currently the > code for this implementation is most d