Skip to content

Commit

Permalink
perf/core: Assert PERF_EVENT_FLAG_ARCH does not overlap with generic …
Browse files Browse the repository at this point in the history
…flags

This just ensures that PERF_EVENT_FLAG_ARCH does not overlap with generic
hardware event flags.

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-3-anshuman.khandual@arm.com
  • Loading branch information
Anshuman Khandual authored and Peter Zijlstra committed Sep 7, 2022
1 parent 7517f08 commit f67dd21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ struct hw_perf_event_extra {
#define PERF_EVENT_FLAG_ARCH 0x000fffff
#define PERF_EVENT_FLAG_USER_READ_CNT 0x80000000

static_assert((PERF_EVENT_FLAG_USER_READ_CNT & PERF_EVENT_FLAG_ARCH) == 0);

/**
* struct hw_perf_event - performance event hardware details:
*/
Expand Down

0 comments on commit f67dd21

Please sign in to comment.