From c4ff0271e7dec5501e7a59294716a26fd53cd927 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 18 Feb 2014 13:30:28 +0100 Subject: score: Wait for per-CPU state changes later Wait for per-CPU changes into PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING later. There is no need to delay the initialization of the main processor at this point. --- cpukit/score/src/smp.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c index 5e098e645a..1353d14543 100644 --- a/cpukit/score/src/smp.c +++ b/cpukit/score/src/smp.c @@ -46,15 +46,6 @@ void _SMP_Handler_initialize( void ) max_cpus = _CPU_SMP_Initialize( max_cpus ); _SMP_Processor_count = max_cpus; - - for ( cpu = 1 ; cpu < max_cpus; ++cpu ) { - const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu ); - - _Per_CPU_Wait_for_state( - per_cpu, - PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING - ); - } } void _SMP_Start_multitasking_on_secondary_processor( void ) @@ -149,6 +140,11 @@ void _SMP_Request_other_cores_to_perform_first_context_switch( void ) Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu ); if ( cpu != self ) { + _Per_CPU_Wait_for_state( + per_cpu, + PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING + ); + _Per_CPU_Change_state( per_cpu, PER_CPU_STATE_BEGIN_MULTITASKING ); } } -- cgit v1.2.3