Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78D1936D9FB; Sat, 28 Feb 2026 17:57:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772301448; cv=none; b=YBwbE66m2xt5r6s+0vO2u11x97/jzsKvsnmWqZKNXIfZOt2QbEoy7Hk8L7hhBB1O1utqqOoBh+k0l+KinRUzcB6X0++dcPYzIxNFAXcYBnpKIkhMeywFwMC2/3UceI4vmU7xZlNiq2Z7rcoR2zC+v07ef6H9o4nEYybB/MEfEwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772301448; c=relaxed/simple; bh=W6W7FBTM2KboxMZEwq13+hDQwWbf3XoBnHsc68k/l1k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IZ82fRKdIIXFb0fjWdM1JlGD2tDLpD4syzrt/O0YM5EgOaRxXktL/zCSB1Z1ptYIf+be/y7fz4t7XARmpg6Xpnz0iPKLqeaU4Bvx4v+dmWeTiruU5qtjhWUTbBeR+qlJY1x9rqn4aS8R/GdYNalyEZbu4KaKIAoE4fCL84uy9Wg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Q2dEoW87; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Q2dEoW87" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 151EDC116D0; Sat, 28 Feb 2026 17:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772301448; bh=W6W7FBTM2KboxMZEwq13+hDQwWbf3XoBnHsc68k/l1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q2dEoW87dioPW5R7KzDq/e/moGn9drryBQGR7W3j5aPHz4EpVXIUDe/+oHUzaAaH2 +le0QDn3s+I9WajJtIoPPkJ1d5krQHrldL4Te1pVaNIvu+Kir+Ovq9ifsG1544pGDs 0MDBwtEIlwrB22ehHND5YvL89ngqPKXcNCoW/jiLeImRUghkszU8hmtwiD/0fV8Qkv 63PRUccGLy5l1FUtvrguOnsg6QWSJGicCcx8dORzRHnEsUsh5HwmhdsaNSVCOFxFy2 lhdUahf3txI2fCOAM7uf/EBBG/aij83NMDwigR2wtMBnttZKVtpqQTVyt2Bw2RtYm7 LQMge6MZB9FdA== From: Sasha Levin To: patches@lists.linux.dev Cc: Leo Yan , Hamza Mahfooz , Thomas Voegtle , Greg Kroah-Hartman , Ian Rogers , James Clark , Namhyung Kim , stable@vger.kernel.org, Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 6.18 634/752] tools: Fix bitfield dependency failure Date: Sat, 28 Feb 2026 12:45:45 -0500 Message-ID: <20260228174750.1542406-634-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228174750.1542406-1-sashal@kernel.org> References: <20260228174750.1542406-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Leo Yan [ Upstream commit a537c0da168a08b0b6a7f7bd9e75f4cc8d45ff57 ] A perf build failure was reported by Thomas Voegtle on stable kernel v6.6.120: 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 issue was not found on the mainline due to the relevant C files have included kernel.h. It'd be good to merge this change on mainline as well for robustness. Closes: https://lore.kernel.org/stable/3a44500b-d7c8-179f-61f6-e51cb50d3512@lio96.de/ Fixes: 64d86c03e1441742 ("perf arm-spe: Extend branch operations") Reported-by: Hamza Mahfooz Reported-by: Thomas Voegtle Signed-off-by: Leo Yan Cc: Greg Kroah-Hartman Cc: Ian Rogers Cc: James Clark Cc: Leo Yan Cc: Namhyung Kim To: Sasha Levin Cc: stable@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/include/linux/bitfield.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/linux/bitfield.h b/tools/include/linux/bitfield.h index 6093fa6db2600..ddf81f24956ba 100644 --- a/tools/include/linux/bitfield.h +++ b/tools/include/linux/bitfield.h @@ -8,6 +8,7 @@ #define _LINUX_BITFIELD_H #include +#include #include /* -- 2.51.0