aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-22 07:59:32 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:50 -0500
commitb73faf74493fd1bc75a8938aa5d296facf50a650 (patch)
tree69edd54da1d535661ac5a14ee3aa27e5e4ca2337 /arch/blackfin/kernel
parentaebfef03249819886a7f9c981940cbd48d82ea47 (diff)
Blackfin: support new ftrace frame pointer semantics
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/ftrace-entry.S12
-rw-r--r--arch/blackfin/kernel/ftrace.c6
2 files changed, 13 insertions, 5 deletions
diff --git a/arch/blackfin/kernel/ftrace-entry.S b/arch/blackfin/kernel/ftrace-entry.S
index db3a51b0af21..d66446b572c0 100644
--- a/arch/blackfin/kernel/ftrace-entry.S
+++ b/arch/blackfin/kernel/ftrace-entry.S
@@ -115,9 +115,12 @@ ENTRY(_ftrace_graph_caller)
115 [--sp] = r1; 115 [--sp] = r1;
116 [--sp] = rets; 116 [--sp] = rets;
117 117
118 /* prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) */ 118 /* prepare_ftrace_return(parent, self_addr, frame_pointer) */
119 r0 = sp; 119 r0 = sp; /* unsigned long *parent */
120 r1 = rets; 120 r1 = rets; /* unsigned long self_addr */
121#ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST
122 r2 = fp; /* unsigned long frame_pointer */
123#endif
121 r0 += 16; /* skip the 4 local regs on stack */ 124 r0 += 16; /* skip the 4 local regs on stack */
122 r1 += -MCOUNT_INSN_SIZE; 125 r1 += -MCOUNT_INSN_SIZE;
123 call _prepare_ftrace_return; 126 call _prepare_ftrace_return;
@@ -136,6 +139,9 @@ ENTRY(_return_to_handler)
136 [--sp] = r1; 139 [--sp] = r1;
137 140
138 /* get original return address */ 141 /* get original return address */
142#ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST
143 r0 = fp; /* Blackfin is sane, so omit this */
144#endif
139 call _ftrace_return_to_handler; 145 call _ftrace_return_to_handler;
140 rets = r0; 146 rets = r0;
141 147
diff --git a/arch/blackfin/kernel/ftrace.c b/arch/blackfin/kernel/ftrace.c
index f2c85ac6f2da..a61d948ea925 100644
--- a/arch/blackfin/kernel/ftrace.c
+++ b/arch/blackfin/kernel/ftrace.c
@@ -16,7 +16,8 @@
16 * Hook the return address and push it in the stack of return addrs 16 * Hook the return address and push it in the stack of return addrs
17 * in current thread info. 17 * in current thread info.
18 */ 18 */
19void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) 19void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
20 unsigned long frame_pointer)
20{ 21{
21 struct ftrace_graph_ent trace; 22 struct ftrace_graph_ent trace;
22 unsigned long return_hooker = (unsigned long)&return_to_handler; 23 unsigned long return_hooker = (unsigned long)&return_to_handler;
@@ -24,7 +25,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
24 if (unlikely(atomic_read(&current->tracing_graph_pause))) 25 if (unlikely(atomic_read(&current->tracing_graph_pause)))
25 return; 26 return;
26 27
27 if (ftrace_push_return_trace(*parent, self_addr, &trace.depth, 0) == -EBUSY) 28 if (ftrace_push_return_trace(*parent, self_addr, &trace.depth,
29 frame_pointer) == -EBUSY)
28 return; 30 return;
29 31
30 trace.func = self_addr; 32 trace.func = self_addr;