]> Pileus Git - ~andy/linux/blobdiff - arch/powerpc/include/asm/ftrace.h
Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
[~andy/linux] / arch / powerpc / include / asm / ftrace.h
index dde1296b8b41a903dd2707f0d9465162efd36fbc..169d039ed402080720aef97c33e20952d28dad12 100644 (file)
@@ -60,4 +60,18 @@ struct dyn_arch_ftrace {
 
 #endif
 
+#if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_PPC64) && !defined(__ASSEMBLY__)
+#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 /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 && !__ASSEMBLY__ */
+
 #endif /* _ASM_POWERPC_FTRACE */