Remove unnecessary page table items

This commit is contained in:
Zhang Junyang
2024-11-09 19:22:41 +08:00
committed by Tate, Hongliang Tian
parent b2b00bdfd2
commit 1f612e45f7
3 changed files with 0 additions and 18 deletions

View File

@ -349,9 +349,6 @@ impl<M: AllocatorSelector + 'static> Drop for KVirtArea<M> {
PageTableItem::NotMapped { .. } => { PageTableItem::NotMapped { .. } => {
break; break;
} }
PageTableItem::PageTableNode { .. } => {
panic!("Found page table node in `KVirtArea`");
}
} }
} }

View File

@ -94,9 +94,6 @@ pub enum PageTableItem {
page: DynPage, page: DynPage,
prop: PageProperty, prop: PageProperty,
}, },
PageTableNode {
page: DynPage,
},
#[allow(dead_code)] #[allow(dead_code)]
MappedUntracked { MappedUntracked {
va: Vaddr, va: Vaddr,

View File

@ -369,15 +369,6 @@ impl CursorMut<'_, '_> {
self.flusher self.flusher
.issue_tlb_flush_with(TlbFlushOp::Address(va), page); .issue_tlb_flush_with(TlbFlushOp::Address(va), page);
} }
PageTableItem::PageTableNode { page } => {
if !self.flusher.need_remote_flush() && tlb_prefer_flush_all {
// Only on single-CPU cases we can drop the page immediately before flushing.
drop(page);
continue;
}
// If we unmap an entire page table node, we prefer directly flushing all TLBs.
self.flusher.issue_tlb_flush_with(TlbFlushOp::All, page);
}
PageTableItem::NotMapped { .. } => { PageTableItem::NotMapped { .. } => {
break; break;
} }
@ -506,9 +497,6 @@ impl TryFrom<PageTableItem> for VmItem {
PageTableItem::MappedUntracked { .. } => { PageTableItem::MappedUntracked { .. } => {
Err("found untracked memory mapped into `VmSpace`") Err("found untracked memory mapped into `VmSpace`")
} }
PageTableItem::PageTableNode { .. } => {
unreachable!()
}
} }
} }
} }