Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cover-letter: Consolidate the probe_device path
Now that the domain allocation path is less duplicated we can tackle the probe_device path. Details of this are spread across several functions, broadly move most of the code into __iommu_probe_device() and organize it more strictly in terms of paired do/undo functions. Make the locking simpler by obtaining the group->mutex fewer times and avoiding adding a half-initialized device to an initialized group. Previously we would lock/unlock the group three times on these paths. Finally we can easily add a properly locked probe_finalize call back so that modern drivers don't have to use the sketchy unlocked version. This follows the prior series: https://lore.kernel.org/r/[email protected] Cc: Nicolin Chen <[email protected]> Cc: Lu Baolu <[email protected]> Cc: Kevin Tian <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
- Loading branch information