[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aOTgTEAqDd4gyk6u@hovoldconsulting.com>
Date: Tue, 7 Oct 2025 11:41:32 +0200
From: Johan Hovold <johan@...nel.org>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>, Sven Peter <sven@...nel.org>,
Janne Grunau <j@...nau.net>,
Rob Clark <robin.clark@....qualcomm.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Yong Wu <yong.wu@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Chen-Yu Tsai <wens@...e.org>,
Thierry Reding <thierry.reding@...il.com>,
Krishna Reddy <vdumpa@...dia.com>, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/14] iommu: fix device leaks
On Wed, Oct 01, 2025 at 01:01:32PM -0300, Jason Gunthorpe wrote:
> On Wed, Oct 01, 2025 at 11:16:09AM +0200, Johan Hovold wrote:
>
> > This seems to be more a case of developers not reading documentation and
> > copying implementations from existing drivers.
>
> IMHO the drivers are mis-using of_xlate, it shouldn't be looking up
> drvdata at all.
Ok, but that would in any case be a separate issue.
> > > IDK if it is worth fixing like this, or if more effort should be put
> > > to make the drivers use of_xlate properly - the arm smmu drivers show
> > > the only way to use it..
> >
> > As Robin pointed out, those drivers just drop the reference as they
> > should (even if I'd drop the reference after looking up the driver
> > data).
>
> So I wrote the series to clean this up and drop the calls to
> of_find_device_by_node() and so on.
>
> I left dart, exynos, msm and omap as-is, so I suggest you trim this
> series to only those drivers and rely on my version to fix the rest.
Looks like there's some room for unification and code reuse, but that
can be done on top of these fixes.
Johan
Powered by blists - more mailing lists