diff options
Diffstat (limited to 'cpukit/score/cpu')
-rw-r--r-- | cpukit/score/cpu/arm/cpu_asm.S | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpukit/score/cpu/arm/cpu_asm.S b/cpukit/score/cpu/arm/cpu_asm.S index cf94822eaf..1ad3a51b14 100644 --- a/cpukit/score/cpu/arm/cpu_asm.S +++ b/cpukit/score/cpu/arm/cpu_asm.S @@ -69,8 +69,14 @@ DEFINE_FUNCTION_ARM(_CPU_Context_switch) #endif #ifdef RTEMS_SMP - /* The executing context no longer executes on this processor */ + /* + * The executing thread no longer executes on this processor. Switch + * the stack to the temporary interrupt stack of this processor. Mark + * the context of the executing thread as not executing. + */ dmb + GET_SELF_CPU_CONTROL r2 + add sp, r2, #(PER_CPU_INTERRUPT_FRAME_AREA + CPU_INTERRUPT_FRAME_SIZE) mov r3, #0 strb r3, [r0, #ARM_CONTEXT_CONTROL_IS_EXECUTING_OFFSET] @@ -128,8 +134,6 @@ DEFINE_FUNCTION_ARM(_CPU_Context_restore) #ifdef RTEMS_SMP .L_get_potential_new_heir: - GET_SELF_CPU_CONTROL r2 - /* We may have a new heir */ /* Read the executing and heir */ |