Re: [PATCH v10 05/12] cxl: Cache endpoint decoder settings during PCI enumeration

From: Srirangan Madhavan

Date: Tue Sep 01 2026 - 22:24:00 EST


On 8/16/26 10:30 PM, Richard Cheng wrote:
+ rc = cxl_find_regblock(pdev, CXL_REGLOC_RBI_COMPONENT, &map);
Hi Srirangan,

I can't compile successfully after your patch series applied, I think the
issue is here.

With CONFIG_CXL_BUS=y or CONFIG_CXL_BUS=m alone with
"""
$ make -j $(nproc) vmlinux modules
"""

The build fails with:

"""
drivers/cxl/core/resource.c:501:38: error:
‘CXL_REGLOC_RBI_COMPONENT’ undeclared
drivers/cxl/core/resource.c:501:38: error:
type of formal parameter 2 is incomplete
"""

drivers/cxl/cxl.h only forward-declares enum cxl_regloc_type.
CXL_REFLOC_RBI_COMPONENT and the complete enum def are provided
by include/cxl/pci.h

I add the following header so we can include drivers/cxl/core/resource.c
to fix the failure.

"""
#include <cxl/pci.h>
"""

Best regards,
Richard Cheng.
Hi Richard,

Thanks for the report. v10 was based on v7.2-rc2 (8cdeaa50eae8), where patch 5 includes <cxlpci.h>. On that base, drivers/cxl/cxlpci.h provides the complete enum cxl_regloc_type definition and CXL_REGLOC_RBI_COMPONENT.

The definitions moved to <cxl/pci.h> in the newer tree as part of the CXL Type 2 enabling work. v11 is rebased onto v7.3-rc1 and uses the new public header.

If this failure reproduces on the declared v10 base, please let me know. Otherwise, I guess this resulted from applying v10 to a newer base after the header relocation?
But anyways, in v11, patches should use the new base and compile individually.

--
Regards,
Srirangan