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

Details

Provenance
alcAuthored on Jul 29 2022, 6:14 AM
Reviewer
kib
Differential Revision
D35995: iommu_gas: Eliminate redundant parameters and push down lock acquisition
Parents
rGbe1f485d7d6b: sockets: add MSG_TRUNC flag handling for recvfrom()/recvmsg().
Branches
Unknown
Tags
Unknown