From: Robin Murphy <robin.murphy@arm.com>
To: Baolu Lu <baolu.lu@linux.intel.com>, joro@8bytes.org, will@kernel.org
Cc: iommu@lists.linux-foundation.org, iommu@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iommu: Clean up release_device checks
Date: Wed, 22 Jun 2022 08:17:29 +0100 [thread overview]
Message-ID: <bc4add1b-8b89-7989-5afb-df6b5338eb3d@arm.com> (raw)
In-Reply-To: <59002dbd-d72a-4f9c-7ad8-808ee8d2ff05@linux.intel.com>
On 2022-06-22 02:36, Baolu Lu wrote:
> On 2022/6/21 23:14, Robin Murphy wrote:
>> Since .release_device is now called through per-device ops, any call
>> which gets as far as a driver definitely*is* for that driver, for a
>> device which has successfully passed .probe_device, so all the checks to
>> that effect are now redundant and can be removed. In the same vein we
>> can also skip freeing fwspecs which are now managed by core code.
>
> Does this depend on any other series? I didn't see iommu_fwspec_free()
> called in the core code. Or I missed anything?
dev_iommu_free() cleans up param->fwspec directly (see b54240ad4943).
FWIW the plan is that iommu_fwspec_free() should eventually go away - of
the remaining uses after this, two are in fact similarly redundant
already, since there's also a dev_iommu_free() in the probe failure
path, and the other two should disappear in part 2 of fixing the bus
probing mess (wherein the of_xlate step gets pulled into
iommu_probe_device as well, and finally works correctly again).
Cheers,
Robin.
>
>>
>> Signed-off-by: Robin Murphy<robin.murphy@arm.com>
>> ---
>> drivers/iommu/apple-dart.c | 3 ---
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 +-------
>> drivers/iommu/arm/arm-smmu/arm-smmu.c | 14 +++-----------
>> drivers/iommu/arm/arm-smmu/qcom_iommu.c | 11 -----------
>> drivers/iommu/exynos-iommu.c | 3 ---
>> drivers/iommu/mtk_iommu.c | 5 -----
>> drivers/iommu/mtk_iommu_v1.c | 5 -----
>> drivers/iommu/sprd-iommu.c | 11 -----------
>> drivers/iommu/virtio-iommu.c | 8 +-------
>> 9 files changed, 5 insertions(+), 63 deletions(-)
>
> Best regards,
> baolu
next prev parent reply other threads:[~2022-06-22 7:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 15:14 [PATCH 0/3] iommu: More internal ops cleanup Robin Murphy
2022-06-21 15:14 ` [PATCH 1/3] iommu: Use dev_iommu_ops() for probe_finalize Robin Murphy
2022-06-21 15:14 ` [PATCH 2/3] iommu: Make .release_device optional Robin Murphy
2022-06-22 1:33 ` Baolu Lu
2022-06-21 15:14 ` [PATCH 3/3] iommu: Clean up release_device checks Robin Murphy
2022-06-22 1:36 ` Baolu Lu
2022-06-22 7:17 ` Robin Murphy [this message]
2022-06-22 11:57 ` Baolu Lu
2022-07-06 10:56 ` [PATCH 0/3] iommu: More internal ops cleanup 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=bc4add1b-8b89-7989-5afb-df6b5338eb3d@arm.com \
--to=robin.murphy@arm.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux-foundation.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®