Lines Matching refs:sgl
217 static void arm64_noalias_unmap_sg(struct device *dev, struct scatterlist *sgl, int nents, in arm64_noalias_unmap_sg() argument
225 for_each_sg(sgl, sg, nents, i) in arm64_noalias_unmap_sg()
230 static int arm64_noalias_map_sg(struct device *dev, struct scatterlist *sgl, int nents, in arm64_noalias_map_sg() argument
236 for_each_sg(sgl, sg, nents, i) { in arm64_noalias_map_sg()
247 arm64_noalias_unmap_sg(dev, sgl, i, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC); in arm64_noalias_map_sg()
263 static void arm64_noalias_sync_sg_for_device(struct device *dev, struct scatterlist *sgl, in arm64_noalias_sync_sg_for_device() argument
269 for_each_sg(sgl, sg, nents, i) in arm64_noalias_sync_sg_for_device()
273 static void arm64_noalias_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, in arm64_noalias_sync_sg_for_cpu() argument
279 for_each_sg(sgl, sg, nents, i) in arm64_noalias_sync_sg_for_cpu()
385 static int arm64_iommu_map_sg(struct device *dev, struct scatterlist *sgl, int nents, in arm64_iommu_map_sg() argument
393 return iommu_dma_ops->map_sg(dev, sgl, nents, dir, attrs); in arm64_iommu_map_sg()
399 for_each_sg(sgl, sg, nents, i) { in arm64_iommu_map_sg()
418 ret = iommu_dma_ops->map_sg(dev, sgl, nents, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC); in arm64_iommu_map_sg()
422 for_each_sg(sgl, sg, nents, i) { in arm64_iommu_map_sg()
431 for_each_sg(sgl, sg, nents, i) { in arm64_iommu_map_sg()
440 static void arm64_iommu_unmap_sg(struct device *dev, struct scatterlist *sgl, int nents, in arm64_iommu_unmap_sg() argument
449 return iommu_dma_ops->unmap_sg(dev, sgl, nents, dir, attrs); in arm64_iommu_unmap_sg()
452 iova = sgl->dma_address; in arm64_iommu_unmap_sg()
453 tmp = sgl; in arm64_iommu_unmap_sg()
454 for_each_sg(sgl, sg, nents, i) { in arm64_iommu_unmap_sg()
464 iommu_dma_ops->unmap_sg(dev, sgl, nents, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC); in arm64_iommu_unmap_sg()
483 static void arm64_iommu_sync_sg_for_device(struct device *dev, struct scatterlist *sgl, in arm64_iommu_sync_sg_for_device() argument
487 struct scatterlist *sg, *tmp = sgl; in arm64_iommu_sync_sg_for_device()
488 dma_addr_t iova = sgl->dma_address; in arm64_iommu_sync_sg_for_device()
491 for_each_sg(sgl, sg, nents, i) { in arm64_iommu_sync_sg_for_device()
503 static void arm64_iommu_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, in arm64_iommu_sync_sg_for_cpu() argument
507 struct scatterlist *sg, *tmp = sgl; in arm64_iommu_sync_sg_for_cpu()
508 dma_addr_t iova = sgl->dma_address; in arm64_iommu_sync_sg_for_cpu()
511 for_each_sg(sgl, sg, nents, i) { in arm64_iommu_sync_sg_for_cpu()