Skip to content

Commit

Permalink
s390/unwind: drop unnecessary code around calling ftrace_graph_ret_ad…
Browse files Browse the repository at this point in the history
…dr()

The current code around calling ftrace_graph_ret_addr() is ifdeffed and
also tests if ftrace redirection is present on stack.
ftrace_graph_ret_addr() however performs the test internally and there
is a version for !CONFIG_FUNCTION_GRAPH_TRACER as well. The unnecessary
code can thus be dropped.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Miroslav Benes <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
  • Loading branch information
mirab authored and Vasily Gorbik committed Nov 5, 2019
1 parent effb83c commit c2f2093
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions arch/s390/kernel/unwind_bc.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,7 @@ bool unwind_next_frame(struct unwind_state *state)
}
}

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
/* Decode any ftrace redirection */
if (ip == (unsigned long) return_to_handler)
ip = ftrace_graph_ret_addr(state->task, &state->graph_idx,
ip, (void *) sp);
#endif
ip = ftrace_graph_ret_addr(state->task, &state->graph_idx, ip, (void *) sp);

/* Update unwind state */
state->sp = sp;
Expand Down Expand Up @@ -140,12 +135,7 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
reliable = false;
}

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
/* Decode any ftrace redirection */
if (ip == (unsigned long) return_to_handler)
ip = ftrace_graph_ret_addr(state->task, &state->graph_idx,
ip, NULL);
#endif
ip = ftrace_graph_ret_addr(state->task, &state->graph_idx, ip, NULL);

/* Update unwind state */
state->sp = sp;
Expand Down

0 comments on commit c2f2093

Please sign in to comment.