Commit 8c63d1e3 authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel

iommu/sun50i: Update to {map,unmap}_pages

Trivially update map/unmap to the new interface, which is quite happy
for drivers to still process just one page per call.
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/395995e5097803f9a65f2fb79e0732d41c2b8a84.1694525662.git.robin.murphy@arm.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent d47b9777
...@@ -588,7 +588,8 @@ static u32 *sun50i_dte_get_page_table(struct sun50i_iommu_domain *sun50i_domain, ...@@ -588,7 +588,8 @@ static u32 *sun50i_dte_get_page_table(struct sun50i_iommu_domain *sun50i_domain,
} }
static int sun50i_iommu_map(struct iommu_domain *domain, unsigned long iova, static int sun50i_iommu_map(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, size_t size, int prot, gfp_t gfp) phys_addr_t paddr, size_t size, size_t count,
int prot, gfp_t gfp, size_t *mapped)
{ {
struct sun50i_iommu_domain *sun50i_domain = to_sun50i_domain(domain); struct sun50i_iommu_domain *sun50i_domain = to_sun50i_domain(domain);
struct sun50i_iommu *iommu = sun50i_domain->iommu; struct sun50i_iommu *iommu = sun50i_domain->iommu;
...@@ -615,13 +616,14 @@ static int sun50i_iommu_map(struct iommu_domain *domain, unsigned long iova, ...@@ -615,13 +616,14 @@ static int sun50i_iommu_map(struct iommu_domain *domain, unsigned long iova,
*pte_addr = sun50i_mk_pte(paddr, prot); *pte_addr = sun50i_mk_pte(paddr, prot);
sun50i_table_flush(sun50i_domain, pte_addr, 1); sun50i_table_flush(sun50i_domain, pte_addr, 1);
*mapped = size;
out: out:
return ret; return ret;
} }
static size_t sun50i_iommu_unmap(struct iommu_domain *domain, unsigned long iova, static size_t sun50i_iommu_unmap(struct iommu_domain *domain, unsigned long iova,
size_t size, struct iommu_iotlb_gather *gather) size_t size, size_t count, struct iommu_iotlb_gather *gather)
{ {
struct sun50i_iommu_domain *sun50i_domain = to_sun50i_domain(domain); struct sun50i_iommu_domain *sun50i_domain = to_sun50i_domain(domain);
phys_addr_t pt_phys; phys_addr_t pt_phys;
...@@ -838,8 +840,8 @@ static const struct iommu_ops sun50i_iommu_ops = { ...@@ -838,8 +840,8 @@ static const struct iommu_ops sun50i_iommu_ops = {
.iotlb_sync_map = sun50i_iommu_iotlb_sync_map, .iotlb_sync_map = sun50i_iommu_iotlb_sync_map,
.iotlb_sync = sun50i_iommu_iotlb_sync, .iotlb_sync = sun50i_iommu_iotlb_sync,
.iova_to_phys = sun50i_iommu_iova_to_phys, .iova_to_phys = sun50i_iommu_iova_to_phys,
.map = sun50i_iommu_map, .map_pages = sun50i_iommu_map,
.unmap = sun50i_iommu_unmap, .unmap_pages = sun50i_iommu_unmap,
.free = sun50i_iommu_domain_free, .free = sun50i_iommu_domain_free,
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment