Thread (30 messages) flat view 30 messages, 2 authors, 2025-09-08

Re: [PATCH rfcv1 6/8] iommu/arm-smmu-v3: Populate smmu_domain->invs when attaching masters

From: Nicolin Chen <hidden>
Date: 2025-09-06 08:21:16
Also in: linux-iommu, linux-patches, lkml

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:
quoted
+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
quoted
+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)
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help