HomeFreeBSD

iommu_gas: Drop needless bound check in lowermatch

Description

iommu_gas: Drop needless bound check in lowermatch

The loop iteration in iommu_gas_lowermatch checks the bound
a->common->lowaddr twice per loop iteration. Rewrite to test only once
per iteration. Do not worry about passing to iommu_gas_match_one a
range wholly beyond lowaddr. Since that function checks the upper end
of the range against lowaddr, it'll get rejected there.

Reviewed by: alc
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D35522

Details

Provenance
dougmAuthored on Jun 21 2022, 12:34 AM
Reviewer
alc
Differential Revision
D35522: iommu_gas: reduce lower bound checking in lowermatch
Parents
rG0586a1290446: nfscl: Clean up the code by removing vfs_flags() macro
Branches
Unknown
Tags
Unknown