]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
iommu/exynos: Rename update_pte()
authorRobin Murphy <robin.murphy@arm.com>
Tue, 14 Jul 2020 11:59:28 +0000 (12:59 +0100)
committerJoerg Roedel <jroedel@suse.de>
Wed, 22 Jul 2020 12:59:50 +0000 (14:59 +0200)
The name "update_pte" is a little too generic, and can end up clashing
with architecture pagetable code leaked out of common mm headers. Rename
it to something more appropriately namespaced.

Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/829bb5dc18e734870b75db673ddce86e7e37fc73.1594727968.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/exynos-iommu.c

index 60c8a56e4a3f869635d9abee0cbb137a38fc2fa4..75cdd37fae38529091a7cbbf6bceafa9f3fa8f3c 100644 (file)
@@ -721,7 +721,7 @@ static struct platform_driver exynos_sysmmu_driver __refdata = {
        }
 };
 
-static inline void update_pte(sysmmu_pte_t *ent, sysmmu_pte_t val)
+static inline void exynos_iommu_set_pte(sysmmu_pte_t *ent, sysmmu_pte_t val)
 {
        dma_sync_single_for_cpu(dma_dev, virt_to_phys(ent), sizeof(*ent),
                                DMA_TO_DEVICE);
@@ -933,7 +933,7 @@ static sysmmu_pte_t *alloc_lv2entry(struct exynos_iommu_domain *domain,
                if (!pent)
                        return ERR_PTR(-ENOMEM);
 
-               update_pte(sent, mk_lv1ent_page(virt_to_phys(pent)));
+               exynos_iommu_set_pte(sent, mk_lv1ent_page(virt_to_phys(pent)));
                kmemleak_ignore(pent);
                *pgcounter = NUM_LV2ENTRIES;
                handle = dma_map_single(dma_dev, pent, LV2TABLE_SIZE,
@@ -994,7 +994,7 @@ static int lv1set_section(struct exynos_iommu_domain *domain,
                *pgcnt = 0;
        }
 
-       update_pte(sent, mk_lv1ent_sect(paddr, prot));
+       exynos_iommu_set_pte(sent, mk_lv1ent_sect(paddr, prot));
 
        spin_lock(&domain->lock);
        if (lv1ent_page_zero(sent)) {
@@ -1018,7 +1018,7 @@ static int lv2set_page(sysmmu_pte_t *pent, phys_addr_t paddr, size_t size,
                if (WARN_ON(!lv2ent_fault(pent)))
                        return -EADDRINUSE;
 
-               update_pte(pent, mk_lv2ent_spage(paddr, prot));
+               exynos_iommu_set_pte(pent, mk_lv2ent_spage(paddr, prot));
                *pgcnt -= 1;
        } else { /* size == LPAGE_SIZE */
                int i;
@@ -1150,7 +1150,7 @@ static size_t exynos_iommu_unmap(struct iommu_domain *iommu_domain,
                }
 
                /* workaround for h/w bug in System MMU v3.3 */
-               update_pte(ent, ZERO_LV2LINK);
+               exynos_iommu_set_pte(ent, ZERO_LV2LINK);
                size = SECT_SIZE;
                goto done;
        }
@@ -1171,7 +1171,7 @@ static size_t exynos_iommu_unmap(struct iommu_domain *iommu_domain,
        }
 
        if (lv2ent_small(ent)) {
-               update_pte(ent, 0);
+               exynos_iommu_set_pte(ent, 0);
                size = SPAGE_SIZE;
                domain->lv2entcnt[lv1ent_offset(iova)] += 1;
                goto done;