No description
  • C 96.8%
  • Assembly 0.9%
  • Rust 0.7%
  • Shell 0.6%
  • Python 0.5%
  • Other 0.3%
Find a file
Tzung-Bi Shih fcc95344aa drm/i915/pmu: Fix build error with GCOV and AutoFDO enabled
[ Upstream commit a7137b1825 ]

i915_pmu.c may fail to build with GCOV and AutoFDO enabled.

../drivers/gpu/drm/i915/i915_pmu.c:116:3: error: call to '__compiletime_assert_487' declared with 'error' attribute: BUILD_BUG_ON failed: bit > BITS_PER_TYPE(typeof_member(struct i915_pmu, enable)) - 1
  116 |                 BUILD_BUG_ON(bit >
      |                 ^

Here is a way to reproduce the issue:
$ git checkout v6.15
$ mkdir build
$ ./scripts/kconfig/merge_config.sh -O build -n -m <(cat <<EOF
CONFIG_DRM=y
CONFIG_PCI=y
CONFIG_DRM_I915=y

CONFIG_PERF_EVENTS=y

CONFIG_DEBUG_FS=y
CONFIG_GCOV_KERNEL=y
CONFIG_GCOV_PROFILE_ALL=y

CONFIG_AUTOFDO_CLANG=y
EOF
)
$ PATH=${PATH}:${HOME}/llvm-20.1.5-x86_64/bin make LLVM=1 O=build \
       olddefconfig
$ PATH=${PATH}:${HOME}/llvm-20.1.5-x86_64/bin make LLVM=1 O=build \
       CLANG_AUTOFDO_PROFILE=...PATH_TO_SOME_AFDO_PROFILE... \
       drivers/gpu/drm/i915/i915_pmu.o

Although not super sure what happened, by reviewing the code, it should
depend on `__builtin_constant_p(bit)` directly instead of assuming
`__builtin_constant_p(config)` makes `bit` a builtin constant.

Also fix a nit, to reuse the `bit` local variable.

Fixes: a644fde77f ("drm/i915/pmu: Change bitmask of enabled events to u32")
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20250612083023.562585-1-tzungbi@kernel.org
(cherry picked from commit 686d773186)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-06-27 11:11:42 +01:00
arch x86/tools: Drop duplicate unlikely() definition in insn_decoder_test.c 2025-06-27 11:11:41 +01:00
block block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion 2025-06-27 11:11:19 +01:00
certs sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3 2024-09-20 19:52:48 +03:00
crypto crypto: api - Redo lookup on EEXIST 2025-06-19 15:31:30 +02:00
Documentation kbuild: rust: add rustc-min-version support function 2025-06-27 11:11:40 +01:00
drivers drm/i915/pmu: Fix build error with GCOV and AutoFDO enabled 2025-06-27 11:11:42 +01:00
fs smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels 2025-06-27 11:11:41 +01:00
include ipv6: replace ipcm6_init calls with ipcm6_init_sk 2025-06-27 11:11:41 +01:00
init rust: clean Rust 1.88.0's unnecessary_transmutes lint 2025-05-18 08:24:51 +02:00
io_uring io_uring: fix task leak issue in io_wq_create() 2025-06-27 11:11:36 +01:00
ipc ipc: fix to protect IPCS lookups using RCU 2025-06-27 11:11:22 +01:00
kernel sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group() 2025-06-27 11:11:38 +01:00
lib Kunit to check the longest symbol length 2025-06-27 11:11:41 +01:00
LICENSES LICENSES: add 0BSD license text 2024-09-01 20:43:24 -07:00
mm mm/hugetlb: unshare page tables during VMA split, not before 2025-06-27 11:11:40 +01:00
net ipv6: replace ipcm6_init calls with ipcm6_init_sk 2025-06-27 11:11:41 +01:00
rust rust: compile libcore with edition 2024 for 1.87+ 2025-06-27 11:11:40 +01:00
samples samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora 2025-05-29 11:02:01 +02:00
scripts rust: compile libcore with edition 2024 for 1.87+ 2025-06-27 11:11:40 +01:00
security selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len 2025-06-27 11:11:38 +01:00
sound ALSA: hda/realtek: Add quirk for Asus GU605C 2025-06-27 11:11:40 +01:00
tools bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE 2025-06-27 11:11:40 +01:00
usr kbuild: hdrcheck: fix cross build with clang 2025-03-13 13:02:18 +01:00
virt KVM: Add member to struct kvm_gfn_range to indicate private/shared 2025-05-22 14:29:36 +02:00
.clang-format clang-format: Update with v6.11-rc1's for_each macro list 2024-08-02 13:20:31 +02:00
.clippy.toml rust: clean Rust 1.88.0's warning about clippy::disallowed_macros configuration 2025-05-18 08:24:51 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.editorconfig .editorconfig: remove trim_trailing_whitespace option 2024-06-13 16:47:52 +02:00
.get_maintainer.ignore Add Jeff Kirsher to .get_maintainer.ignore 2024-03-08 11:36:54 +00:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore rust: introduce .clippy.toml 2025-03-13 13:01:42 +01:00
.mailmap mailmap: add entry for Thorsten Blum 2024-11-07 14:14:59 -08:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Remove self from DSA entry 2024-11-03 12:52:38 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS MAINTAINERS: Update Alexey Makhalov's email address 2025-05-22 14:29:46 +02:00
Makefile Linux 6.12.34 2025-06-19 15:32:38 +02:00
README README: Fix spelling 2024-03-18 03:36:32 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.