aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/ftrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/ftrace.c')
-rw-r--r--arch/mips/kernel/ftrace.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
index 7f3dfdbc3657..b122cbb4aad1 100644
--- a/arch/mips/kernel/ftrace.c
+++ b/arch/mips/kernel/ftrace.c
@@ -322,7 +322,6 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
322 unsigned long fp) 322 unsigned long fp)
323{ 323{
324 unsigned long old_parent_ra; 324 unsigned long old_parent_ra;
325 struct ftrace_graph_ent trace;
326 unsigned long return_hooker = (unsigned long) 325 unsigned long return_hooker = (unsigned long)
327 &return_to_handler; 326 &return_to_handler;
328 int faulted, insns; 327 int faulted, insns;
@@ -369,12 +368,6 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
369 if (unlikely(faulted)) 368 if (unlikely(faulted))
370 goto out; 369 goto out;
371 370
372 if (ftrace_push_return_trace(old_parent_ra, self_ra, &trace.depth, fp,
373 NULL) == -EBUSY) {
374 *parent_ra_addr = old_parent_ra;
375 return;
376 }
377
378 /* 371 /*
379 * Get the recorded ip of the current mcount calling site in the 372 * Get the recorded ip of the current mcount calling site in the
380 * __mcount_loc section, which will be used to filter the function 373 * __mcount_loc section, which will be used to filter the function
@@ -382,13 +375,10 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
382 */ 375 */
383 376
384 insns = core_kernel_text(self_ra) ? 2 : MCOUNT_OFFSET_INSNS + 1; 377 insns = core_kernel_text(self_ra) ? 2 : MCOUNT_OFFSET_INSNS + 1;
385 trace.func = self_ra - (MCOUNT_INSN_SIZE * insns); 378 self_ra -= (MCOUNT_INSN_SIZE * insns);
386 379
387 /* Only trace if the calling function expects to */ 380 if (function_graph_enter(old_parent_ra, self_ra, fp, NULL))
388 if (!ftrace_graph_entry(&trace)) {
389 current->curr_ret_stack--;
390 *parent_ra_addr = old_parent_ra; 381 *parent_ra_addr = old_parent_ra;
391 }
392 return; 382 return;
393out: 383out:
394 ftrace_graph_stop(); 384 ftrace_graph_stop();