diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-05-27 09:21:27 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-06-22 09:53:25 -0400 |
commit | ba3558c772ce1ac64d07f46b8c763349a0e51ba3 (patch) | |
tree | e89141966f881bc363b5952b6f216ebbd69b4501 /arch/arc/include | |
parent | 147aece29b15051173eb1e767018135361cdba89 (diff) |
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/include')
-rw-r--r-- | arch/arc/include/asm/entry.h | 8 |
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 @@ | |||
290 | * safe-keeping not really needed, but it keeps the epilogue code | 290 | * safe-keeping not really needed, but it keeps the epilogue code |
291 | * (SP restore) simpler/uniform. | 291 | * (SP restore) simpler/uniform. |
292 | */ | 292 | */ |
293 | b.d 77f | 293 | b.d 66f |
294 | 294 | mov r9, sp | |
295 | st.a sp, [sp, -12] ; Make room for orig_r0 and orig_r8 | ||
296 | 295 | ||
297 | 88: /*------Intr/Ecxp happened in user mode, "switch" stack ------ */ | 296 | 88: /*------Intr/Ecxp happened in user mode, "switch" stack ------ */ |
298 | 297 | ||
@@ -311,6 +310,7 @@ | |||
311 | /* With current tsk in r9, get it's kernel mode stack base */ | 310 | /* With current tsk in r9, get it's kernel mode stack base */ |
312 | GET_TSK_STACK_BASE r9, r9 | 311 | GET_TSK_STACK_BASE r9, r9 |
313 | 312 | ||
313 | 66: | ||
314 | /* Save Pre Intr/Exception User SP on kernel stack */ | 314 | /* Save Pre Intr/Exception User SP on kernel stack */ |
315 | st.a sp, [r9, -12] ; Make room for orig_r0 and orig_r8 | 315 | st.a sp, [r9, -12] ; Make room for orig_r0 and orig_r8 |
316 | 316 | ||
@@ -323,7 +323,7 @@ | |||
323 | /* set SP to point to kernel mode stack */ | 323 | /* set SP to point to kernel mode stack */ |
324 | mov sp, r9 | 324 | mov sp, r9 |
325 | 325 | ||
326 | 77: /* ----- Stack Switched to kernel Mode, Now save REG FILE ----- */ | 326 | /* ----- Stack Switched to kernel Mode, Now save REG FILE ----- */ |
327 | 327 | ||
328 | .endm | 328 | .endm |
329 | 329 | ||