Lines Matching refs:sg
875 struct scatterlist *sg; in swiotlb_map_sg_attrs() local
880 for_each_sg(sgl, sg, nelems, i) { in swiotlb_map_sg_attrs()
881 phys_addr_t paddr = sg_phys(sg); in swiotlb_map_sg_attrs()
885 !dma_capable(hwdev, dev_addr, sg->length)) { in swiotlb_map_sg_attrs()
886 phys_addr_t map = map_single(hwdev, sg_phys(sg), in swiotlb_map_sg_attrs()
887 sg->length, dir); in swiotlb_map_sg_attrs()
891 swiotlb_full(hwdev, sg->length, dir, 0); in swiotlb_map_sg_attrs()
897 sg->dma_address = phys_to_dma(hwdev, map); in swiotlb_map_sg_attrs()
899 sg->dma_address = dev_addr; in swiotlb_map_sg_attrs()
900 sg_dma_len(sg) = sg->length; in swiotlb_map_sg_attrs()
922 struct scatterlist *sg; in swiotlb_unmap_sg_attrs() local
927 for_each_sg(sgl, sg, nelems, i) in swiotlb_unmap_sg_attrs()
928 unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir); in swiotlb_unmap_sg_attrs()
953 struct scatterlist *sg; in swiotlb_sync_sg() local
956 for_each_sg(sgl, sg, nelems, i) in swiotlb_sync_sg()
957 swiotlb_sync_single(hwdev, sg->dma_address, in swiotlb_sync_sg()
958 sg_dma_len(sg), dir, target); in swiotlb_sync_sg()
962 swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_cpu() argument
965 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_CPU); in swiotlb_sync_sg_for_cpu()
970 swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_device() argument
973 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_DEVICE); in swiotlb_sync_sg_for_device()