diff options
Diffstat (limited to 'include/linux/perf_regs.h')
-rw-r--r-- | include/linux/perf_regs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/perf_regs.h b/include/linux/perf_regs.h new file mode 100644 index 000000000000..a2f1a98f7839 --- /dev/null +++ b/include/linux/perf_regs.h | |||
@@ -0,0 +1,19 @@ | |||
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 | #else | ||
9 | static inline u64 perf_reg_value(struct pt_regs *regs, int idx) | ||
10 | { | ||
11 | return 0; | ||
12 | } | ||
13 | |||
14 | static inline int perf_reg_validate(u64 mask) | ||
15 | { | ||
16 | return mask ? -ENOSYS : 0; | ||
17 | } | ||
18 | #endif /* CONFIG_HAVE_PERF_REGS */ | ||
19 | #endif /* _LINUX_PERF_REGS_H */ | ||