mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
arm64/perf: Assert all platform event flags are within PERF_EVENT_FLAG_ARCH
Ensure all platform specific event flags are within PERF_EVENT_FLAG_ARCH. Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: James Clark <james.clark@arm.com> Link: https://lkml.kernel.org/r/20220907091924.439193-4-anshuman.khandual@arm.com
This commit is contained in:
committed by
Peter Zijlstra
parent
f67dd218fa
commit
91207f6261
@@ -24,10 +24,11 @@
|
||||
/*
|
||||
* ARM PMU hw_event flags
|
||||
*/
|
||||
/* Event uses a 64bit counter */
|
||||
#define ARMPMU_EVT_64BIT 1
|
||||
/* Event uses a 47bit counter */
|
||||
#define ARMPMU_EVT_47BIT 2
|
||||
#define ARMPMU_EVT_64BIT 0x00001 /* Event uses a 64bit counter */
|
||||
#define ARMPMU_EVT_47BIT 0x00002 /* Event uses a 47bit counter */
|
||||
|
||||
static_assert((PERF_EVENT_FLAG_ARCH & ARMPMU_EVT_64BIT) == ARMPMU_EVT_64BIT);
|
||||
static_assert((PERF_EVENT_FLAG_ARCH & ARMPMU_EVT_47BIT) == ARMPMU_EVT_47BIT);
|
||||
|
||||
#define HW_OP_UNSUPPORTED 0xFFFF
|
||||
#define C(_x) PERF_COUNT_HW_CACHE_##_x
|
||||
|
||||
Reference in New Issue
Block a user