summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/mcount.S
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-01-05 12:48:11 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-01-05 12:47:31 +0100
commit4cc9bed034d1ae588e5b773ee0edeb74ef3c0ff4 (patch)
tree80f2b7c92d9ef40ee93d82888f305c93c21ef5c8 /arch/s390/kernel/mcount.S
parent5e9a26928f550157563cfc06ce12c4ae121a02ec (diff)
downloadop-kernel-dev-4cc9bed034d1ae588e5b773ee0edeb74ef3c0ff4.zip
op-kernel-dev-4cc9bed034d1ae588e5b773ee0edeb74ef3c0ff4.tar.gz
[S390] cleanup ftrace backend functions
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/mcount.S')
-rw-r--r--arch/s390/kernel/mcount.S30
1 files changed, 7 insertions, 23 deletions
diff --git a/arch/s390/kernel/mcount.S b/arch/s390/kernel/mcount.S
index 4a6e1a5..1e6a557 100644
--- a/arch/s390/kernel/mcount.S
+++ b/arch/s390/kernel/mcount.S
@@ -18,22 +18,12 @@ _mcount:
#ifdef CONFIG_DYNAMIC_FTRACE
br %r14
- .data
- .globl ftrace_dyn_func
-ftrace_dyn_func:
- .long ftrace_stub
- .previous
-
.globl ftrace_caller
ftrace_caller:
#endif
stm %r2,%r5,16(%r15)
bras %r1,2f
-#ifdef CONFIG_DYNAMIC_FTRACE
-0: .long ftrace_dyn_func
-#else
0: .long ftrace_trace_function
-#endif
1: .long function_trace_stop
2: l %r2,1b-0b(%r1)
icm %r2,0xf,0(%r2)
@@ -49,21 +39,15 @@ ftrace_caller:
l %r14,0(%r14)
basr %r14,%r14
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
-#ifdef CONFIG_DYNAMIC_FTRACE
+ l %r2,100(%r15)
+ l %r3,152(%r15)
.globl ftrace_graph_caller
ftrace_graph_caller:
- # This unconditional branch gets runtime patched. Change only if
- # you know what you are doing. See ftrace_enable_graph_caller().
- j 1f
-#endif
- bras %r1,0f
- .long prepare_ftrace_return
-0: l %r2,152(%r15)
- l %r4,0(%r1)
- l %r3,100(%r15)
- basr %r14,%r4
- st %r2,100(%r15)
-1:
+# The bras instruction gets runtime patched to call prepare_ftrace_return.
+# See ftrace_enable_ftrace_graph_caller. The patched instruction is:
+# bras %r14,prepare_ftrace_return
+ bras %r14,0f
+0: st %r2,100(%r15)
#endif
ahi %r15,96
l %r14,56(%r15)
OpenPOWER on IntegriCloud