Changeset a400d06f in rtems


Ignore:
Timestamp:
Jul 18, 2017, 1:11:41 PM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
600d88d
Parents:
b2e1bded
git-author:
Sebastian Huber <sebastian.huber@…> (07/18/17 13:11:41)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/25/17 09:41:11)
Message:

sparc: Rename SPARC_USE_SAFE_FP_SUPPORT

Rename SPARC_USE_SAFE_FP_SUPPORT in SPARC_USE_SYNCHRONOUS_FP_SWITCH.
Update comment.

Update #3077.

Files:
4 edited

Legend:

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

    rb2e1bded ra400d06f  
    2626#include <bspopts.h>
    2727
    28 #if SPARC_HAS_FPU == 1 && defined(SPARC_USE_SAFE_FP_SUPPORT)
     28#if defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    2929  #define FP_FRAME_OFFSET_FO_F1 (SPARC_MINIMUM_STACK_FRAME_SIZE + 0)
    3030  #define FP_FRAME_OFFSET_F2_F3 (FP_FRAME_OFFSET_FO_F1 + 8)
     
    653653        mov      0, %o1                 ! ISR level for _Thread_Do_dispatch()
    654654
    655 #if SPARC_HAS_FPU == 1 && defined(SPARC_USE_SAFE_FP_SUPPORT)
     655#if defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    656656        /* Test if we interrupted a floating point thread (PSR[EF] == 1) */
    657657        andcc   %l0, %l5, %g0
     
    732732         mov    %g6, %o0
    733733
    734 #if SPARC_HAS_FPU == 1 && defined(SPARC_USE_SAFE_FP_SUPPORT)
     734#if defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    735735thread_dispatch_done:
    736736#endif
  • cpukit/score/cpu/sparc/cpu.c

    rb2e1bded ra400d06f  
    111111);
    112112
    113 #if (SPARC_HAS_FPU == 1) && !defined(SPARC_USE_SAFE_FP_SUPPORT)
     113#if (SPARC_HAS_FPU == 1) && !defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    114114Context_Control_fp _CPU_Null_fp_context;
    115115#endif
     
    130130void _CPU_Initialize(void)
    131131{
    132 #if (SPARC_HAS_FPU == 1) && !defined(SPARC_USE_SAFE_FP_SUPPORT)
     132#if (SPARC_HAS_FPU == 1) && !defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    133133  Context_Control_fp *pointer;
    134134  uint32_t            psr;
  • cpukit/score/cpu/sparc/cpu_asm.S

    rb2e1bded ra400d06f  
    2727#include <rtems/system.h>
    2828
    29 #if (SPARC_HAS_FPU == 1) && !defined(SPARC_USE_SAFE_FP_SUPPORT)
     29#if (SPARC_HAS_FPU == 1) && !defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    3030
    3131/*
  • cpukit/score/cpu/sparc/rtems/score/cpu.h

    rb2e1bded ra400d06f  
    2929/* conditional compilation parameters */
    3030
    31 #if defined(RTEMS_SMP)
    32   /*
    33    * The SPARC ABI is a bit special with respect to the floating point context.
    34    * The complete floating point context is volatile.  Thus from an ABI point
    35    * of view nothing needs to be saved and restored during a context switch.
    36    * Instead the floating point context must be saved and restored during
    37    * interrupt processing.  Historically the deferred floating point switch is
    38    * used for SPARC and the complete floating point context is saved and
    39    * restored during a context switch to the new floating point unit owner.
    40    * This is a bit dangerous since post-switch actions (e.g. signal handlers)
    41    * and context switch extensions may silently corrupt the floating point
    42    * context.  The floating point unit is disabled for interrupt handlers.
    43    * Thus in case an interrupt handler uses the floating point unit then this
    44    * will result in a trap.
    45    *
    46    * On SMP configurations the deferred floating point switch is not
    47    * supported in principle.  So use here a safe floating point support.  Safe
    48    * means that the volatile floating point context is saved and restored
    49    * around a thread dispatch issued during interrupt processing.  Thus
    50    * post-switch actions and context switch extensions may safely use the
    51    * floating point unit.
    52    */
    53   #define SPARC_USE_SAFE_FP_SUPPORT
     31/*
     32 * The SPARC ABI is a bit special with respect to the floating point context.
     33 * The complete floating point context is volatile.  Thus from an ABI point
     34 * of view nothing needs to be saved and restored during a context switch.
     35 * Instead the floating point context must be saved and restored during
     36 * interrupt processing.  Historically, the deferred floating point switch is
     37 * used for SPARC and the complete floating point context is saved and
     38 * restored during a context switch to the new floating point unit owner.
     39 * This is a bit dangerous since post-switch actions (e.g. signal handlers)
     40 * and context switch extensions may silently corrupt the floating point
     41 * context.  The floating point unit is disabled for interrupt handlers.
     42 * Thus in case an interrupt handler uses the floating point unit then this
     43 * will result in a trap.
     44 *
     45 * In SMP configurations, the deferred floating point switch is not supported
     46 * in principle.  So, use here a synchronous floating point switching.
     47 * Synchronous means that the volatile floating point context is saved and
     48 * restored around a thread dispatch issued during interrupt processing.  Thus
     49 * post-switch actions and context switch extensions may safely use the
     50 * floating point unit.
     51 */
     52#if SPARC_HAS_FPU == 1
     53  #if defined(RTEMS_SMP)
     54    #define SPARC_USE_SYNCHRONOUS_FP_SWITCH
     55  #endif
    5456#endif
    5557
     
    118120 * This is set based upon the multilib settings.
    119121 */
    120 #if ( SPARC_HAS_FPU == 1 ) && !defined(SPARC_USE_SAFE_FP_SUPPORT)
     122#if ( SPARC_HAS_FPU == 1 ) && !defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    121123  #define CPU_HARDWARE_FP     TRUE
    122124#else
     
    168170 * it is safe to defer floating point context switches.
    169171 */
    170 #if defined(SPARC_USE_SAFE_FP_SUPPORT)
     172#if defined(SPARC_USE_SYNCHRONOUS_FP_SWITCH)
    171173  #define CPU_USE_DEFERRED_FP_SWITCH FALSE
    172174#else
Note: See TracChangeset for help on using the changeset viewer.