aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/perf_event.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2010-04-30 06:32:44 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-17 06:53:57 -0400
commit181193f398e7d8da6b1196138f0e219709621743 (patch)
treeab633ad66a481a4acfb3fffcedeaef78a4a5803a /arch/arm/include/asm/perf_event.h
parent49c006b93769a86bec2b32b9234abf016ac0d50e (diff)
ARM: 6069/1: perf-events: use numeric ID to identify PMU
The ARM perf-events framework provides support for a number of different PMUs using struct arm_pmu. The char *name field of this struct can be used to identify the PMU, but this is cumbersome if used outside of perf. This patch replaces the name string for a PMU with an enum, which holds a unique ID for the PMU being represented. This ID can be used to index an array of names within perf, so no functionality is lost. The presence of the ID field, allows other kernel subsystems [currently oprofile] to use their own mappings for the PMU name. Cc: Jean Pihet <jpihet@mvista.com> Acked-by: Jamie Iles <jamie.iles@picochip.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/perf_event.h')
-rw-r--r--arch/arm/include/asm/perf_event.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h
index 49e3049aba32..fa4b32625d37 100644
--- a/arch/arm/include/asm/perf_event.h
+++ b/arch/arm/include/asm/perf_event.h
@@ -28,4 +28,18 @@ set_perf_event_pending(void)
28 * same indexes here for consistency. */ 28 * same indexes here for consistency. */
29#define PERF_EVENT_INDEX_OFFSET 1 29#define PERF_EVENT_INDEX_OFFSET 1
30 30
31/* ARM perf PMU IDs for use by internal perf clients. */
32enum arm_perf_pmu_ids {
33 ARM_PERF_PMU_ID_XSCALE1 = 0,
34 ARM_PERF_PMU_ID_XSCALE2,
35 ARM_PERF_PMU_ID_V6,
36 ARM_PERF_PMU_ID_V6MP,
37 ARM_PERF_PMU_ID_CA8,
38 ARM_PERF_PMU_ID_CA9,
39 ARM_NUM_PMU_IDS,
40};
41
42extern enum arm_perf_pmu_ids
43armpmu_get_pmu_id(void);
44
31#endif /* __ARM_PERF_EVENT_H__ */ 45#endif /* __ARM_PERF_EVENT_H__ */