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: Mon, 23 Jan 2023 17:00:27 -0400 [thread overview]
Message-ID: <Y871a3elCP1gmPQi@ziepe.ca> (raw)
In-Reply-To: <20230123093102.12392-1-m.szyprowski@samsung.com>
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.
> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
> index 6fc58e89712f..c4955d045855 100644
> --- a/drivers/iommu/exynos-iommu.c
> +++ b/drivers/iommu/exynos-iommu.c
> @@ -1346,8 +1346,10 @@ static void exynos_iommu_release_device(struct device *dev)
> struct iommu_group *group = iommu_group_get(dev);
>
> if (group) {
> +#ifndef CONFIG_ARM
> WARN_ON(owner->domain !=
> iommu_group_default_domain(group));
> +#endif
> exynos_iommu_detach_device(owner->domain, dev);
> iommu_group_put(group);
> }
> @@ -1398,6 +1400,9 @@ static int exynos_iommu_of_xlate(struct device *dev,
> static const struct iommu_ops exynos_iommu_ops = {
> .domain_alloc = exynos_iommu_domain_alloc,
> .device_group = generic_device_group,
> +#ifdef CONFIG_ARM
> + .set_platform_dma_ops = exynos_iommu_release_device,
> +#endif
This is ugly, if you need a set_platform_dma_ops it should not be
called release... Release is supposed to be about putting the HW back
to some idle state because we are unplugging the struct device.
Jason
next prev parent reply other threads:[~2023-01-23 21:00 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 [this message]
2023-02-17 11:08 ` Marek Szyprowski
2023-02-17 11:18 ` Baolu Lu
2023-02-17 12:35 ` Jason Gunthorpe
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=Y871a3elCP1gmPQi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.