diff options
Diffstat (limited to 'arch/arm/include/asm/ftrace.h')
-rw-r--r-- | arch/arm/include/asm/ftrace.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h index 103f7ee97313..f89515adac60 100644 --- a/arch/arm/include/asm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h | |||
@@ -2,12 +2,30 @@ | |||
2 | #define _ASM_ARM_FTRACE | 2 | #define _ASM_ARM_FTRACE |
3 | 3 | ||
4 | #ifdef CONFIG_FUNCTION_TRACER | 4 | #ifdef CONFIG_FUNCTION_TRACER |
5 | #define MCOUNT_ADDR ((long)(mcount)) | 5 | #define MCOUNT_ADDR ((unsigned long)(__gnu_mcount_nc)) |
6 | #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ | 6 | #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ |
7 | 7 | ||
8 | #ifndef __ASSEMBLY__ | 8 | #ifndef __ASSEMBLY__ |
9 | extern void mcount(void); | 9 | extern void mcount(void); |
10 | extern void __gnu_mcount_nc(void); | 10 | extern void __gnu_mcount_nc(void); |
11 | |||
12 | #ifdef CONFIG_DYNAMIC_FTRACE | ||
13 | struct dyn_arch_ftrace { | ||
14 | #ifdef CONFIG_OLD_MCOUNT | ||
15 | bool old_mcount; | ||
16 | #endif | ||
17 | }; | ||
18 | |||
19 | static inline unsigned long ftrace_call_adjust(unsigned long addr) | ||
20 | { | ||
21 | /* With Thumb-2, the recorded addresses have the lsb set */ | ||
22 | return addr & ~1; | ||
23 | } | ||
24 | |||
25 | extern void ftrace_caller_old(void); | ||
26 | extern void ftrace_call_old(void); | ||
27 | #endif | ||
28 | |||
11 | #endif | 29 | #endif |
12 | 30 | ||
13 | #endif | 31 | #endif |