aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/ftrace-entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/ftrace-entry.S')
-rw-r--r--arch/blackfin/kernel/ftrace-entry.S23
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/blackfin/kernel/ftrace-entry.S b/arch/blackfin/kernel/ftrace-entry.S
index 6980b7a0615d..76dd4fbcd17a 100644
--- a/arch/blackfin/kernel/ftrace-entry.S
+++ b/arch/blackfin/kernel/ftrace-entry.S
@@ -17,8 +17,8 @@
17 * only one we can blow away. With pointer registers, we have P0-P2. 17 * only one we can blow away. With pointer registers, we have P0-P2.
18 * 18 *
19 * Upon entry, the RETS will point to the top of the current profiled 19 * Upon entry, the RETS will point to the top of the current profiled
20 * function. And since GCC setup the frame for us, the previous function 20 * function. And since GCC pushed the previous RETS for us, the previous
21 * will be waiting there. mmmm pie. 21 * function will be waiting there. mmmm pie.
22 */ 22 */
23ENTRY(__mcount) 23ENTRY(__mcount)
24 /* save third function arg early so we can do testing below */ 24 /* save third function arg early so we can do testing below */
@@ -70,14 +70,14 @@ ENTRY(__mcount)
70 /* setup the tracer function */ 70 /* setup the tracer function */
71 p0 = r3; 71 p0 = r3;
72 72
73 /* tracer(ulong frompc, ulong selfpc): 73 /* function_trace_call(unsigned long ip, unsigned long parent_ip):
74 * frompc: the pc that did the call to ... 74 * ip: this point was called by ...
75 * selfpc: ... this location 75 * parent_ip: ... this function
76 * the selfpc itself will need adjusting for the mcount call 76 * the ip itself will need adjusting for the mcount call
77 */ 77 */
78 r1 = rets; 78 r0 = rets;
79 r0 = [fp + 4]; 79 r1 = [sp + 16]; /* skip the 4 local regs on stack */
80 r1 += -MCOUNT_INSN_SIZE; 80 r0 += -MCOUNT_INSN_SIZE;
81 81
82 /* call the tracer */ 82 /* call the tracer */
83 call (p0); 83 call (p0);
@@ -106,9 +106,10 @@ ENTRY(_ftrace_graph_caller)
106 [--sp] = r1; 106 [--sp] = r1;
107 [--sp] = rets; 107 [--sp] = rets;
108 108
109 r0 = fp; 109 /* prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) */
110 r0 = sp;
110 r1 = rets; 111 r1 = rets;
111 r0 += 4; 112 r0 += 16; /* skip the 4 local regs on stack */
112 r1 += -MCOUNT_INSN_SIZE; 113 r1 += -MCOUNT_INSN_SIZE;
113 call _prepare_ftrace_return; 114 call _prepare_ftrace_return;
114 115