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: Mitchel Humpherys <mitchelh@codeaurora.org>
This commit is contained in:
Mitchel Humpherys 2015-12-03 11:20:03 -08:00 committed by Jeevan Shriram
parent e7f52c5c47
commit 19c21eee9e

View file

@ -1003,6 +1003,11 @@ static void arm_smmu_tlb_inv_range_nosync(unsigned long iova, size_t size,
arm_smmu_disable_clocks_atomic(smmu);
}
static void arm_smmu_tlbi_domain(struct iommu_domain *domain)
{
arm_smmu_tlb_inv_context(to_smmu_domain(domain));
}
struct arm_smmu_secure_pool_chunk {
void *addr;
size_t size;
@ -3103,6 +3108,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 void arm_smmu_device_reset(struct arm_smmu_device *smmu)