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.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 366e5097a41a..99208728d48f 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -132,6 +132,25 @@ ftrace_call:
132 132
133#else 133#else
134 134
135ENTRY(__gnu_mcount_nc)
136 stmdb sp!, {r0-r3, lr}
137 ldr r0, =ftrace_trace_function
138 ldr r2, [r0]
139 adr r0, ftrace_stub
140 cmp r0, r2
141 bne gnu_trace
142 ldmia sp!, {r0-r3, ip, lr}
143 bx ip
144
145gnu_trace:
146 ldr r1, [sp, #20] @ lr of instrumented routine
147 mov r0, lr
148 sub r0, r0, #MCOUNT_INSN_SIZE
149 mov lr, pc
150 mov pc, r2
151 ldmia sp!, {r0-r3, ip, lr}
152 bx ip
153
135ENTRY(mcount) 154ENTRY(mcount)
136 stmdb sp!, {r0-r3, lr} 155 stmdb sp!, {r0-r3, lr}
137 ldr r0, =ftrace_trace_function 156 ldr r0, =ftrace_trace_function