mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 02:19:54 +00:00
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 <robin.murphy@arm.com> Link: https://lore.kernel.org/r/579176033e92d49ec9fc9f3d33d7b9d4c474f0b4.1694525662.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
committed by
Joerg Roedel
parent
ebfdc4569e
commit
983efefa44
@@ -1229,7 +1229,7 @@ static int lv2set_page(sysmmu_pte_t *pent, phys_addr_t paddr, size_t size,
|
|||||||
*/
|
*/
|
||||||
static int exynos_iommu_map(struct iommu_domain *iommu_domain,
|
static int exynos_iommu_map(struct iommu_domain *iommu_domain,
|
||||||
unsigned long l_iova, phys_addr_t paddr, size_t size,
|
unsigned long l_iova, phys_addr_t paddr, size_t size,
|
||||||
int prot, gfp_t gfp)
|
size_t count, int prot, gfp_t gfp, size_t *mapped)
|
||||||
{
|
{
|
||||||
struct exynos_iommu_domain *domain = to_exynos_domain(iommu_domain);
|
struct exynos_iommu_domain *domain = to_exynos_domain(iommu_domain);
|
||||||
sysmmu_pte_t *entry;
|
sysmmu_pte_t *entry;
|
||||||
@@ -1263,6 +1263,8 @@ static int exynos_iommu_map(struct iommu_domain *iommu_domain,
|
|||||||
if (ret)
|
if (ret)
|
||||||
pr_err("%s: Failed(%d) to map %#zx bytes @ %#x\n",
|
pr_err("%s: Failed(%d) to map %#zx bytes @ %#x\n",
|
||||||
__func__, ret, size, iova);
|
__func__, ret, size, iova);
|
||||||
|
else
|
||||||
|
*mapped = size;
|
||||||
|
|
||||||
spin_unlock_irqrestore(&domain->pgtablelock, flags);
|
spin_unlock_irqrestore(&domain->pgtablelock, flags);
|
||||||
|
|
||||||
@@ -1284,7 +1286,7 @@ static void exynos_iommu_tlb_invalidate_entry(struct exynos_iommu_domain *domain
|
|||||||
}
|
}
|
||||||
|
|
||||||
static size_t exynos_iommu_unmap(struct iommu_domain *iommu_domain,
|
static size_t exynos_iommu_unmap(struct iommu_domain *iommu_domain,
|
||||||
unsigned long l_iova, size_t size,
|
unsigned long l_iova, size_t size, size_t count,
|
||||||
struct iommu_iotlb_gather *gather)
|
struct iommu_iotlb_gather *gather)
|
||||||
{
|
{
|
||||||
struct exynos_iommu_domain *domain = to_exynos_domain(iommu_domain);
|
struct exynos_iommu_domain *domain = to_exynos_domain(iommu_domain);
|
||||||
@@ -1477,8 +1479,8 @@ static const struct iommu_ops exynos_iommu_ops = {
|
|||||||
.of_xlate = exynos_iommu_of_xlate,
|
.of_xlate = exynos_iommu_of_xlate,
|
||||||
.default_domain_ops = &(const struct iommu_domain_ops) {
|
.default_domain_ops = &(const struct iommu_domain_ops) {
|
||||||
.attach_dev = exynos_iommu_attach_device,
|
.attach_dev = exynos_iommu_attach_device,
|
||||||
.map = exynos_iommu_map,
|
.map_pages = exynos_iommu_map,
|
||||||
.unmap = exynos_iommu_unmap,
|
.unmap_pages = exynos_iommu_unmap,
|
||||||
.iova_to_phys = exynos_iommu_iova_to_phys,
|
.iova_to_phys = exynos_iommu_iova_to_phys,
|
||||||
.free = exynos_iommu_domain_free,
|
.free = exynos_iommu_domain_free,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user