aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/pmu.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/pmu.h')
-rw-r--r--arch/arm/include/asm/pmu.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h
index ae1919be8f98..0b648c541293 100644
--- a/arch/arm/include/asm/pmu.h
+++ b/arch/arm/include/asm/pmu.h
@@ -42,6 +42,25 @@ struct arm_pmu_platdata {
42 42
43#ifdef CONFIG_HW_PERF_EVENTS 43#ifdef CONFIG_HW_PERF_EVENTS
44 44
45/*
46 * The ARMv7 CPU PMU supports up to 32 event counters.
47 */
48#define ARMPMU_MAX_HWEVENTS 32
49
50#define HW_OP_UNSUPPORTED 0xFFFF
51#define C(_x) PERF_COUNT_HW_CACHE_##_x
52#define CACHE_OP_UNSUPPORTED 0xFFFF
53
54#define PERF_MAP_ALL_UNSUPPORTED \
55 [0 ... PERF_COUNT_HW_MAX - 1] = HW_OP_UNSUPPORTED
56
57#define PERF_CACHE_MAP_ALL_UNSUPPORTED \
58[0 ... C(MAX) - 1] = { \
59 [0 ... C(OP_MAX) - 1] = { \
60 [0 ... C(RESULT_MAX) - 1] = CACHE_OP_UNSUPPORTED, \
61 }, \
62}
63
45/* The events for a given PMU register set. */ 64/* The events for a given PMU register set. */
46struct pmu_hw_events { 65struct pmu_hw_events {
47 /* 66 /*