diff options
author | Nicholas Piggin <[email protected]> | 2020-05-08 14:34:04 +1000 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2020-05-19 00:10:34 +1000 |
commit | f2d7f62e4abdb03de3f4267361d96c417312d05c (patch) | |
tree | 5a0735320307b2560af0c58bfcc20f1b83eecda1 /arch/powerpc/include/asm/ftrace.h | |
parent | 116ac378bb3ff844df333e7609e7604651a0db9d (diff) |
powerpc: Implement ftrace_enabled() helpers
Signed-off-by: Nicholas Piggin <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Reviewed-by: Christophe Leroy <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/powerpc/include/asm/ftrace.h')
-rw-r--r-- | arch/powerpc/include/asm/ftrace.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h index f54a08a2cd70..bc76970b6ee5 100644 --- a/arch/powerpc/include/asm/ftrace.h +++ b/arch/powerpc/include/asm/ftrace.h @@ -108,9 +108,23 @@ static inline void this_cpu_enable_ftrace(void) { get_paca()->ftrace_enabled = 1; } + +/* Disable ftrace on this CPU if possible (may not be implemented) */ +static inline void this_cpu_set_ftrace_enabled(u8 ftrace_enabled) +{ + get_paca()->ftrace_enabled = ftrace_enabled; +} + +static inline u8 this_cpu_get_ftrace_enabled(void) +{ + return get_paca()->ftrace_enabled; +} + #else /* CONFIG_PPC64 */ static inline void this_cpu_disable_ftrace(void) { } static inline void this_cpu_enable_ftrace(void) { } +static inline void this_cpu_set_ftrace_enabled(u8 ftrace_enabled) { } +static inline u8 this_cpu_get_ftrace_enabled(void) { return 1; } #endif /* CONFIG_PPC64 */ #endif /* !__ASSEMBLY__ */ |