aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_regs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/perf_regs.h')
-rw-r--r--include/linux/perf_regs.h19
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>
6u64 perf_reg_value(struct pt_regs *regs, int idx);
7int perf_reg_validate(u64 mask);
8#else
9static inline u64 perf_reg_value(struct pt_regs *regs, int idx)
10{
11 return 0;
12}
13
14static 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 */