entry-common.S (d3b9dc9dd2b994f396741f7086ffe7a48bacb165) entry-common.S (376cfa8730c08c0394d0aa1d4a80fd8c9971f323)
1/*
2 * linux/arch/arm/kernel/entry-common.S
3 *
4 * Copyright (C) 2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 134 unchanged lines hidden (view full) ---

143
144.macro __mcount suffix
145 mcount_enter
146 ldr r0, =ftrace_trace_function
147 ldr r2, [r0]
148 adr r0, .Lftrace_stub
149 cmp r0, r2
150 bne 1f
1/*
2 * linux/arch/arm/kernel/entry-common.S
3 *
4 * Copyright (C) 2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 134 unchanged lines hidden (view full) ---

143
144.macro __mcount suffix
145 mcount_enter
146 ldr r0, =ftrace_trace_function
147 ldr r2, [r0]
148 adr r0, .Lftrace_stub
149 cmp r0, r2
150 bne 1f
151
152#ifdef CONFIG_FUNCTION_GRAPH_TRACER
153 ldr r1, =ftrace_graph_return
154 ldr r2, [r1]
155 cmp r0, r2
156 bne ftrace_graph_caller\suffix
157
158 ldr r1, =ftrace_graph_entry
159 ldr r2, [r1]
160 ldr r0, =ftrace_graph_entry_stub
161 cmp r0, r2
162 bne ftrace_graph_caller\suffix
163#endif
164
151 mcount_exit
152
1531: mcount_get_lr r1 @ lr of instrumented func
154 mov r0, lr @ instrumented function
155 sub r0, r0, #MCOUNT_INSN_SIZE
156 adr lr, BSYM(2f)
157 mov pc, r2
1582: mcount_exit

--- 8 unchanged lines hidden (view full) ---

167
168 .globl ftrace_call\suffix
169ftrace_call\suffix:
170 bl ftrace_stub
171
172 mcount_exit
173.endm
174
165 mcount_exit
166
1671: mcount_get_lr r1 @ lr of instrumented func
168 mov r0, lr @ instrumented function
169 sub r0, r0, #MCOUNT_INSN_SIZE
170 adr lr, BSYM(2f)
171 mov pc, r2
1722: mcount_exit

--- 8 unchanged lines hidden (view full) ---

181
182 .globl ftrace_call\suffix
183ftrace_call\suffix:
184 bl ftrace_stub
185
186 mcount_exit
187.endm
188
189.macro __ftrace_graph_caller
190 sub r0, fp, #4 @ &lr of instrumented routine (&parent)
191 mov r1, lr @ instrumented routine (func)
192 sub r1, r1, #MCOUNT_INSN_SIZE
193 mov r2, fp @ frame pointer
194 bl prepare_ftrace_return
195 mcount_exit
196.endm
197
175#ifdef CONFIG_OLD_MCOUNT
176/*
177 * mcount
178 */
179
180.macro mcount_enter
181 stmdb sp!, {r0-r3, lr}
182.endm

--- 18 unchanged lines hidden (view full) ---

201ENDPROC(mcount)
202
203#ifdef CONFIG_DYNAMIC_FTRACE
204ENTRY(ftrace_caller_old)
205 __ftrace_caller _old
206ENDPROC(ftrace_caller_old)
207#endif
208
198#ifdef CONFIG_OLD_MCOUNT
199/*
200 * mcount
201 */
202
203.macro mcount_enter
204 stmdb sp!, {r0-r3, lr}
205.endm

--- 18 unchanged lines hidden (view full) ---

224ENDPROC(mcount)
225
226#ifdef CONFIG_DYNAMIC_FTRACE
227ENTRY(ftrace_caller_old)
228 __ftrace_caller _old
229ENDPROC(ftrace_caller_old)
230#endif
231
232#ifdef CONFIG_FUNCTION_GRAPH_TRACER
233ENTRY(ftrace_graph_caller_old)
234 __ftrace_graph_caller
235ENDPROC(ftrace_graph_caller_old)
236#endif
237
209.purgem mcount_enter
210.purgem mcount_get_lr
211.purgem mcount_exit
212#endif
213
214/*
215 * __gnu_mcount_nc
216 */

--- 22 unchanged lines hidden (view full) ---

239ENDPROC(__gnu_mcount_nc)
240
241#ifdef CONFIG_DYNAMIC_FTRACE
242ENTRY(ftrace_caller)
243 __ftrace_caller
244ENDPROC(ftrace_caller)
245#endif
246
238.purgem mcount_enter
239.purgem mcount_get_lr
240.purgem mcount_exit
241#endif
242
243/*
244 * __gnu_mcount_nc
245 */

--- 22 unchanged lines hidden (view full) ---

268ENDPROC(__gnu_mcount_nc)
269
270#ifdef CONFIG_DYNAMIC_FTRACE
271ENTRY(ftrace_caller)
272 __ftrace_caller
273ENDPROC(ftrace_caller)
274#endif
275
276#ifdef CONFIG_FUNCTION_GRAPH_TRACER
277ENTRY(ftrace_graph_caller)
278 __ftrace_graph_caller
279ENDPROC(ftrace_graph_caller)
280#endif
281
247.purgem mcount_enter
248.purgem mcount_get_lr
249.purgem mcount_exit
250
282.purgem mcount_enter
283.purgem mcount_get_lr
284.purgem mcount_exit
285
286#ifdef CONFIG_FUNCTION_GRAPH_TRACER
287 .globl return_to_handler
288return_to_handler:
289 stmdb sp!, {r0-r3}
290 mov r0, fp @ frame pointer
291 bl ftrace_return_to_handler
292 mov lr, r0 @ r0 has real ret addr
293 ldmia sp!, {r0-r3}
294 mov pc, lr
295#endif
296
251ENTRY(ftrace_stub)
252.Lftrace_stub:
253 mov pc, lr
254ENDPROC(ftrace_stub)
255
256#endif /* CONFIG_FUNCTION_TRACER */
257
258/*=============================================================================

--- 323 unchanged lines hidden ---
297ENTRY(ftrace_stub)
298.Lftrace_stub:
299 mov pc, lr
300ENDPROC(ftrace_stub)
301
302#endif /* CONFIG_FUNCTION_TRACER */
303
304/*=============================================================================

--- 323 unchanged lines hidden ---