Title: [8222] trunk/arch/blackfin/kernel: Blackfin: support new ftrace frame pointer semantics
Revision
8222
Author
vapier
Date
2010-01-22 08:00:46 -0500 (Fri, 22 Jan 2010)

Log Message

Blackfin: support new ftrace frame pointer semantics

Modified Paths


Diff

Modified: trunk/arch/blackfin/kernel/ftrace-entry.S (8221 => 8222)


--- trunk/arch/blackfin/kernel/ftrace-entry.S	2010-01-22 12:56:58 UTC (rev 8221)
+++ trunk/arch/blackfin/kernel/ftrace-entry.S	2010-01-22 13:00:46 UTC (rev 8222)
@@ -115,9 +115,10 @@
 	[--sp] = r1;
 	[--sp] = rets;
 
-	/* prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) */
-	r0 = sp;
-	r1 = rets;
+	/* prepare_ftrace_return(parent, self_addr, frame_pointer) */
+	r0 = sp;	/* unsigned long *parent */
+	r1 = rets;	/* unsigned long self_addr */
+	r2 = fp;	/* unsigned long frame_pointer */
 	r0 += 16;	/* skip the 4 local regs on stack */
 	r1 += -MCOUNT_INSN_SIZE;
 	call _prepare_ftrace_return;
@@ -136,6 +137,9 @@
 	[--sp] = r1;
 
 	/* get original return address */
+#ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST
+	r0 = fp;	/* Blackfin is sane, so omit this */
+#endif
 	call _ftrace_return_to_handler;
 	rets = r0;
 

Modified: trunk/arch/blackfin/kernel/ftrace.c (8221 => 8222)


--- trunk/arch/blackfin/kernel/ftrace.c	2010-01-22 12:56:58 UTC (rev 8221)
+++ trunk/arch/blackfin/kernel/ftrace.c	2010-01-22 13:00:46 UTC (rev 8222)
@@ -16,7 +16,8 @@
  * Hook the return address and push it in the stack of return addrs
  * in current thread info.
  */
-void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
+void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
+                           unsigned long frame_pointer)
 {
 	struct ftrace_graph_ent trace;
 	unsigned long return_hooker = (unsigned long)&return_to_handler;
@@ -24,7 +25,8 @@
 	if (unlikely(atomic_read(&current->tracing_graph_pause)))
 		return;
 
-	if (ftrace_push_return_trace(*parent, self_addr, &trace.depth, 0) == -EBUSY)
+	if (ftrace_push_return_trace(*parent, self_addr, &trace.depth,
+	                             frame_pointer) == -EBUSY)
 		return;
 
 	trace.func = self_addr;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to