From: Anshuman Khandual <anshuman.khandual@arm.com>
To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
peterz@infradead.org
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Subject: [PATCH 0/3] perf/core: Assert PERF_EVENT_FLAG_ARCH is followed
Date: Mon, 29 Aug 2022 12:25:04 +0530 [thread overview]
Message-ID: <20220829065507.177781-1-anshuman.khandual@arm.com> (raw)
This series ensures that PERF_EVENT_FLAG_ARCH mask is followed correctly,
while defining all the platform specific hardware event flags. But after
adding these checks, there are couple of build failures on x86 platform
like the following.
BUILD_BUG_ON(~PERF_EVENT_FLAG_ARCH & PERF_X86_EVENT_AMD_BRS)
BUILD_BUG_ON(~PERF_EVENT_FLAG_ARCH & PERF_X86_EVENT_PEBS_LAT_HYBRID)
This happens because both these flags PERF_X86_EVENT_AMD_BRS (0x10000) and
PERF_X86_EVENT_PEBS_LAT_HYBRID (0x20000) falls outside PERF_EVENT_FLAG_ARCH
(0x0000ffff). Given that x86 platform is already using up all available bit
positions, should this platform flags mask be extended to (0x000fffff) ?
This seires applies on v6.0-rc3.
Anshuman Khandual (3):
perf/core: Assert PERF_EVENT_FLAG_ARCH does not overlap with generic flags
arm64/perf: Assert all platform event flags are within PERF_EVENT_FLAG_ARCH
x86/perf: Assert all platform event flags are within PERF_EVENT_FLAG_ARCH
arch/arm64/kernel/perf_event.c | 1 +
arch/x86/events/amd/core.c | 2 ++
arch/x86/events/core.c | 16 ++++++++++++++++
drivers/perf/apple_m1_cpu_pmu.c | 1 +
drivers/perf/arm_spe_pmu.c | 1 +
kernel/events/core.c | 1 +
6 files changed, 22 insertions(+)
--
2.25.1
next reply other threads:[~2022-08-29 6:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 6:55 Anshuman Khandual [this message]
2022-08-29 6:55 ` [PATCH 1/3] perf/core: Assert PERF_EVENT_FLAG_ARCH does not overlap with generic flags Anshuman Khandual
2022-08-29 6:55 ` [PATCH 2/3] arm64/perf: Assert all platform event flags are within PERF_EVENT_FLAG_ARCH Anshuman Khandual
2022-08-29 6:55 ` [PATCH 3/3] x86/perf: " Anshuman Khandual
2022-08-30 10:00 ` James Clark
2022-09-05 4:05 ` Anshuman Khandual
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220829065507.177781-1-anshuman.khandual@arm.com \
--to=anshuman.khandual@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).