Skip to content

Commit 82e6511

Browse files
committed
reformat
1 parent b370dba commit 82e6511

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/arch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ sys_reg!(sp_el1);
156156
sys_reg!(mpidr_el1);
157157

158158
/// Disable MMU and caches.
159-
///
159+
///
160160
/// # Safety
161-
///
161+
///
162162
/// It is not sound to execute arbitrary Rust code after disabling the data cache, so this
163163
/// should only ever be called from assembly.
164164
/// This disables MMU, so the caller must ensure that the code will be executable at the

src/hypervisor.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ use alloc::boxed::Box;
1313
use log::debug;
1414
use spin::mutex::SpinMutex;
1515

16-
use crate::{arch::{self, esr, far}, platform::{Platform, PlatformImpl}, simple_map::SimpleMap};
16+
use crate::{
17+
arch::{self, esr, far},
18+
platform::{Platform, PlatformImpl},
19+
simple_map::SimpleMap,
20+
};
1721

1822
/// Entry point for EL1 execution.
1923
///
@@ -318,7 +322,8 @@ unsafe extern "C" fn cpu_resume() -> ! {
318322
}
319323

320324
const MAX_CORES: usize = <PlatformImpl as Platform>::MAX_CORES;
321-
static SUSPEND_CONTEXTS: SpinMutex<SimpleMap<u64, SuspendContext, MAX_CORES>> = SpinMutex::new(SimpleMap::new());
325+
static SUSPEND_CONTEXTS: SpinMutex<SimpleMap<u64, SuspendContext, MAX_CORES>> =
326+
SpinMutex::new(SimpleMap::new());
322327

323328
/// The class of an exception.
324329
#[derive(Debug)]
@@ -344,12 +349,12 @@ impl ExceptionClass {
344349

345350
/// The number of pages to allocate for each secondary core stack.
346351
const SECONDARY_STACK_PAGE_COUNT: usize = 4;
347-
static SECONDARY_STACKS: SpinMutex<SimpleMap<u64, Box<Stack<SECONDARY_STACK_PAGE_COUNT>>, MAX_CORES>> =
348-
SpinMutex::new(SimpleMap::new());
352+
static SECONDARY_STACKS: SpinMutex<
353+
SimpleMap<u64, Box<Stack<SECONDARY_STACK_PAGE_COUNT>>, MAX_CORES>,
354+
> = SpinMutex::new(SimpleMap::new());
349355

350356
fn get_secondary_stack(mpidr: u64) -> *mut Stack<SECONDARY_STACK_PAGE_COUNT> {
351-
let mut stack_map = SECONDARY_STACKS
352-
.lock();
357+
let mut stack_map = SECONDARY_STACKS.lock();
353358
if let Some(stack) = stack_map.get_mut(&mpidr) {
354359
&raw mut **stack
355360
} else {

0 commit comments

Comments
 (0)