1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef ARCH_PERF_REGS_H
3 #define ARCH_PERF_REGS_H
6 #include <linux/types.h>
7 #include <asm/perf_regs.h>
9 void perf_regs_load(u64
*regs
);
11 #define PERF_REGS_MASK ((1ULL << PERF_REG_ARM64_MAX) - 1)
12 #define PERF_REGS_MAX PERF_REG_ARM64_MAX
13 #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_64
15 #define PERF_REG_IP PERF_REG_ARM64_PC
16 #define PERF_REG_SP PERF_REG_ARM64_SP
18 static inline const char *perf_reg_name(int id
)
21 case PERF_REG_ARM64_X0
:
23 case PERF_REG_ARM64_X1
:
25 case PERF_REG_ARM64_X2
:
27 case PERF_REG_ARM64_X3
:
29 case PERF_REG_ARM64_X4
:
31 case PERF_REG_ARM64_X5
:
33 case PERF_REG_ARM64_X6
:
35 case PERF_REG_ARM64_X7
:
37 case PERF_REG_ARM64_X8
:
39 case PERF_REG_ARM64_X9
:
41 case PERF_REG_ARM64_X10
:
43 case PERF_REG_ARM64_X11
:
45 case PERF_REG_ARM64_X12
:
47 case PERF_REG_ARM64_X13
:
49 case PERF_REG_ARM64_X14
:
51 case PERF_REG_ARM64_X15
:
53 case PERF_REG_ARM64_X16
:
55 case PERF_REG_ARM64_X17
:
57 case PERF_REG_ARM64_X18
:
59 case PERF_REG_ARM64_X19
:
61 case PERF_REG_ARM64_X20
:
63 case PERF_REG_ARM64_X21
:
65 case PERF_REG_ARM64_X22
:
67 case PERF_REG_ARM64_X23
:
69 case PERF_REG_ARM64_X24
:
71 case PERF_REG_ARM64_X25
:
73 case PERF_REG_ARM64_X26
:
75 case PERF_REG_ARM64_X27
:
77 case PERF_REG_ARM64_X28
:
79 case PERF_REG_ARM64_X29
:
81 case PERF_REG_ARM64_SP
:
83 case PERF_REG_ARM64_LR
:
85 case PERF_REG_ARM64_PC
:
94 #endif /* ARCH_PERF_REGS_H */