diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2023-12-22 22:41:19 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2023-12-26 01:28:23 +0000 |
commit | c0047e7c356953d138194ff71cc510ffe85425f0 (patch) | |
tree | d4dd9b348ad90f2750a49df0cb363268245d7f50 | |
parent | f59128775636846574e092c68e849a56f74577e6 (diff) |
iommu_gas_remove(): consolidate places where decision is made to keep the entry
Move all flag checks into iommu_gas_remove_unmap().
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
-rw-r--r-- | sys/dev/iommu/iommu_gas.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index cfd375c658c3..4b6141b981da 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -693,6 +693,7 @@ iommu_gas_remove_unmap(struct iommu_domain *domain, IOMMU_DOMAIN_ASSERT_LOCKED(domain); if ((entry->flags & (IOMMU_MAP_ENTRY_UNMAPPED | + IOMMU_MAP_ENTRY_RMRR | IOMMU_MAP_ENTRY_REMOVING)) != 0) return; MPASS((entry->flags & IOMMU_MAP_ENTRY_PLACE) == 0); @@ -720,8 +721,6 @@ iommu_gas_remove_locked(struct iommu_domain *domain, KASSERT(start <= entry->start, ("iommu_gas_remove entry (%#jx, %#jx) start %#jx", entry->start, entry->end, start)); - if ((entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0) - continue; iommu_gas_remove_unmap(domain, entry, gc); } if (iommu_gas_remove_clip_right(domain, end, entry, *r2)) { |