From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH] iommu-groups: Add list_head for iommu groups Date: Tue, 8 Apr 2014 12:18:01 +0200 Message-ID: <20140408101800.GS13491@8bytes.org> References: <1396620219.3215.46.camel@ul30vt.home> <1396880095.3215.89.camel@ul30vt.home> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: 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: Ritesh Harjani Cc: David Woodhouse , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" List-Id: iommu@lists.linux-foundation.org On Mon, Apr 07, 2014 at 09:54:54PM +0530, Ritesh Harjani wrote: > On Mon, Apr 7, 2014 at 7:44 PM, Alex Williamson > wrote: > > On Mon, 2014-04-07 at 15:23 +0530, Ritesh Harjani wrote: > >> Say multiple groups are linked to one iommu device. Each iommu_group maintains > >> one iommu_data specific to their group. Now, if iommu driver of a > >> iommu device wants > >> to query all the iommu groups and thus all devices which belongs to > >> this iommu hardware, > >> then in that it will be nice if iommu_group struct provides a list_entry ? > > > > iommu_data is owned by the iommu driver, so if a driver wants to create > > such a list, why would it not do so there? What's being requested here > > is an extension to a private data structure with no concrete example of > > why this is needed. Current users don't seem to have any need for this. > > Furthermore struct iommu_group is intentionally opaque to everything > > outside of iommu.c, so without either relocating this structure to a > > header or adding a list service to the iommu group interfaces, the > > change is completely useless. Thanks, I agree with Alex. Besides, when submitting such a change please also include the code that makes use of it. Only then we can see if the change is really necessary. Joerg