[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1611885162.5302.19.camel@mhfsdcap03>
Date: Fri, 29 Jan 2021 09:52:42 +0800
From: Yong Wu <yong.wu@...iatek.com>
To: Will Deacon <will@...nel.org>
CC: Joerg Roedel <joro@...tes.org>, Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Robin Murphy <robin.murphy@....com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Evan Green <evgreen@...omium.org>,
Tomasz Figa <tfiga@...gle.com>,
<linux-mediatek@...ts.infradead.org>,
<srv_heupstream@...iatek.com>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<iommu@...ts.linux-foundation.org>, <youlin.pei@...iatek.com>,
Nicolas Boichat <drinkcat@...omium.org>,
<anan.sun@...iatek.com>, <chao.hao@...iatek.com>
Subject: Re: [PATCH v6 07/33] iommu: Avoid reallocate default domain for a
group
On Thu, 2021-01-28 at 21:14 +0000, Will Deacon wrote:
> On Thu, Jan 28, 2021 at 09:10:20PM +0000, Will Deacon wrote:
> > On Wed, Jan 27, 2021 at 05:39:16PM +0800, Yong Wu wrote:
> > > On Tue, 2021-01-26 at 22:23 +0000, Will Deacon wrote:
> > > > On Mon, Jan 11, 2021 at 07:18:48PM +0800, Yong Wu wrote:
> > > > > If group->default_domain exists, avoid reallocate it.
> > > > >
> > > > > In some iommu drivers, there may be several devices share a group. Avoid
> > > > > realloc the default domain for this case.
> > > > >
> > > > > Signed-off-by: Yong Wu <yong.wu@...iatek.com>
> > > > > ---
> > > > > drivers/iommu/iommu.c | 3 ++-
> > > > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> > > > > index 3d099a31ddca..f4b87e6abe80 100644
> > > > > --- a/drivers/iommu/iommu.c
> > > > > +++ b/drivers/iommu/iommu.c
> > > > > @@ -266,7 +266,8 @@ int iommu_probe_device(struct device *dev)
> > > > > * support default domains, so the return value is not yet
> > > > > * checked.
> > > > > */
> > > > > - iommu_alloc_default_domain(group, dev);
> > > > > + if (!group->default_domain)
> > > > > + iommu_alloc_default_domain(group, dev);
> > > >
> > > > I don't really get what this achieves, since iommu_alloc_default_domain()
> > > > looks like this:
> > > >
> > > > static int iommu_alloc_default_domain(struct iommu_group *group,
> > > > struct device *dev)
> > > > {
> > > > unsigned int type;
> > > >
> > > > if (group->default_domain)
> > > > return 0;
> > > >
> > > > ...
> > > >
> > > > in which case, it should be fine?
> > >
> > > oh. sorry, I overlooked this. the current code is enough.
> > > I will remove this patch. and send the next version in this week.
> > > Thanks very much.
> >
> > Actually, looking at this again, if we're dropping this patch and patch 6
> > just needs the kfree() moving about, then there's no need to repost. The
> > issue that Robin and Paul are discussing can be handled separately.
>
> Argh, except that this version of the patches doesn't apply :)
>
> So after all that, please go ahead and post a v7 ASAP based on this branch:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/mtk
After confirm with Tomasz, He still need some time to take a look at v6.
thus I need wait some time to send v7 after his feedback.
Thanks for your comment. and Thanks Tomasz for the review.
>
> Will
Powered by blists - more mailing lists