summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-02-18 13:30:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-02-19 09:59:42 +0100
commitc4ff0271e7dec5501e7a59294716a26fd53cd927 (patch)
tree18b110cb2006334a3623e297145c55a0d4452677
parentscore: Initialize per-CPU locks (diff)
downloadrtems-c4ff0271e7dec5501e7a59294716a26fd53cd927.tar.bz2
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.
-rw-r--r--cpukit/score/src/smp.c14
1 files 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 );
}
}