Lines Matching refs:sg
543 struct scatterlist *sg; in xen_swiotlb_map_sg_attrs() local
548 for_each_sg(sgl, sg, nelems, i) { in xen_swiotlb_map_sg_attrs()
549 phys_addr_t paddr = sg_phys(sg); in xen_swiotlb_map_sg_attrs()
554 !dma_capable(hwdev, dev_addr, sg->length) || in xen_swiotlb_map_sg_attrs()
555 range_straddles_page_boundary(paddr, sg->length)) { in xen_swiotlb_map_sg_attrs()
558 sg_phys(sg), in xen_swiotlb_map_sg_attrs()
559 sg->length, in xen_swiotlb_map_sg_attrs()
573 sg->length, in xen_swiotlb_map_sg_attrs()
576 sg->dma_address = xen_phys_to_bus(map); in xen_swiotlb_map_sg_attrs()
584 sg->length, in xen_swiotlb_map_sg_attrs()
587 sg->dma_address = dev_addr; in xen_swiotlb_map_sg_attrs()
589 sg_dma_len(sg) = sg->length; in xen_swiotlb_map_sg_attrs()
604 struct scatterlist *sg; in xen_swiotlb_unmap_sg_attrs() local
609 for_each_sg(sgl, sg, nelems, i) in xen_swiotlb_unmap_sg_attrs()
610 xen_unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir, attrs); in xen_swiotlb_unmap_sg_attrs()
627 struct scatterlist *sg; in xen_swiotlb_sync_sg() local
630 for_each_sg(sgl, sg, nelems, i) in xen_swiotlb_sync_sg()
631 xen_swiotlb_sync_single(hwdev, sg->dma_address, in xen_swiotlb_sync_sg()
632 sg_dma_len(sg), dir, target); in xen_swiotlb_sync_sg()
636 xen_swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, in xen_swiotlb_sync_sg_for_cpu() argument
639 xen_swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_CPU); in xen_swiotlb_sync_sg_for_cpu()
644 xen_swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, in xen_swiotlb_sync_sg_for_device() argument
647 xen_swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_DEVICE); in xen_swiotlb_sync_sg_for_device()