aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/mcount.S
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-01-05 06:48:11 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-01-05 06:47:31 -0500
commit4cc9bed034d1ae588e5b773ee0edeb74ef3c0ff4 (patch)
tree80f2b7c92d9ef40ee93d82888f305c93c21ef5c8 /arch/s390/kernel/mcount.S
parent5e9a26928f550157563cfc06ce12c4ae121a02ec (diff)
[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 4a6e1a575f9e..1e6a55795628 100644
--- a/arch/s390/kernel/mcount.S
+++ b/arch/s390/kernel/mcount.S
@@ -18,22 +18,12 @@ _mcount:
18#ifdef CONFIG_DYNAMIC_FTRACE 18#ifdef CONFIG_DYNAMIC_FTRACE
19 br %r14 19 br %r14
20 20
21 .data
22 .globl ftrace_dyn_func
23ftrace_dyn_func:
24 .long ftrace_stub
25 .previous
26
27 .globl ftrace_caller 21 .globl ftrace_caller
28ftrace_caller: 22ftrace_caller:
29#endif 23#endif
30 stm %r2,%r5,16(%r15) 24 stm %r2,%r5,16(%r15)
31 bras %r1,2f 25 bras %r1,2f
32#ifdef CONFIG_DYNAMIC_FTRACE
330: .long ftrace_dyn_func
34#else
350: .long ftrace_trace_function 260: .long ftrace_trace_function
36#endif
371: .long function_trace_stop 271: .long function_trace_stop
382: l %r2,1b-0b(%r1) 282: l %r2,1b-0b(%r1)
39 icm %r2,0xf,0(%r2) 29 icm %r2,0xf,0(%r2)
@@ -49,21 +39,15 @@ ftrace_caller:
49 l %r14,0(%r14) 39 l %r14,0(%r14)
50 basr %r14,%r14 40 basr %r14,%r14
51#ifdef CONFIG_FUNCTION_GRAPH_TRACER 41#ifdef CONFIG_FUNCTION_GRAPH_TRACER
52#ifdef CONFIG_DYNAMIC_FTRACE 42 l %r2,100(%r15)
43 l %r3,152(%r15)
53 .globl ftrace_graph_caller 44 .globl ftrace_graph_caller
54ftrace_graph_caller: 45ftrace_graph_caller:
55 # This unconditional branch gets runtime patched. Change only if 46# The bras instruction gets runtime patched to call prepare_ftrace_return.
56 # you know what you are doing. See ftrace_enable_graph_caller(). 47# See ftrace_enable_ftrace_graph_caller. The patched instruction is:
57 j 1f 48# bras %r14,prepare_ftrace_return
58#endif 49 bras %r14,0f
59 bras %r1,0f 500: st %r2,100(%r15)
60 .long prepare_ftrace_return
610: l %r2,152(%r15)
62 l %r4,0(%r1)
63 l %r3,100(%r15)
64 basr %r14,%r4
65 st %r2,100(%r15)
661:
67#endif 51#endif
68 ahi %r15,96 52 ahi %r15,96
69 l %r14,56(%r15) 53 l %r14,56(%r15)