From bdbf347c228ea12b9cc6fee57147e6cd228ab8f7 Mon Sep 17 00:00:00 2001 From: Richard Barry Date: Tue, 28 Jun 2016 10:39:25 +0000 Subject: [PATCH] Remove clrex instruction from Cortex-M ports again as it is implicit in interrupt entry. --- FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm | 3 --- FreeRTOS/Source/portable/GCC/ARM_CM3/port.c | 1 - FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c | 1 - FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c | 1 - FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c | 1 - FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c | 1 - FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s | 1 - FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s | 3 --- FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s | 3 --- FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c | 2 -- FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c | 1 - FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c | 3 --- FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c | 1 - FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c | 3 --- 14 files changed, 25 deletions(-) diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm index aa42559800..a392583b07 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 0888579f87..960717a573 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 986b988240..d176bcc356 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 2cb58683e7..952c60b8bd 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 a6b4c5a84e..babea315fb 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 51d1c1a661..86fb9cc6bb 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 756602121d..cf7a6a3a1b 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 a6e07773db..758d6fa971 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 e90dfb2612..2ab809a0e3 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 8bd991d3ca..bb69933481 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 8ce6d098d2..e15b91a16c 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 aaf9efd21e..6902f97894 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 0623859e84..3cd9240565 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 9f0dc3330e..133f61ea8c 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