File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
arch/powerpc/include/uapi/asm Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ enum perf_event_powerpc_regs {
52
52
PERF_REG_POWERPC_MMCR0 ,
53
53
PERF_REG_POWERPC_MMCR1 ,
54
54
PERF_REG_POWERPC_MMCR2 ,
55
+ PERF_REG_POWERPC_MMCR3 ,
56
+ PERF_REG_POWERPC_SIER2 ,
57
+ PERF_REG_POWERPC_SIER3 ,
55
58
/* Max regs without the extended regs */
56
59
PERF_REG_POWERPC_MAX = PERF_REG_POWERPC_MMCRA + 1 ,
57
60
};
@@ -60,6 +63,9 @@ enum perf_event_powerpc_regs {
60
63
61
64
/* PERF_REG_EXTENDED_MASK value for CPU_FTR_ARCH_300 */
62
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)
63
68
64
69
#define PERF_REG_MAX_ISA_300 (PERF_REG_POWERPC_MMCR2 + 1)
70
+ #define PERF_REG_MAX_ISA_31 (PERF_REG_POWERPC_SIER3 + 1)
65
71
#endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ static const char *reg_names[] = {
68
68
[PERF_REG_POWERPC_MMCR0 ] = "mmcr0" ,
69
69
[PERF_REG_POWERPC_MMCR1 ] = "mmcr1" ,
70
70
[PERF_REG_POWERPC_MMCR2 ] = "mmcr2" ,
71
+ [PERF_REG_POWERPC_MMCR3 ] = "mmcr3" ,
72
+ [PERF_REG_POWERPC_SIER2 ] = "sier2" ,
73
+ [PERF_REG_POWERPC_SIER3 ] = "sier3" ,
71
74
};
72
75
73
76
static inline const char * perf_reg_name (int id )
Original file line number Diff line number Diff line change 14
14
#include <linux/kernel.h>
15
15
16
16
#define PVR_POWER9 0x004E
17
+ #define PVR_POWER10 0x0080
17
18
18
19
const struct sample_reg sample_reg_masks [] = {
19
20
SMPL_REG (r0 , PERF_REG_POWERPC_R0 ),
@@ -64,6 +65,9 @@ const struct sample_reg sample_reg_masks[] = {
64
65
SMPL_REG (mmcr0 , PERF_REG_POWERPC_MMCR0 ),
65
66
SMPL_REG (mmcr1 , PERF_REG_POWERPC_MMCR1 ),
66
67
SMPL_REG (mmcr2 , PERF_REG_POWERPC_MMCR2 ),
68
+ SMPL_REG (mmcr3 , PERF_REG_POWERPC_MMCR3 ),
69
+ SMPL_REG (sier2 , PERF_REG_POWERPC_SIER2 ),
70
+ SMPL_REG (sier3 , PERF_REG_POWERPC_SIER3 ),
67
71
SMPL_REG_END
68
72
};
69
73
@@ -194,6 +198,8 @@ uint64_t arch__intr_reg_mask(void)
194
198
version = (((mfspr (SPRN_PVR )) >> 16 ) & 0xFFFF );
195
199
if (version == PVR_POWER9 )
196
200
extended_mask = PERF_REG_PMU_MASK_300 ;
201
+ else if (version == PVR_POWER10 )
202
+ extended_mask = PERF_REG_PMU_MASK_31 ;
197
203
else
198
204
return mask ;
199
205
You can’t perform that action at this time.
0 commit comments