mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 17:03:23 +00:00
Remove unnecessary page table items
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
b2b00bdfd2
commit
1f612e45f7
@ -349,9 +349,6 @@ impl<M: AllocatorSelector + 'static> Drop for KVirtArea<M> {
|
||||
PageTableItem::NotMapped { .. } => {
|
||||
break;
|
||||
}
|
||||
PageTableItem::PageTableNode { .. } => {
|
||||
panic!("Found page table node in `KVirtArea`");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,9 +94,6 @@ pub enum PageTableItem {
|
||||
page: DynPage,
|
||||
prop: PageProperty,
|
||||
},
|
||||
PageTableNode {
|
||||
page: DynPage,
|
||||
},
|
||||
#[allow(dead_code)]
|
||||
MappedUntracked {
|
||||
va: Vaddr,
|
||||
|
@ -369,15 +369,6 @@ impl CursorMut<'_, '_> {
|
||||
self.flusher
|
||||
.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 { .. } => {
|
||||
break;
|
||||
}
|
||||
@ -506,9 +497,6 @@ impl TryFrom<PageTableItem> for VmItem {
|
||||
PageTableItem::MappedUntracked { .. } => {
|
||||
Err("found untracked memory mapped into `VmSpace`")
|
||||
}
|
||||
PageTableItem::PageTableNode { .. } => {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user