Thread (26 messages) flat view 26 messages, 2 authors, 10d ago

Re: [PATCH v4 02/15] iommu/arm-smmu-v3: Add arm_smmu_attach_release()

From: Jonathan Cameron <hidden>
Date: 2026-09-11 00:14:36
Also in: linux-iommu, linux-pci, lkml

The IOPF teardown is done in arm_smmu_remove_master_domain() when releasing
the master_domain on detach, under the global arm_smmu_asid_lock mutex.

A later change will add an IOPF workqueue flush to that teardown, which can
block on a user-faulting page-fault handler. Holding the arm_smmu_asid_lock
across it would stall every unrelated attachment in the system.

Split the teardown out of arm_smmu_remove_master_domain(), to a new helper
arm_smmu_attach_release() that runs after arm_smmu_asid_lock is released.

No functional change: the old master_domain belongs to no other device, so
freeing it outside the lock stays safe, still under iommu_group->mutex.

Signed-off-by: Nicolin Chen <redacted>
Nice now.

Reviewed-by: Jonathan Cameron <redacted>

-- 
Jonathan Cameron [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help