Skip to content

Commit 36dff49

Browse files
author
Vasily Gorbik
committed
s390/ftrace: Avoid extra serialization for graph caller patching
The only context where ftrace_enable_ftrace_graph_caller() or ftrace_disable_ftrace_graph_caller() is called also calls ftrace_arch_code_modify_post_process(), which already performs text_poke_sync_lock(). ftrace_run_update_code() arch_ftrace_update_code() ftrace_modify_all_code() ftrace_enable_ftrace_graph_caller()/ftrace_disable_ftrace_graph_caller() ftrace_arch_code_modify_post_process() text_poke_sync_lock() Remove the redundant serialization. Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 5200614 commit 36dff49

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

arch/s390/kernel/ftrace.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -290,26 +290,14 @@ NOKPROBE_SYMBOL(prepare_ftrace_return);
290290
*/
291291
int ftrace_enable_ftrace_graph_caller(void)
292292
{
293-
int rc;
294-
295293
/* Expect brc 0xf,... */
296-
rc = ftrace_patch_branch_mask(ftrace_graph_caller, 0xa7f4, false);
297-
if (rc)
298-
return rc;
299-
text_poke_sync_lock();
300-
return 0;
294+
return ftrace_patch_branch_mask(ftrace_graph_caller, 0xa7f4, false);
301295
}
302296

303297
int ftrace_disable_ftrace_graph_caller(void)
304298
{
305-
int rc;
306-
307299
/* Expect brc 0x0,... */
308-
rc = ftrace_patch_branch_mask(ftrace_graph_caller, 0xa704, true);
309-
if (rc)
310-
return rc;
311-
text_poke_sync_lock();
312-
return 0;
300+
return ftrace_patch_branch_mask(ftrace_graph_caller, 0xa704, true);
313301
}
314302

315303
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */

0 commit comments

Comments
 (0)