diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-28 10:58:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-29 11:06:07 +0200 |
commit | 2f6108f93b3ee4dcc85b236593d4c57c7652bf1b (patch) | |
tree | 841e4daad0d7f0e1dcd7a6eb91271731662c77e4 /cpukit/score/include/rtems/score/smp.h | |
parent | smp: Delete bsp_smp_secondary_cpu_initialize() (diff) | |
download | rtems-2f6108f93b3ee4dcc85b236593d4c57c7652bf1b.tar.bz2 |
smp: Simplify SMP initialization sequence
Delete bsp_smp_wait_for(). Other parts of the system work without
timeout, e.g. the spinlocks. Using a timeout here does not make the
system more robust.
Delete bsp_smp_cpu_state and replace it with Per_CPU_State. The
Per_CPU_State follows the Score naming conventions. Add
_Per_CPU_Change_state() and _Per_CPU_Wait_for_state() functions to
change and observe states.
Use Per_CPU_State in Per_CPU_Control instead of the anonymous integer.
Add _CPU_Processor_event_broadcast() and _CPU_Processor_event_receive()
functions provided by the CPU port. Use these functions in
_Per_CPU_Change_state() and _Per_CPU_Wait_for_state().
Add prototype for _SMP_Send_message().
Delete RTEMS_BSP_SMP_FIRST_TASK message. The first context switch is
now performed in rtems_smp_secondary_cpu_initialize(). Issuing the
first context switch in the context of the inter-processor interrupt is
not possible on systems with a modern interrupt controller. Such an
interrupt controler usually requires a handshake protocol with interrupt
acknowledge and end of interrupt signals. A direct context switch in an
interrupt handler circumvents the interrupt processing epilogue and may
leave the system in an inconsistent state.
Release lock in rtems_smp_process_interrupt() even if no message was
delivered. This prevents deadlock of the system.
Simplify and format _SMP_Send_message(),
_SMP_Request_other_cores_to_perform_first_context_switch(),
_SMP_Request_other_cores_to_dispatch() and
_SMP_Request_other_cores_to_shutdown().
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/smp.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/cpukit/score/include/rtems/score/smp.h b/cpukit/score/include/rtems/score/smp.h index f4bf72edd9..c7de6d64a9 100644 --- a/cpukit/score/include/rtems/score/smp.h +++ b/cpukit/score/include/rtems/score/smp.h @@ -58,13 +58,6 @@ extern "C" { */ #define RTEMS_BSP_SMP_SHUTDOWN 0x04 -/** - * This defines the bit which indicates the interprocessor interrupt - * has been requested that the receiving CPU needs to perform a context - * switch to the first task. - */ -#define RTEMS_BSP_SMP_FIRST_TASK 0x08 - #ifndef ASM /** * @brief Number of CPUs in a SMP system. @@ -75,6 +68,16 @@ extern "C" { SCORE_EXTERN uint32_t _SMP_Processor_count; /** + * @brief Sends a SMP message to a processor. + * + * The target processor may be the sending processor. + * + * @param[in] cpu The target processor of the message. + * @param[in] message The message. + */ +void _SMP_Send_message( int cpu, uint32_t message ); + +/** * @brief Request of others CPUs. * * This method is invoked by RTEMS when it needs to make a request |