[PATCH 11/11] smp: Move secondary CPU initialization request
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon May 27 10:58:16 UTC 2013
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(-)
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index 3fb27fd..4ee2471 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 6367c45..e4f124c 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
--
1.7.7
More information about the devel
mailing list