aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2017-03-20 10:17:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-30 09:44:08 +0200
commit03d92bd5b426ea4ee6def637c101195b57f74bf0 (patch)
treec9e5299ee2396455bb685e22f6a48c756d602bb2
parentb7d02d90d03a985bd041068c13844e02d76baad7 (diff)
downloadlinux-yocto-03d92bd5b426ea4ee6def637c101195b57f74bf0.tar.gz
linux-yocto-03d92bd5b426ea4ee6def637c101195b57f74bf0.tar.bz2
linux-yocto-03d92bd5b426ea4ee6def637c101195b57f74bf0.zip
iommu/exynos: Block SYSMMU while invalidating FLPD cache
commit 7d2aa6b814476a2e2794960f844344519246df72 upstream. Documentation specifies that SYSMMU should be in blocked state while performing TLB/FLPD cache invalidation, so add needed calls to sysmmu_block/unblock. Fixes: 66a7ed84b345d ("iommu/exynos: Apply workaround of caching fault page table entries") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/iommu/exynos-iommu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 57ba0d3091ea..7c81c793150c 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -509,7 +509,10 @@ static void sysmmu_tlb_invalidate_flpdcache(struct sysmmu_drvdata *data,
spin_lock_irqsave(&data->lock, flags);
if (data->active && data->version >= MAKE_MMU_VER(3, 3)) {
clk_enable(data->clk_master);
- __sysmmu_tlb_invalidate_entry(data, iova, 1);
+ if (sysmmu_block(data)) {
+ __sysmmu_tlb_invalidate_entry(data, iova, 1);
+ sysmmu_unblock(data);
+ }
clk_disable(data->clk_master);
}
spin_unlock_irqrestore(&data->lock, flags);