summaryrefslogtreecommitdiff
path: root/arch/metag/include/asm/ftrace.h
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2012-10-05 16:27:31 +0100
committerJames Hogan <james.hogan@imgtec.com>2013-03-02 20:09:55 +0000
commit00512bdd4573674d10af1c1d60328b4b0f9dcafd (patch)
tree31f0db0a3ea2887bc6b6bb17dd1e09c508d2f803 /arch/metag/include/asm/ftrace.h
parent903b20ad6810e05bc5f7cc038257e80463e71001 (diff)
metag: ftrace support
Add ftrace support for metag. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'arch/metag/include/asm/ftrace.h')
-rw-r--r--arch/metag/include/asm/ftrace.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/metag/include/asm/ftrace.h b/arch/metag/include/asm/ftrace.h
new file mode 100644
index 000000000000..2901f0f7d944
--- /dev/null
+++ b/arch/metag/include/asm/ftrace.h
@@ -0,0 +1,23 @@
+#ifndef _ASM_METAG_FTRACE
+#define _ASM_METAG_FTRACE
+
+#ifdef CONFIG_FUNCTION_TRACER
+#define MCOUNT_INSN_SIZE 8 /* sizeof mcount call */
+
+#ifndef __ASSEMBLY__
+extern void mcount_wrapper(void);
+#define MCOUNT_ADDR ((long)(mcount_wrapper))
+
+static inline unsigned long ftrace_call_adjust(unsigned long addr)
+{
+ return addr;
+}
+
+struct dyn_arch_ftrace {
+ /* No extra data needed on metag */
+};
+#endif /* __ASSEMBLY__ */
+
+#endif /* CONFIG_FUNCTION_TRACER */
+
+#endif /* _ASM_METAG_FTRACE */