1 #ifndef _ASM_POWERPC_FTRACE
2 #define _ASM_POWERPC_FTRACE
4 #ifdef CONFIG_FUNCTION_TRACER
5 #define MCOUNT_ADDR ((unsigned long)(_mcount))
6 #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
10 /* Based off of objdump optput from glibc */
12 #define MCOUNT_SAVE_FRAME \
28 #define MCOUNT_RESTORE_FRAME \
45 #else /* !__ASSEMBLY__ */
46 extern void _mcount(void);
48 #ifdef CONFIG_DYNAMIC_FTRACE
49 # define FTRACE_ADDR ((unsigned long)ftrace_caller)
50 # define FTRACE_REGS_ADDR FTRACE_ADDR
51 static inline unsigned long ftrace_call_adjust(unsigned long addr
)
53 /* reloction of mcount call site is the same as the address */
57 struct dyn_arch_ftrace
{
60 #endif /* CONFIG_DYNAMIC_FTRACE */
61 #endif /* __ASSEMBLY__ */
63 #ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
64 #define ARCH_SUPPORTS_FTRACE_OPS 1
68 #if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_PPC64) && !defined(__ASSEMBLY__)
69 #if !defined(_CALL_ELF) || _CALL_ELF != 2
70 #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
71 static inline bool arch_syscall_match_sym_name(const char *sym
, const char *name
)
74 * Compare the symbol name with the system call name. Skip the .sys or .SyS
75 * prefix from the symbol name and the sys prefix from the system call name and
76 * just match the rest. This is only needed on ppc64 since symbol names on
77 * 32bit do not start with a period so the generic function will work.
79 return !strcmp(sym
+ 4, name
+ 3);
82 #endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 && !__ASSEMBLY__ */
84 #endif /* _ASM_POWERPC_FTRACE */
This page took 0.035588 seconds and 6 git commands to generate.