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.
This commit is contained in:
Sebastian Huber
2014-02-17 13:58:01 +01:00
parent 9eec2f33e9
commit 2cb95b5f0a
2 changed files with 10 additions and 10 deletions

View File

@@ -35,11 +35,11 @@ extern "C" {
*/ */
/** /**
* This defines the bit which indicates the interprocessor interrupt * @brief SMP message to request a processor shutdown.
* has been requested so that this CPU will be shutdown. This is done *
* as part of rtems_executive_shutdown(). * @see _SMP_Send_message().
*/ */
#define RTEMS_BSP_SMP_SHUTDOWN 0x04 #define SMP_MESSAGE_SHUTDOWN UINT32_C(0x1)
#if !defined( ASM ) #if !defined( ASM )
@@ -58,7 +58,7 @@ typedef enum {
return _SMP_Processor_count; return _SMP_Processor_count;
} }
#else #else
#define _SMP_Get_processor_count() ( ( uint32_t ) 1 ) #define _SMP_Get_processor_count() UINT32_C(1)
#endif #endif
#if defined( RTEMS_SMP ) #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(); return _CPU_SMP_Get_current_processor();
} }
#else #else
#define _SMP_Get_current_processor() ( ( uint32_t ) 0 ) #define _SMP_Get_current_processor() UINT32_C(0)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -61,21 +61,21 @@ void rtems_smp_process_interrupt( void )
#if defined(RTEMS_DEBUG) #if defined(RTEMS_DEBUG)
{ {
void *sp = __builtin_frame_address(0); void *sp = __builtin_frame_address(0);
if ( !(message & RTEMS_BSP_SMP_SHUTDOWN) ) { if ( !(message & SMP_MESSAGE_SHUTDOWN) ) {
printk( printk(
"ISR on CPU %d -- (0x%02x) (0x%p)\n", "ISR on CPU %d -- (0x%02x) (0x%p)\n",
_Per_CPU_Get_index( self_cpu ), _Per_CPU_Get_index( self_cpu ),
message, message,
sp sp
); );
if ( message & RTEMS_BSP_SMP_SHUTDOWN ) if ( message & SMP_MESSAGE_SHUTDOWN )
printk( "shutdown\n" ); printk( "shutdown\n" );
} }
printk( "Dispatch level %d\n", _Thread_Dispatch_get_disable_level() ); printk( "Dispatch level %d\n", _Thread_Dispatch_get_disable_level() );
} }
#endif #endif
if ( ( message & RTEMS_BSP_SMP_SHUTDOWN ) != 0 ) { if ( ( message & SMP_MESSAGE_SHUTDOWN ) != 0 ) {
_Per_CPU_Change_state( self_cpu, PER_CPU_STATE_SHUTDOWN ); _Per_CPU_Change_state( self_cpu, PER_CPU_STATE_SHUTDOWN );
rtems_fatal( RTEMS_FATAL_SOURCE_SMP, SMP_FATAL_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 ); const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu );
if ( per_cpu->state != PER_CPU_STATE_BEFORE_INITIALIZATION ) { if ( per_cpu->state != PER_CPU_STATE_BEFORE_INITIALIZATION ) {
_SMP_Send_message( cpu, RTEMS_BSP_SMP_SHUTDOWN ); _SMP_Send_message( cpu, SMP_MESSAGE_SHUTDOWN );
} }
} }
} }