Changeset 558cc8d in rtems


Ignore:
Timestamp:
Feb 5, 2014, 2:41:00 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
920a43e
Parents:
1c1c2a0
git-author:
Sebastian Huber <sebastian.huber@…> (02/05/14 14:41:00)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/05/14 14:46:30)
Message:

score: _CPU_Context_switch_to_first_task_smp()

Delete _CPU_Context_switch_to_first_task_smp() and use
_CPU_Context_restore() instead.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/shared/irq_asm.S

    r1c1c2a0 r558cc8d  
    240240        ba      SYM(_CPU_Context_restore_heir)
    241241        mov     %i0, %o1                      ! in the delay slot
    242         .align 4
    243 
    244 #if defined(RTEMS_SMP)
    245 /*
    246  *  void _CPU_Context_switch_to_first_task_smp(
    247  *    Context_Control *new_context
    248  *  )
    249  *
    250  *  This routine is only used to switch to the first task on a
    251  *  secondary core in an SMP configuration.  We do not need to
    252  *  flush any windows and, in fact, this can be dangerous
    253  *  as they may or may not be initialized properly.  So we just
    254  *  reinitialize the PSR and WIM.
    255  */
    256         PUBLIC(_CPU_Context_switch_to_first_task_smp)
    257 SYM(_CPU_Context_switch_to_first_task_smp):
    258         mov     %psr, %g1               ! Turn of traps when modifying WIM
    259         andn    %g1, SPARC_PSR_ET_MASK, %g1
    260         mov     %g1, %psr
    261         /* WIM and PSR will be set in done_flushing, it need args:
    262          * g1=PSR, g3=CWP, o1=Context
    263          */
    264         and     %g1, SPARC_NUMBER_OF_REGISTER_WINDOWS - 1, %g3
    265         nop
    266         mov     %o0, %o1                ! in the delay slot
    267         GET_SELF_CPU_CONTROL %o3, %o4
    268         ba,a    done_flushing
    269 #endif
    270242
    271243/*
  • cpukit/score/cpu/arm/rtems/score/cpu.h

    r1c1c2a0 r558cc8d  
    471471
    472472#ifdef RTEMS_SMP
    473   #define _CPU_Context_switch_to_first_task_smp( _context ) \
    474     _CPU_Context_restore( _context )
    475 
    476473  RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
    477474    _CPU_SMP_Get_current_processor( void )
  • cpukit/score/cpu/i386/rtems/score/cpu.h

    r1c1c2a0 r558cc8d  
    463463
    464464#if defined(RTEMS_SMP)
    465   #define _CPU_Context_switch_to_first_task_smp( _the_context ) \
    466      _CPU_Context_restore( (_the_context) );
    467 
    468465  RTEMS_COMPILER_PURE_ATTRIBUTE uint32_t _CPU_SMP_Get_current_processor( void );
    469466
  • cpukit/score/cpu/powerpc/rtems/score/cpu.h

    r1c1c2a0 r558cc8d  
    10111011
    10121012#ifdef RTEMS_SMP
    1013   #define _CPU_Context_switch_to_first_task_smp( _context ) \
    1014     _CPU_Context_restore( _context )
    1015 
    10161013  RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
    10171014    _CPU_SMP_Get_current_processor( void )
  • cpukit/score/cpu/sparc/rtems/score/cpu.h

    r1c1c2a0 r558cc8d  
    11901190
    11911191#if defined(RTEMS_SMP)
    1192   /**
    1193    * @brief SPARC specific method to switch to first task.
    1194    *
    1195    * This routine is only used to switch to the first task on a
    1196    * secondary core in an SMP configuration.  We do not need to
    1197    * flush all the windows and, in fact, this can be dangerous
    1198    * as they may or may not be initialized properly.
    1199    *
    1200    * @param[in] new_context is the context to restore
    1201    */
    1202   void _CPU_Context_switch_to_first_task_smp(
    1203     Context_Control *new_context
    1204   );
    1205 
    12061192  RTEMS_COMPILER_PURE_ATTRIBUTE uint32_t _CPU_SMP_Get_current_processor( void );
    12071193
  • cpukit/score/include/rtems/score/context.h

    r1c1c2a0 r558cc8d  
    107107   _CPU_Context_Restart_self( _the_context )
    108108
    109 #if defined(RTEMS_SMP)
    110 /*
    111  *  @brief Switch to first task on secondary core.
    112  *
    113  *  This routine is only used to switch to the first task on a
    114  *  secondary core in an SMP configuration.  Since the switch
    115  *  to the first task is done from an interrupt handler, this
    116  *  may be different from simply restarting the currently running
    117  *  task.
    118  *
    119  *  @param[in] _the_context is the context of the first thread to
    120  *             run on this core
    121  */
    122 #define _Context_Switch_to_first_task_smp( _the_context ) \
    123    _CPU_Context_switch_to_first_task_smp( _the_context )
    124 #endif
    125 
    126109/**
    127110 *  @brief Return starting address of floating point context.
  • cpukit/score/src/threadstartmultitasking.c

    r1c1c2a0 r558cc8d  
    7979    self_cpu->thread_dispatch_disable_level = 1;
    8080
    81     _CPU_Context_switch_to_first_task_smp( &heir->Registers );
     81    _CPU_Context_restore( &heir->Registers );
    8282  }
    8383#endif
Note: See TracChangeset for help on using the changeset viewer.