From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: James Clark <james.clark@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Syncing include/linux/coresight-pmu.h with its copy in tools/perf
Date: Thu, 5 Mar 2026 17:26:10 -0300 [thread overview]
Message-ID: <aanm4oUxeJ4U34FO@x1> (raw)
Hi,
Right now we have this perf build warning:
diff -u tools/include/linux/coresight-pmu.h include/linux/coresight-pmu.h
But when I try to update it it explodes, can someone in the ARM front
take a look at it?
Thanks,
- Arnaldo
⬢ [acme@toolbx perf-tools]$ m
make: Entering directory '/home/acme/git/perf-tools/tools/perf'
BUILD: Doing 'make -j32' parallel build
Warning: Kernel ABI header differences:
diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h
diff -u tools/include/linux/coresight-pmu.h include/linux/coresight-pmu.h
diff -u tools/arch/x86/include/asm/amd/ibs.h arch/x86/include/asm/amd/ibs.h
diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
Auto-detecting system features:
... libdw: [ on ]
... glibc: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libpython: [ on ]
... libcapstone: [ on ]
... llvm-perf: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
... libopenssl: [ on ]
... rust: [ on ]
INSTALL libsubcmd_headers
INSTALL libapi_headers
INSTALL libperf_headers
INSTALL libsymbol_headers
INSTALL libbpf_headers
INSTALL binaries
INSTALL tests
INSTALL libperf-jvmti.so
INSTALL libexec
INSTALL perf-archive
INSTALL perf-iostat
INSTALL python-scripts
INSTALL dlfilters
INSTALL perf_completion-script
INSTALL perf-tip
make: Leaving directory '/home/acme/git/perf-tools/tools/perf'
⬢ [acme@toolbx perf-tools]$ diff -u tools/include/linux/coresight-pmu.h include/linux/coresight-pmu.h
--- tools/include/linux/coresight-pmu.h 2025-06-16 13:19:13.119223002 -0300
+++ include/linux/coresight-pmu.h 2026-02-21 18:08:24.737530149 -0300
@@ -22,30 +22,6 @@
#define CORESIGHT_LEGACY_CPU_TRACE_ID(cpu) (0x10 + (cpu * 2))
/*
- * Below are the definition of bit offsets for perf option, and works as
- * arbitrary values for all ETM versions.
- *
- * Most of them are orignally from ETMv3.5/PTM's ETMCR config, therefore,
- * ETMv3.5/PTM doesn't define ETMCR config bits with prefix "ETM3_" and
- * directly use below macros as config bits.
- */
-#define ETM_OPT_BRANCH_BROADCAST 8
-#define ETM_OPT_CYCACC 12
-#define ETM_OPT_CTXTID 14
-#define ETM_OPT_CTXTID2 15
-#define ETM_OPT_TS 28
-#define ETM_OPT_RETSTK 29
-
-/* ETMv4 CONFIGR programming bits for the ETM OPTs */
-#define ETM4_CFG_BIT_BB 3
-#define ETM4_CFG_BIT_CYCACC 4
-#define ETM4_CFG_BIT_CTXTID 6
-#define ETM4_CFG_BIT_VMID 7
-#define ETM4_CFG_BIT_TS 11
-#define ETM4_CFG_BIT_RETSTK 12
-#define ETM4_CFG_BIT_VMID_OPT 15
-
-/*
* Interpretation of the PERF_RECORD_AUX_OUTPUT_HW_ID payload.
* Used to associate a CPU with the CoreSight Trace ID.
* [07:00] - Trace ID - uses 8 bits to make value easy to read in file.
⬢ [acme@toolbx perf-tools]$ cp include/linux/coresight-pmu.h tools/include/linux/coresight-pmu.h
⬢ [acme@toolbx perf-tools]$ m
make: Entering directory '/home/acme/git/perf-tools/tools/perf'
BUILD: Doing 'make -j32' parallel build
Warning: Kernel ABI header differences:
diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h
diff -u tools/arch/x86/include/asm/amd/ibs.h arch/x86/include/asm/amd/ibs.h
diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
Auto-detecting system features:
... libdw: [ on ]
... glibc: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libpython: [ on ]
... libcapstone: [ on ]
... llvm-perf: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
... libopenssl: [ on ]
... rust: [ on ]
INSTALL libsubcmd_headers
INSTALL libperf_headers
INSTALL libapi_headers
INSTALL libsymbol_headers
INSTALL libbpf_headers
CC /tmp/build/perf-tools/util/cs-etm-decoder/cs-etm-decoder.o
CC /tmp/build/perf-tools/util/cs-etm.o
LD /tmp/build/perf-tools/util/cs-etm-decoder/perf-util-in.o
In file included from /home/acme/git/perf-tools/tools/include/linux/bits.h:5,
from /home/acme/git/perf-tools/tools/include/linux/bitops.h:14,
from util/cs-etm.c:10:
util/cs-etm.c: In function ‘cs_etm__init_pid_fmt’:
util/cs-etm.c:213:31: error: ‘ETM_OPT_CTXTID’ undeclared (first use in this function)
213 | if (val & BIT(ETM_OPT_CTXTID))
| ^~~~~~~~~~~~~~
/home/acme/git/perf-tools/tools/include/vdso/bits.h:7:44: note: in definition of macro ‘BIT’
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
util/cs-etm.c:213:31: note: each undeclared identifier is reported only once for each function it appears in
213 | if (val & BIT(ETM_OPT_CTXTID))
| ^~~~~~~~~~~~~~
/home/acme/git/perf-tools/tools/include/vdso/bits.h:7:44: note: in definition of macro ‘BIT’
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
util/cs-etm.c:218:32: error: ‘ETM4_CFG_BIT_VMID’ undeclared (first use in this function)
218 | if (val & (BIT(ETM4_CFG_BIT_VMID) | BIT(ETM4_CFG_BIT_VMID_OPT)))
| ^~~~~~~~~~~~~~~~~
/home/acme/git/perf-tools/tools/include/vdso/bits.h:7:44: note: in definition of macro ‘BIT’
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
util/cs-etm.c:218:57: error: ‘ETM4_CFG_BIT_VMID_OPT’ undeclared (first use in this function)
218 | if (val & (BIT(ETM4_CFG_BIT_VMID) | BIT(ETM4_CFG_BIT_VMID_OPT)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/acme/git/perf-tools/tools/include/vdso/bits.h:7:44: note: in definition of macro ‘BIT’
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
util/cs-etm.c:221:36: error: ‘ETM4_CFG_BIT_CTXTID’ undeclared (first use in this function)
221 | else if (val & BIT(ETM4_CFG_BIT_CTXTID))
| ^~~~~~~~~~~~~~~~~~~
/home/acme/git/perf-tools/tools/include/vdso/bits.h:7:44: note: in definition of macro ‘BIT’
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
util/cs-etm.c: In function ‘cs_etm__setup_timeless_decoding’:
util/cs-etm.c:2934:65: error: ‘ETM_OPT_TS’ undeclared (first use in this function)
2934 | !(evsel->core.attr.config & BIT(ETM_OPT_TS));
| ^~~~~~~~~~
/home/acme/git/perf-tools/tools/include/vdso/bits.h:7:44: note: in definition of macro ‘BIT’
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
make[4]: *** [/home/acme/git/perf-tools/tools/build/Makefile.build:95: /tmp/build/perf-tools/util/cs-etm.o] Error 1
make[3]: *** [/home/acme/git/perf-tools/tools/build/Makefile.build:158: util] Error 2
make[2]: *** [Makefile.perf:797: /tmp/build/perf-tools/perf-util-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile.perf:289: sub-make] Error 2
make: *** [Makefile:119: install-bin] Error 2
make: Leaving directory '/home/acme/git/perf-tools/tools/perf'
⬢ [acme@toolbx perf-tools]$
next reply other threads:[~2026-03-05 20:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 20:26 Arnaldo Carvalho de Melo [this message]
2026-03-06 11:27 ` Syncing include/linux/coresight-pmu.h with its copy in tools/perf James Clark
2026-03-09 19:21 ` Arnaldo Carvalho de Melo
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=aanm4oUxeJ4U34FO@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--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=namhyung@kernel.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