1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI_ASM_POWERPC_PERF_REGS_H
3 #define _UAPI_ASM_POWERPC_PERF_REGS_H
5 enum perf_event_powerpc_regs
{
40 PERF_REG_POWERPC_ORIG_R3
,
42 PERF_REG_POWERPC_LINK
,
45 PERF_REG_POWERPC_SOFTE
,
46 PERF_REG_POWERPC_TRAP
,
48 PERF_REG_POWERPC_DSISR
,
49 PERF_REG_POWERPC_SIER
,
50 PERF_REG_POWERPC_MMCRA
,
51 /* Extended registers */
52 PERF_REG_POWERPC_MMCR0
,
53 PERF_REG_POWERPC_MMCR1
,
54 PERF_REG_POWERPC_MMCR2
,
55 PERF_REG_POWERPC_MMCR3
,
56 PERF_REG_POWERPC_SIER2
,
57 PERF_REG_POWERPC_SIER3
,
58 /* Max regs without the extended regs */
59 PERF_REG_POWERPC_MAX
= PERF_REG_POWERPC_MMCRA
+ 1,
62 #define PERF_REG_PMU_MASK ((1ULL << PERF_REG_POWERPC_MAX) - 1)
64 /* PERF_REG_EXTENDED_MASK value for CPU_FTR_ARCH_300 */
65 #define PERF_REG_PMU_MASK_300 (((1ULL << (PERF_REG_POWERPC_MMCR2 + 1)) - 1) - PERF_REG_PMU_MASK)
66 /* PERF_REG_EXTENDED_MASK value for CPU_FTR_ARCH_31 */
67 #define PERF_REG_PMU_MASK_31 (((1ULL << (PERF_REG_POWERPC_SIER3 + 1)) - 1) - PERF_REG_PMU_MASK)
69 #define PERF_REG_MAX_ISA_300 (PERF_REG_POWERPC_MMCR2 + 1)
70 #define PERF_REG_MAX_ISA_31 (PERF_REG_POWERPC_SIER3 + 1)
71 #endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */