* [PATCH] iommu/rockchip: Remove redundant DMA syncs
@ 2021-05-21 13:49 Robin Murphy
2021-06-04 15:11 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Robin Murphy @ 2021-05-21 13:49 UTC (permalink / raw)
To: joro, will
Cc: heiko, iommu, linux-arm-kernel, linux-rockchip, benjamin.gaignard, xxm
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: Robin Murphy <robin.murphy@arm.com>
---
drivers/iommu/rockchip-iommu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 7a2932772fdf..e5116d6a6260 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -682,7 +682,6 @@ static u32 *rk_dte_get_page_table(struct rk_iommu_domain *rk_domain,
dte = rk_mk_dte(pt_dma);
*dte_addr = dte;
- rk_table_flush(rk_domain, pt_dma, NUM_PT_ENTRIES);
rk_table_flush(rk_domain,
rk_domain->dt_dma + dte_index * sizeof(u32), 1);
done:
@@ -1004,8 +1003,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type)
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->dt_lock);
INIT_LIST_HEAD(&rk_domain->iommus);
--
2.21.0.dirty
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iommu/rockchip: Remove redundant DMA syncs
2021-05-21 13:49 [PATCH] iommu/rockchip: Remove redundant DMA syncs Robin Murphy
@ 2021-06-04 15:11 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2021-06-04 15:11 UTC (permalink / raw)
To: Robin Murphy
Cc: will, heiko, iommu, linux-arm-kernel, linux-rockchip,
benjamin.gaignard, xxm
On Fri, May 21, 2021 at 02:49:39PM +0100, Robin Murphy wrote:
> 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: Robin Murphy <robin.murphy@arm.com>
> ---
> drivers/iommu/rockchip-iommu.c | 3 ---
> 1 file changed, 3 deletions(-)
Applied, thanks Robin.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-04 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 13:49 [PATCH] iommu/rockchip: Remove redundant DMA syncs Robin Murphy
2021-06-04 15:11 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).