aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/mcount.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/mcount.S')
-rw-r--r--arch/s390/kernel/mcount.S56
1 files changed, 56 insertions, 0 deletions
diff --git a/arch/s390/kernel/mcount.S b/arch/s390/kernel/mcount.S
new file mode 100644
index 000000000000..397d131a345f
--- /dev/null
+++ b/arch/s390/kernel/mcount.S
@@ -0,0 +1,56 @@
1/*
2 * Copyright IBM Corp. 2008
3 *
4 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
5 *
6 */
7
8#ifndef CONFIG_64BIT
9.globl _mcount
10_mcount:
11 stm %r0,%r5,8(%r15)
12 st %r14,56(%r15)
13 lr %r1,%r15
14 ahi %r15,-96
15 l %r3,100(%r15)
16 la %r2,0(%r14)
17 st %r1,0(%r15)
18 la %r3,0(%r3)
19 bras %r14,0f
20 .long ftrace_trace_function
210: l %r14,0(%r14)
22 l %r14,0(%r14)
23 basr %r14,%r14
24 ahi %r15,96
25 lm %r0,%r5,8(%r15)
26 l %r14,56(%r15)
27 br %r14
28
29.globl ftrace_stub
30ftrace_stub:
31 br %r14
32
33#else /* CONFIG_64BIT */
34
35.globl _mcount
36_mcount:
37 stmg %r0,%r5,16(%r15)
38 stg %r14,112(%r15)
39 lgr %r1,%r15
40 aghi %r15,-160
41 stg %r1,0(%r15)
42 lgr %r2,%r14
43 lg %r3,168(%r15)
44 larl %r14,ftrace_trace_function
45 lg %r14,0(%r14)
46 basr %r14,%r14
47 aghi %r15,160
48 lmg %r0,%r5,16(%r15)
49 lg %r14,112(%r15)
50 br %r14
51
52.globl ftrace_stub
53ftrace_stub:
54 br %r14
55
56#endif /* CONFIG_64BIT */