Lines Matching refs:sg
882 struct scatterlist *sg; in swiotlb_map_sg_attrs() local
887 for_each_sg(sgl, sg, nelems, i) { in swiotlb_map_sg_attrs()
888 phys_addr_t paddr = sg_phys(sg); in swiotlb_map_sg_attrs()
892 !dma_capable(hwdev, dev_addr, sg->length)) { in swiotlb_map_sg_attrs()
893 phys_addr_t map = map_single(hwdev, sg_phys(sg), in swiotlb_map_sg_attrs()
894 sg->length, dir); in swiotlb_map_sg_attrs()
898 swiotlb_full(hwdev, sg->length, dir, 0); in swiotlb_map_sg_attrs()
904 sg->dma_address = phys_to_dma(hwdev, map); in swiotlb_map_sg_attrs()
906 sg->dma_address = dev_addr; in swiotlb_map_sg_attrs()
907 sg_dma_len(sg) = sg->length; in swiotlb_map_sg_attrs()
929 struct scatterlist *sg; in swiotlb_unmap_sg_attrs() local
934 for_each_sg(sgl, sg, nelems, i) in swiotlb_unmap_sg_attrs()
935 unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir); in swiotlb_unmap_sg_attrs()
960 struct scatterlist *sg; in swiotlb_sync_sg() local
963 for_each_sg(sgl, sg, nelems, i) in swiotlb_sync_sg()
964 swiotlb_sync_single(hwdev, sg->dma_address, in swiotlb_sync_sg()
965 sg_dma_len(sg), dir, target); in swiotlb_sync_sg()
969 swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_cpu() argument
972 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_CPU); in swiotlb_sync_sg_for_cpu()
977 swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_device() argument
980 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_DEVICE); in swiotlb_sync_sg_for_device()