aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r--arch/arm/kernel/entry-common.S6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 06269ea375c5..159d0416f270 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -111,6 +111,7 @@ ENTRY(mcount)
111 .globl mcount_call 111 .globl mcount_call
112mcount_call: 112mcount_call:
113 bl ftrace_stub 113 bl ftrace_stub
114 ldr lr, [fp, #-4] @ restore lr
114 ldmia sp!, {r0-r3, pc} 115 ldmia sp!, {r0-r3, pc}
115 116
116ENTRY(ftrace_caller) 117ENTRY(ftrace_caller)
@@ -122,6 +123,7 @@ ENTRY(ftrace_caller)
122 .globl ftrace_call 123 .globl ftrace_call
123ftrace_call: 124ftrace_call:
124 bl ftrace_stub 125 bl ftrace_stub
126 ldr lr, [fp, #-4] @ restore lr
125 ldmia sp!, {r0-r3, pc} 127 ldmia sp!, {r0-r3, pc}
126 128
127#else 129#else
@@ -133,14 +135,16 @@ ENTRY(mcount)
133 adr r0, ftrace_stub 135 adr r0, ftrace_stub
134 cmp r0, r2 136 cmp r0, r2
135 bne trace 137 bne trace
138 ldr lr, [fp, #-4] @ restore lr
136 ldmia sp!, {r0-r3, pc} 139 ldmia sp!, {r0-r3, pc}
137 140
138trace: 141trace:
139 ldr r1, [fp, #-4] 142 ldr r1, [fp, #-4] @ lr of instrumented routine
140 mov r0, lr 143 mov r0, lr
141 sub r0, r0, #MCOUNT_INSN_SIZE 144 sub r0, r0, #MCOUNT_INSN_SIZE
142 mov lr, pc 145 mov lr, pc
143 mov pc, r2 146 mov pc, r2
147 mov lr, r1 @ restore lr
144 ldmia sp!, {r0-r3, pc} 148 ldmia sp!, {r0-r3, pc}
145 149
146#endif /* CONFIG_DYNAMIC_FTRACE */ 150#endif /* CONFIG_DYNAMIC_FTRACE */