HomeFreeBSD

iommu_gas: Eliminate redundant parameters and push down lock acquisition

Description

iommu_gas: Eliminate redundant parameters and push down lock acquisition

Since IOMMU map entries store a reference to the domain in which they
reside, there is no need to pass the domain to iommu_gas_free_entry(),
iommu_gas_free_space(), and iommu_gas_free_region().

Push down the acquisition and release of the IOMMU domain lock into
iommu_gas_free_space() and iommu_gas_free_region().

Both of these changes allow for simplifications in the callers of the
functions without really complicating the functions themselves.
Moreover, the latter change eliminates the direct use of the IOMMU
domain lock from the x86-specific DMAR code.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35995

(cherry picked from commit 4670f90846d49027bf23435a30895a74264f1e79)

Details

Provenance
alcAuthored on Jul 29 2022, 6:14 AM
dougmCommitted on Aug 8 2022, 7:07 AM
Reviewer
kib
Differential Revision
D35995: iommu_gas: Eliminate redundant parameters and push down lock acquisition
Parents
rG02b3bb3e456f: x86/iommu: Reduce DMAR lock contention
Branches
Unknown
Tags
Unknown