blob: 3c73d5fe18be4b950628f82234b7ba58855b2c29 [file] [log] [blame]
Jiri Olsac5e63192012-08-07 15:20:36 +02001#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);
Jiri Olsa40189942012-08-07 15:20:37 +02008u64 perf_reg_abi(struct task_struct *task);
Jiri Olsac5e63192012-08-07 15:20:36 +02009#else
10static inline u64 perf_reg_value(struct pt_regs *regs, int idx)
11{
12 return 0;
13}
14
15static inline int perf_reg_validate(u64 mask)
16{
17 return mask ? -ENOSYS : 0;
18}
Jiri Olsa40189942012-08-07 15:20:37 +020019
20static inline u64 perf_reg_abi(struct task_struct *task)
21{
22 return PERF_SAMPLE_REGS_ABI_NONE;
23}
Jiri Olsac5e63192012-08-07 15:20:36 +020024#endif /* CONFIG_HAVE_PERF_REGS */
25#endif /* _LINUX_PERF_REGS_H */