diff options
author | Ashok Kumar <ashoks@broadcom.com> | 2016-04-21 05:58:44 -0700 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-04-25 14:11:10 +0100 |
commit | 4b1a9e6934ec6e38138c66c2f73cf6f3695a9c6c (patch) | |
tree | 06a250a1e8a492379b105ce5b94d7b2c6140790e /include/linux/perf | |
parent | bf2d4782e7500b6e3e6f606b17b596751bc14013 (diff) | |
download | linux-stable-4b1a9e6934ec6e38138c66c2f73cf6f3695a9c6c.tar.gz linux-stable-4b1a9e6934ec6e38138c66c2f73cf6f3695a9c6c.tar.bz2 linux-stable-4b1a9e6934ec6e38138c66c2f73cf6f3695a9c6c.zip |
arm64/perf: Filter common events based on PMCEIDn_EL0
The complete common architectural and micro-architectural
event number structure is filtered based on PMCEIDn_EL0 and
exposed to /sys using is_visibile function pointer in events
attribute_group.
To filter the events in is_visible function, pmceid based bitmap
is stored in arm_pmu structure and the id field from
perf_pmu_events_attr is used to check against the bitmap.
The function which derives event bitmap from PMCEIDn_EL0 is
executed in the cpus, which has the pmu being initialized,
for heterogeneous pmu support.
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ashok Kumar <ashoks@broadcom.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'include/linux/perf')
-rw-r--r-- | include/linux/perf/arm_pmu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index 4196c90a3c88..d28ac05c7f92 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h @@ -105,6 +105,8 @@ struct arm_pmu { struct mutex reserve_mutex; u64 max_period; bool secure_access; /* 32-bit ARM only */ +#define ARMV8_PMUV3_MAX_COMMON_EVENTS 0x40 + DECLARE_BITMAP(pmceid_bitmap, ARMV8_PMUV3_MAX_COMMON_EVENTS); struct platform_device *plat_device; struct pmu_hw_events __percpu *hw_events; struct notifier_block hotplug_nb; |