8 #ifndef __ASM_BFIN_FTRACE_H__
9 #define __ASM_BFIN_FTRACE_H__
11 #define MCOUNT_INSN_SIZE 6
15 #ifdef CONFIG_DYNAMIC_FTRACE
18 #define MCOUNT_ADDR ((unsigned long)_mcount)
20 static inline unsigned long ftrace_call_adjust(
unsigned long addr)
31 #ifdef CONFIG_FRAME_POINTER
36 unsigned long *endstack, *
fp, *ret_addr;
37 unsigned int current_level = 0;
40 return __builtin_return_address(0);
42 fp = (
unsigned long *)__builtin_frame_address(0);
45 while (((
unsigned long)fp & 0x3) == 0 && fp &&
46 (fp + 1) < endstack && current_level <
level) {
47 fp = (
unsigned long *)*fp;
51 if (((
unsigned long)fp & 0x3) == 0 && fp &&
53 ret_addr = (
unsigned long *)*(fp + 1);
69 #define HAVE_ARCH_CALLER_ADDR
72 #define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
73 #define CALLER_ADDR1 ((unsigned long)return_address(1))
74 #define CALLER_ADDR2 ((unsigned long)return_address(2))
75 #define CALLER_ADDR3 ((unsigned long)return_address(3))
76 #define CALLER_ADDR4 ((unsigned long)return_address(4))
77 #define CALLER_ADDR5 ((unsigned long)return_address(5))
78 #define CALLER_ADDR6 ((unsigned long)return_address(6))