On Fri, 2014-04-04 at 11:12 +0530, Ritesh Harjani wrote:
> Hi All,
> 
> Please find the below patch and let me know your suggestions on this.
> 
> With this patch iommu groups can be linked and iommu driver will
> get to know which all iommu groups belongs to a particular iommu device.
> 
> 
> 
> Each iommu device might have multiple iommu groups,
> with each group populated with many devices. With
> this configuration, iommu driver may require a list
> of iommu groups belonging to each iommu device.
> 
> Add list_head struct entry in iommu_group.
> 
> Signed-off-by: Ritesh Harjani <ritesh.harj...@gmail.com>
> ---
>  drivers/iommu/iommu.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index e5555fc..70588dc 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -36,6 +36,10 @@ static struct ida iommu_group_ida;
>  static struct mutex iommu_group_mutex;
> 
>  struct iommu_group {
> +       struct list_head list;  /* lower level iommu driver structure
> +                                * may require list of iommu groups
> +                                * belonging to that iommu device.
> +                                */


To have a list would require locking to manage that list, but you seem
to imply that the iommu driver would be managing this list... but there
might be multiple iommu drivers in a single system.  Groups are
currently independent of each other by design, trying to manage them in
a list defeats that.  There is also no example provided here of why we
would need or even want to do this.  Thanks,

Alex

>         struct kobject kobj;
>         struct kobject *devices_kobj;
>         struct list_head devices;
> --
> 1.8.1.3



_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to