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

(cherry picked from commit 70b5d8fa0f9457833027e4a1c57b4e68a9351cac)

Details

Provenance
dougmAuthored on Jun 21 2022, 12:34 AM
Reviewer
alc
Differential Revision
D35522: iommu_gas: reduce lower bound checking in lowermatch
Parents
rG094bcfa4e15b: mips_busdma: fix mips errors after merge
Branches
Unknown
Tags
Unknown