From: rtel Date: Tue, 28 Jun 2016 10:39:25 +0000 (+0000) Subject: Remove clrex instruction from Cortex-M ports again as it is implicit in interrupt... X-Git-Tag: V10.0.0~53 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6df2d931c5793a118726a1751291eae2224a117c;p=freertos Remove clrex instruction from Cortex-M ports again as it is implicit in interrupt entry. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2466 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm index aa4255980..a392583b0 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm +++ b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm @@ -123,9 +123,6 @@ xPortPendSVHandler: .asmfunc ;/* Save the new top of stack into the first member of the TCB. */ str r0, [r2] - ;/* Ensure thread safety of atomic operations. */ - clrex - stmdb sp!, {r3} ldr r0, ulMaxSyscallInterruptPriorityConst ldr r1, [r0] diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c index 0888579f8..960717a57 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c @@ -410,7 +410,6 @@ void xPortPendSVHandler( void ) " \n" " stmdb r0!, {r4-r11} \n" /* Save the remaining registers. */ " str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */ - " clrex \n" /* Ensure thread safety of atomic operations. */ " \n" " stmdb sp!, {r3, r14} \n" " mov r0, %0 \n" diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c index 986b98824..d176bcc35 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c @@ -450,7 +450,6 @@ void xPortPendSVHandler( void ) " mrs r1, control \n" " stmdb r0!, {r1, r4-r11} \n" /* Save the remaining registers. */ " str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */ - " clrex \n" /* Ensure thread safety of atomic operations. */ " \n" " stmdb sp!, {r3, r14} \n" " mov r0, %0 \n" diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c index 2cb58683e..952c60b8b 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c @@ -450,7 +450,6 @@ void xPortPendSVHandler( void ) " \n" " stmdb r0!, {r4-r11, r14} \n" /* Save the core registers. */ " str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */ - " clrex \n" /* Ensure thread safety of atomic operations. */ " \n" " stmdb sp!, {r3} \n" " mov r0, %0 \n" diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c index a6b4c5a84..babea315f 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c @@ -477,7 +477,6 @@ void xPortPendSVHandler( void ) " mrs r1, control \n" " stmdb r0!, {r1, r4-r11, r14} \n" /* Save the remaining registers. */ " str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */ - " clrex \n" /* Ensure thread safety of atomic operations. */ " \n" " stmdb sp!, {r3} \n" " mov r0, %0 \n" diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c index 51d1c1a66..86fb9cc6b 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c @@ -438,7 +438,6 @@ void xPortPendSVHandler( void ) " \n" " stmdb r0!, {r4-r11, r14} \n" /* Save the core registers. */ " str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */ - " clrex \n" /* Ensure thread safety of atomic operations. */ " \n" " stmdb sp!, {r3} \n" " mov r0, %0 \n" diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s index 756602121..cf7a6a3a1 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s @@ -91,7 +91,6 @@ xPortPendSVHandler: stmdb r0!, {r4-r11} /* Save the remaining registers. */ str r0, [r2] /* Save the new top of stack into the first member of the TCB. */ - clrex /* Ensure thread safety of atomic operations. */ stmdb sp!, {r3, r14} mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s index a6e07773d..758d6fa97 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s @@ -101,9 +101,6 @@ xPortPendSVHandler: /* Save the new top of stack into the first member of the TCB. */ str r0, [r2] - /* Ensure thread safety of atomic operations. */ - clrex - stmdb sp!, {r3} mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY msr basepri, r0 diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s index e90dfb261..2ab809a0e 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s @@ -101,9 +101,6 @@ xPortPendSVHandler: /* Save the new top of stack into the first member of the TCB. */ str r0, [r2] - /* Ensure thread safety of atomic operations. */ - clrex - stmdb sp!, {r3} mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY cpsid i diff --git a/FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c b/FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c index 8bd991d3c..bb6993348 100644 --- a/FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c +++ b/FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c @@ -458,8 +458,6 @@ void xPortPendSVHandler( void ) iv IVT_INT_PendSV ics ICS_OFF str r0, [r2] /* Save the new top of stack into the first member of the TCB. */ - clrex /* Ensure thread safety of atomic operations. */ - stmdb sp!, (r3) ldr r0, =_ucMaxSyscallInterruptPriority ldr r1, [r0] diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c index 8ce6d098d..e15b91a16 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c @@ -407,7 +407,6 @@ __asm void xPortPendSVHandler( void ) stmdb r0!, {r4-r11} /* Save the remaining registers. */ str r0, [r2] /* Save the new top of stack into the first member of the TCB. */ - clrex /* Ensure thread safety of atomic operations. */ stmdb sp!, {r3, r14} mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c index aaf9efd21..6902f9789 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c @@ -479,9 +479,6 @@ __asm void xPortPendSVHandler( void ) /* Save the new top of stack into the first member of the TCB. */ str r0, [r2] - /* Ensure thread safety of atomic operations. */ - clrex - stmdb sp!, {r3} mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY msr basepri, r0 diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c index 0623859e8..3cd924056 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c @@ -492,7 +492,6 @@ __asm void xPortPendSVHandler( void ) mrs r1, control stmdb r0!, {r1, r4-r11, r14} /* Save the remaining registers. */ str r0, [r2] /* Save the new top of stack into the first member of the TCB. */ - clrex /* Ensure thread safety of atomic operations. */ stmdb sp!, {r3} mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c index 9f0dc3330..133f61ea8 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c @@ -463,9 +463,6 @@ __asm void xPortPendSVHandler( void ) /* Save the new top of stack into the first member of the TCB. */ str r0, [r2] - /* Ensure thread safety of atomic operations. */ - clrex - stmdb sp!, {r3} mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY cpsid i