Lines Matching refs:attrs
439 unsigned long attrs) in dma_info_to_prot() argument
443 if (attrs & DMA_ATTR_PRIVILEGED) in dma_info_to_prot()
445 if (attrs & DMA_ATTR_SYS_CACHE_ONLY) in dma_info_to_prot()
447 if (attrs & DMA_ATTR_SYS_CACHE_ONLY_NWA) in dma_info_to_prot()
640 unsigned long attrs) in __iommu_dma_alloc_noncontiguous() argument
646 int ioprot = dma_info_to_prot(DMA_BIDIRECTIONAL, coherent, attrs); in __iommu_dma_alloc_noncontiguous()
663 if (attrs & DMA_ATTR_ALLOC_SINGLE_PAGES) in __iommu_dma_alloc_noncontiguous()
707 unsigned long attrs) in iommu_dma_alloc_remap() argument
714 attrs); in iommu_dma_alloc_remap()
734 unsigned long attrs) in iommu_dma_alloc_noncontiguous() argument
743 PAGE_KERNEL, attrs); in iommu_dma_alloc_noncontiguous()
830 unsigned long attrs) in iommu_dma_map_page() argument
834 int prot = dma_info_to_prot(dir, coherent, attrs); in iommu_dma_map_page()
852 iova_mask(iovad), dir, attrs); in iommu_dma_map_page()
861 if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) && in iommu_dma_map_page()
870 if (!coherent && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) in iommu_dma_map_page()
875 swiotlb_tbl_unmap_single(dev, phys, size, dir, attrs); in iommu_dma_map_page()
880 size_t size, enum dma_data_direction dir, unsigned long attrs) in iommu_dma_unmap_page() argument
889 if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) && !dev_is_dma_coherent(dev)) in iommu_dma_unmap_page()
895 swiotlb_tbl_unmap_single(dev, phys, size, dir, attrs); in iommu_dma_unmap_page()
974 int nents, enum dma_data_direction dir, unsigned long attrs) in iommu_dma_unmap_sg_swiotlb() argument
981 sg_dma_len(s), dir, attrs); in iommu_dma_unmap_sg_swiotlb()
985 int nents, enum dma_data_direction dir, unsigned long attrs) in iommu_dma_map_sg_swiotlb() argument
992 s->offset, s->length, dir, attrs); in iommu_dma_map_sg_swiotlb()
1001 iommu_dma_unmap_sg_swiotlb(dev, sg, i, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC); in iommu_dma_map_sg_swiotlb()
1013 int nents, enum dma_data_direction dir, unsigned long attrs) in iommu_dma_map_sg() argument
1019 int prot = dma_info_to_prot(dir, dev_is_dma_coherent(dev), attrs); in iommu_dma_map_sg()
1033 return iommu_dma_map_sg_swiotlb(dev, sg, nents, dir, attrs); in iommu_dma_map_sg()
1035 if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC)) in iommu_dma_map_sg()
1104 int nents, enum dma_data_direction dir, unsigned long attrs) in iommu_dma_unmap_sg() argument
1111 iommu_dma_unmap_sg_swiotlb(dev, sg, nents, dir, attrs); in iommu_dma_unmap_sg()
1115 if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC)) in iommu_dma_unmap_sg()
1133 size_t size, enum dma_data_direction dir, unsigned long attrs) in iommu_dma_map_resource() argument
1136 dma_info_to_prot(dir, false, attrs) | IOMMU_MMIO, in iommu_dma_map_resource()
1141 size_t size, enum dma_data_direction dir, unsigned long attrs) in iommu_dma_unmap_resource() argument
1178 dma_addr_t handle, unsigned long attrs) in iommu_dma_free() argument
1185 struct page **pagep, gfp_t gfp, unsigned long attrs) in iommu_dma_alloc_pages() argument
1200 pgprot_t prot = dma_pgprot(dev, PAGE_KERNEL, attrs); in iommu_dma_alloc_pages()
1222 dma_addr_t *handle, gfp_t gfp, unsigned long attrs) in iommu_dma_alloc() argument
1225 int ioprot = dma_info_to_prot(DMA_BIDIRECTIONAL, coherent, attrs); in iommu_dma_alloc()
1232 !(attrs & DMA_ATTR_FORCE_CONTIGUOUS)) { in iommu_dma_alloc()
1234 dma_pgprot(dev, PAGE_KERNEL, attrs), attrs); in iommu_dma_alloc()
1242 cpu_addr = iommu_dma_alloc_pages(dev, size, &page, gfp, attrs); in iommu_dma_alloc()
1258 unsigned long attrs) in iommu_dma_mmap() argument
1264 vma->vm_page_prot = dma_pgprot(dev, vma->vm_page_prot, attrs); in iommu_dma_mmap()
1289 unsigned long attrs) in iommu_dma_get_sgtable() argument