Thread (67 messages) 67 messages, 2 authors, 2023-08-16

Re: [PATCH v6 10/25] iommu/exynos: Implement an IDENTITY domain

From: Baolu Lu <baolu.lu@linux.intel.com>
Date: 2023-08-14 04:53:31
Also in: linux-arm-kernel, linux-arm-msm, linux-iommu, linux-mediatek, linux-rockchip, linux-s390, linux-samsung-soc, linux-sunxi, linux-tegra

On 2023/8/3 8:07, Jason Gunthorpe wrote:
quoted hunk ↗ jump to hunk
What exynos calls exynos_iommu_detach_device is actually putting the iommu
into identity mode.

Move to the new core support for ARM_DMA_USE_IOMMU by defining
ops->identity_domain.

Tested-by: Marek Szyprowski<m.szyprowski@samsung.com>
Acked-by: Marek Szyprowski<m.szyprowski@samsung.com>
Signed-off-by: Jason Gunthorpe<jgg@nvidia.com>
---
  drivers/iommu/exynos-iommu.c | 66 +++++++++++++++++-------------------
  1 file changed, 32 insertions(+), 34 deletions(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index c275fe71c4db32..5e12b85dfe8705 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -24,6 +24,7 @@
  
  typedef u32 sysmmu_iova_t;
  typedef u32 sysmmu_pte_t;
+static struct iommu_domain exynos_identity_domain;
Is there a conflict between above and below?

[...]
+static struct iommu_domain_ops exynos_identity_ops = {
+	.attach_dev = exynos_iommu_identity_attach,
+};
+
+static struct iommu_domain exynos_identity_domain = {
here.

Both define the same.
+	.type = IOMMU_DOMAIN_IDENTITY,
+	.ops = &exynos_identity_ops,
+};
Best regards,
baolu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help