diff options
Diffstat (limited to 'include/linux/perf_regs.h')
-rw-r--r-- | include/linux/perf_regs.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/perf_regs.h b/include/linux/perf_regs.h new file mode 100644 index 000000000000..3c73d5fe18be --- /dev/null +++ b/include/linux/perf_regs.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _LINUX_PERF_REGS_H | ||
2 | #define _LINUX_PERF_REGS_H | ||
3 | |||
4 | #ifdef CONFIG_HAVE_PERF_REGS | ||
5 | #include <asm/perf_regs.h> | ||
6 | u64 perf_reg_value(struct pt_regs *regs, int idx); | ||
7 | int perf_reg_validate(u64 mask); | ||
8 | u64 perf_reg_abi(struct task_struct *task); | ||
9 | #else | ||
10 | static inline u64 perf_reg_value(struct pt_regs *regs, int idx) | ||
11 | { | ||
12 | return 0; | ||
13 | } | ||
14 | |||
15 | static inline int perf_reg_validate(u64 mask) | ||
16 | { | ||
17 | return mask ? -ENOSYS : 0; | ||
18 | } | ||
19 | |||
20 | static inline u64 perf_reg_abi(struct task_struct *task) | ||
21 | { | ||
22 | return PERF_SAMPLE_REGS_ABI_NONE; | ||
23 | } | ||
24 | #endif /* CONFIG_HAVE_PERF_REGS */ | ||
25 | #endif /* _LINUX_PERF_REGS_H */ | ||