hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/perf/arm_pmu.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * linux/arch/arm/include/asm/pmu.h
34 *
45 * Copyright (C) 2009 picoChip Designs Ltd, Jamie Iles
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
106 */
117
128 #ifndef __ARM_PMU_H__
....@@ -77,6 +73,7 @@
7773 ARMPMU_ATTR_GROUP_COMMON,
7874 ARMPMU_ATTR_GROUP_EVENTS,
7975 ARMPMU_ATTR_GROUP_FORMATS,
76
+ ARMPMU_ATTR_GROUP_CAPS,
8077 ARMPMU_NR_ATTR_GROUPS
8178 };
8279
....@@ -84,6 +81,7 @@
8481 struct pmu pmu;
8582 cpumask_t supported_cpus;
8683 char *name;
84
+ int pmuver;
8785 irqreturn_t (*handle_irq)(struct arm_pmu *pmu);
8886 void (*enable)(struct perf_event *event);
8987 void (*disable)(struct perf_event *event);
....@@ -102,14 +100,18 @@
102100 int (*filter_match)(struct perf_event *event);
103101 int num_events;
104102 bool secure_access; /* 32-bit ARM only */
105
-#define ARMV8_PMUV3_MAX_COMMON_EVENTS 0x40
103
+#define ARMV8_PMUV3_MAX_COMMON_EVENTS 0x40
106104 DECLARE_BITMAP(pmceid_bitmap, ARMV8_PMUV3_MAX_COMMON_EVENTS);
105
+#define ARMV8_PMUV3_EXT_COMMON_EVENT_BASE 0x4000
106
+ DECLARE_BITMAP(pmceid_ext_bitmap, ARMV8_PMUV3_MAX_COMMON_EVENTS);
107107 struct platform_device *plat_device;
108108 struct pmu_hw_events __percpu *hw_events;
109109 struct hlist_node node;
110110 struct notifier_block cpu_pm_nb;
111111 /* the attr_groups array must be NULL-terminated */
112112 const struct attribute_group *attr_groups[ARMPMU_NR_ATTR_GROUPS + 1];
113
+ /* store the PMMIR_EL1 to expose slots */
114
+ u64 reg_pmmir;
113115
114116 /* Only to be used by ACPI probing code */
115117 unsigned long acpi_cpuid;
....@@ -173,4 +175,6 @@
173175
174176 #endif /* CONFIG_ARM_PMU */
175177
178
+#define ARMV8_SPE_PDEV_NAME "arm,spe-v1"
179
+
176180 #endif /* __ARM_PMU_H__ */