summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi Doyu <hdoyu@nvidia.com>2013-04-03 11:49:20 +0300
committerHarshada Kale <hkale@nvidia.com>2013-06-10 03:48:16 -0700
commit7e8f0b08f06c242fae745677fce0f0b30746f5a1 (patch)
tree1e73ca3c045f95437d7e33df22a1cfb61d6e4b6a
parentf1e67ff7a4394ec89b0fb1683b99be2161618944 (diff)
iommu/tegra: smmu: Add flush_ptc_and_tlb_range()
Add flush_ptc_and_tlb_range() to handle multiple entries at once. bug 1286500 Change-Id: Ib1e9e2e7131345bb422787633eb8d1a4c549dda0 (cherry picked from commit b16d45873a8776d7ef7259a9b293336d9a2e1d28) Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> Reviewed-on: http://git-master/r/234121 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
-rw-r--r--drivers/iommu/tegra-smmu.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index d48296636460..a719ef20b2c6 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -484,6 +484,19 @@ static void flush_ptc_and_tlb(struct smmu_device *smmu,
smmu_flush_tlb(smmu, as, iova, is_pde);
}
+static void flush_ptc_and_tlb_range(struct smmu_device *smmu,
+ struct smmu_as *as, dma_addr_t iova,
+ unsigned long *pte, struct page *page,
+ size_t count)
+{
+ int i;
+
+ for (i = 0; i < count; i++) {
+ smmu_flush_ptc(smmu, pte + i, page);
+ smmu_flush_tlb(smmu, as, iova + i * PAGE_SIZE, 0);
+ }
+}
+
static inline void flush_ptc_and_tlb_all(struct smmu_device *smmu,
struct smmu_as *as)
{