From mboxrd@z Thu Jan 1 00:00:00 1970 From: "jroedel-l3A5Bk7waGM@public.gmane.org" Subject: Re: [RFC PATCH v3 5/7] dma-mapping: detect and configure IOMMU in of_dma_configure Date: Mon, 27 Oct 2014 17:33:57 +0100 Message-ID: <20141027163357.GF9734@suse.de> References: <1410539695-29128-1-git-send-email-will.deacon@arm.com> <4572757.M4IDlCz5Vc@avalon> <20141027105158.GE8768@arm.com> <14012645.olm9XxYoII@avalon> <20141027160216.GY8768@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20141027160216.GY8768-5wv7dgnIgG8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Will Deacon Cc: "arnd-r2nGTMty4D4@public.gmane.org" , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , Thierry Reding , Laurent Pinchart , "Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org" , "dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: iommu@lists.linux-foundation.org On Mon, Oct 27, 2014 at 04:02:16PM +0000, Will Deacon wrote: > On Mon, Oct 27, 2014 at 11:30:33AM +0000, Laurent Pinchart wrote: > > I'm not sure to follow you here. Aren't we already exposing masters that > > master through multiple IOMMUs as single instances of struct device ? > > Hmm, yes, now you've confused me too! The conclusion was certainly that > dma-mapping should not be the one dealing with the I/O topology. Domain > allocation would then be an iommu callback (something like > ->get_default_domain), but the rest of the details weren't fleshed out. The idea is that the IOMMU core code will allocate a default domain for each iommu-group at initialization time. This domain can be requested later by a new iommu-api function and used for DMA-API mappings. A device still can be assigned to another domain by driver code (like VFIO). But if the device is later de-assigned the IOMMU core-code automatically puts it back into the default domain. Joerg