perf/core: Expand PERF_EVENT_FLAG_ARCH
authorAnshuman Khandual <anshuman.khandual@arm.com>
Wed, 7 Sep 2022 09:19:21 +0000 (14:49 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 7 Sep 2022 19:54:00 +0000 (21:54 +0200)
Two hardware event flags on x86 platform has overshot PERF_EVENT_FLAG_ARCH
(0x0000ffff). These flags are PERF_X86_EVENT_PEBS_LAT_HYBRID (0x20000) and
PERF_X86_EVENT_AMD_BRS (0x10000). Lets expand PERF_EVENT_FLAG_ARCH mask to
accommodate those flags, and also create room for two more in the future.

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-2-anshuman.khandual@arm.com
include/linux/perf_event.h

index a627528e5f3a2c9cc6d0cda838494d663317c0af..3e3c07512b75f56f835592b6ee4c9253bfdefb35 100644 (file)
@@ -138,7 +138,7 @@ struct hw_perf_event_extra {
  * PERF_EVENT_FLAG_ARCH bits are reserved for architecture-specific
  * usage.
  */
-#define PERF_EVENT_FLAG_ARCH                   0x0000ffff
+#define PERF_EVENT_FLAG_ARCH                   0x000fffff
 #define PERF_EVENT_FLAG_USER_READ_CNT          0x80000000
 
 /**