Changeset 282bfd3 in rtems


Ignore:
Timestamp:
Feb 18, 2014, 12:03:27 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
b1d08a58
Parents:
a171e0a8
git-author:
Sebastian Huber <sebastian.huber@…> (02/18/14 12:03:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/19/14 08:59:42)
Message:

score: Move _SMP_Handler_initialize()

Location:
cpukit/score/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/percpu.c

    ra171e0a8 r282bfd3  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/score/address.h>
    23 #include <rtems/score/thread.h>
    2421#include <rtems/score/percpu.h>
    25 #include <rtems/score/wkspace.h>
    26 #include <rtems/config.h>
    27 #include <string.h>
    2822
    2923#if defined(RTEMS_SMP)
    30 
    31   #include <rtems/score/smp.h>
    32 
    33   void _SMP_Handler_initialize(void)
    34   {
    35     uint32_t max_cpus = rtems_configuration_get_maximum_processors();
    36     uint32_t cpu;
    37 
    38     /*
    39      * Discover and initialize the secondary cores in an SMP system.
    40      */
    41     max_cpus = _CPU_SMP_Initialize( max_cpus );
    42 
    43     _SMP_Processor_count = max_cpus;
    44 
    45     for ( cpu = 1 ; cpu < max_cpus; ++cpu ) {
    46       const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu );
    47 
    48       _Per_CPU_Wait_for_state(
    49         per_cpu,
    50         PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING
    51       );
    52     }
    53   }
    54 
    5524  void _Per_CPU_Change_state(
    5625    Per_CPU_Control *per_cpu,
  • cpukit/score/src/smp.c

    ra171e0a8 r282bfd3  
    2929  #include <rtems/bspIo.h>
    3030#endif
     31
     32void _SMP_Handler_initialize( void )
     33{
     34  uint32_t max_cpus = rtems_configuration_get_maximum_processors();
     35  uint32_t cpu;
     36
     37  /*
     38   * Discover and initialize the secondary cores in an SMP system.
     39   */
     40  max_cpus = _CPU_SMP_Initialize( max_cpus );
     41
     42  _SMP_Processor_count = max_cpus;
     43
     44  for ( cpu = 1 ; cpu < max_cpus; ++cpu ) {
     45    const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu );
     46
     47    _Per_CPU_Wait_for_state(
     48      per_cpu,
     49      PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING
     50    );
     51  }
     52}
    3153
    3254void _SMP_Start_multitasking_on_secondary_processor( void )
Note: See TracChangeset for help on using the changeset viewer.