Public bug reported:

Ubuntu release: 26.04 (Resolute)
Source package: linux-nvidia-bos
Affected branch: 26.04_linux-nvidia-bos
Affected source revision: 7829ba635edc528b6b83ee3b3f4cfa2929195b4b

A kernel build with CONFIG_CXL_BUS=n fails in drivers/pci/probe.c
because the public CXL header defines cxl_find_regblock() using an
incomplete enum type. PR #629 reports the failure with aarch64-linux-
gnu-gcc 16.1:

include/cxl/cxl.h:444:62: error: parameter 2 ('type') has incomplete type
include/cxl/cxl.h:444:1: error: function declaration isn't a prototype 
[-Werror=strict-prototypes]

The disabled-CXL inline stub takes enum cxl_regloc_type by value. The
enum is defined in include/cxl/pci.h, but include/cxl/cxl.h only
forward-declares it and does not include that defining header.

The regression was introduced by:
c2905ebe1a6672998f0a913f4c590ecc8377ad82
NVIDIA: VR: SAUCE: cxl: Declare cxl_probe_component_regs in public header
https://github.com/NVIDIA/NV-Kernels/commit/c2905ebe1a6672998f0a913f4c590ecc8377ad82

Expected: the kernel compiles with CXL bus support disabled.
Actual: compilation fails with the incomplete-type error above.

The fix adds #include <cxl/pci.h> and removes the incomplete forward 
declaration:
647cf71170b99ecf55ebc4c382a51774bdf3e21e
NVIDIA: SAUCE: cxl: Fix enum forward declaration
https://github.com/NVIDIA/NV-Kernels/commit/647cf71170b99ecf55ebc4c382a51774bdf3e21e
https://github.com/NVIDIA/NV-Kernels/pull/629

Validation: a focused syntax-only check of the actual enum/stub code
with GCC 13.3 reproduced the failure before the fix and passed with the
complete enum definition. A full kernel build was not independently run.

** Affects: linux-nvidia-bos (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: arm64 cxl resolute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2169549

Title:
  linux-nvidia-bos: incomplete CXL enum breaks builds with
  CONFIG_CXL_BUS=n

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-bos/+bug/2169549/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to