Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932347AbaGaJWv (ORCPT ); Thu, 31 Jul 2014 05:22:51 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:55059 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932262AbaGaJWs (ORCPT ); Thu, 31 Jul 2014 05:22:48 -0400 Date: Thu, 31 Jul 2014 10:22:41 +0100 From: Mark Rutland To: Thierry Reding Cc: Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , Stephen Warren , Arnd Bergmann , Will Deacon , Joerg Roedel , Cho KyongHo , Grant Grundler , Dave P Martin , Marc Zyngier , Hiroshi Doyu , Olav Haugan , Varun Sethi , "devicetree@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-arm-kernel@lists.infradead.org" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings Message-ID: <20140731092241.GA21850@leverpostej> References: <1404487757-18829-1-git-send-email-thierry.reding@gmail.com> <20140730152646.GC20162@leverpostej> <20140731083923.GA31218@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140731083923.GA31218@ulmo> Thread-Topic: [PATCH v4] devicetree: Add generic IOMMU device tree bindings Accept-Language: en-GB, en-US Content-Language: en-US User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [...] > > > +Examples: > > > +========= > > > + > > > +Single-master IOMMU: > > > +-------------------- > > > + > > > + iommu { > > > + #iommu-cells = <0>; > > > + }; > > > + > > > + master { > > > + iommus = <&/iommu>; > > > > Nit: this should be iommus = <&{/iommu}>, or it's not valid dts syntax. > > Done. Cheers. I take it that was done for the other occurrences too? > > > > + }; > > > + > > > +Multiple-master IOMMU with fixed associations: > > > +---------------------------------------------- > > > + > > > + /* multiple-master IOMMU */ > > > + iommu { > > > + /* > > > + * Masters are statically associated with this IOMMU and > > > + * address translation is always enabled. > > > + */ > > > + #iommu-cells = <0>; > > > > I don't follow why translation being always enabled is relevant to the > > example; that would seem to be independent from the binding. > > > > Surely the key point is that with no way to distinguish devices, they > > presumably share the same translations? > > Both aspects are important I think. For #iommu-cells = <0> there is no > way for the IOMMU driver to know how to enable translation for a given > device. So it must be either always on or always off. Sure. But "always on or off" is not the same as "always enabled", which was what confused me. > I guess one could say that this is implicit if all masters share the > same translations. And I guess translations don't always have to be on > or off technically. Let me try to rephrase this: > > /* > * Masters are statically associated with this IOMMU and share > * the same address translations because the IOMMU does not > * have sufficient information to distinguish between masters. > * > * Consequently address translation is always on or off for > * all masters at any given point in time. > */ > > Does that sound better? That addresses my concern, so yes. Given these are minor and everyone wants this in now, I'm happy for these to go through in a fixup patch later. Cheers, Mark. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/