Changeset 406dd62 in rtems


Ignore:
Timestamp:
Jul 24, 2018, 9:18:27 AM (15 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
a1f7d7d
Parents:
4678d1a
git-author:
Sebastian Huber <sebastian.huber@…> (07/24/18 09:18:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/25/18 08:07:42)
Message:

_SMP_Start_multitasking_on_secondary_processor()

Pass current processor control as first parameter to make dependency
more explicit.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • bsps/arm/include/bsp/arm-a9mpcore-start.h

    r4678d1a r406dd62  
    110110  arm_cp15_set_control(ctrl);
    111111
    112   _SMP_Start_multitasking_on_secondary_processor();
     112  _SMP_Start_multitasking_on_secondary_processor(_Per_CPU_Get());
    113113}
    114114
  • bsps/arm/raspberrypi/start/bspsmp_init.c

    r4678d1a r406dd62  
    7878  arm_cp15_set_control(ctrl);
    7979
    80   _SMP_Start_multitasking_on_secondary_processor();
     80  _SMP_Start_multitasking_on_secondary_processor(_Per_CPU_Get());
    8181}
  • bsps/i386/pc386/start/smp-imps.c

    r4678d1a r406dd62  
    795795#endif
    796796
    797   _SMP_Start_multitasking_on_secondary_processor();
     797  _SMP_Start_multitasking_on_secondary_processor( _Per_CPU_Get() );
    798798}
    799799
  • bsps/powerpc/qoriq/start/bspsmp.c

    r4678d1a r406dd62  
    5454  bsp_interrupt_facility_initialize();
    5555
    56   _SMP_Start_multitasking_on_secondary_processor();
     56  _SMP_Start_multitasking_on_secondary_processor(cpu_self);
    5757}
    5858#endif
     
    9494  start_thread_if_necessary(cpu_index_self);
    9595
    96   _SMP_Start_multitasking_on_secondary_processor();
     96  _SMP_Start_multitasking_on_secondary_processor(cpu_self);
    9797}
    9898
  • bsps/sparc/leon3/start/bspsmp.c

    r4678d1a r406dd62  
    5353  LEON3_IrqCtrl_Regs->mask[cpu_index_self] |= 1U << LEON3_mp_irq;
    5454
    55   _SMP_Start_multitasking_on_secondary_processor();
     55  _SMP_Start_multitasking_on_secondary_processor(cpu_self);
    5656}
    5757
  • cpukit/include/rtems/score/smpimpl.h

    r4678d1a r406dd62  
    135135 *
    136136 * This function does not return to the caller.
    137  */
    138 void _SMP_Start_multitasking_on_secondary_processor( void )
    139   RTEMS_NO_RETURN;
     137 *
     138 * @param[in] cpu_self The current processor control.
     139 */
     140void _SMP_Start_multitasking_on_secondary_processor(
     141  Per_CPU_Control *cpu_self
     142) RTEMS_NO_RETURN;
    140143
    141144typedef void ( *SMP_Test_message_handler )( Per_CPU_Control *cpu_self );
  • cpukit/score/src/smp.c

    r4678d1a r406dd62  
    146146void _SMP_Request_start_multitasking( void )
    147147{
    148   Per_CPU_Control *self_cpu = _Per_CPU_Get();
    149   uint32_t cpu_count = _SMP_Get_processor_count();
    150   uint32_t cpu_index;
    151 
    152   _Per_CPU_State_change( self_cpu, PER_CPU_STATE_READY_TO_START_MULTITASKING );
     148  Per_CPU_Control *cpu_self;
     149  uint32_t         cpu_count;
     150  uint32_t         cpu_index;
     151
     152  cpu_self = _Per_CPU_Get();
     153  _Per_CPU_State_change( cpu_self, PER_CPU_STATE_READY_TO_START_MULTITASKING );
     154
     155  cpu_count = _SMP_Get_processor_count();
    153156
    154157  for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {
    155     Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );
     158    Per_CPU_Control *cpu;
     159
     160    cpu = _Per_CPU_Get_by_index( cpu_index );
    156161
    157162    if ( _Per_CPU_Is_processor_online( cpu ) ) {
     
    169174}
    170175
    171 void _SMP_Start_multitasking_on_secondary_processor( void )
    172 {
    173   Per_CPU_Control *self_cpu = _Per_CPU_Get();
    174   uint32_t cpu_index_self = _Per_CPU_Get_index( self_cpu );
     176void _SMP_Start_multitasking_on_secondary_processor(
     177  Per_CPU_Control *cpu_self
     178)
     179{
     180  uint32_t cpu_index_self;
     181
     182  cpu_index_self = _Per_CPU_Get_index( cpu_self );
    175183
    176184  if ( cpu_index_self >= rtems_configuration_get_maximum_processors() ) {
     
    182190  }
    183191
    184   _Per_CPU_State_change( self_cpu, PER_CPU_STATE_READY_TO_START_MULTITASKING );
     192  _Per_CPU_State_change( cpu_self, PER_CPU_STATE_READY_TO_START_MULTITASKING );
    185193
    186194  _Thread_Start_multitasking();
Note: See TracChangeset for help on using the changeset viewer.