From e071c18322b9e01f95fced40fe0242542e1b13e1 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 16 May 2013 11:08:40 +0200 Subject: smp: Move secondary CPU initialization request Do not assume that the scheduler selects the main processor for the initialization thread. --- cpukit/sapi/src/exinit.c | 4 ++++ cpukit/score/src/threadhandler.c | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'cpukit') diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index 3fb27fdfa0..4ee24710b3 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -223,6 +223,10 @@ void rtems_initialize_start_multitasking(void) _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); +#ifdef RTEMS_SMP + _SMP_Request_other_cores_to_perform_first_context_switch(); +#endif + _Thread_Start_multitasking(); /******************************************************************* diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c index 6367c451f4..e4f124c052 100644 --- a/cpukit/score/src/threadhandler.c +++ b/cpukit/score/src/threadhandler.c @@ -126,12 +126,6 @@ void _Thread_Handler( void ) */ if (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); - - #if defined(RTEMS_SMP) - _Thread_Disable_dispatch(); - _SMP_Request_other_cores_to_perform_first_context_switch(); - _Thread_Enable_dispatch(); - #endif } #endif -- cgit v1.2.3