From: Namhyung Kim <namhyung@kernel.org>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: linux-kernel@vger.kernel.org, mmayer@broadcom.com,
bcm-kernel-feedback-list@broadcom.com,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
"open list:PERFORMANCE EVENTS SUBSYSTEM"
<linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH] perf trace beauty fcntl: Fix build with older kernel headers
Date: Thu, 14 May 2026 08:56:42 -0700 [thread overview]
Message-ID: <agXwulXp_PqixUCg@google.com> (raw)
In-Reply-To: <20260513192347.4007895-1-florian.fainelli@broadcom.com>
Hello,
On Wed, May 13, 2026 at 12:23:46PM -0700, Florian Fainelli wrote:
> Toolchains with older kernel headers that do not include upstream commit
> c75b1d9421f80f4143e389d2d50ddfc8a28c8c35 ("fs: add fcntl() interface for
> setting/getting write life time hints") will now fail to build perf due
> to missing definitions for
> F_GET_RW_HINT/F_SET_RW_HINT/F_GET_FILE_RW_HINT/F_SET_FILE_RW_HINT.
Can you share the error messages?
I think this code should use a copy of the header in
trace/beauty/include/uapi/linux/fcntl.h which has the definitions.
Thanks,
Namhyung
>
> Provide a fallback definition for these when they are not already
> defined.
>
> Fixes: 9c47f6674838 ("perf trace beauty fcntl: Basic 'arg' beautifier")
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
> tools/perf/trace/beauty/fcntl.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/tools/perf/trace/beauty/fcntl.c b/tools/perf/trace/beauty/fcntl.c
> index d075904dccce..e1b99b8f55eb 100644
> --- a/tools/perf/trace/beauty/fcntl.c
> +++ b/tools/perf/trace/beauty/fcntl.c
> @@ -9,6 +9,22 @@
> #include <linux/kernel.h>
> #include <linux/fcntl.h>
>
> +#ifndef F_GET_RW_HINT
> +#define F_GET_RW_HINT (F_LINUX_SPECIFIC_BASE + 11)
> +#endif
> +
> +#ifndef F_SET_RW_HINT
> +#define F_SET_RW_HINT (F_LINUX_SPECIFIC_BASE + 12)
> +#endif
> +
> +#ifndef F_GET_FILE_RW_HINT
> +#define F_GET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 13)
> +#endif
> +
> +#ifndef F_SET_FILE_RW_HINT
> +#define F_SET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 14)
> +#endif
> +
> static size_t fcntl__scnprintf_getfd(unsigned long val, char *bf, size_t size, bool show_prefix)
> {
> return val ? scnprintf(bf, size, "%s", "0") :
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-05-14 15:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 19:23 [PATCH] perf trace beauty fcntl: Fix build with older kernel headers Florian Fainelli
2026-05-13 20:58 ` Ian Rogers
2026-05-13 21:56 ` Florian Fainelli
2026-05-13 23:13 ` Ian Rogers
2026-05-14 15:56 ` Namhyung Kim [this message]
2026-05-14 16:37 ` Ian Rogers
2026-05-14 16:57 ` Florian Fainelli
2026-05-14 17:13 ` Ian Rogers
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=agXwulXp_PqixUCg@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=florian.fainelli@broadcom.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=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=mmayer@broadcom.com \
--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