diff --git a/arch/arm/core/swap_helper.S b/arch/arm/core/swap_helper.S index d4e95abc41b..f5804e69ae1 100644 --- a/arch/arm/core/swap_helper.S +++ b/arch/arm/core/swap_helper.S @@ -305,7 +305,7 @@ SECTION_FUNC(TEXT, __svc) /* * grab service call number: - * 0: context switch + * 0: Unused * 1: irq_offload (if configured) * 2: kernel panic or oops (software generated fatal exception) * 3: System call @@ -326,9 +326,7 @@ SECTION_FUNC(TEXT, __svc) tst r2, #0x1 bne _oops - cmp r1, #0 #endif - beq _context_switch cmp r1, #2 beq _oops @@ -342,24 +340,6 @@ SECTION_FUNC(TEXT, __svc) b _IntExit #endif -_context_switch: - - /* - * Unlock interrupts: - * - in a SVC call, so protected against context switches - * - allow PendSV, since it's running at prio 0xff - */ - eors.n r0, r0 - msr BASEPRI, r0 - - /* set PENDSV bit, pending the PendSV exception */ - ldr r1, =_SCS_ICSR - ldr r2, =_SCS_ICSR_PENDSV - str r2, [r1, #0] - - /* handler mode exit, to PendSV */ - bx lr - _oops: push {lr} blx _do_kernel_oops