Lines Matching refs:attrs
438 static inline pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot)
440 prot = (attrs & DMA_ATTR_WRITE_COMBINE) ?
535 unsigned long attrs, const void *caller)
548 .want_vaddr = ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) == 0),
606 dma_addr_t handle, unsigned long attrs,
616 .want_vaddr = ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) == 0),
733 static int __dma_info_to_prot(enum dma_data_direction dir, unsigned long attrs)
737 if (attrs & DMA_ATTR_PRIVILEGED)
853 gfp_t gfp, unsigned long attrs,
869 if (attrs & DMA_ATTR_FORCE_CONTIGUOUS)
888 if (attrs & DMA_ATTR_ALLOC_SINGLE_PAGES)
944 size_t size, unsigned long attrs)
949 if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) {
966 unsigned long attrs)
991 __dma_info_to_prot(DMA_BIDIRECTIONAL, attrs),
1032 static struct page **__iommu_get_pages(void *cpu_addr, unsigned long attrs)
1037 if (attrs & DMA_ATTR_NO_KERNEL_MAPPING)
1045 unsigned long attrs)
1057 *handle = __iommu_create_mapping(dev, &page, size, attrs);
1079 dma_addr_t *handle, gfp_t gfp, unsigned long attrs)
1081 pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL);
1091 coherent_flag, attrs);
1093 pages = __iommu_alloc_buffer(dev, size, gfp, attrs, coherent_flag);
1097 *handle = __iommu_create_mapping(dev, pages, size, attrs);
1101 if (attrs & DMA_ATTR_NO_KERNEL_MAPPING)
1114 __iommu_free_buffer(dev, pages, size, attrs);
1120 unsigned long attrs)
1122 struct page **pages = __iommu_get_pages(cpu_addr, attrs);
1133 vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot);
1147 dma_addr_t handle, unsigned long attrs)
1158 pages = __iommu_get_pages(cpu_addr, attrs);
1164 if ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) == 0)
1168 __iommu_free_buffer(dev, pages, size, attrs);
1173 size_t size, unsigned long attrs)
1176 struct page **pages = __iommu_get_pages(cpu_addr, attrs);
1190 enum dma_data_direction dir, unsigned long attrs)
1210 if (!dev->dma_coherent && !(attrs & DMA_ATTR_SKIP_CPU_SYNC))
1213 prot = __dma_info_to_prot(dir, attrs);
1244 int nents, enum dma_data_direction dir, unsigned long attrs)
1259 &dma->dma_address, dir, attrs);
1273 ret = __map_sg_chunk(dev, start, size, &dma->dma_address, dir, attrs);
1303 unsigned long attrs)
1312 if (!dev->dma_coherent && !(attrs & DMA_ATTR_SKIP_CPU_SYNC))
1373 unsigned long attrs)
1379 if (!dev->dma_coherent && !(attrs & DMA_ATTR_SKIP_CPU_SYNC))
1386 prot = __dma_info_to_prot(dir, attrs);
1409 size_t size, enum dma_data_direction dir, unsigned long attrs)
1420 if (!dev->dma_coherent && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) {
1438 enum dma_data_direction dir, unsigned long attrs)
1451 prot = __dma_info_to_prot(dir, attrs) | IOMMU_MMIO;
1472 unsigned long attrs)
1811 gfp_t gfp, unsigned long attrs)
1814 __get_dma_pgprot(attrs, PAGE_KERNEL), false,
1815 attrs, __builtin_return_address(0));
1819 dma_addr_t dma_handle, unsigned long attrs)
1821 __arm_dma_free(dev, size, cpu_addr, dma_handle, attrs, false);