diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-03 09:55:52 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-03 12:58:47 +0100 |
commit | 057c294afdffc0c0f9a4a2d7b6b6cdecf7487f1e (patch) | |
tree | 1dadf3deec1a34321b10f2bf46e2e53032680c1a /c/src/lib/libcpu | |
parent | bsp/qoriq: Use System V small-data area (diff) | |
download | rtems-057c294afdffc0c0f9a4a2d7b6b6cdecf7487f1e.tar.bz2 |
bsps/powerpc: Unconditionally clear reservations
Diffstat (limited to 'c/src/lib/libcpu')
-rw-r--r-- | c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S b/c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S index c40803ac2a..73dbc87f42 100644 --- a/c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S +++ b/c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S @@ -267,18 +267,19 @@ PROC (_CPU_Context_switch): mfmsr r5 mflr r6 mfcr r7 -#if defined(RTEMS_MULTIPROCESSING) || defined(RTEMS_SMP) + /* * We have to clear the reservation of the executing thread. See also - * Book E section 6.1.6.2 "Atomic Update Primitives". + * Book E section 6.1.6.2 "Atomic Update Primitives". Recent GCC + * versions use atomic operations in the C++ library for example. */ - #if PPC_CONTEXT_OFFSET_GPR1 != PPC_CONTEXT_CACHE_LINE_0 \ - || !BSP_DATA_CACHE_ENABLED \ - || PPC_CACHE_ALIGNMENT != 32 +#if PPC_CONTEXT_OFFSET_GPR1 != PPC_CONTEXT_CACHE_LINE_0 \ + || !BSP_DATA_CACHE_ENABLED \ + || PPC_CACHE_ALIGNMENT != 32 li r10, PPC_CONTEXT_OFFSET_GPR1 - #endif - stwcx. r1, r3, r10 #endif + stwcx. r1, r3, r10 + stw r1, PPC_CONTEXT_OFFSET_GPR1(r3) stw r5, PPC_CONTEXT_OFFSET_MSR(r3) stw r6, PPC_CONTEXT_OFFSET_LR(r3) |