提交 acd55b10 编写于 作者: N Naveen N. Rao 提交者: Michael Ellerman

powerpc64/ftrace: Add helpers to hard disable ftrace

Add some helpers to enable/disable ftrace through paca->ftrace_enabled.
Signed-off-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 c3e59d77
...@@ -82,6 +82,23 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name ...@@ -82,6 +82,23 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name
return !strcmp(sym + 4, name + 3); return !strcmp(sym + 4, name + 3);
} }
#endif /* CONFIG_FTRACE_SYSCALLS && PPC64_ELF_ABI_v1 */ #endif /* CONFIG_FTRACE_SYSCALLS && PPC64_ELF_ABI_v1 */
#ifdef CONFIG_PPC64
#include <asm/paca.h>
static inline void this_cpu_disable_ftrace(void)
{
get_paca()->ftrace_enabled = 0;
}
static inline void this_cpu_enable_ftrace(void)
{
get_paca()->ftrace_enabled = 1;
}
#else /* CONFIG_PPC64 */
static inline void this_cpu_disable_ftrace(void) { }
static inline void this_cpu_enable_ftrace(void) { }
#endif /* CONFIG_PPC64 */
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* _ASM_POWERPC_FTRACE */ #endif /* _ASM_POWERPC_FTRACE */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册