From: Jason Gunthorpe <jgg@ziepe.ca>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: iommu@lists.linux.dev, linux-samsung-soc@vger.kernel.org,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
lim Akhtar <alim.akhtar@samsung.com>,
Lu Baolu <baolu.lu@linux.intel.com>
Subject: Re: [PATCH] iommu/exynos: add missing set_platform_dma_ops callback
Date: Fri, 17 Feb 2023 08:35:58 -0400 [thread overview]
Message-ID: <Y+90rkPHe/+eSLs6@ziepe.ca> (raw)
In-Reply-To: <e7aa3a5d-c8f9-ad7d-4c5c-08756c1ab2d3@samsung.com>
On Fri, Feb 17, 2023 at 12:08:42PM +0100, 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.
Why can't this just use the normal iommu path in all cases?
It looks like it is trying to copy the DMA API domain from a parent
device to a sub device.
Even when using arm_iommu an iommu_domain is still present, so the
copy code should work?
Though I'm still not really sure how this arm_iommu stuff works..
eg if a driver does iommu_device_claim_dma_owner() how does the
iommu_domain get set back to the arm_iommu's mapping's iommu_domain?
According to the API that is what set_platform is supposed to do (eg
it is what s390 does), but I don't see any code like that in any of
the ARM32 drivers..
Jason
next prev parent reply other threads:[~2023-02-17 12:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230123093116eucas1p19b8fe8afc4b631debbdc5321c53009e9@eucas1p1.samsung.com>
2023-01-23 9:31 ` [PATCH] iommu/exynos: add missing set_platform_dma_ops callback Marek Szyprowski
2023-01-23 21:00 ` Jason Gunthorpe
2023-02-17 11:08 ` Marek Szyprowski
2023-02-17 11:18 ` Baolu Lu
2023-02-17 12:35 ` Jason Gunthorpe [this message]
2023-02-20 13:58 ` Robin Murphy
2023-04-06 23:37 ` Jason Gunthorpe
2023-04-12 22:03 ` Marek Szyprowski
2023-04-12 22:40 ` Jason Gunthorpe
2023-02-03 9:41 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y+90rkPHe/+eSLs6@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=alim.akhtar@samsung.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox