On 2023/2/17 19:08, Marek Szyprowski wrote:
Hi,
I'm sorry for a delay in replying, but I was busy with other stuff.
On 23.01.2023 22:00, Jason Gunthorpe wrote:
On Mon, Jan 23, 2023 at 10:31:01AM +0100, Marek Szyprowski wrote:
Add set_platform_dma_ops() required for proper driver operation on ARM
32bit arch after recent changes in the IOMMU framework (detach ops
removal).
Thanks for looking into this!
Can you explain more about how this actually solves the problem in the
commit message? I don't get it.
Exynos DRM driver calls arm_iommu_detach_device(), then
arm_iommu_attach_device() with a difrent 'mapping', see
drivers/gpu/drm/exynos/exynos_drm_dma.c Lack of set_platform_dma_ops
leads to a warning in iommu_group_do_set_platform_dma(). The other case
of calling arm_iommu_detach_device() is after unsuccessful probe of the
platform device.
Do we really need to call iommu_detach_device() in
arm_iommu_detach_device() for 32-bit ARM? The dma-iommu is disabled for
32-bit ARM, hence calling .set_platform_dma_ops makes no sense.
In below patch,
https://lore.kernel.org/linux-iommu/20230217094736.159005-2-baolu.lu@xxxxxxxxxxxxxxx/
I removed iommu_detach_device() from arm_iommu_detach_device().
Best regards,
baolu