Lines Matching refs:attrs
37 static pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot, in __get_dma_pgprot() argument
40 if (!coherent || (attrs & DMA_ATTR_WRITE_COMBINE)) in __get_dma_pgprot()
96 unsigned long attrs) in __dma_alloc() argument
101 pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, false); in __dma_alloc()
115 ptr = swiotlb_alloc(dev, size, dma_handle, flags, attrs); in __dma_alloc()
136 swiotlb_free(dev, size, ptr, *dma_handle, attrs); in __dma_alloc()
143 unsigned long attrs) in __dma_free() argument
154 swiotlb_free(dev, size, swiotlb_addr, dma_handle, attrs); in __dma_free()
160 unsigned long attrs) in __swiotlb_map_page() argument
164 dev_addr = swiotlb_map_page(dev, page, offset, size, dir, attrs); in __swiotlb_map_page()
166 (attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) in __swiotlb_map_page()
175 unsigned long attrs) in __swiotlb_unmap_page() argument
178 (attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) in __swiotlb_unmap_page()
180 swiotlb_unmap_page(dev, dev_addr, size, dir, attrs); in __swiotlb_unmap_page()
185 unsigned long attrs) in __swiotlb_map_sg_attrs() argument
190 ret = swiotlb_map_sg_attrs(dev, sgl, nelems, dir, attrs); in __swiotlb_map_sg_attrs()
192 (attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) in __swiotlb_map_sg_attrs()
203 unsigned long attrs) in __swiotlb_unmap_sg_attrs() argument
209 (attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) in __swiotlb_unmap_sg_attrs()
213 swiotlb_unmap_sg_attrs(dev, sgl, nelems, dir, attrs); in __swiotlb_unmap_sg_attrs()
283 unsigned long attrs) in __swiotlb_mmap() argument
288 vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot, in __swiotlb_mmap()
310 unsigned long attrs) in __swiotlb_get_sgtable() argument
415 unsigned long attrs) in __dummy_alloc() argument
422 unsigned long attrs) in __dummy_free() argument
429 unsigned long attrs) in __dummy_mmap() argument
437 unsigned long attrs) in __dummy_map_page() argument
444 unsigned long attrs) in __dummy_unmap_page() argument
450 unsigned long attrs) in __dummy_map_sg() argument
458 unsigned long attrs) in __dummy_unmap_sg() argument
529 unsigned long attrs) in __iommu_alloc_attrs() argument
532 int ioprot = dma_info_to_prot(DMA_BIDIRECTIONAL, coherent, attrs); in __iommu_alloc_attrs()
571 } else if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) { in __iommu_alloc_attrs()
572 pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, coherent); in __iommu_alloc_attrs()
594 iommu_dma_unmap_page(dev, *handle, iosize, 0, attrs); in __iommu_alloc_attrs()
599 pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, coherent); in __iommu_alloc_attrs()
602 pages = iommu_dma_alloc(dev, iosize, gfp, attrs, ioprot, in __iommu_alloc_attrs()
616 dma_addr_t handle, unsigned long attrs) in __iommu_free_attrs() argument
635 } else if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) { in __iommu_free_attrs()
638 iommu_dma_unmap_page(dev, handle, iosize, 0, attrs); in __iommu_free_attrs()
656 unsigned long attrs) in __iommu_mmap_attrs() argument
661 vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot, in __iommu_mmap_attrs()
667 if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) { in __iommu_mmap_attrs()
685 size_t size, unsigned long attrs) in __iommu_get_sgtable() argument
690 if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) { in __iommu_get_sgtable()
735 unsigned long attrs) in __iommu_map_page() argument
738 int prot = dma_info_to_prot(dir, coherent, attrs); in __iommu_map_page()
742 (attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) in __iommu_map_page()
750 unsigned long attrs) in __iommu_unmap_page() argument
752 if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) in __iommu_unmap_page()
755 iommu_dma_unmap_page(dev, dev_addr, size, dir, attrs); in __iommu_unmap_page()
788 unsigned long attrs) in __iommu_map_sg_attrs() argument
792 if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) in __iommu_map_sg_attrs()
796 dma_info_to_prot(dir, coherent, attrs)); in __iommu_map_sg_attrs()
802 unsigned long attrs) in __iommu_unmap_sg_attrs() argument
804 if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) in __iommu_unmap_sg_attrs()
807 iommu_dma_unmap_sg(dev, sgl, nelems, dir, attrs); in __iommu_unmap_sg_attrs()