This source file includes following definitions.
- ftrace_call_adjust
1
2
3
4
5
6
7
8 #if defined(CONFIG_FUNCTION_GRAPH_TRACER) && defined(CONFIG_FRAME_POINTER)
9 #define HAVE_FUNCTION_GRAPH_FP_TEST
10 #endif
11 #define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
12
13 #define ARCH_SUPPORTS_FTRACE_OPS 1
14 #ifndef __ASSEMBLY__
15 void _mcount(void);
16 static inline unsigned long ftrace_call_adjust(unsigned long addr)
17 {
18 return addr;
19 }
20
21 struct dyn_arch_ftrace {
22 };
23 #endif
24
25 #ifdef CONFIG_DYNAMIC_FTRACE
26
27
28
29
30
31
32
33
34
35
36 #define MCOUNT_ADDR ((unsigned long)_mcount)
37 #define JALR_SIGN_MASK (0x00000800)
38 #define JALR_OFFSET_MASK (0x00000fff)
39 #define AUIPC_OFFSET_MASK (0xfffff000)
40 #define AUIPC_PAD (0x00001000)
41 #define JALR_SHIFT 20
42 #define JALR_BASIC (0x000080e7)
43 #define AUIPC_BASIC (0x00000097)
44 #define NOP4 (0x00000013)
45
46 #define make_call(caller, callee, call) \
47 do { \
48 call[0] = to_auipc_insn((unsigned int)((unsigned long)callee - \
49 (unsigned long)caller)); \
50 call[1] = to_jalr_insn((unsigned int)((unsigned long)callee - \
51 (unsigned long)caller)); \
52 } while (0)
53
54 #define to_jalr_insn(offset) \
55 (((offset & JALR_OFFSET_MASK) << JALR_SHIFT) | JALR_BASIC)
56
57 #define to_auipc_insn(offset) \
58 ((offset & JALR_SIGN_MASK) ? \
59 (((offset & AUIPC_OFFSET_MASK) + AUIPC_PAD) | AUIPC_BASIC) : \
60 ((offset & AUIPC_OFFSET_MASK) | AUIPC_BASIC))
61
62
63
64
65 #define MCOUNT_INSN_SIZE 8
66 #endif