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

Commit 2dcc2349 authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Patrick Daly
Browse files

iommu/arm-smmu: Implement the .tlbi_domain op



The upcoming "fast" DMA mapper will need to take control of TLB
invalidation.  Doing so allows us to perform fewer TLB invalidation
operations since the DMA mapper layer has more knowledge about when
"stale" TLB entries might actually become a problem, so it can do TLB
invalidation much less frequently.  Implement the tlbi_domain op for
this purpose.

CRs-Fixed: 997751
Change-Id: Iba9f499dba89db91c1150947b9599d85ade65b0e
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 39bad0c4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2789,6 +2789,11 @@ static void arm_smmu_reg_write(struct iommu_domain *domain,
	arm_smmu_power_off(smmu);
}

static void arm_smmu_tlbi_domain(struct iommu_domain *domain)
{
	arm_smmu_tlb_inv_context(to_smmu_domain(domain));
}

static struct iommu_ops arm_smmu_ops = {
	.capable		= arm_smmu_capable,
	.domain_alloc		= arm_smmu_domain_alloc,
@@ -2809,6 +2814,7 @@ static struct iommu_ops arm_smmu_ops = {
	.trigger_fault		= arm_smmu_trigger_fault,
	.reg_read		= arm_smmu_reg_read,
	.reg_write		= arm_smmu_reg_write,
	.tlbi_domain		= arm_smmu_tlbi_domain,
};

static int arm_smmu_wait_for_halt(struct arm_smmu_device *smmu)