From: Leo Yan <leo.yan@arm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: James Clark <james.clark@linaro.org>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [PATCH v3 1/3] tools headers: Go back to include asm-generic/unistd.h for arm64
Date: Wed, 7 Jan 2026 17:14:26 +0000 [thread overview]
Message-ID: <20260107171426.GE336318@e132581.arm.com> (raw)
In-Reply-To: <b50402a1-f1e2-46dc-b0f8-a08326b02c96@app.fastmail.com>
On Wed, Jan 07, 2026 at 04:21:28PM +0100, Arnd Bergmann wrote:
[...]
> >> I'm still a bit lost about why Arm64 copying
> >> the generated header is considered a special case when we already have these
> >> x86 ones.
> >
> > If arm64 maintains its own unistd.h, there is a concern that other
> > architectures will do the same, and we will end up maintaining
> > fragmented headers for each architecture.
> >
> > Later, if we need to support architecture specific syscalls, we should
> > explore better approaches, such as using generated headers (e.g.,
> > make headers) to provide UAPI headers instead.
>
> I think the more important issue with the current code is that
> we don't support the older architectures besides x86: arm32, powerpc,
> s390, mips, etc all have a custom syscall.tbl file like x86 but
> don't have any asm/unistd.h installed in tools. If we want to
> support any of them in the future, we should start generating the
> files the same way we do for the kernel. There is already a copy
> of the syscall.tbl files in tools/perf/arch/*/entry/syscalls/syscall*.tbl
> and the arch/mips/kernel/syscalls/Makefile
> just not the corresponding scripts/syscallhdr.sh.
Thanks for the supplement, Arnd!
Using the syscall*.tbl files under tools/perf to generate unistd.h
headers is not a good idea for me. These files are maintained within
tools/perf (mainly for perf beauty printing), but the generated
unistd.h headers are required by code outside of perf (e.g., libperf,
feature checks, etc.).
In fact, selftests already use dynamic headers (see [1]). Seems to
me that we should apply the same approach to perf build.
Thanks,
Leo
[1] https://docs.kernel.org/dev-tools/kselftest.html#running-the-selftests-hotplug-tests-are-run-in-limited-mode
next prev parent reply other threads:[~2026-01-07 17:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 18:06 [PATCH v3 0/3] tools build: Fix arm64 unistd.h dependency Leo Yan
2025-12-22 18:06 ` [PATCH v3 1/3] tools headers: Go back to include asm-generic/unistd.h for arm64 Leo Yan
2025-12-24 13:47 ` James Clark
2026-01-07 14:48 ` Leo Yan
2026-01-07 15:21 ` Arnd Bergmann
2026-01-07 17:14 ` Leo Yan [this message]
2025-12-22 18:06 ` [PATCH v3 2/3] Revert "perf tools: Fix arm64 build by generating unistd_64.h" Leo Yan
2025-12-22 18:06 ` [PATCH v3 3/3] tools headers: Don't check arm64's unistd.h Leo Yan
2025-12-24 13:51 ` James Clark
2026-01-07 15:05 ` Leo Yan
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=20260107171426.GE336318@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=arnd@arndb.de \
--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