From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1CA3CAC599 for ; Tue, 16 Sep 2025 09:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UkZWILK+JDAs4j04OIqHn/mytGnhx9VYR5zccLHHIAw=; b=Ku79un0RKceEMLdcg8kbFDYuYC qB9lCqrMiktOIfXup7AOMtoHrTgPI+yWcRsf04AiSEFyC5HZfGt46+d4RhNR4eUqbhz0qeIi2v0+Q fuAr+m/ympbFT0T36NgsEwFhA+u29pUn7iUhfqycNOK2vqi4/77uWGwYAvwypEB/DO5DMsmVhCwix mz2fSqxTZTLMq16YC9UeMz3Njj7E/urJyprYUmF8PX81d4tGBEpIcQPQwThEMKr/uttXJCGxSzFXH 02lVi3tHFNmT+QVOlAbZ4IIy11eOrPAkSECmDvCSEtxNP5oseEILZpgo8g98qknJy9pHeE7hlDD7b IaGUEs8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uyS1Y-00000007Ngz-0GgR; Tue, 16 Sep 2025 09:30:56 +0000 Received: from sender4-pp-f112.zoho.com ([136.143.188.112]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uyS1V-00000007Nek-0eqv; Tue, 16 Sep 2025 09:30:54 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1758015027; cv=none; d=zohomail.com; s=zohoarc; b=g6fls8GpQFdJJPyn2BerMzHDaaltYp454eYLzT43Cl3hYaunv53ulpBxzd2zf8brKdIqfRJ18z3CNS7/uuslxP4w3OxLub0yh04coNNzQkt+UroO79VnUcDa0tLgS9JEpf+CzmEQX4tukcO5x+4poGC5xwHMdvXscmnCAHWCNns= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758015027; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=UkZWILK+JDAs4j04OIqHn/mytGnhx9VYR5zccLHHIAw=; b=NPqS+DC2xqz9tx6skzBnfs9/piXDoU5PraVJi9PGCcXDw5I1edab4aepZ2WnfO7Ig660pH1Ln/8n1JkhgcncrYc9cKT4sjSx7NQOQIlJbbP4i19hoOkH5AR8hwP6bk8F4SP9ZcJb0kmUwb4rwRnJ6Xq6W3rH7NLJX+Cq/IiruPY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=benjamin.gaignard@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1758015027; s=zohomail; d=collabora.com; i=benjamin.gaignard@collabora.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=UkZWILK+JDAs4j04OIqHn/mytGnhx9VYR5zccLHHIAw=; b=iAkofwVwvYWxN35eWDQYbLtMQHEW3Ayh0AdYskiOVW83Ky184bRoIjqvjkqDgmuB c88TJFdUgtOQB0tIbKsVtwf7B0BE9uzfwxLNQXhBiLlhI6BRLNu0kDRmyk7XXSOZHX7 QFjd6wEm4ia9MCMkyq68jx3DYNwhJiTJmy/lj4js= Received: by mx.zohomail.com with SMTPS id 1758015025274111.17127971304149; Tue, 16 Sep 2025 02:30:25 -0700 (PDT) Message-ID: <0eff8b1a-c45f-47b1-a871-59f4a0101f0f@collabora.com> Date: Tue, 16 Sep 2025 11:30:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 3/7] iommu: Add verisilicon IOMMU driver To: Will Deacon , Jason Gunthorpe Cc: =?UTF-8?B?SsO2cmcgUsO2ZGVs?= , Nicolas Dufresne , robin.murphy@arm.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, p.zabel@pengutronix.de, mchehab@kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@collabora.com, linux-media@vger.kernel.org References: <20250911155720.180465-1-benjamin.gaignard@collabora.com> <20250911155720.180465-4-benjamin.gaignard@collabora.com> <694b9ba15cd67f41a38f4a65a3811f035cf8e99d.camel@collabora.com> <20250915225806.GM882933@ziepe.ca> Content-Language: en-US From: Benjamin Gaignard In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250916_023053_278833_5559C300 X-CRM114-Status: GOOD ( 25.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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