From 8149793b9a62a96e298dbc5f82c0bdabda69dc29 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Fri, 10 May 2019 17:34:18 +0800 Subject: [PATCH] Fix typo in mips paging --- kernel/src/arch/mipsel/paging.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/src/arch/mipsel/paging.rs b/kernel/src/arch/mipsel/paging.rs index af0a782..b949dbc 100644 --- a/kernel/src/arch/mipsel/paging.rs +++ b/kernel/src/arch/mipsel/paging.rs @@ -23,7 +23,7 @@ impl PageTable for ActivePageTable { let frame = Frame::of_addr(PhysAddr::new(target)); // we may need frame allocator to alloc frame for new page table(first/second) self.get_table() - .map_to(page, frame, flags, &mut FrameAllocatorForRiscv) + .map_to(page, frame, flags, &mut FrameAllocatorForMips) .unwrap() .flush(); self.get_entry(addr).expect("fail to get entry") @@ -254,15 +254,15 @@ impl Drop for InactivePageTable0 { } } -struct FrameAllocatorForRiscv; +struct FrameAllocatorForMips; -impl FrameAllocator for FrameAllocatorForRiscv { +impl FrameAllocator for FrameAllocatorForMips { fn alloc(&mut self) -> Option { alloc_frame().map(|addr| Frame::of_addr(PhysAddr::new(addr))) } } -impl FrameDeallocator for FrameAllocatorForRiscv { +impl FrameDeallocator for FrameAllocatorForMips { fn dealloc(&mut self, frame: Frame) { dealloc_frame(frame.start_address().as_usize()); }