Lines Matching refs:startsg
14 iommu_fill_pdir(struct ioc *ioc, struct scatterlist *startsg, int nents, in iommu_fill_pdir() argument
19 struct scatterlist *dma_sg = startsg; /* pointer to current DMA */ in iommu_fill_pdir()
34 (unsigned long)sg_dma_address(startsg), cnt, in iommu_fill_pdir()
35 sg_virt_addr(startsg), startsg->length in iommu_fill_pdir()
43 if (sg_dma_address(startsg) & PIDE_FLAG) { in iommu_fill_pdir()
44 u32 pide = sg_dma_address(startsg) & ~PIDE_FLAG; in iommu_fill_pdir()
50 dma_len = sg_dma_len(startsg); in iommu_fill_pdir()
51 sg_dma_len(startsg) = 0; in iommu_fill_pdir()
69 vaddr = sg_virt_addr(startsg); in iommu_fill_pdir()
70 sg_dma_len(dma_sg) += startsg->length; in iommu_fill_pdir()
71 size = startsg->length + dma_offset; in iommu_fill_pdir()
74 ioc->msg_pages += startsg->length >> IOVP_SHIFT; in iommu_fill_pdir()
83 startsg++; in iommu_fill_pdir()
101 struct scatterlist *startsg, int nents, in iommu_coalesce_chunks() argument
114 contig_sg = startsg; in iommu_coalesce_chunks()
115 dma_len = startsg->length; in iommu_coalesce_chunks()
116 dma_offset = sg_virt_addr(startsg) & ~IOVP_MASK; in iommu_coalesce_chunks()
119 sg_dma_address(startsg) = 0; in iommu_coalesce_chunks()
120 sg_dma_len(startsg) = 0; in iommu_coalesce_chunks()
129 prevstartsg_end = sg_virt_addr(startsg) + in iommu_coalesce_chunks()
130 startsg->length; in iommu_coalesce_chunks()
132 startsg++; in iommu_coalesce_chunks()
133 startsg_end = sg_virt_addr(startsg) + in iommu_coalesce_chunks()
134 startsg->length; in iommu_coalesce_chunks()
137 sg_dma_address(startsg) = 0; in iommu_coalesce_chunks()
138 sg_dma_len(startsg) = 0; in iommu_coalesce_chunks()
145 if(unlikely(ALIGN(dma_len + dma_offset + startsg->length, in iommu_coalesce_chunks()
149 if (startsg->length + dma_len > max_seg_size) in iommu_coalesce_chunks()
156 if (unlikely(((prevstartsg_end | sg_virt_addr(startsg)) & ~PAGE_MASK) != 0)) in iommu_coalesce_chunks()
159 dma_len += startsg->length; in iommu_coalesce_chunks()