Skip to content

Commit fcea452

Browse files
author
Russell King
committed
ARM: move PC value into r9
Move the saved PC value into r9, thereby moving it into a caller-saved register for functions that we may call during the entry to a syscall. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
1 parent da594e3 commit fcea452

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎arch/arm/kernel/entry-common.S‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@
2828
#include "entry-header.S"
2929

3030
saved_psr .req r8
31+
#if defined(CONFIG_TRACE_IRQFLAGS) || defined(CONFIG_CONTEXT_TRACKING)
32+
saved_pc .req r9
33+
#define TRACE(x...) x
34+
#else
3135
saved_pc .req lr
36+
#define TRACE(x...)
37+
#endif
3238

3339
.align 5
3440
#if !(IS_ENABLED(CONFIG_TRACE_IRQFLAGS) || IS_ENABLED(CONFIG_CONTEXT_TRACKING))
@@ -144,6 +150,7 @@ ENTRY(vector_swi)
144150
THUMB( mov r8, sp )
145151
THUMB( store_user_sp_lr r8, r10, S_SP ) @ calling sp, lr
146152
mrs saved_psr, spsr @ called from non-FIQ mode, so ok.
153+
TRACE( mov saved_pc, lr )
147154
str saved_pc, [sp, #S_PC] @ Save calling PC
148155
str saved_psr, [sp, #S_PSR] @ Save CPSR
149156
str r0, [sp, #S_OLD_R0] @ Save OLD_R0

0 commit comments

Comments
 (0)