| .. | .. |
|---|
| 8 | 8 | #define MCOUNT_ADDR ((unsigned long)(_mcount)) |
|---|
| 9 | 9 | #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ |
|---|
| 10 | 10 | |
|---|
| 11 | +#define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR |
|---|
| 12 | + |
|---|
| 11 | 13 | #ifdef __ASSEMBLY__ |
|---|
| 12 | 14 | |
|---|
| 13 | 15 | /* Based off of objdump optput from glibc */ |
|---|
| .. | .. |
|---|
| 94 | 96 | #endif /* PPC64_ELF_ABI_v1 */ |
|---|
| 95 | 97 | #endif /* CONFIG_FTRACE_SYSCALLS */ |
|---|
| 96 | 98 | |
|---|
| 97 | | -#ifdef CONFIG_PPC64 |
|---|
| 99 | +#if defined(CONFIG_PPC64) && defined(CONFIG_FUNCTION_TRACER) |
|---|
| 98 | 100 | #include <asm/paca.h> |
|---|
| 99 | 101 | |
|---|
| 100 | 102 | static inline void this_cpu_disable_ftrace(void) |
|---|
| .. | .. |
|---|
| 106 | 108 | { |
|---|
| 107 | 109 | get_paca()->ftrace_enabled = 1; |
|---|
| 108 | 110 | } |
|---|
| 111 | + |
|---|
| 112 | +/* Disable ftrace on this CPU if possible (may not be implemented) */ |
|---|
| 113 | +static inline void this_cpu_set_ftrace_enabled(u8 ftrace_enabled) |
|---|
| 114 | +{ |
|---|
| 115 | + get_paca()->ftrace_enabled = ftrace_enabled; |
|---|
| 116 | +} |
|---|
| 117 | + |
|---|
| 118 | +static inline u8 this_cpu_get_ftrace_enabled(void) |
|---|
| 119 | +{ |
|---|
| 120 | + return get_paca()->ftrace_enabled; |
|---|
| 121 | +} |
|---|
| 122 | + |
|---|
| 123 | +void ftrace_free_init_tramp(void); |
|---|
| 109 | 124 | #else /* CONFIG_PPC64 */ |
|---|
| 110 | 125 | static inline void this_cpu_disable_ftrace(void) { } |
|---|
| 111 | 126 | static inline void this_cpu_enable_ftrace(void) { } |
|---|
| 127 | +static inline void this_cpu_set_ftrace_enabled(u8 ftrace_enabled) { } |
|---|
| 128 | +static inline u8 this_cpu_get_ftrace_enabled(void) { return 1; } |
|---|
| 129 | +static inline void ftrace_free_init_tramp(void) { } |
|---|
| 112 | 130 | #endif /* CONFIG_PPC64 */ |
|---|
| 113 | 131 | #endif /* !__ASSEMBLY__ */ |
|---|
| 114 | 132 | |
|---|