Lines Matching refs:sg
874 struct scatterlist *sg; in swiotlb_map_sg_attrs() local
879 for_each_sg(sgl, sg, nelems, i) { in swiotlb_map_sg_attrs()
880 phys_addr_t paddr = sg_phys(sg); in swiotlb_map_sg_attrs()
884 !dma_capable(hwdev, dev_addr, sg->length)) { in swiotlb_map_sg_attrs()
885 phys_addr_t map = map_single(hwdev, sg_phys(sg), in swiotlb_map_sg_attrs()
886 sg->length, dir); in swiotlb_map_sg_attrs()
890 swiotlb_full(hwdev, sg->length, dir, 0); in swiotlb_map_sg_attrs()
896 sg->dma_address = phys_to_dma(hwdev, map); in swiotlb_map_sg_attrs()
898 sg->dma_address = dev_addr; in swiotlb_map_sg_attrs()
899 sg_dma_len(sg) = sg->length; in swiotlb_map_sg_attrs()
921 struct scatterlist *sg; in swiotlb_unmap_sg_attrs() local
926 for_each_sg(sgl, sg, nelems, i) in swiotlb_unmap_sg_attrs()
927 unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir); in swiotlb_unmap_sg_attrs()
952 struct scatterlist *sg; in swiotlb_sync_sg() local
955 for_each_sg(sgl, sg, nelems, i) in swiotlb_sync_sg()
956 swiotlb_sync_single(hwdev, sg->dma_address, in swiotlb_sync_sg()
957 sg_dma_len(sg), dir, target); in swiotlb_sync_sg()
961 swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_cpu() argument
964 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_CPU); in swiotlb_sync_sg_for_cpu()
969 swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_device() argument
972 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_DEVICE); in swiotlb_sync_sg_for_device()