Changeset 9eec2f3 in rtems


Ignore:
Timestamp:
Feb 17, 2014, 12:46:11 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
2cb95b5f
Parents:
46d7fa5
git-author:
Sebastian Huber <sebastian.huber@…> (02/17/14 12:46:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/19/14 08:59:40)
Message:

score: Add RTEMS_FATAL_SOURCE_SMP

Use rtems_fatal() instead of _CPU_Fatal_halt() to shutdown processors in
SMP configurations since this allows intervention of BSP or application
specific fatal extensions.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/src/fatalsrctext.c

    r46d7fa5 r9eec2f3  
    3737  "RTEMS_FATAL_SOURCE_ASSERT",
    3838  "RTEMS_FATAL_SOURCE_STACK_CHECKER",
    39   "RTEMS_FATAL_SOURCE_EXCEPTION"
     39  "RTEMS_FATAL_SOURCE_EXCEPTION",
     40  "RTEMS_FATAL_SOURCE_SMP"
    4041};
    4142
  • cpukit/score/include/rtems/score/interr.h

    r46d7fa5 r9eec2f3  
    103103   */
    104104  RTEMS_FATAL_SOURCE_EXCEPTION,
     105
     106  /**
     107   * @brief Fatal source of SMP domain.
     108   *
     109   * @see SMP_Fatal_code.
     110   */
     111  RTEMS_FATAL_SOURCE_SMP,
    105112
    106113  /**
  • cpukit/score/include/rtems/score/smp.h

    r46d7fa5 r9eec2f3  
    4343
    4444#if !defined( ASM )
     45
     46/**
     47 * @brief SMP fatal codes.
     48 */
     49typedef enum {
     50  SMP_FATAL_SHUTDOWN
     51} SMP_Fatal_code;
    4552
    4653#if defined( RTEMS_SMP )
  • cpukit/score/src/smp.c

    r46d7fa5 r9eec2f3  
    2424#include <rtems/score/smp.h>
    2525#include <rtems/config.h>
     26#include <rtems/fatal.h>
    2627
    2728#if defined(RTEMS_DEBUG)
     
    7677
    7778    if ( ( message & RTEMS_BSP_SMP_SHUTDOWN ) != 0 ) {
    78       _ISR_Disable_without_giant( level );
    79 
    80       _Thread_Dispatch_set_disable_level( 0 );
    81 
    8279      _Per_CPU_Change_state( self_cpu, PER_CPU_STATE_SHUTDOWN );
    8380
    84       _CPU_Fatal_halt( _Per_CPU_Get_index( self_cpu ) );
     81      rtems_fatal( RTEMS_FATAL_SOURCE_SMP, SMP_FATAL_SHUTDOWN );
    8582      /* does not continue past here */
    8683    }
  • testsuites/sptests/spinternalerror02/init.c

    r46d7fa5 r9eec2f3  
    5050  } while ( text != text_last );
    5151
    52   rtems_test_assert( source - 3 == RTEMS_FATAL_SOURCE_EXCEPTION );
     52  rtems_test_assert( source - 3 == RTEMS_FATAL_SOURCE_SMP );
    5353}
    5454
  • testsuites/sptests/spinternalerror02/spinternalerror02.scn

    r46d7fa5 r9eec2f3  
    3737RTEMS_FATAL_SOURCE_STACK_CHECKER
    3838RTEMS_FATAL_SOURCE_EXCEPTION
     39RTEMS_FATAL_SOURCE_SMP
    3940?
    4041?
Note: See TracChangeset for help on using the changeset viewer.