Heiko Carstens | 5d360a7 | 2008-12-25 13:38:56 +0100 | [diff] [blame] | 1 | #ifndef _ASM_S390_FTRACE_H |
| 2 | #define _ASM_S390_FTRACE_H |
| 3 | |
| 4 | #ifndef __ASSEMBLY__ |
Heiko Carstens | dfd9f7a | 2009-06-12 10:26:44 +0200 | [diff] [blame] | 5 | |
Heiko Carstens | 5d360a7 | 2008-12-25 13:38:56 +0100 | [diff] [blame] | 6 | extern void _mcount(void); |
Heiko Carstens | dfd9f7a | 2009-06-12 10:26:44 +0200 | [diff] [blame] | 7 | extern unsigned long ftrace_dyn_func; |
| 8 | |
| 9 | struct dyn_arch_ftrace { }; |
| 10 | |
| 11 | #define MCOUNT_ADDR ((long)_mcount) |
| 12 | |
| 13 | #ifdef CONFIG_64BIT |
Heiko Carstens | 88dbd20 | 2009-06-12 10:26:46 +0200 | [diff] [blame] | 14 | #define MCOUNT_OFFSET_RET 18 |
| 15 | #define MCOUNT_INSN_SIZE 24 |
| 16 | #define MCOUNT_OFFSET 14 |
Heiko Carstens | dfd9f7a | 2009-06-12 10:26:44 +0200 | [diff] [blame] | 17 | #else |
Heiko Carstens | 88dbd20 | 2009-06-12 10:26:46 +0200 | [diff] [blame] | 18 | #define MCOUNT_OFFSET_RET 26 |
| 19 | #define MCOUNT_INSN_SIZE 30 |
| 20 | #define MCOUNT_OFFSET 8 |
Heiko Carstens | 5d360a7 | 2008-12-25 13:38:56 +0100 | [diff] [blame] | 21 | #endif |
| 22 | |
Heiko Carstens | dfd9f7a | 2009-06-12 10:26:44 +0200 | [diff] [blame] | 23 | static inline unsigned long ftrace_call_adjust(unsigned long addr) |
| 24 | { |
| 25 | return addr - MCOUNT_OFFSET; |
| 26 | } |
| 27 | |
| 28 | #endif /* __ASSEMBLY__ */ |
Heiko Carstens | 5d360a7 | 2008-12-25 13:38:56 +0100 | [diff] [blame] | 29 | #endif /* _ASM_S390_FTRACE_H */ |