@@ -430,7 +430,7 @@ static int iommu_v1_map_pages(struct io_pgtable_ops *ops, unsigned long iova,
}
/* Everything flushed out, free pages now */
- put_pages_list(&freelist);
+ iommu_free_pgtbl_pages(&dom->domain, &freelist);
return ret;
}
@@ -511,8 +511,7 @@ static void v1_free_pgtable(struct io_pgtable *iop)
/* Make changes visible to IOMMUs */
amd_iommu_domain_update(dom);
-
- put_pages_list(&freelist);
+ iommu_free_pgtbl_pages(&dom->domain, &freelist);
}
static struct io_pgtable *v1_alloc_pgtable(struct io_pgtable_cfg *cfg, void *cookie)
@@ -136,7 +136,8 @@ static void fq_ring_free(struct iommu_dma_cookie *cookie, struct iova_fq *fq)
if (fq->entries[idx].counter >= counter)
break;
- put_pages_list(&fq->entries[idx].freelist);
+ iommu_free_pgtbl_pages(cookie->fq_domain,
+ &fq->entries[idx].freelist);
free_iova_fast(&cookie->iovad,
fq->entries[idx].iova_pfn,
fq->entries[idx].pages);
@@ -232,7 +233,8 @@ static void iommu_dma_free_fq(struct iommu_dma_cookie *cookie)
struct iova_fq *fq = per_cpu_ptr(cookie->fq, cpu);
fq_ring_for_each(idx, fq)
- put_pages_list(&fq->entries[idx].freelist);
+ iommu_free_pgtbl_pages(cookie->fq_domain,
+ &fq->entries[idx].freelist);
}
free_percpu(cookie->fq);
@@ -1827,7 +1827,7 @@ static void domain_exit(struct dmar_domain *domain)
LIST_HEAD(freelist);
domain_unmap(domain, 0, DOMAIN_MAX_PFN(domain->gaw), &freelist);
- put_pages_list(&freelist);
+ iommu_free_pgtbl_pages(&domain->domain, &freelist);
}
if (WARN_ON(!list_empty(&domain->devices)))
@@ -4286,7 +4286,7 @@ static void intel_iommu_tlb_sync(struct iommu_domain *domain,
start_pfn, nrpages,
list_empty(&gather->freelist), 0);
- put_pages_list(&gather->freelist);
+ iommu_free_pgtbl_pages(domain, &gather->freelist);
}
static phys_addr_t intel_iommu_iova_to_phys(struct iommu_domain *domain,