aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorAnshuman Khandual <anshuman.khandual@arm.com>2022-09-07 14:49:22 +0530
committerPeter Zijlstra <peterz@infradead.org>2022-09-07 21:54:00 +0200
commitf67dd218fafd9de9a13d095e775b621db76a058f (patch)
tree97e83cc21a7e6740fd7bae1d368a92115f3e256a /include/linux/perf_event.h
parentperf/core: Expand PERF_EVENT_FLAG_ARCH (diff)
downloadlinux-dev-f67dd218fafd9de9a13d095e775b621db76a058f.tar.xz
linux-dev-f67dd218fafd9de9a13d095e775b621db76a058f.zip
perf/core: Assert PERF_EVENT_FLAG_ARCH does not overlap with generic 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
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 3e3c07512b75..f88cb31eaf75 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -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:
*/