x86/compat: remove is_compat_task()
[deliverable/linux.git] / arch / x86 / include / asm / ftrace.h
CommitLineData
1965aae3
PA
1#ifndef _ASM_X86_FTRACE_H
2#define _ASM_X86_FTRACE_H
395a59d0 3
606576ce 4#ifdef CONFIG_FUNCTION_TRACER
d57c5d51 5#ifdef CC_USING_FENTRY
c93bf928 6# define MCOUNT_ADDR ((unsigned long)(__fentry__))
d57c5d51 7#else
c93bf928 8# define MCOUNT_ADDR ((unsigned long)(mcount))
d57c5d51 9#endif
395a59d0
AS
10#define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */
11
28fb5dfa 12#ifdef CONFIG_DYNAMIC_FTRACE
2f5f6ad9 13#define ARCH_SUPPORTS_FTRACE_OPS 1
08f6fba5 14#endif
2f5f6ad9 15
395a59d0
AS
16#ifndef __ASSEMBLY__
17extern void mcount(void);
a192cd04 18extern atomic_t modifying_ftrace_code;
d57c5d51 19extern void __fentry__(void);
68bf21aa
SR
20
21static inline unsigned long ftrace_call_adjust(unsigned long addr)
22{
23 /*
521ccb5c
MS
24 * addr is the address of the mcount call instruction.
25 * recordmcount does the necessary offset calculation.
68bf21aa 26 */
521ccb5c 27 return addr;
68bf21aa 28}
31e88909
SR
29
30#ifdef CONFIG_DYNAMIC_FTRACE
31
32struct dyn_arch_ftrace {
33 /* No extra data needed for x86 */
34};
35
08d636b6
SR
36int ftrace_int3_handler(struct pt_regs *regs);
37
1026ff9b
SRRH
38#define FTRACE_GRAPH_TRAMP_ADDR FTRACE_GRAPH_ADDR
39
31e88909 40#endif /* CONFIG_DYNAMIC_FTRACE */
a26a2a27 41#endif /* __ASSEMBLY__ */
606576ce 42#endif /* CONFIG_FUNCTION_TRACER */
395a59d0 43
f431b634
SR
44
45#if !defined(__ASSEMBLY__) && !defined(COMPILE_OFFSETS)
46
47#if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_IA32_EMULATION)
48#include <asm/compat.h>
49
50/*
51 * Because ia32 syscalls do not map to x86_64 syscall numbers
52 * this screws up the trace output when tracing a ia32 task.
53 * Instead of reporting bogus syscalls, just do not trace them.
54 *
55 * If the user realy wants these, then they should use the
56 * raw syscall tracepoints with filtering.
57 */
58#define ARCH_TRACE_IGNORE_COMPAT_SYSCALLS 1
59static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs)
60{
f970165b 61 if (in_compat_syscall())
f431b634
SR
62 return true;
63 return false;
64}
65#endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_IA32_EMULATION */
66#endif /* !__ASSEMBLY__ && !COMPILE_OFFSETS */
67
1965aae3 68#endif /* _ASM_X86_FTRACE_H */
This page took 0.432174 seconds and 5 git commands to generate.