From 5b37cd7346357346d10a32cc52a86a923288bf1d Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Wed, 23 May 2018 13:33:18 +0200 Subject: [PATCH] arch: arm: swap: Remove old context switch code Remove unused context switch code from the helper assembly file that manages the SuperVisor Call invocations (SVCs). This is no longer in use in the code, since all calls to __swap() now go through PendSV directly. Signed-off-by: Carles Cufi --- arch/arm/core/swap_helper.S | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) 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