public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: David Laight <david.laight.linux@gmail.com>
Cc: James Clark <james.clark@linaro.org>,
	Thomas Voegtle <tv@lio96.de>,
	stable@vger.kernel.org, Sasha Levin <sashal@kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf arm_spe: Fix bitfield dependency failure
Date: Fri, 23 Jan 2026 14:41:19 +0000	[thread overview]
Message-ID: <20260123144119.GC40455@e132581.arm.com> (raw)
In-Reply-To: <20260123140317.4bd85cdb@pumpkin>

On Fri, Jan 23, 2026 at 02:03:17PM +0000, David Laight wrote:

[...]

> > bitfield.h is a common header so I did not change it.  I digged a bit
> > and found diverage between kernel's bitfield.h and tool's bitfield.h.
> > 
> > 1) The kernel's bitfield.h includes asm/byteorder.h, and finally it
> >    includes linux/byteorder/generic.h, cpu_to_le{16|32|64} are defined
> >    in this file.
> > 
> > 2) The tool's bitfield.h will includes asm/byteorder.h, but this hooks
> >    to the headers provided by the toolchain.  cpu_to_le{16|32|64} are
> >    not C lib API, they are defined in tool's kernel.h.
> 
> Perhaps cpu_to_le16() and friends should be defined in the tools
> asm/byteorder.h rather than its kernel.h.

This will override the toolchain's asm/byteorder.h.

Another issue is:

  $ git grep -l cpu_to_le tools/
  tools/arch/x86/include/asm/insn.h
  tools/include/asm-generic/io.h
  tools/include/linux/bitfield.h
  tools/include/linux/kernel.h
  tools/include/linux/unaligned.h
  tools/perf/util/intel-pt.c
  tools/testing/cxl/test/mem.c
  tools/testing/nvdimm/test/ndtest.c
  tools/testing/selftests/arm64/fp/fp-ptrace.c
  tools/testing/selftests/kvm/include/arm64/processor.h
  tools/testing/selftests/kvm/lib/arm64/gic_v3_its.c
  tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
  tools/usb/ffs-test.c

I assume these programs include kernel.h for calling cpu_to_le(), if
move cpu_to_le() out from kernel.h, it will break build for these
programs.

Thanks,
Leo

      reply	other threads:[~2026-01-23 14:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 10:02 [PATCH] perf arm_spe: Fix bitfield dependency failure Leo Yan
2026-01-23 10:27 ` James Clark
2026-01-23 12:08   ` Leo Yan
2026-01-23 14:03     ` David Laight
2026-01-23 14:41       ` Leo Yan [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=20260123144119.GC40455@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=acme@kernel.org \
    --cc=david.laight.linux@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tv@lio96.de \
    /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