Changeset ae3e6af8 in rtems


Ignore:
Timestamp:
Jun 20, 2017, 8:39:54 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
d30c2cc
Parents:
c6810c8
git-author:
Sebastian Huber <sebastian.huber@…> (06/20/17 08:39:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/20/17 08:41:39)
Message:

powerpc: Fix TLS support

Do not zero the GPR2 in the thread context via dcbz instructions. Bug
was introduced by 32b4a0c42704f0076da8e2d5411290f55d1b2965.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/powerpc/rtems/score/cpu.h

    rc6810c8 rae3e6af8  
    223223  PPC_GPR_TYPE gpr30;
    224224  PPC_GPR_TYPE gpr31;
    225   uint32_t gpr2;
    226225  uint32_t isr_dispatch_disable;
     226  uint32_t reserved_for_alignment;
    227227  #if defined(PPC_MULTILIB_ALTIVEC)
    228228    uint8_t v20[16];
     
    271271    double f31;
    272272  #endif
     273  /*
     274   * The following items are at the structure end, so that we can use dcbz for
     275   * the previous items to optimize the context switch.  We must not set the
     276   * following items to zero via the dcbz.
     277   */
     278  uint32_t gpr2;
    273279  #if defined(RTEMS_SMP)
    274     /*
    275      * This item is at the structure end, so that we can use dcbz for the
    276      * previous items to optimize the context switch.  We must not set this
    277      * item to zero via the dcbz.
    278      */
    279280    volatile uint32_t is_executing;
    280281  #endif
     
    348349#define PPC_CONTEXT_OFFSET_GPR30 PPC_CONTEXT_GPR_OFFSET( 30 )
    349350#define PPC_CONTEXT_OFFSET_GPR31 PPC_CONTEXT_GPR_OFFSET( 31 )
    350 #define PPC_CONTEXT_OFFSET_GPR2 PPC_CONTEXT_GPR_OFFSET( 32 )
    351 #define PPC_CONTEXT_OFFSET_ISR_DISPATCH_DISABLE \
    352   ( PPC_CONTEXT_GPR_OFFSET( 32 ) + 4 )
     351#define PPC_CONTEXT_OFFSET_ISR_DISPATCH_DISABLE PPC_CONTEXT_GPR_OFFSET( 32 )
    353352
    354353#ifdef PPC_MULTILIB_ALTIVEC
     
    404403#endif
    405404
     405#define PPC_CONTEXT_OFFSET_GPR2 PPC_CONTEXT_VOLATILE_SIZE
     406
    406407#ifdef RTEMS_SMP
    407   #define PPC_CONTEXT_OFFSET_IS_EXECUTING PPC_CONTEXT_VOLATILE_SIZE
     408  #define PPC_CONTEXT_OFFSET_IS_EXECUTING (PPC_CONTEXT_VOLATILE_SIZE + 4)
    408409#endif
    409410
Note: See TracChangeset for help on using the changeset viewer.