lkml.org 
[lkml]   [2017]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 07/11] iommu/arm-smmu: Make use of the iommu_register interface
On Fri, Feb 10, 2017 at 02:20:34PM +0000, Robin Murphy wrote:
> > @@ -1795,8 +1798,10 @@ static int arm_smmu_add_device(struct device *dev)
> > }
> >
> > group = iommu_group_get_for_dev(dev);
> > - if (!IS_ERR(group))
> > + if (!IS_ERR(group)) {
> > iommu_group_put(group);
> > + iommu_device_link(&smmu->iommu, dev);
>
> Given the coupling evident from this and the other patches, might it
> work to simply do the linking/unlinking automatically in
> iommu_group_{add,remove}_device()?

Yes, this is one of the goals too. But currently we don't have a generic
device->hw_iommu mapping in the iommu-code which would allow to call
the link/unlink functions in generic code too.

But changing this is one of the next things on my list :)



Joerg

\
 
 \ /
  Last update: 2017-02-10 16:34    [W:0.055 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site