mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
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
This commit is contained in:
parent
f591287756
commit
c0047e7c35
|
@ -693,6 +693,7 @@ iommu_gas_remove_unmap(struct iommu_domain *domain,
|
||||||
IOMMU_DOMAIN_ASSERT_LOCKED(domain);
|
IOMMU_DOMAIN_ASSERT_LOCKED(domain);
|
||||||
|
|
||||||
if ((entry->flags & (IOMMU_MAP_ENTRY_UNMAPPED |
|
if ((entry->flags & (IOMMU_MAP_ENTRY_UNMAPPED |
|
||||||
|
IOMMU_MAP_ENTRY_RMRR |
|
||||||
IOMMU_MAP_ENTRY_REMOVING)) != 0)
|
IOMMU_MAP_ENTRY_REMOVING)) != 0)
|
||||||
return;
|
return;
|
||||||
MPASS((entry->flags & IOMMU_MAP_ENTRY_PLACE) == 0);
|
MPASS((entry->flags & IOMMU_MAP_ENTRY_PLACE) == 0);
|
||||||
|
@ -720,8 +721,6 @@ iommu_gas_remove_locked(struct iommu_domain *domain,
|
||||||
KASSERT(start <= entry->start,
|
KASSERT(start <= entry->start,
|
||||||
("iommu_gas_remove entry (%#jx, %#jx) start %#jx",
|
("iommu_gas_remove entry (%#jx, %#jx) start %#jx",
|
||||||
entry->start, entry->end, start));
|
entry->start, entry->end, start));
|
||||||
if ((entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0)
|
|
||||||
continue;
|
|
||||||
iommu_gas_remove_unmap(domain, entry, gc);
|
iommu_gas_remove_unmap(domain, entry, gc);
|
||||||
}
|
}
|
||||||
if (iommu_gas_remove_clip_right(domain, end, entry, *r2)) {
|
if (iommu_gas_remove_clip_right(domain, end, entry, *r2)) {
|
||||||
|
|
Loading…
Reference in a new issue