public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: "Baolu Lu" <baolu.lu@linux.intel.com>,
	"Petr Tesařík" <petr@tesarici.cz>,
	iommu@lists.linux.dev
Cc: Petr Tesarik <ptesarik@suse.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Tom Murphy <murphyt7@tcd.ie>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/vt-d: Remove an unnecessary call set_dma_ops()
Date: Thu, 10 Apr 2025 12:33:51 +0100	[thread overview]
Message-ID: <9bd6cbaa-3a1f-4cc5-8581-3a99dc6ac2c2@arm.com> (raw)
In-Reply-To: <5543e3a5-dda5-49b5-aa59-fbc599d24bab@linux.intel.com>

On 10/04/2025 3:59 am, Baolu Lu wrote:
> On 4/9/25 23:44, Petr Tesařík wrote:
>> On Thu,  3 Apr 2025 18:56:05 +0200
>> Petr Tesarik<ptesarik@suse.com> wrote:
>>
>>> Do not touch per-device DMA ops when the driver has been converted to 
>>> use
>>> the dma-iommu API.
>>>
>>> Fixes: c588072bba6b ("iommu/vt-d: Convert intel iommu driver to the 
>>> iommu ops")
>>> Signed-off-by: Petr Tesarik<ptesarik@suse.com>
>> Does anyone agree? Or see any issues?

At least it definitely serves no purpose since b5c58b2fdc42 
("dma-mapping: direct calls for dma-iommu"). FWIW,

Reviewed-by: Robin Murphy <robin.murphy@arm.com>

> This change looks good to me. The iommu driver should not call
> set_dma_ops() anyway. I will queue this for v6.15-rc.
> 
> I ever wondered whether we could clean up dev->dma_iommu when the device
> is released by the iommu core. But, iommu_release_device() is only
> called in the device removal path, so keeping dev->dma_iommu set doesn't
> impose any functional impact AFAICS.

Funnily enough I've just been looking at that - I'd long held the same 
assumption, but I'd been forgetting the edge case that's always been 
there if bus_set_iommu(), and now iommu_device_register(), failed and 
groups and default domains were torn down for existing devices. So in 
fact it seems Intel was one of the few drivers/architectures managing to 
do the right thing before :)

Cheers,
Robin.

      reply	other threads:[~2025-04-10 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03 16:56 [PATCH] iommu/vt-d: Remove an unnecessary call set_dma_ops() Petr Tesarik
2025-04-09 15:44 ` Petr Tesařík
2025-04-10  2:59   ` Baolu Lu
2025-04-10 11:33     ` Robin Murphy [this message]

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=9bd6cbaa-3a1f-4cc5-8581-3a99dc6ac2c2@arm.com \
    --to=robin.murphy@arm.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=murphyt7@tcd.ie \
    --cc=petr@tesarici.cz \
    --cc=ptesarik@suse.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