Lines Matching refs:sg
884 struct scatterlist *sg; in swiotlb_map_sg_attrs() local
889 for_each_sg(sgl, sg, nelems, i) { in swiotlb_map_sg_attrs()
890 phys_addr_t paddr = sg_phys(sg); in swiotlb_map_sg_attrs()
894 !dma_capable(hwdev, dev_addr, sg->length)) { in swiotlb_map_sg_attrs()
895 phys_addr_t map = map_single(hwdev, sg_phys(sg), in swiotlb_map_sg_attrs()
896 sg->length, dir); in swiotlb_map_sg_attrs()
900 swiotlb_full(hwdev, sg->length, dir, 0); in swiotlb_map_sg_attrs()
906 sg->dma_address = phys_to_dma(hwdev, map); in swiotlb_map_sg_attrs()
908 sg->dma_address = dev_addr; in swiotlb_map_sg_attrs()
909 sg_dma_len(sg) = sg->length; in swiotlb_map_sg_attrs()
931 struct scatterlist *sg; in swiotlb_unmap_sg_attrs() local
936 for_each_sg(sgl, sg, nelems, i) in swiotlb_unmap_sg_attrs()
937 unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir); in swiotlb_unmap_sg_attrs()
962 struct scatterlist *sg; in swiotlb_sync_sg() local
965 for_each_sg(sgl, sg, nelems, i) in swiotlb_sync_sg()
966 swiotlb_sync_single(hwdev, sg->dma_address, in swiotlb_sync_sg()
967 sg_dma_len(sg), dir, target); in swiotlb_sync_sg()
971 swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_cpu() argument
974 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_CPU); in swiotlb_sync_sg_for_cpu()
979 swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_device() argument
982 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_DEVICE); in swiotlb_sync_sg_for_device()