aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-22 07:35:20 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:50 -0500
commitaebfef03249819886a7f9c981940cbd48d82ea47 (patch)
tree95f436dac29ef51e20d61e2a66ffafdfc6ef1cc7 /arch
parent6388d14eb2dd3af655cee28ca2a1c56881e63e56 (diff)
Blackfin: implement ftrace mcount test
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/Kconfig1
-rw-r--r--arch/blackfin/kernel/ftrace-entry.S11
2 files changed, 11 insertions, 1 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index f46db59eac8a..3123aa49ff79 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -25,6 +25,7 @@ config BLACKFIN
25 def_bool y 25 def_bool y
26 select HAVE_FUNCTION_GRAPH_TRACER 26 select HAVE_FUNCTION_GRAPH_TRACER
27 select HAVE_FUNCTION_TRACER 27 select HAVE_FUNCTION_TRACER
28 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
28 select HAVE_IDE 29 select HAVE_IDE
29 select HAVE_KERNEL_GZIP if RAMKERNEL 30 select HAVE_KERNEL_GZIP if RAMKERNEL
30 select HAVE_KERNEL_BZIP2 if RAMKERNEL 31 select HAVE_KERNEL_BZIP2 if RAMKERNEL
diff --git a/arch/blackfin/kernel/ftrace-entry.S b/arch/blackfin/kernel/ftrace-entry.S
index 76dd4fbcd17a..db3a51b0af21 100644
--- a/arch/blackfin/kernel/ftrace-entry.S
+++ b/arch/blackfin/kernel/ftrace-entry.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * mcount and friends -- ftrace stuff 2 * mcount and friends -- ftrace stuff
3 * 3 *
4 * Copyright (C) 2009 Analog Devices Inc. 4 * Copyright (C) 2009-2010 Analog Devices Inc.
5 * Licensed under the GPL-2 or later. 5 * Licensed under the GPL-2 or later.
6 */ 6 */
7 7
@@ -21,6 +21,15 @@
21 * function will be waiting there. mmmm pie. 21 * function will be waiting there. mmmm pie.
22 */ 22 */
23ENTRY(__mcount) 23ENTRY(__mcount)
24#ifdef CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST
25 /* optional micro optimization: return if stopped */
26 p1.l = _function_trace_stop;
27 p1.h = _function_trace_stop;
28 r3 = [p1];
29 cc = r3 == 0;
30 if ! cc jump _ftrace_stub (bp);
31#endif
32
24 /* save third function arg early so we can do testing below */ 33 /* save third function arg early so we can do testing below */
25 [--sp] = r2; 34 [--sp] = r2;
26 35