mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
kernel: riscv: run rustfmt on mem.rs
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
16ea102e94
commit
5ae39de7da
1 changed files with 10 additions and 4 deletions
|
|
@ -446,7 +446,14 @@ pub fn move_page_inner(
|
||||||
let phys = previous_entry >> 10 << 12;
|
let phys = previous_entry >> 10 << 12;
|
||||||
let flags = untranslate_flags(previous_entry);
|
let flags = untranslate_flags(previous_entry);
|
||||||
|
|
||||||
let result = map_page_inner(mm, dest_pid, phys, dest_addr as usize, flags, dest_pid.get() != 1);
|
let result = map_page_inner(
|
||||||
|
mm,
|
||||||
|
dest_pid,
|
||||||
|
phys,
|
||||||
|
dest_addr as usize,
|
||||||
|
flags,
|
||||||
|
dest_pid.get() != 1,
|
||||||
|
);
|
||||||
|
|
||||||
// Switch back to the original address space and return
|
// Switch back to the original address space and return
|
||||||
src_space.activate().unwrap();
|
src_space.activate().unwrap();
|
||||||
|
|
@ -495,8 +502,7 @@ pub fn lend_page_inner(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Strip the `VALID` flag, and set the `SHARED` flag.
|
// Strip the `VALID` flag, and set the `SHARED` flag.
|
||||||
*entry = (*entry & !MMUFlags::VALID.bits())
|
*entry = (*entry & !MMUFlags::VALID.bits()) | MMUFlags::S.bits();
|
||||||
| MMUFlags::S.bits();
|
|
||||||
|
|
||||||
// Ensure the change takes effect.
|
// Ensure the change takes effect.
|
||||||
unsafe { flush_mmu() };
|
unsafe { flush_mmu() };
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue