Fix a bug in assertion: entry flags also includes IOMMU_MAP_ENTRY_UNMAPPED.
The entry->flags field is initialized in iommu_gas_init_domain(). Reviewed by: kib Sponsored by: Innovate DSbD Differential Revision: https://reviews.freebsd.org/D27235
This commit is contained in:
parent
caa9627013
commit
61896f9123
@ -258,7 +258,8 @@ iommu_gas_fini_domain(struct iommu_domain *domain)
|
||||
entry = RB_MIN(iommu_gas_entries_tree, &domain->rb_root);
|
||||
KASSERT(entry->start == 0, ("start entry start %p", domain));
|
||||
KASSERT(entry->end == IOMMU_PAGE_SIZE, ("start entry end %p", domain));
|
||||
KASSERT(entry->flags == IOMMU_MAP_ENTRY_PLACE,
|
||||
KASSERT(entry->flags ==
|
||||
(IOMMU_MAP_ENTRY_PLACE | IOMMU_MAP_ENTRY_UNMAPPED),
|
||||
("start entry flags %p", domain));
|
||||
RB_REMOVE(iommu_gas_entries_tree, &domain->rb_root, entry);
|
||||
iommu_gas_free_entry(domain, entry);
|
||||
@ -266,7 +267,8 @@ iommu_gas_fini_domain(struct iommu_domain *domain)
|
||||
entry = RB_MAX(iommu_gas_entries_tree, &domain->rb_root);
|
||||
KASSERT(entry->start == domain->end, ("end entry start %p", domain));
|
||||
KASSERT(entry->end == domain->end, ("end entry end %p", domain));
|
||||
KASSERT(entry->flags == IOMMU_MAP_ENTRY_PLACE,
|
||||
KASSERT(entry->flags ==
|
||||
(IOMMU_MAP_ENTRY_PLACE | IOMMU_MAP_ENTRY_UNMAPPED),
|
||||
("end entry flags %p", domain));
|
||||
RB_REMOVE(iommu_gas_entries_tree, &domain->rb_root, entry);
|
||||
iommu_gas_free_entry(domain, entry);
|
||||
|
Loading…
Reference in New Issue
Block a user