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 00000000000..3c73d5fe18b --- /dev/null +++ b/include/linux/perf_regs.h @@ -0,0 +1,25 @@ +#ifndef _LINUX_PERF_REGS_H +#define _LINUX_PERF_REGS_H + +#ifdef CONFIG_HAVE_PERF_REGS +#include <asm/perf_regs.h> +u64 perf_reg_value(struct pt_regs *regs, int idx); +int perf_reg_validate(u64 mask); +u64 perf_reg_abi(struct task_struct *task); +#else +static inline u64 perf_reg_value(struct pt_regs *regs, int idx) +{ + return 0; +} + +static inline int perf_reg_validate(u64 mask) +{ + return mask ? -ENOSYS : 0; +} + +static inline u64 perf_reg_abi(struct task_struct *task) +{ + return PERF_SAMPLE_REGS_ABI_NONE; +} +#endif /* CONFIG_HAVE_PERF_REGS */ +#endif /* _LINUX_PERF_REGS_H */ |