Revert "scatterlist: use sg_phys()"
[sfrench/cifs-2.6.git] / drivers / iommu / iommu.c
index abae363c7b9bd8932066e760beea7f76f22e7b8d..0e3b0092ec92c9d4d1dcb06e713edcf99c4a9293 100644 (file)
@@ -1430,7 +1430,7 @@ size_t default_iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
        min_pagesz = 1 << __ffs(domain->ops->pgsize_bitmap);
 
        for_each_sg(sg, s, nents, i) {
-               phys_addr_t phys = sg_phys(s);
+               phys_addr_t phys = page_to_phys(sg_page(s)) + s->offset;
 
                /*
                 * We are mapping on IOMMU page boundaries, so offset within