Lines Matching refs:attrs
437 * @attrs: DMA attributes for the mapping
441 static int dma_info_to_prot(enum dma_data_direction dir, bool coherent, unsigned long attrs)
445 if (attrs & DMA_ATTR_PRIVILEGED) {
448 if (attrs & DMA_ATTR_SYS_CACHE_ONLY) {
451 if (attrs & DMA_ATTR_SYS_CACHE_ONLY_NWA) {
646 * @attrs: DMA attributes for this allocation
654 unsigned long attrs)
660 int ioprot = dma_info_to_prot(DMA_BIDIRECTIONAL, coherent, attrs);
680 if (attrs & DMA_ATTR_ALLOC_SINGLE_PAGES) {
798 enum dma_data_direction dir, unsigned long attrs)
802 int prot = dma_info_to_prot(dir, coherent, attrs);
806 if (!coherent && !(attrs & DMA_ATTR_SKIP_CPU_SYNC) && dma_handle != DMA_MAPPING_ERROR) {
813 unsigned long attrs)
815 if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC)) {
908 unsigned long attrs)
914 int prot = dma_info_to_prot(dir, dev_is_dma_coherent(dev), attrs);
924 if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC)) {
991 unsigned long attrs)
997 if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC)) {
1018 unsigned long attrs)
1020 return iommu_dma_map_ext(dev, phys, size, dma_info_to_prot(dir, false, attrs) | IOMMU_MMIO, dma_get_mask(dev));
1024 unsigned long attrs)
1063 static void iommu_dma_free(struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle, unsigned long attrs)
1069 static void *iommu_dma_alloc_pages(struct device *dev, size_t size, struct page **pagep, gfp_t gfp, unsigned long attrs)
1086 pgprot_t prot = dma_pgprot(dev, PAGE_KERNEL, attrs);
1108 static void *iommu_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, unsigned long attrs)
1111 int ioprot = dma_info_to_prot(DMA_BIDIRECTIONAL, coherent, attrs);
1117 if (IS_ENABLED(CONFIG_DMA_REMAP) && gfpflags_allow_blocking(gfp) && !(attrs & DMA_ATTR_FORCE_CONTIGUOUS)) {
1118 return iommu_dma_alloc_remap(dev, size, handle, gfp, dma_pgprot(dev, PAGE_KERNEL, attrs), attrs);
1124 cpu_addr = iommu_dma_alloc_pages(dev, size, &page, gfp, attrs);
1168 size_t size, unsigned long attrs)
1174 vma->vm_page_prot = dma_pgprot(dev, vma->vm_page_prot, attrs);
1199 size_t size, unsigned long attrs)