aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/kernel/entry-armv.S19
-rw-r--r--arch/arm/kernel/entry-common.S4
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 85040cfeb5e5..d662a2f1fd85 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -20,6 +20,7 @@
20#include <asm/vfpmacros.h> 20#include <asm/vfpmacros.h>
21#include <mach/entry-macro.S> 21#include <mach/entry-macro.S>
22#include <asm/thread_notify.h> 22#include <asm/thread_notify.h>
23#include <asm/unwind.h>
23 24
24#include "entry-header.S" 25#include "entry-header.S"
25 26
@@ -123,6 +124,8 @@ ENDPROC(__und_invalid)
123#endif 124#endif
124 125
125 .macro svc_entry, stack_hole=0 126 .macro svc_entry, stack_hole=0
127 UNWIND(.fnstart )
128 UNWIND(.save {r0 - pc} )
126 sub sp, sp, #(S_FRAME_SIZE + \stack_hole) 129 sub sp, sp, #(S_FRAME_SIZE + \stack_hole)
127 SPFIX( tst sp, #4 ) 130 SPFIX( tst sp, #4 )
128 SPFIX( bicne sp, sp, #4 ) 131 SPFIX( bicne sp, sp, #4 )
@@ -196,6 +199,7 @@ __dabt_svc:
196 ldr r0, [sp, #S_PSR] 199 ldr r0, [sp, #S_PSR]
197 msr spsr_cxsf, r0 200 msr spsr_cxsf, r0
198 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr 201 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
202 UNWIND(.fnend )
199ENDPROC(__dabt_svc) 203ENDPROC(__dabt_svc)
200 204
201 .align 5 205 .align 5
@@ -228,6 +232,7 @@ __irq_svc:
228 bleq trace_hardirqs_on 232 bleq trace_hardirqs_on
229#endif 233#endif
230 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr 234 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
235 UNWIND(.fnend )
231ENDPROC(__irq_svc) 236ENDPROC(__irq_svc)
232 237
233 .ltorg 238 .ltorg
@@ -278,6 +283,7 @@ __und_svc:
278 ldr lr, [sp, #S_PSR] @ Get SVC cpsr 283 ldr lr, [sp, #S_PSR] @ Get SVC cpsr
279 msr spsr_cxsf, lr 284 msr spsr_cxsf, lr
280 ldmia sp, {r0 - pc}^ @ Restore SVC registers 285 ldmia sp, {r0 - pc}^ @ Restore SVC registers
286 UNWIND(.fnend )
281ENDPROC(__und_svc) 287ENDPROC(__und_svc)
282 288
283 .align 5 289 .align 5
@@ -320,6 +326,7 @@ __pabt_svc:
320 ldr r0, [sp, #S_PSR] 326 ldr r0, [sp, #S_PSR]
321 msr spsr_cxsf, r0 327 msr spsr_cxsf, r0
322 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr 328 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
329 UNWIND(.fnend )
323ENDPROC(__pabt_svc) 330ENDPROC(__pabt_svc)
324 331
325 .align 5 332 .align 5
@@ -343,6 +350,8 @@ ENDPROC(__pabt_svc)
343#endif 350#endif
344 351
345 .macro usr_entry 352 .macro usr_entry
353 UNWIND(.fnstart )
354 UNWIND(.cantunwind ) @ don't unwind the user space
346 sub sp, sp, #S_FRAME_SIZE 355 sub sp, sp, #S_FRAME_SIZE
347 stmib sp, {r1 - r12} 356 stmib sp, {r1 - r12}
348 357
@@ -420,6 +429,7 @@ __dabt_usr:
420 mov r2, sp 429 mov r2, sp
421 adr lr, ret_from_exception 430 adr lr, ret_from_exception
422 b do_DataAbort 431 b do_DataAbort
432 UNWIND(.fnend )
423ENDPROC(__dabt_usr) 433ENDPROC(__dabt_usr)
424 434
425 .align 5 435 .align 5
@@ -450,6 +460,7 @@ __irq_usr:
450 460
451 mov why, #0 461 mov why, #0
452 b ret_to_user 462 b ret_to_user
463 UNWIND(.fnend )
453ENDPROC(__irq_usr) 464ENDPROC(__irq_usr)
454 465
455 .ltorg 466 .ltorg
@@ -484,6 +495,7 @@ __und_usr:
484#else 495#else
485 b __und_usr_unknown 496 b __und_usr_unknown
486#endif 497#endif
498 UNWIND(.fnend )
487ENDPROC(__und_usr) 499ENDPROC(__und_usr)
488 500
489 @ 501 @
@@ -671,14 +683,18 @@ __pabt_usr:
671 enable_irq @ Enable interrupts 683 enable_irq @ Enable interrupts
672 mov r1, sp @ regs 684 mov r1, sp @ regs
673 bl do_PrefetchAbort @ call abort handler 685 bl do_PrefetchAbort @ call abort handler
686 UNWIND(.fnend )
674 /* fall through */ 687 /* fall through */
675/* 688/*
676 * This is the return code to user mode for abort handlers 689 * This is the return code to user mode for abort handlers
677 */ 690 */
678ENTRY(ret_from_exception) 691ENTRY(ret_from_exception)
692 UNWIND(.fnstart )
693 UNWIND(.cantunwind )
679 get_thread_info tsk 694 get_thread_info tsk
680 mov why, #0 695 mov why, #0
681 b ret_to_user 696 b ret_to_user
697 UNWIND(.fnend )
682ENDPROC(__pabt_usr) 698ENDPROC(__pabt_usr)
683ENDPROC(ret_from_exception) 699ENDPROC(ret_from_exception)
684 700
@@ -688,6 +704,8 @@ ENDPROC(ret_from_exception)
688 * previous and next are guaranteed not to be the same. 704 * previous and next are guaranteed not to be the same.
689 */ 705 */
690ENTRY(__switch_to) 706ENTRY(__switch_to)
707 UNWIND(.fnstart )
708 UNWIND(.cantunwind )
691 add ip, r1, #TI_CPU_SAVE 709 add ip, r1, #TI_CPU_SAVE
692 ldr r3, [r2, #TI_TP_VALUE] 710 ldr r3, [r2, #TI_TP_VALUE]
693 stmia ip!, {r4 - sl, fp, sp, lr} @ Store most regs on stack 711 stmia ip!, {r4 - sl, fp, sp, lr} @ Store most regs on stack
@@ -717,6 +735,7 @@ ENTRY(__switch_to)
717 bl atomic_notifier_call_chain 735 bl atomic_notifier_call_chain
718 mov r0, r5 736 mov r0, r5
719 ldmia r4, {r4 - sl, fp, sp, pc} @ Load all regs saved previously 737 ldmia r4, {r4 - sl, fp, sp, pc} @ Load all regs saved previously
738 UNWIND(.fnend )
720ENDPROC(__switch_to) 739ENDPROC(__switch_to)
721 740
722 __INIT 741 __INIT
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 49a6ba926c2b..b8c1f1411440 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -11,6 +11,7 @@
11#include <asm/unistd.h> 11#include <asm/unistd.h>
12#include <asm/ftrace.h> 12#include <asm/ftrace.h>
13#include <mach/entry-macro.S> 13#include <mach/entry-macro.S>
14#include <asm/unwind.h>
14 15
15#include "entry-header.S" 16#include "entry-header.S"
16 17
@@ -22,6 +23,8 @@
22 * stack. 23 * stack.
23 */ 24 */
24ret_fast_syscall: 25ret_fast_syscall:
26 UNWIND(.fnstart )
27 UNWIND(.cantunwind )
25 disable_irq @ disable interrupts 28 disable_irq @ disable interrupts
26 ldr r1, [tsk, #TI_FLAGS] 29 ldr r1, [tsk, #TI_FLAGS]
27 tst r1, #_TIF_WORK_MASK 30 tst r1, #_TIF_WORK_MASK
@@ -38,6 +41,7 @@ ret_fast_syscall:
38 mov r0, r0 41 mov r0, r0
39 add sp, sp, #S_FRAME_SIZE - S_PC 42 add sp, sp, #S_FRAME_SIZE - S_PC
40 movs pc, lr @ return & move spsr_svc into cpsr 43 movs pc, lr @ return & move spsr_svc into cpsr
44 UNWIND(.fnend )
41 45
42/* 46/*
43 * Ok, we need to do extra processing, enter the slow path. 47 * Ok, we need to do extra processing, enter the slow path.