aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/kernel/entry-armv.S13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 29dec080a604..12ecc817be3f 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -112,8 +112,8 @@ common_invalid:
112#define SPFIX(code...) 112#define SPFIX(code...)
113#endif 113#endif
114 114
115 .macro svc_entry 115 .macro svc_entry, stack_hole=0
116 sub sp, sp, #S_FRAME_SIZE 116 sub sp, sp, #(S_FRAME_SIZE + \stack_hole)
117 SPFIX( tst sp, #4 ) 117 SPFIX( tst sp, #4 )
118 SPFIX( bicne sp, sp, #4 ) 118 SPFIX( bicne sp, sp, #4 )
119 stmib sp, {r1 - r12} 119 stmib sp, {r1 - r12}
@@ -121,7 +121,7 @@ common_invalid:
121 ldmia r0, {r1 - r3} 121 ldmia r0, {r1 - r3}
122 add r5, sp, #S_SP @ here for interlock avoidance 122 add r5, sp, #S_SP @ here for interlock avoidance
123 mov r4, #-1 @ "" "" "" "" 123 mov r4, #-1 @ "" "" "" ""
124 add r0, sp, #S_FRAME_SIZE @ "" "" "" "" 124 add r0, sp, #(S_FRAME_SIZE + \stack_hole)
125 SPFIX( addne r0, r0, #4 ) 125 SPFIX( addne r0, r0, #4 )
126 str r1, [sp] @ save the "real" r0 copied 126 str r1, [sp] @ save the "real" r0 copied
127 @ from the exception stack 127 @ from the exception stack
@@ -242,7 +242,14 @@ svc_preempt:
242 242
243 .align 5 243 .align 5
244__und_svc: 244__und_svc:
245#ifdef CONFIG_KPROBES
246 @ If a kprobe is about to simulate a "stmdb sp..." instruction,
247 @ it obviously needs free stack space which then will belong to
248 @ the saved context.
249 svc_entry 64
250#else
245 svc_entry 251 svc_entry
252#endif
246 253
247 @ 254 @
248 @ call emulation code, which returns using r9 if it has emulated 255 @ call emulation code, which returns using r9 if it has emulated