[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aLvuxxT3aYK/Is7g@nvidia.com>
Date: Sat, 6 Sep 2025 01:20:23 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: <will@...nel.org>, <robin.murphy@....com>, <joro@...tes.org>,
<jean-philippe@...aro.org>, <miko.lenczewski@....com>, <balbirs@...dia.com>,
<peterz@...radead.org>, <smostafa@...gle.com>, <kevin.tian@...el.com>,
<praan@...gle.com>, <zhangzekun11@...wei.com>,
<linux-arm-kernel@...ts.infradead.org>, <iommu@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>, <patches@...ts.linux.dev>
Subject: Re: [PATCH rfcv1 6/8] iommu/arm-smmu-v3: Populate smmu_domain->invs
when attaching masters
On Wed, Aug 27, 2025 at 03:21:23PM -0300, Jason Gunthorpe wrote:
> On Wed, Aug 13, 2025 at 06:25:37PM -0700, Nicolin Chen wrote:
> > +typedef struct arm_smmu_invs *(*invs_fn)(struct arm_smmu_invs *old_invs,
> > + struct arm_smmu_invs *invs);
>
> no reason to pass in fn, this always just calls it as the last thing
> so the caller can do it..
The only concern from letting callers to invoke separately is that
the master->build_invs is a shared memory. So, embedding it inside
this arm_smmu_build_invs() allows it to be used before overwritten.
Having said that, I think we should be fine, as I noted this down
in the kdocs.
Thanks
Nicolin
> > +static struct arm_smmu_invs *arm_smmu_build_invs(
> > + struct arm_smmu_invs *old_invs, struct arm_smmu_domain *smmu_domain,
> > + struct arm_smmu_master *master, bool ats, ioasid_t ssid, invs_fn fn)
Powered by blists - more mailing lists