Fix more warnings
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ impl Arch for X86Arch {
|
||||
asm!("mov cr3, {0}", in(reg) address.data());
|
||||
}
|
||||
|
||||
fn virt_is_valid(address: VirtualAddress) -> bool {
|
||||
fn virt_is_valid(_address: VirtualAddress) -> bool {
|
||||
// On 32-bit x86, every virtual address is valid
|
||||
true
|
||||
}
|
||||
|
||||
+3
-2
@@ -125,11 +125,12 @@ impl<A: Arch, F: FrameAllocator> PageMapper<A, F> {
|
||||
Some(flush)
|
||||
}
|
||||
|
||||
pub unsafe fn unmap_phys(&mut self, virt: VirtualAddress, unmap_parents: bool) -> Option<(PhysicalAddress, PageFlags<A>, PageFlush<A>)> {
|
||||
pub unsafe fn unmap_phys(&mut self, virt: VirtualAddress, _unmap_parents: bool) -> Option<(PhysicalAddress, PageFlags<A>, PageFlush<A>)> {
|
||||
//TODO: verify virt is aligned
|
||||
let mut table = self.table();
|
||||
let level = table.level();
|
||||
unmap_phys_inner(virt, &mut table, level, unmap_parents, &mut self.allocator).map(|(pa, pf)| (pa, pf, PageFlush::new(virt)))
|
||||
//TODO: use unmap_parents
|
||||
unmap_phys_inner(virt, &mut table, level, false, &mut self.allocator).map(|(pa, pf)| (pa, pf, PageFlush::new(virt)))
|
||||
}
|
||||
}
|
||||
unsafe fn unmap_phys_inner<A: Arch>(virt: VirtualAddress, table: &mut PageTable<A>, initial_level: usize, unmap_parents: bool, allocator: &mut impl FrameAllocator) -> Option<(PhysicalAddress, PageFlags<A>)> {
|
||||
|
||||
Reference in New Issue
Block a user