Changeset 646e7b0d in rtems


Ignore:
Timestamp:
Jun 29, 2010, 12:39:44 AM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
56cdd5e8
Parents:
61b1c413
Message:

2010-06-28 Joel Sherrill <joel.sherrill@…>

PR 1573/cpukit

  • shared/score/interrupt.S: Add a per cpu data structure which contains the information required by RTEMS for each CPU core. This encapsulates information such as thread executing, heir, idle and dispatch needed.
Location:
c/src/lib/libcpu/sparc64
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/sparc64/ChangeLog

    r61b1c413 r646e7b0d  
     12010-06-28      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        PR 1573/cpukit
     4        * shared/score/interrupt.S: Add a per cpu data structure which contains
     5        the information required by RTEMS for each CPU core. This
     6        encapsulates information such as thread executing, heir, idle and
     7        dispatch needed.
     8
    192010-06-17      Joel Sherrill <joel.sherrill@oarcorp.com>
    210
  • c/src/lib/libcpu/sparc64/shared/score/interrupt.S

    r61b1c413 r646e7b0d  
    2727
    2828#include <rtems/asm.h>
     29#include <rtems/score/percpu.h>
    2930
    3031
     
    179180  setx  SYM(_Thread_Dispatch_disable_level), %o5, %g3
    180181  lduw  [%g3], %g5
    181   setx  SYM(_ISR_Nest_level), %o5, %g6
     182  setx  ISR_NEST_LEVEL, %o5, %g6
    182183  lduw  [%g6], %g4
    183184
     
    346347    nop
    347348
    348     setx    SYM(_Context_Switch_necessary), %o5, %g7
     349    setx    DISPATCH_NEEDED, %o5, %g7
    349350
    350351
     
    359360    bnz      SYM(_ISR_Dispatch) ! yes, then invoke the dispatcher
    360361    nop
    361 
    362     /*
    363      *  Finally, check to see if signals were sent to the currently
    364      *  executing task.  If so, we need to invoke the interrupt dispatcher.
    365      */
    366     setx    SYM(_ISR_Signals_to_thread_executing), %o5, %g5
    367     ldub    [%g5], %o5
    368 
    369     orcc    %o5, %g0, %g0   ! Were signals sent to the currently
    370     !   executing thread?
    371     bz      simple_return   ! yes, then invoke the dispatcher
    372     ! use the delay slot to clear the signals
    373     !   to the currently executing task flag
    374     stb     %g0, [%g5]
    375 
    376362
    377363    /*
     
    409395   */
    410396
    411   setx     SYM(_Context_Switch_necessary), %o5, %o1
     397  setx     DISPATCH_NEEDED, %o5, %o1
    412398  ldub     [%o1], %o2
    413399
    414   ! NOTE: Use some of delay slot to start loading this
    415   setx     SYM(_ISR_Signals_to_thread_executing), %o5, %o1
    416   ldub     [%o1], %o3
    417 
    418400  orcc     %o2, %g0, %g0   ! Is thread switch necessary?
    419   bnz      dispatchAgain   ! yes, then invoke the dispatcher AGAIN
    420   ! NOTE: Use the delay slot to catch the orcc below
    421 
    422   /*
    423    *  Finally, check to see if signals were sent to the currently
    424    *  executing task.  If so, we need to invoke the interrupt dispatcher.
    425    */
    426 
    427   ! NOTE: Delay slots above were used to perform the load AND
    428   !       this orcc falls into the delay slot for bnz above
    429   orcc     %o3, %g0, %g0   ! Were signals sent to the currently
    430   !   executing thread?
    431401  bz       allow_nest_again ! No, then clear out and return
    432402  nop
    433403
    434404  ! Yes, then invoke the dispatcher
    435   dispatchAgain:
     405dispatchAgain:
    436406  mov      3, %g4        ! syscall (enable interrupts)
    437407  ta       0             ! syscall (enable interrupts)
Note: See TracChangeset for help on using the changeset viewer.