Lines Matching refs:sg
238 static void iommu_get_scsi_sgl_gflush(struct device *dev, struct scatterlist *sg, int sz) in iommu_get_scsi_sgl_gflush() argument
245 n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; in iommu_get_scsi_sgl_gflush()
246 sg->dma_address = iommu_get_one(dev, sg_page(sg), n) + sg->offset; in iommu_get_scsi_sgl_gflush()
247 sg->dma_length = sg->length; in iommu_get_scsi_sgl_gflush()
248 sg = sg_next(sg); in iommu_get_scsi_sgl_gflush()
252 static void iommu_get_scsi_sgl_pflush(struct device *dev, struct scatterlist *sg, int sz) in iommu_get_scsi_sgl_pflush() argument
260 n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; in iommu_get_scsi_sgl_pflush()
267 if ((page = (unsigned long) page_address(sg_page(sg))) != 0) { in iommu_get_scsi_sgl_pflush()
277 sg->dma_address = iommu_get_one(dev, sg_page(sg), n) + sg->offset; in iommu_get_scsi_sgl_pflush()
278 sg->dma_length = sg->length; in iommu_get_scsi_sgl_pflush()
279 sg = sg_next(sg); in iommu_get_scsi_sgl_pflush()
309 static void iommu_release_scsi_sgl(struct device *dev, struct scatterlist *sg, int sz) in iommu_release_scsi_sgl() argument
316 n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; in iommu_release_scsi_sgl()
317 iommu_release_one(dev, sg->dma_address & PAGE_MASK, n); in iommu_release_scsi_sgl()
318 sg->dma_address = 0x21212121; in iommu_release_scsi_sgl()
319 sg = sg_next(sg); in iommu_release_scsi_sgl()