From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Suchit Karunakaran <suchitkarunakaran@gmail.com>,
peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org,
mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
jolsa@kernel.org, adrian.hunter@intel.com,
james.clark@linaro.org, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v2 2/2] perf build: compile BPF skeletons with -mcpu=v3
Date: Thu, 4 Jun 2026 10:34:58 -0300 [thread overview]
Message-ID: <aiF_ApG1ykL3MXdD@x1> (raw)
In-Reply-To: <CAP-5=fVZ0zOG4yEPjn2Lk2H4zteoHKjmdKdNdMeeTTMCFvZLgA@mail.gmail.com>
On Sat, May 30, 2026 at 03:39:32PM -0700, Ian Rogers wrote:
> On Sat, May 30, 2026 at 12:55 PM Suchit Karunakaran
> <suchitkarunakaran@gmail.com> wrote:
> >
> > The lock_contention BPF program uses __sync_val_compare_and_swap()
> > to atomically update the max_time and min_time fields in
> > contention_data. This builtin lowers to the BPF_CMPXCHG instruction,
> > which is only available in BPF ISA v3. Without an explicit -mcpu flag,
> > Clang targets BPF v1/v2 by default on older toolchains (Clang < 18),
> > causing build errors when v3 instructions are emitted.
> >
> > Add -mcpu=v3 to CLANG_OPTIONS, which is used exclusively in the BPF
> > skeleton compilation rule.
> >
> > Signed-off-by: Suchit Karunakaran <suchitkarunakaran@gmail.com>
>
> Acked-by: Ian Rogers <irogers@google.com>
Thanks, applied to perf-tools-next, for v7.2.
- Arnaldo
prev parent reply other threads:[~2026-06-04 13:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 19:55 [PATCH v2 2/2] perf build: compile BPF skeletons with -mcpu=v3 Suchit Karunakaran
2026-05-30 22:39 ` Ian Rogers
2026-06-04 13:34 ` Arnaldo Carvalho de Melo [this message]
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=aiF_ApG1ykL3MXdD@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bpf@vger.kernel.org \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=suchitkarunakaran@gmail.com \
/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