Lines Matching refs:sg
15 struct scatterlist *sg; in ib_umem_dmabuf_map_pages() local
35 for_each_sgtable_dma_sg(sgt, sg, i) { in ib_umem_dmabuf_map_pages()
36 if (start < cur + sg_dma_len(sg) && cur < end) in ib_umem_dmabuf_map_pages()
38 if (cur <= start && start < cur + sg_dma_len(sg)) { in ib_umem_dmabuf_map_pages()
41 umem_dmabuf->first_sg = sg; in ib_umem_dmabuf_map_pages()
43 sg_dma_address(sg) += offset; in ib_umem_dmabuf_map_pages()
44 sg_dma_len(sg) -= offset; in ib_umem_dmabuf_map_pages()
47 if (cur < end && end <= cur + sg_dma_len(sg)) { in ib_umem_dmabuf_map_pages()
48 unsigned long trim = cur + sg_dma_len(sg) - end; in ib_umem_dmabuf_map_pages()
50 umem_dmabuf->last_sg = sg; in ib_umem_dmabuf_map_pages()
52 sg_dma_len(sg) -= trim; in ib_umem_dmabuf_map_pages()
55 cur += sg_dma_len(sg); in ib_umem_dmabuf_map_pages()