diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2013-05-23 23:02:25 -0400 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2013-07-08 04:18:57 -0400 |
commit | 478ba61afccd3a4d7ca662cadff1d35d183fe67d (patch) | |
tree | 9458a98aa39dba5e195241a48a4c31435a4c92e3 /arch/xtensa/include/asm/ftrace.h | |
parent | 220f5354089b27e8eeaa8658806dabc59ce55729 (diff) |
xtensa: add static function tracer support
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/include/asm/ftrace.h')
-rw-r--r-- | arch/xtensa/include/asm/ftrace.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/xtensa/include/asm/ftrace.h b/arch/xtensa/include/asm/ftrace.h index 36dc7a684397..73cc3f482304 100644 --- a/arch/xtensa/include/asm/ftrace.h +++ b/arch/xtensa/include/asm/ftrace.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | 14 | ||
15 | #define HAVE_ARCH_CALLER_ADDR | 15 | #define HAVE_ARCH_CALLER_ADDR |
16 | #ifndef __ASSEMBLY__ | ||
16 | #define CALLER_ADDR0 ({ unsigned long a0, a1; \ | 17 | #define CALLER_ADDR0 ({ unsigned long a0, a1; \ |
17 | __asm__ __volatile__ ( \ | 18 | __asm__ __volatile__ ( \ |
18 | "mov %0, a0\n" \ | 19 | "mov %0, a0\n" \ |
@@ -24,10 +25,22 @@ extern unsigned long return_address(unsigned level); | |||
24 | #define CALLER_ADDR1 return_address(1) | 25 | #define CALLER_ADDR1 return_address(1) |
25 | #define CALLER_ADDR2 return_address(2) | 26 | #define CALLER_ADDR2 return_address(2) |
26 | #define CALLER_ADDR3 return_address(3) | 27 | #define CALLER_ADDR3 return_address(3) |
27 | #else | 28 | #else /* CONFIG_FRAME_POINTER */ |
28 | #define CALLER_ADDR1 (0) | 29 | #define CALLER_ADDR1 (0) |
29 | #define CALLER_ADDR2 (0) | 30 | #define CALLER_ADDR2 (0) |
30 | #define CALLER_ADDR3 (0) | 31 | #define CALLER_ADDR3 (0) |
31 | #endif | 32 | #endif /* CONFIG_FRAME_POINTER */ |
33 | #endif /* __ASSEMBLY__ */ | ||
34 | |||
35 | #ifdef CONFIG_FUNCTION_TRACER | ||
36 | |||
37 | #define MCOUNT_ADDR ((unsigned long)(_mcount)) | ||
38 | #define MCOUNT_INSN_SIZE 3 | ||
39 | |||
40 | #ifndef __ASSEMBLY__ | ||
41 | extern void _mcount(void); | ||
42 | #define mcount _mcount | ||
43 | #endif /* __ASSEMBLY__ */ | ||
44 | #endif /* CONFIG_FUNCTION_TRACER */ | ||
32 | 45 | ||
33 | #endif /* _XTENSA_FTRACE_H */ | 46 | #endif /* _XTENSA_FTRACE_H */ |