Skip to content

Commit 983efef

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu/exynos: 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: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/579176033e92d49ec9fc9f3d33d7b9d4c474f0b4.1694525662.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <[email protected]>
1 parent ebfdc45 commit 983efef

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/iommu/exynos-iommu.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ static int lv2set_page(sysmmu_pte_t *pent, phys_addr_t paddr, size_t size,
12291229
*/
12301230
static int exynos_iommu_map(struct iommu_domain *iommu_domain,
12311231
unsigned long l_iova, phys_addr_t paddr, size_t size,
1232-
int prot, gfp_t gfp)
1232+
size_t count, int prot, gfp_t gfp, size_t *mapped)
12331233
{
12341234
struct exynos_iommu_domain *domain = to_exynos_domain(iommu_domain);
12351235
sysmmu_pte_t *entry;
@@ -1263,6 +1263,8 @@ static int exynos_iommu_map(struct iommu_domain *iommu_domain,
12631263
if (ret)
12641264
pr_err("%s: Failed(%d) to map %#zx bytes @ %#x\n",
12651265
__func__, ret, size, iova);
1266+
else
1267+
*mapped = size;
12661268

12671269
spin_unlock_irqrestore(&domain->pgtablelock, flags);
12681270

@@ -1284,7 +1286,7 @@ static void exynos_iommu_tlb_invalidate_entry(struct exynos_iommu_domain *domain
12841286
}
12851287

12861288
static size_t exynos_iommu_unmap(struct iommu_domain *iommu_domain,
1287-
unsigned long l_iova, size_t size,
1289+
unsigned long l_iova, size_t size, size_t count,
12881290
struct iommu_iotlb_gather *gather)
12891291
{
12901292
struct exynos_iommu_domain *domain = to_exynos_domain(iommu_domain);
@@ -1477,8 +1479,8 @@ static const struct iommu_ops exynos_iommu_ops = {
14771479
.of_xlate = exynos_iommu_of_xlate,
14781480
.default_domain_ops = &(const struct iommu_domain_ops) {
14791481
.attach_dev = exynos_iommu_attach_device,
1480-
.map = exynos_iommu_map,
1481-
.unmap = exynos_iommu_unmap,
1482+
.map_pages = exynos_iommu_map,
1483+
.unmap_pages = exynos_iommu_unmap,
14821484
.iova_to_phys = exynos_iommu_iova_to_phys,
14831485
.free = exynos_iommu_domain_free,
14841486
}

0 commit comments

Comments
 (0)