public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf arm_spe: Fix bitfield dependency failure
@ 2026-01-23 10:02 Leo Yan
  2026-01-23 10:27 ` James Clark
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Yan @ 2026-01-23 10:02 UTC (permalink / raw)
  To: Sasha Levin, Greg KH, Arnaldo Carvalho de Melo, Namhyung Kim,
	Ian Rogers, James Clark, linux-perf-users
  Cc: Leo Yan, Thomas Voegtle, stable

A perf build failure was reported by Thomas Voegtle on stable kernel
v6.6.120:

  make perf NO_JEVENTS=1 NO_LIBTRACEEVENT=1
    BUILD:   Doing 'make -j12' parallel build
    HOSTCC  fixdep.o
    HOSTLD  fixdep-in.o
  ...
  ...
    CC      tests/sample-parsing.o
    CC      util/intel-pt-decoder/intel-pt-pkt-decoder.o
    CC      util/perf-regs-arch/perf_regs_csky.o
    CC      util/arm-spe-decoder/arm-spe-pkt-decoder.o
    CC      util/perf-regs-arch/perf_regs_loongarch.o
  In file included from util/arm-spe-decoder/arm-spe-pkt-decoder.h:10,
                   from util/arm-spe-decoder/arm-spe-pkt-decoder.c:14:
  /local/git/linux-stable-rc/tools/include/linux/bitfield.h: In function ‘le16_encode_bits’:
  /local/git/linux-stable-rc/tools/include/linux/bitfield.h:166:31: error: implicit declaration of
  function ‘cpu_to_le16’; did you mean ‘htole16’? [-Werror=implicit-function-declaration]
    ____MAKE_OP(le##size,u##size,cpu_to_le##size,le##size##_to_cpu) \
                                 ^~~~~~~~~
  /local/git/linux-stable-rc/tools/include/linux/bitfield.h:149:9: note: in definition of macro
  ‘____MAKE_OP’
    return to((v & field_mask(field)) * field_multiplier(field)); \
           ^~
  /local/git/linux-stable-rc/tools/include/linux/bitfield.h:170:1: note: in expansion of macro
  ‘__MAKE_OP’
   __MAKE_OP(16)

Fix this by including linux/kernel.h, which provides the required
definitions.

The relevant C file in mainline already includes kernel.h, so the issue is
not exposed.  It'd be good to merge this change on mainline as well for
robustness.

Fixes: 64d86c03e144 ("perf arm-spe: Extend branch operations")
Reported-by: Thomas Voegtle <tv@lio96.de>
Closes: https://lore.kernel.org/stable/3a44500b-d7c8-179f-61f6-e51cb50d3512@lio96.de/
Cc: stable@vger.kernel.org
Signed-off-by: Leo Yan <leo.yan@arm.com>
---
 tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h
index adf4cde320aa..8d16619cd098 100644
--- a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h
+++ b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h
@@ -7,6 +7,7 @@
 #ifndef INCLUDE__ARM_SPE_PKT_DECODER_H__
 #define INCLUDE__ARM_SPE_PKT_DECODER_H__
 
+#include <linux/kernel.h>
 #include <linux/bitfield.h>
 #include <stddef.h>
 #include <stdint.h>
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-23 14:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox