[ARM] pxa: update defconfig for Verdex Pro
[linux-2.6/verdex.git] / arch / s390 / kernel / mcount64.S
blobc37211c6092b5a7e9dfeac083898070f884ec070
1 /*
2  * Copyright IBM Corp. 2008,2009
3  *
4  *   Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
5  *
6  */
8 #include <asm/asm-offsets.h>
10         .globl ftrace_stub
11 ftrace_stub:
12         br      %r14
14         .globl _mcount
15 _mcount:
16 #ifdef CONFIG_DYNAMIC_FTRACE
17         br      %r14
19         .data
20         .globl  ftrace_dyn_func
21 ftrace_dyn_func:
22         .quad   ftrace_stub
23         .previous
25         .globl ftrace_caller
26 ftrace_caller:
27 #endif
28         larl    %r1,function_trace_stop
29         icm     %r1,0xf,0(%r1)
30         bnzr    %r14
31         stmg    %r2,%r5,32(%r15)
32         stg     %r14,112(%r15)
33         lgr     %r1,%r15
34         aghi    %r15,-160
35         stg     %r1,__SF_BACKCHAIN(%r15)
36         lgr     %r2,%r14
37         lg      %r3,168(%r15)
38 #ifdef CONFIG_DYNAMIC_FTRACE
39         larl    %r14,ftrace_dyn_func
40 #else
41         larl    %r14,ftrace_trace_function
42 #endif
43         lg      %r14,0(%r14)
44         basr    %r14,%r14
45 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
46 #ifdef CONFIG_DYNAMIC_FTRACE
47         .globl  ftrace_graph_caller
48 ftrace_graph_caller:
49         # This unconditional branch gets runtime patched. Change only if
50         # you know what you are doing. See ftrace_enable_graph_caller().
51         j       0f
52 #endif
53         lg      %r2,272(%r15)
54         lg      %r3,168(%r15)
55         brasl   %r14,prepare_ftrace_return
56         stg     %r2,168(%r15)
58 #endif
59         aghi    %r15,160
60         lmg     %r2,%r5,32(%r15)
61         lg      %r14,112(%r15)
62         br      %r14
64 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
66         .globl  return_to_handler
67 return_to_handler:
68         stmg    %r2,%r5,32(%r15)
69         lgr     %r1,%r15
70         aghi    %r15,-160
71         stg     %r1,__SF_BACKCHAIN(%r15)
72         brasl   %r14,ftrace_return_to_handler
73         aghi    %r15,160
74         lgr     %r14,%r2
75         lmg     %r2,%r5,32(%r15)
76         br      %r14
78 #endif