diff --git a/libcpu/aarch64/common/context_gcc.S b/libcpu/aarch64/common/context_gcc.S index 36bb2adcac99a9403000463e7ed2afb028819cf2..1c0b5711dfb20c533952eeba05a08657756470e7 100644 --- a/libcpu/aarch64/common/context_gcc.S +++ b/libcpu/aarch64/common/context_gcc.S @@ -144,9 +144,10 @@ rt_hw_get_gtimer_frq: /* Set the SP to point to the stack of the task being restored. */ MOV SP, X0 +#ifdef RT_USING_LWP bl lwp_check_debug - BL lwp_check_exit +#endif LDP X2, X3, [SP], #0x10 /* SPSR and ELR. */ @@ -186,6 +187,7 @@ rt_hw_get_gtimer_frq: MOV SP, X0 #ifdef RT_USING_LWP + bl lwp_check_debug bl lwp_check_exit #endif diff --git a/libcpu/arm/cortex-a/context_gcc.S b/libcpu/arm/cortex-a/context_gcc.S index a64790b584d23a1837a0e9593f755b3d29798fda..9549129c0d4c969c56db4e62a774dc15992b6f34 100644 --- a/libcpu/arm/cortex-a/context_gcc.S +++ b/libcpu/arm/cortex-a/context_gcc.S @@ -246,9 +246,8 @@ rt_hw_context_switch_exit: ldmfd sp!, {r1} msr spsr_cxsf, r1 /* original mode */ - bl lwp_check_debug - #ifdef RT_USING_LWP + bl lwp_check_debug bl lwp_check_exit #endif diff --git a/libcpu/arm/cortex-a/start_gcc.S b/libcpu/arm/cortex-a/start_gcc.S index c20f2fa13d909915d264bce928464034ca1bc80d..28dd4be3a9ea21cf74629006871bcd8fa313ce5c 100644 --- a/libcpu/arm/cortex-a/start_gcc.S +++ b/libcpu/arm/cortex-a/start_gcc.S @@ -505,9 +505,8 @@ rt_hw_context_switch_interrupt_do: ldmfd sp!, {r4} /* pop new task's cpsr to spsr */ msr spsr_cxsf, r4 - bl lwp_check_debug - #ifdef RT_USING_LWP + bl lwp_check_debug bl lwp_check_exit #endif