@@ -13,7 +13,11 @@ use alloc::boxed::Box;
1313use log:: debug;
1414use 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
320324const 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.
346351const 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
350356fn 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