bsps/powerpc: Unconditionally clear reservations

This commit is contained in:
Sebastian Huber
2013-12-03 09:55:52 +01:00
parent f339afb47f
commit 057c294afd

View File

@@ -267,10 +267,11 @@ PROC (_CPU_Context_switch):
mfmsr r5 mfmsr r5
mflr r6 mflr r6
mfcr r7 mfcr r7
#if defined(RTEMS_MULTIPROCESSING) || defined(RTEMS_SMP)
/* /*
* We have to clear the reservation of the executing thread. See also * 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 \ #if PPC_CONTEXT_OFFSET_GPR1 != PPC_CONTEXT_CACHE_LINE_0 \
|| !BSP_DATA_CACHE_ENABLED \ || !BSP_DATA_CACHE_ENABLED \
@@ -278,7 +279,7 @@ PROC (_CPU_Context_switch):
li r10, PPC_CONTEXT_OFFSET_GPR1 li r10, PPC_CONTEXT_OFFSET_GPR1
#endif #endif
stwcx. r1, r3, r10 stwcx. r1, r3, r10
#endif
stw r1, PPC_CONTEXT_OFFSET_GPR1(r3) stw r1, PPC_CONTEXT_OFFSET_GPR1(r3)
stw r5, PPC_CONTEXT_OFFSET_MSR(r3) stw r5, PPC_CONTEXT_OFFSET_MSR(r3)
stw r6, PPC_CONTEXT_OFFSET_LR(r3) stw r6, PPC_CONTEXT_OFFSET_LR(r3)