aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2017-03-20 10:17:57 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-30 09:44:08 +0200
commit514e122cf8d0dd7350009d44553a16dc2a18ac7b (patch)
treeb0ac65d289523971363413a2e7264be20c3448a2
parent03d92bd5b426ea4ee6def637c101195b57f74bf0 (diff)
downloadlinux-yocto-514e122cf8d0dd7350009d44553a16dc2a18ac7b.tar.gz
linux-yocto-514e122cf8d0dd7350009d44553a16dc2a18ac7b.tar.bz2
linux-yocto-514e122cf8d0dd7350009d44553a16dc2a18ac7b.zip
iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5
commit cd37a296a9f890586665bb8974a8b17ee2f17d6d upstream. For some unknown reasons, in some cases, FLPD cache invalidation doesn't work properly with SYSMMU v5 controllers found in Exynos5433 SoCs. This can be observed by a firmware crash during initialization phase of MFC video decoder available in the mentioned SoCs when IOMMU support is enabled. To workaround this issue perform a full TLB/FLPD invalidation in case of replacing any first level page descriptors in case of SYSMMU v5. Fixes: 740a01eee9ada ("iommu/exynos: Add support for v5 SYSMMU") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Andrzej Hajda <a.hajda@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 7c81c793150c..318cc878d0ca 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -510,7 +510,10 @@ static void sysmmu_tlb_invalidate_flpdcache(struct sysmmu_drvdata *data,
if (data->active && data->version >= MAKE_MMU_VER(3, 3)) {
clk_enable(data->clk_master);
if (sysmmu_block(data)) {
- __sysmmu_tlb_invalidate_entry(data, iova, 1);
+ if (data->version >= MAKE_MMU_VER(5, 0))
+ __sysmmu_tlb_invalidate(data);
+ else
+ __sysmmu_tlb_invalidate_entry(data, iova, 1);
sysmmu_unblock(data);
}
clk_disable(data->clk_master);