Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c62c1c6 authored by Yong Wu's avatar Yong Wu Committed by Joerg Roedel
Browse files

iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA



Fix the commit 81b3c252 ("iommu/io-pgtable: Introduce explicit
coherency"). If there is no IO_PGTABLE_QUIRK_NO_DMA, we should call
dma_sync_single_for_device for cache synchronization.

Signed-off-by: default avatarYong Wu <yong.wu@mediatek.com>
Fixes: 81b3c252 ('iommu/io-pgtable: Introduce explicit coherency')
Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent e19b205b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ static void __arm_v7s_free_table(void *table, int lvl,
static void __arm_v7s_pte_sync(arm_v7s_iopte *ptep, int num_entries,
			       struct io_pgtable_cfg *cfg)
{
	if (!(cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA))
	if (cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA)
		return;

	dma_sync_single_for_device(cfg->iommu_dev, __arm_v7s_dma_addr(ptep),