Commit 9197bc95 authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel

iommu/rockchip: Remove redundant DMA syncs

When we allocate new pagetable pages, we don't modify them between the
initial dma_map_single() call and the dma_sync_single_for_device() call
via rk_iommu_flush(), so the latter is entirely pointless.
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/5c29a9ff0a20df0167635b1901f94b5195c1fb28.1621604979.git.robin.murphy@arm.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 8124c8a6
...@@ -682,7 +682,6 @@ static u32 *rk_dte_get_page_table(struct rk_iommu_domain *rk_domain, ...@@ -682,7 +682,6 @@ static u32 *rk_dte_get_page_table(struct rk_iommu_domain *rk_domain,
dte = rk_mk_dte(pt_dma); dte = rk_mk_dte(pt_dma);
*dte_addr = dte; *dte_addr = dte;
rk_table_flush(rk_domain, pt_dma, NUM_PT_ENTRIES);
rk_table_flush(rk_domain, rk_table_flush(rk_domain,
rk_domain->dt_dma + dte_index * sizeof(u32), 1); rk_domain->dt_dma + dte_index * sizeof(u32), 1);
done: done:
...@@ -1004,8 +1003,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) ...@@ -1004,8 +1003,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type)
goto err_free_dt; goto err_free_dt;
} }
rk_table_flush(rk_domain, rk_domain->dt_dma, NUM_DT_ENTRIES);
spin_lock_init(&rk_domain->iommus_lock); spin_lock_init(&rk_domain->iommus_lock);
spin_lock_init(&rk_domain->dt_lock); spin_lock_init(&rk_domain->dt_lock);
INIT_LIST_HEAD(&rk_domain->iommus); INIT_LIST_HEAD(&rk_domain->iommus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment