Skip to content

Commit e2d591d

Browse files
brooniectmarinas
authored andcommitted
arm64: entry-ftrace.S: Convert to modern annotations for assembly functions
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC and also add a new annotation for static functions which previously had no ENTRY equivalent. Update the annotations in the core kernel code to the new macros. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent e7bf697 commit e2d591d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

arch/arm64/kernel/entry-ftrace.S

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ ENTRY(ftrace_common)
9191
ldr_l x2, function_trace_op // op
9292
mov x3, sp // regs
9393

94-
GLOBAL(ftrace_call)
94+
SYM_INNER_LABEL(ftrace_call, SYM_L_GLOBAL)
9595
bl ftrace_stub
9696

9797
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
98-
GLOBAL(ftrace_graph_call) // ftrace_graph_caller();
98+
SYM_INNER_LABEL(ftrace_graph_call, SYM_L_GLOBAL) // ftrace_graph_caller();
9999
nop // If enabled, this will be replaced
100100
// "b ftrace_graph_caller"
101101
#endif
@@ -218,7 +218,7 @@ ENDPROC(ftrace_graph_caller)
218218
* - tracer function to probe instrumented function's entry,
219219
* - ftrace_graph_caller to set up an exit hook
220220
*/
221-
ENTRY(_mcount)
221+
SYM_FUNC_START(_mcount)
222222
mcount_enter
223223

224224
ldr_l x2, ftrace_trace_function
@@ -242,7 +242,7 @@ skip_ftrace_call: // }
242242
b.ne ftrace_graph_caller // ftrace_graph_caller();
243243
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
244244
mcount_exit
245-
ENDPROC(_mcount)
245+
SYM_FUNC_END(_mcount)
246246
EXPORT_SYMBOL(_mcount)
247247
NOKPROBE(_mcount)
248248

@@ -253,9 +253,9 @@ NOKPROBE(_mcount)
253253
* and later on, NOP to branch to ftrace_caller() when enabled or branch to
254254
* NOP when disabled per-function base.
255255
*/
256-
ENTRY(_mcount)
256+
SYM_FUNC_START(_mcount)
257257
ret
258-
ENDPROC(_mcount)
258+
SYM_FUNC_END(_mcount)
259259
EXPORT_SYMBOL(_mcount)
260260
NOKPROBE(_mcount)
261261

@@ -268,24 +268,24 @@ NOKPROBE(_mcount)
268268
* - tracer function to probe instrumented function's entry,
269269
* - ftrace_graph_caller to set up an exit hook
270270
*/
271-
ENTRY(ftrace_caller)
271+
SYM_FUNC_START(ftrace_caller)
272272
mcount_enter
273273

274274
mcount_get_pc0 x0 // function's pc
275275
mcount_get_lr x1 // function's lr
276276

277-
GLOBAL(ftrace_call) // tracer(pc, lr);
277+
SYM_INNER_LABEL(ftrace_call, SYM_L_GLOBAL) // tracer(pc, lr);
278278
nop // This will be replaced with "bl xxx"
279279
// where xxx can be any kind of tracer.
280280

281281
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
282-
GLOBAL(ftrace_graph_call) // ftrace_graph_caller();
282+
SYM_INNER_LABEL(ftrace_graph_call) // ftrace_graph_caller();
283283
nop // If enabled, this will be replaced
284284
// "b ftrace_graph_caller"
285285
#endif
286286

287287
mcount_exit
288-
ENDPROC(ftrace_caller)
288+
SYM_FUNC_END(ftrace_caller)
289289
#endif /* CONFIG_DYNAMIC_FTRACE */
290290

291291
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
@@ -298,20 +298,20 @@ ENDPROC(ftrace_caller)
298298
* the call stack in order to intercept instrumented function's return path
299299
* and run return_to_handler() later on its exit.
300300
*/
301-
ENTRY(ftrace_graph_caller)
301+
SYM_FUNC_START(ftrace_graph_caller)
302302
mcount_get_pc x0 // function's pc
303303
mcount_get_lr_addr x1 // pointer to function's saved lr
304304
mcount_get_parent_fp x2 // parent's fp
305305
bl prepare_ftrace_return // prepare_ftrace_return(pc, &lr, fp)
306306

307307
mcount_exit
308-
ENDPROC(ftrace_graph_caller)
308+
SYM_FUNC_END(ftrace_graph_caller)
309309
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
310310
#endif /* CONFIG_DYNAMIC_FTRACE_WITH_REGS */
311311

312-
ENTRY(ftrace_stub)
312+
SYM_FUNC_START(ftrace_stub)
313313
ret
314-
ENDPROC(ftrace_stub)
314+
SYM_FUNC_END(ftrace_stub)
315315

316316
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
317317
/*

0 commit comments

Comments
 (0)