diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-01-05 06:48:11 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-01-05 06:47:31 -0500 |
commit | 4cc9bed034d1ae588e5b773ee0edeb74ef3c0ff4 (patch) | |
tree | 80f2b7c92d9ef40ee93d82888f305c93c21ef5c8 /arch/s390/kernel/mcount.S | |
parent | 5e9a26928f550157563cfc06ce12c4ae121a02ec (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.S | 30 |
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 | ||
23 | ftrace_dyn_func: | ||
24 | .long ftrace_stub | ||
25 | .previous | ||
26 | |||
27 | .globl ftrace_caller | 21 | .globl ftrace_caller |
28 | ftrace_caller: | 22 | ftrace_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 | ||
33 | 0: .long ftrace_dyn_func | ||
34 | #else | ||
35 | 0: .long ftrace_trace_function | 26 | 0: .long ftrace_trace_function |
36 | #endif | ||
37 | 1: .long function_trace_stop | 27 | 1: .long function_trace_stop |
38 | 2: l %r2,1b-0b(%r1) | 28 | 2: 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 |
54 | ftrace_graph_caller: | 45 | ftrace_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 | 50 | 0: st %r2,100(%r15) |
60 | .long prepare_ftrace_return | ||
61 | 0: l %r2,152(%r15) | ||
62 | l %r4,0(%r1) | ||
63 | l %r3,100(%r15) | ||
64 | basr %r14,%r4 | ||
65 | st %r2,100(%r15) | ||
66 | 1: | ||
67 | #endif | 51 | #endif |
68 | ahi %r15,96 | 52 | ahi %r15,96 |
69 | l %r14,56(%r15) | 53 | l %r14,56(%r15) |