TLB invalidation by VA will work for the given VA and
not the range of VA. So, for a region that spreads
across multiple PTEs, that need to call TLBIVA multiple
times. This is un-optimized.
Anyways, the present implementation also support single
TLBIVA only for the first VA and rest may be kept in
TLB as is. This is a problem. Fix this by upgrading
TLBIVA with TLBIASID which will do invalidation for
all the VAs for matching ASID.
We may still skip fixing this in iommu_map as iommu_map
is still indeed mapping one VA at a time.
Change-Id: I6c833e62fd47d9c11457ef90cdd322b6f751c698
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
check_tlb_sync_state(iommu_drvdata, ctx, priv);
}
+#ifdef CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP
static int __flush_iotlb_va(struct iommu_domain *domain, unsigned int va)
{
struct msm_iommu_priv *priv = domain->priv;
fail:
return ret;
}
+#endif
static int __flush_iotlb(struct iommu_domain *domain)
{
if (ret < 0)
goto fail;
- ret = __flush_iotlb_va(domain, va);
+ ret = __flush_iotlb(domain);
msm_iommu_pagetable_free_tables(&priv->pt, va, len);
fail: