diff options
Diffstat (limited to 'arch/powerpc/include/asm/ftrace.h')
| -rw-r--r-- | arch/powerpc/include/asm/ftrace.h | 16 | 
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h index dde1296b8b4..e3661872fbe 100644 --- a/arch/powerpc/include/asm/ftrace.h +++ b/arch/powerpc/include/asm/ftrace.h @@ -60,4 +60,20 @@ struct dyn_arch_ftrace {  #endif +#if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_PPC64) && !defined(__ASSEMBLY__) +#if !defined(_CALL_ELF) || _CALL_ELF != 2 +#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME +static inline bool arch_syscall_match_sym_name(const char *sym, const char *name) +{ +	/* +	 * Compare the symbol name with the system call name. Skip the .sys or .SyS +	 * prefix from the symbol name and the sys prefix from the system call name and +	 * just match the rest. This is only needed on ppc64 since symbol names on +	 * 32bit do not start with a period so the generic function will work. +	 */ +	return !strcmp(sym + 4, name + 3); +} +#endif +#endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 && !__ASSEMBLY__ */ +  #endif /* _ASM_POWERPC_FTRACE */  | 
