From: Hiroshi Doyu Date: Wed, 28 Nov 2012 13:52:53 +0000 (+0200) Subject: iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all X-Git-Tag: upstream/snapshot3+hdmi~5982^2^5~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37683e45623a0ccd34761c71aad618cc129fe35c;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all smmu_flush_regs() does TLB/PTC flush all when freeing a second level page table. This isn't necessay at all since each pte entry has been already maintained by address in the above flush_ptc_and_tlb(). Signed-off-by: Hiroshi Doyu Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index c0f7a42..48538a6 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c @@ -696,10 +696,8 @@ static void __smmu_iommu_unmap(struct smmu_as *as, dma_addr_t iova) *pte = _PTE_VACANT(iova); FLUSH_CPU_DCACHE(pte, page, sizeof(*pte)); flush_ptc_and_tlb(as->smmu, as, iova, pte, page, 0); - if (!--(*count)) { + if (!--(*count)) free_ptbl(as, iova); - smmu_flush_regs(as->smmu, 0); - } } static void __smmu_iommu_map_pfn(struct smmu_as *as, dma_addr_t iova,