Received: from soltyk.jannau.net (soltyk.jannau.net [144.76.91.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC71964E for ; Fri, 9 Sep 2022 14:45:06 +0000 (UTC) Received: by soltyk.jannau.net (Postfix, from userid 1000) id C8BB826F000; Fri, 9 Sep 2022 16:45:04 +0200 (CEST) Date: Fri, 9 Sep 2022 16:45:04 +0200 From: Janne Grunau To: Rob Herring Cc: Thierry Reding , Joerg Roedel , Will Deacon , Robin Murphy , Nicolin Chen , Krishna Reddy , Dmitry Osipenko , Alyssa Rosenzweig , Sameer Pujar , devicetree@vger.kernel.org, iommu@lists.linux-foundation.org, linux-tegra@vger.kernel.org, asahi@lists.linux.dev Subject: Re: [PATCH v8 1/5] dt-bindings: reserved-memory: Document iommu-addresses Message-ID: <20220909144504.GA4024@jannau.net> References: <20220905170833.396892-1-thierry.reding@gmail.com> <20220905170833.396892-2-thierry.reding@gmail.com> <20220908223247.GA3448766-robh@kernel.org> Precedence: bulk X-Mailing-List: asahi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220908223247.GA3448766-robh@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) On 2022-09-08 17:32:47 -0500, Rob Herring wrote: > On Mon, Sep 05, 2022 at 07:08:29PM +0200, Thierry Reding wrote: > > From: Thierry Reding > > > > This adds the "iommu-addresses" property to reserved-memory nodes, which > > allow describing the interaction of memory regions with IOMMUs. Two use- > > cases are supported: > > > > 1. Static mappings can be described by pairing the "iommu-addresses" > > property with a "reg" property. This is mostly useful for adopting > > firmware-allocated buffers via identity mappings. One common use- > > case where this is required is if early firmware or bootloaders > > have set up a bootsplash framebuffer that a display controller is > > actively scanning out from during the operating system boot > > process. > > > > 2. If an "iommu-addresses" property exists without a "reg" property, > > the reserved-memory node describes an IOVA reservation. Such memory > > regions are excluded from the IOVA space available to operating > > system drivers and can be used for regions that must not be used to > > map arbitrary buffers. > > > > Each mapping or reservation is tied to a specific device via a phandle > > to the device's device tree node. This allows a reserved-memory region > > to be reused across multiple devices. > > > > Signed-off-by: Thierry Reding > > --- > > Changes in v8: > > - include validation warning fixes that had crept into an unrelated patch > > > > Changes in v7: > > - keep reserved-memory.txt to avoid broken references > > > > Changes in v6: > > - add device phandle to iommu-addresses property in examples > > - remove now unused dt-bindings/reserved-memory.h header > > > > .../reserved-memory/reserved-memory.yaml | 70 +++++++++++++++++++ > > 1 file changed, 70 insertions(+) > > Thanks for being persistent with this. It looks good to me. > > Reviewed-by: Rob Herring > > I really don't like new common bindings with only 1 user, so I hope the > Asahi folks chime in here. Or really anyone else look at it. The Asahi WIP display controller/processor driver uses this binding with static non 1:1 mappings. The binding is sufficient for our needs our needs. Janne