RE: [PATCH] iommu/fsl: Fix warning resulting from adding PCI device twice

2014-09-04 Thread Varun Sethi
..@vger.kernel.org > Subject: Re: [PATCH] iommu/fsl: Fix warning resulting from adding PCI device > twice > > On Thu, Sep 04, 2014 at 11:33:42AM +0530, Varun Sethi wrote: > > + if (!iommu_group_get(dev)) > > + ret = iommu_group_add_device(group, dev); > > &g

Re: [PATCH] iommu/fsl: Fix warning resulting from adding PCI device twice

2014-09-04 Thread Joerg Roedel
On Thu, Sep 04, 2014 at 11:33:42AM +0530, Varun Sethi wrote: > + if (!iommu_group_get(dev)) > + ret = iommu_group_add_device(group, dev); > > iommu_group_put(group); > return ret; Doesn't this additional call to iommu_group_get take a reference to the iommu_group that

[PATCH] iommu/fsl: Fix warning resulting from adding PCI device twice

2014-09-03 Thread Varun Sethi
iommu_group_get_for_dev determines the iommu group for the PCI device and adds the device to the group. In the PAMU driver we were again adding the device to the same group without checking if the device already had an iommu group. This resulted in the following warning. sysfs: cannot create du