summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2015-12-03 11:20:03 -0800
committerJeevan Shriram <jshriram@codeaurora.org>2016-05-20 19:23:56 -0700
commit19c21eee9ed01fe95973777a62876a17d5d34cd3 (patch)
tree5ba339437b20096bed7673e8207f4ce187caa382
parente7f52c5c475be7ece4053cc4058776128a6e37c4 (diff)
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>
-rw-r--r--drivers/iommu/arm-smmu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index ab60fb6351e7..532611e2ead7 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -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)