summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/ftrace.h
diff options
context:
space:
mode:
authorMartin Schwidefsky2011-05-10 10:10:41 +0200
committerSteven Rostedt2011-05-16 20:55:57 +0200
commit521ccb5c4aece609311bfa7157910a8f0c942af5 (patch)
tree5312027b1397133c6a63bbc915f0d80b86155798 /arch/x86/include/asm/ftrace.h
parentftrace/recordmcount: mcount address adjustment (diff)
downloadkernel-qcow2-linux-521ccb5c4aece609311bfa7157910a8f0c942af5.tar.gz
kernel-qcow2-linux-521ccb5c4aece609311bfa7157910a8f0c942af5.tar.xz
kernel-qcow2-linux-521ccb5c4aece609311bfa7157910a8f0c942af5.zip
ftrace/x86: mcount offset calculation
Do the mcount offset adjustment in the recordmcount.pl/recordmcount.[ch] at compile time and not in ftrace_call_adjust at run time. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'arch/x86/include/asm/ftrace.h')
-rw-r--r--arch/x86/include/asm/ftrace.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h
index db24c2278be0..268c783ab1c0 100644
--- a/arch/x86/include/asm/ftrace.h
+++ b/arch/x86/include/asm/ftrace.h
@@ -38,11 +38,10 @@ extern void mcount(void);
static inline unsigned long ftrace_call_adjust(unsigned long addr)
{
/*
- * call mcount is "e8 <4 byte offset>"
- * The addr points to the 4 byte offset and the caller of this
- * function wants the pointer to e8. Simply subtract one.
+ * addr is the address of the mcount call instruction.
+ * recordmcount does the necessary offset calculation.
*/
- return addr - 1;
+ return addr;
}
#ifdef CONFIG_DYNAMIC_FTRACE