Skip to content

Commit dc4d58a

Browse files
mrutland-armwilldeacon
authored andcommitted
perf: arm_pmu: Move PMUv3-specific data
A few fields in struct arm_pmu are only used with PMUv3, and soon we will need to add more for BRBE. Group the fields together so that we have a logical place to add more data in future. At the same time, remove the comment for reg_pmmir as it doesn't convey anything useful. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <[email protected]> Signed-off-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Tested-by: James Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent c2e793d commit dc4d58a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

include/linux/perf/arm_pmu.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ struct arm_pmu {
8484
struct pmu pmu;
8585
cpumask_t supported_cpus;
8686
char *name;
87-
int pmuver;
8887
irqreturn_t (*handle_irq)(struct arm_pmu *pmu);
8988
void (*enable)(struct perf_event *event);
9089
void (*disable)(struct perf_event *event);
@@ -102,18 +101,20 @@ struct arm_pmu {
102101
int (*map_event)(struct perf_event *event);
103102
DECLARE_BITMAP(cntr_mask, ARMPMU_MAX_HWEVENTS);
104103
bool secure_access; /* 32-bit ARM only */
105-
#define ARMV8_PMUV3_MAX_COMMON_EVENTS 0x40
106-
DECLARE_BITMAP(pmceid_bitmap, ARMV8_PMUV3_MAX_COMMON_EVENTS);
107-
#define ARMV8_PMUV3_EXT_COMMON_EVENT_BASE 0x4000
108-
DECLARE_BITMAP(pmceid_ext_bitmap, ARMV8_PMUV3_MAX_COMMON_EVENTS);
109104
struct platform_device *plat_device;
110105
struct pmu_hw_events __percpu *hw_events;
111106
struct hlist_node node;
112107
struct notifier_block cpu_pm_nb;
113108
/* the attr_groups array must be NULL-terminated */
114109
const struct attribute_group *attr_groups[ARMPMU_NR_ATTR_GROUPS + 1];
115-
/* store the PMMIR_EL1 to expose slots */
110+
111+
/* PMUv3 only */
112+
int pmuver;
116113
u64 reg_pmmir;
114+
#define ARMV8_PMUV3_MAX_COMMON_EVENTS 0x40
115+
DECLARE_BITMAP(pmceid_bitmap, ARMV8_PMUV3_MAX_COMMON_EVENTS);
116+
#define ARMV8_PMUV3_EXT_COMMON_EVENT_BASE 0x4000
117+
DECLARE_BITMAP(pmceid_ext_bitmap, ARMV8_PMUV3_MAX_COMMON_EVENTS);
117118

118119
/* Only to be used by ACPI probing code */
119120
unsigned long acpi_cpuid;

0 commit comments

Comments
 (0)