diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-17 13:58:01 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-19 09:59:40 +0100 |
commit | 2cb95b5f0a2c7af10531dea5f4a6bc0c2be0410c (patch) | |
tree | 99409bf8b78708760121c61bf71a383fca4ad688 /cpukit | |
parent | score: Add RTEMS_FATAL_SOURCE_SMP (diff) | |
download | rtems-2cb95b5f0a2c7af10531dea5f4a6bc0c2be0410c.tar.bz2 |
score: Rename RTEMS_BSP_SMP_SHUTDOWN
Rename RTEMS_BSP_SMP_SHUTDOWN in SMP_MESSAGE_SHUTDOWN since SMP messages
have nothing to do with the BSP. Use UINT32_C() instead of casts.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/score/include/rtems/score/smp.h | 12 | ||||
-rw-r--r-- | cpukit/score/src/smp.c | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/cpukit/score/include/rtems/score/smp.h b/cpukit/score/include/rtems/score/smp.h index 88e3ec8b9e..0643c62bd1 100644 --- a/cpukit/score/include/rtems/score/smp.h +++ b/cpukit/score/include/rtems/score/smp.h @@ -35,11 +35,11 @@ extern "C" { */ /** - * This defines the bit which indicates the interprocessor interrupt - * has been requested so that this CPU will be shutdown. This is done - * as part of rtems_executive_shutdown(). + * @brief SMP message to request a processor shutdown. + * + * @see _SMP_Send_message(). */ -#define RTEMS_BSP_SMP_SHUTDOWN 0x04 +#define SMP_MESSAGE_SHUTDOWN UINT32_C(0x1) #if !defined( ASM ) @@ -58,7 +58,7 @@ typedef enum { return _SMP_Processor_count; } #else - #define _SMP_Get_processor_count() ( ( uint32_t ) 1 ) + #define _SMP_Get_processor_count() UINT32_C(1) #endif #if defined( RTEMS_SMP ) @@ -120,7 +120,7 @@ void _SMP_Request_other_cores_to_perform_first_context_switch(void); return _CPU_SMP_Get_current_processor(); } #else - #define _SMP_Get_current_processor() ( ( uint32_t ) 0 ) + #define _SMP_Get_current_processor() UINT32_C(0) #endif #ifdef __cplusplus diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c index 994bfea922..c03c148625 100644 --- a/cpukit/score/src/smp.c +++ b/cpukit/score/src/smp.c @@ -61,21 +61,21 @@ void rtems_smp_process_interrupt( void ) #if defined(RTEMS_DEBUG) { void *sp = __builtin_frame_address(0); - if ( !(message & RTEMS_BSP_SMP_SHUTDOWN) ) { + if ( !(message & SMP_MESSAGE_SHUTDOWN) ) { printk( "ISR on CPU %d -- (0x%02x) (0x%p)\n", _Per_CPU_Get_index( self_cpu ), message, sp ); - if ( message & RTEMS_BSP_SMP_SHUTDOWN ) + if ( message & SMP_MESSAGE_SHUTDOWN ) printk( "shutdown\n" ); } printk( "Dispatch level %d\n", _Thread_Dispatch_get_disable_level() ); } #endif - if ( ( message & RTEMS_BSP_SMP_SHUTDOWN ) != 0 ) { + if ( ( message & SMP_MESSAGE_SHUTDOWN ) != 0 ) { _Per_CPU_Change_state( self_cpu, PER_CPU_STATE_SHUTDOWN ); rtems_fatal( RTEMS_FATAL_SOURCE_SMP, SMP_FATAL_SHUTDOWN ); @@ -149,7 +149,7 @@ void _SMP_Request_other_cores_to_shutdown( void ) const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu ); if ( per_cpu->state != PER_CPU_STATE_BEFORE_INITIALIZATION ) { - _SMP_Send_message( cpu, RTEMS_BSP_SMP_SHUTDOWN ); + _SMP_Send_message( cpu, SMP_MESSAGE_SHUTDOWN ); } } } |