File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -886,10 +886,7 @@ pub fn ipi_tlb_flush() {
886886#[ allow( unused_variables) ]
887887pub fn wakeup_core ( core_id_to_wakeup : CoreId ) {
888888 #[ cfg( all( feature = "smp" , not( feature = "idle-poll" ) ) ) ]
889- if core_id_to_wakeup != core_id ( )
890- && !processor:: supports_mwait ( )
891- && scheduler:: take_core_hlt_state ( core_id_to_wakeup)
892- {
889+ if core_id_to_wakeup != core_id ( ) && !processor:: supports_mwait ( ) {
893890 without_interrupts ( || {
894891 let apic_ids = CPU_LOCAL_APIC_IDS . lock ( ) ;
895892 let local_apic_id = apic_ids[ core_id_to_wakeup as usize ] ;
Original file line number Diff line number Diff line change 11use alloc:: boxed:: Box ;
22use core:: arch:: asm;
33use core:: cell:: Cell ;
4- #[ cfg( feature = "smp" ) ]
5- use core:: sync:: atomic:: AtomicBool ;
64use core:: sync:: atomic:: Ordering ;
75use core:: { mem, ptr} ;
86
@@ -34,8 +32,6 @@ pub(crate) struct CoreLocal {
3432 irq_statistics : & ' static IrqStatistics ,
3533 /// The core-local async executor.
3634 ex : StaticLocalExecutor < RawSpinMutex , RawRwSpinLock > ,
37- #[ cfg( feature = "smp" ) ]
38- pub hlt : AtomicBool ,
3935 /// Queues to handle incoming requests from the other cores
4036 #[ cfg( feature = "smp" ) ]
4137 pub scheduler_input : InterruptTicketMutex < SchedulerInput > ,
@@ -63,8 +59,6 @@ impl CoreLocal {
6359 irq_statistics,
6460 ex : StaticLocalExecutor :: new ( ) ,
6561 #[ cfg( feature = "smp" ) ]
66- hlt : AtomicBool :: new ( false ) ,
67- #[ cfg( feature = "smp" ) ]
6862 scheduler_input : InterruptTicketMutex :: new ( SchedulerInput :: new ( ) ) ,
6963 } ;
7064 let this = if core_id == 0 {
Original file line number Diff line number Diff line change @@ -82,8 +82,6 @@ pub(crate) fn enable_and_wait() {
8282 ) ;
8383 }
8484 } else {
85- #[ cfg( feature = "smp" ) ]
86- crate :: CoreLocal :: get ( ) . hlt . store ( true , Ordering :: Relaxed ) ;
8785 enable_and_hlt ( ) ;
8886 }
8987}
Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ static NO_TASKS: AtomicU32 = AtomicU32::new(0);
4040#[ cfg( feature = "smp" ) ]
4141static SCHEDULER_INPUTS : SpinMutex < Vec < & InterruptTicketMutex < SchedulerInput > > > =
4242 SpinMutex :: new ( Vec :: new ( ) ) ;
43- #[ cfg( all( target_arch = "x86_64" , feature = "smp" ) ) ]
44- static CORE_HLT_STATE : SpinMutex < Vec < & AtomicBool > > = SpinMutex :: new ( Vec :: new ( ) ) ;
4543/// Map between Task ID and Queue of waiting tasks
4644static WAITING_TASKS : InterruptTicketMutex < BTreeMap < TaskId , VecDeque < TaskHandle > > > =
4745 InterruptTicketMutex :: new ( BTreeMap :: new ( ) ) ;
@@ -891,19 +889,9 @@ pub(crate) fn add_current_core() {
891889 core_id. try_into ( ) . unwrap ( ) ,
892890 & CoreLocal :: get ( ) . scheduler_input ,
893891 ) ;
894- #[ cfg( target_arch = "x86_64" ) ]
895- CORE_HLT_STATE
896- . lock ( )
897- . insert ( core_id. try_into ( ) . unwrap ( ) , & CoreLocal :: get ( ) . hlt ) ;
898892 }
899893}
900894
901- #[ inline]
902- #[ cfg( all( target_arch = "x86_64" , feature = "smp" , not( feature = "idle-poll" ) ) ) ]
903- pub ( crate ) fn take_core_hlt_state ( core_id : CoreId ) -> bool {
904- CORE_HLT_STATE . lock ( ) [ usize:: try_from ( core_id) . unwrap ( ) ] . swap ( false , Ordering :: Acquire )
905- }
906-
907895#[ inline]
908896#[ cfg( feature = "smp" ) ]
909897fn get_scheduler_input ( core_id : CoreId ) -> & ' static InterruptTicketMutex < SchedulerInput > {
You can’t perform that action at this time.
0 commit comments