iommu/rockchip: Retire global dma_dev workaround
authorRobin Murphy <robin.murphy@arm.com>
Thu, 13 Mar 2025 17:31:06 +0000 (17:31 +0000)
committerJoerg Roedel <jroedel@suse.de>
Thu, 20 Mar 2025 07:58:24 +0000 (08:58 +0100)
commitdcde1c4aa7ceec94e8557191d5789fd76df2f671
tree08bb02e1d793dc9ca4896f7eb7e1d737f9df89bf
parentf90aa59eb2999e4c33049f7e5679a6424da5c6b9
iommu/rockchip: Retire global dma_dev workaround

The global dma_dev trick was mostly because the old domain_alloc op
provided no context, so no way to know which IOMMU was to own the
pagetable, or if a suitable one even existed at all. In the new
multi-instance world with domain_alloc_paging this is no longer a
concern - now we know that the given device must be associated with a
valid IOMMU instance which provided the op to call in the first place,
and therefore that instance can and should be the pagetable owner. To
avoid worrying about the lifetime and stability of the rk_domain->iommus
list, and keep the lookups simple and efficient, we'll still stash a
dma_dev pointer, but now it's accurately per-domain.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Quentin Schulz <quentin.schulz@cherry.de>
Tested-by: Dang Huynh <danct12@riseup.net>
Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://lore.kernel.org/r/25dc948a7d35c8142c5719ac22bc523f8524d006.1741886382.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/rockchip-iommu.c