aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-05-27 18:51:27 +0530
committerVineet Gupta <vgupta@synopsys.com>2013-06-22 19:23:25 +0530
commitba3558c772ce1ac64d07f46b8c763349a0e51ba3 (patch)
treee89141966f881bc363b5952b6f216ebbd69b4501 /arch/arc
parentARC: Entry Handler tweaks: Simplify branch for in-kernel preemption (diff)
downloadlinux-dev-ba3558c772ce1ac64d07f46b8c763349a0e51ba3.tar.xz
linux-dev-ba3558c772ce1ac64d07f46b8c763349a0e51ba3.zip
ARC: K/U SP saved from one location in stack switching macro
This paves way for further simplifications. There's an overhead of 1 insn for the non-common case of interrupt taken from kernel mode. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/include/asm/entry.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arc/include/asm/entry.h b/arch/arc/include/asm/entry.h
index 5191945f3d39..2cf6aa08cfca 100644
--- a/arch/arc/include/asm/entry.h
+++ b/arch/arc/include/asm/entry.h
@@ -290,9 +290,8 @@
* safe-keeping not really needed, but it keeps the epilogue code
* (SP restore) simpler/uniform.
*/
- b.d 77f
-
- st.a sp, [sp, -12] ; Make room for orig_r0 and orig_r8
+ b.d 66f
+ mov r9, sp
88: /*------Intr/Ecxp happened in user mode, "switch" stack ------ */
@@ -311,6 +310,7 @@
/* With current tsk in r9, get it's kernel mode stack base */
GET_TSK_STACK_BASE r9, r9
+66:
/* Save Pre Intr/Exception User SP on kernel stack */
st.a sp, [r9, -12] ; Make room for orig_r0 and orig_r8
@@ -323,7 +323,7 @@
/* set SP to point to kernel mode stack */
mov sp, r9
-77: /* ----- Stack Switched to kernel Mode, Now save REG FILE ----- */
+ /* ----- Stack Switched to kernel Mode, Now save REG FILE ----- */
.endm