[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0eff8b1a-c45f-47b1-a871-59f4a0101f0f@collabora.com>
Date: Tue, 16 Sep 2025 11:30:20 +0200
From: Benjamin Gaignard <benjamin.gaignard@...labora.com>
To: Will Deacon <will@...nel.org>, Jason Gunthorpe <jgg@...pe.ca>
Cc: Jörg Rödel <joro@...tes.org>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>, robin.murphy@....com,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org, heiko@...ech.de,
p.zabel@...gutronix.de, mchehab@...nel.org, iommu@...ts.linux.dev,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
kernel@...labora.com, linux-media@...r.kernel.org
Subject: Re: [PATCH v9 3/7] iommu: Add verisilicon IOMMU driver
Le 16/09/2025 à 10:48, Will Deacon a écrit :
> On Mon, Sep 15, 2025 at 07:58:06PM -0300, Jason Gunthorpe wrote:
>> On Sat, Sep 13, 2025 at 07:58:04AM +0200, Jörg Rödel wrote:
>>> [Adding Will back to Cc]
>>>
>>> On Fri, Sep 12, 2025 at 01:37:11PM -0400, Nicolas Dufresne wrote:
>>>> To me this rejection isn't about Benjamin's driver, all iommu seems to look
>>>> alike, so anyone else that would have sent new driver would have face the same
>>>> issue.
>>> This is about ignoring comments from one of the IOMMU maintainers. I am not
>>> going to merge a driver with open comments/objections[1] from Will (and a few
>>> others), so resolve this with him and get his Ack.
>> I would strongly object to trying to share map_pages, unmap_pages,
>> iova_to_phys, free and other iommu pt related functions in some
>> limited way instead of helping on the much more complete iommu pt
>> work. Which is what I said to Will, but for some reason he suggested
>> it anyhow.
> If the answer is to convert this to iommu pt, then so be it. My
> understanding was that was still premature at this stage but you know
> better than me.
>
> When I bothered to look at this driver side-by-side with the rockchip
> driver which, despite apparently being totally different IP (honest!),
> is *remarkably* similar, I summarised the similarity in the default
> domain ops:
>
> https://lore.kernel.org/all/aH5yR9CkYSJ4PaZV@willie-the-truck/
>
> But rather than respond to that, Benjamin just sent a new version. I
> was hoping for a bit more discussion...
Sorry if that had offend, you it wasn't the purpose.
Where you see similarities in the pattern I see lot of differences
everywhere that will required to duplicate the functions for each
hardware (locking schema, bit definition, power management, enable/disable).
Since the v6 I have fix lot of locking and pm_runtime issue and add a
function, needed by the video decoder, to flush the TLB.
My first attempt when writing Verisilicon driver was to add a variant
(like for rk iommu v2 I had already done) to Rockchip driver but mixing or
sharing structures or functions between Rockchip and Verisilicon is just a
nightmare because it requires to add "if else" everywhere.
Benjamin
>
>> Sorry, but it doesn't make sense to complain about duplication in
>> drivers and then not help advance one of the biggest projects to
>> actually concretely and comprehensively address that duplication.
> I don't think it needs to be one or the other. afaict, these drivers
> should share the default domain ops and if the page-table code is using
> iommu-pt then that's even better.
>
> Will
Powered by blists - more mailing lists