Skip to content

Commit 7171aa2

Browse files
mszyprowgregkh
authored andcommitted
iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5
[ Upstream commit cd37a29 ] 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: 740a01e ("iommu/exynos: Add support for v5 SYSMMU") CC: stable@vger.kernel.org # v4.10+ 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: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0f0ac21 commit 7171aa2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/iommu/exynos-iommu.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,10 @@ static void sysmmu_tlb_invalidate_flpdcache(struct sysmmu_drvdata *data,
543543
if (is_sysmmu_active(data) && data->version >= MAKE_MMU_VER(3, 3)) {
544544
clk_enable(data->clk_master);
545545
if (sysmmu_block(data)) {
546-
__sysmmu_tlb_invalidate_entry(data, iova, 1);
546+
if (data->version >= MAKE_MMU_VER(5, 0))
547+
__sysmmu_tlb_invalidate(data);
548+
else
549+
__sysmmu_tlb_invalidate_entry(data, iova, 1);
547550
sysmmu_unblock(data);
548551
}
549552
clk_disable(data->clk_master);

0 commit comments

Comments
 (0)