Lines Matching refs:sg
550 struct scatterlist *sg; in xen_swiotlb_map_sg_attrs() local
555 for_each_sg(sgl, sg, nelems, i) { in xen_swiotlb_map_sg_attrs()
556 phys_addr_t paddr = sg_phys(sg); in xen_swiotlb_map_sg_attrs()
561 !dma_capable(hwdev, dev_addr, sg->length) || in xen_swiotlb_map_sg_attrs()
562 range_straddles_page_boundary(paddr, sg->length)) { in xen_swiotlb_map_sg_attrs()
565 sg_phys(sg), in xen_swiotlb_map_sg_attrs()
566 sg->length, in xen_swiotlb_map_sg_attrs()
580 sg->length, in xen_swiotlb_map_sg_attrs()
583 sg->dma_address = xen_phys_to_bus(map); in xen_swiotlb_map_sg_attrs()
591 sg->length, in xen_swiotlb_map_sg_attrs()
594 sg->dma_address = dev_addr; in xen_swiotlb_map_sg_attrs()
596 sg_dma_len(sg) = sg->length; in xen_swiotlb_map_sg_attrs()
611 struct scatterlist *sg; in xen_swiotlb_unmap_sg_attrs() local
616 for_each_sg(sgl, sg, nelems, i) in xen_swiotlb_unmap_sg_attrs()
617 xen_unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir, attrs); in xen_swiotlb_unmap_sg_attrs()
634 struct scatterlist *sg; in xen_swiotlb_sync_sg() local
637 for_each_sg(sgl, sg, nelems, i) in xen_swiotlb_sync_sg()
638 xen_swiotlb_sync_single(hwdev, sg->dma_address, in xen_swiotlb_sync_sg()
639 sg_dma_len(sg), dir, target); in xen_swiotlb_sync_sg()
643 xen_swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, in xen_swiotlb_sync_sg_for_cpu() argument
646 xen_swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_CPU); in xen_swiotlb_sync_sg_for_cpu()
651 xen_swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, in xen_swiotlb_sync_sg_for_device() argument
654 xen_swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_DEVICE); in xen_swiotlb_sync_sg_for_device()