Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c885e4aa authored by Prakash Gupta's avatar Prakash Gupta
Browse files

iommu/arm-smmu: Add IOMMU API TLB sync support



commit 32b12449 ("iommu/io-pgtable-arm: Convert to IOMMU API TLB sync")
adds support for flush_iotlb_all and iotlb_sync in arm-smmu-v3, add the
same for arm-smmu driver.

Change-Id: I5df70305f837a9cd0c1bc03121666c59cd3ac913
Signed-off-by: default avatarPrakash Gupta <guptap@codeaurora.org>
parent 8e1ab7a0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3202,6 +3202,14 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
	return ret;
}

static void arm_smmu_iotlb_sync(struct iommu_domain *domain)
{
	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);

	if (smmu_domain->tlb_ops)
		smmu_domain->tlb_ops->tlb_sync(smmu_domain);
}

/*
 * This function can sleep, and cannot be called from atomic context. Will
 * power on register block if required. This restriction does not apply to the
@@ -3968,6 +3976,8 @@ static struct iommu_ops arm_smmu_ops = {
	.map			= arm_smmu_map,
	.unmap			= arm_smmu_unmap,
	.map_sg			= arm_smmu_map_sg,
	.flush_iotlb_all	= arm_smmu_iotlb_sync,
	.iotlb_sync		= arm_smmu_iotlb_sync,
	.iova_to_phys		= arm_smmu_iova_to_phys,
	.iova_to_phys_hard	= arm_smmu_iova_to_phys_hard,
	.add_device		= arm_smmu_add_device,