cxl: fix FWCTL dependency
PATCH 1/1 cxl: fix FWCTL dependency
From: Arnd Bergmann <[email protected]>
The 'FWCTL' subsystem is selected by CXL_FEATURES, which is a 'bool' symbol with a dependency on CXL_PCI, but referenced by the cxl_core.ko. When cxl_core is built-in, but the cxl_pci.ko driver is a loadable mdoule, this results in a link failure:
ld.lld-21: error: undefined symbol: _fwctl_alloc_device
Quoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:695 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:695)
ld.lld-21: error: undefined symbol: fwctl_register
Quoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:699 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:699)
ld.lld-21: error: undefined symbol: fwctl_unregister
Quoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:676 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:676)
Move the 'select' into the symbol that controls the core module instead.
--- drivers/cxl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/Kconfig +1 -1
@@ -7,6 +7,7 @@ menuconfig CXL_BUS select PCI_DOE select FIRMWARE_TABLE select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS + select FWCTL if CXL_FEATURES help CXL is a bus that is electrically compatible with PCI Express, but layers three protocols on that signalling (CXL.io, CXL.cache, and
@@ -105,7 +106,6 @@ config CXL_MEM config CXL_FEATURES bool "CXL: Features" depends on CXL_PCI - select FWCTL help Enable support for CXL Features. A CXL device that includes a mailbox supports commands that allows listing, getting, and setting of
Signature · 1 line
2.39.5
Quoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The 'FWCTL' subsystem is selected by
CXL_FEATURES, which is a 'bool' symbol with a dependency onCXL_PCI, but referenced by the cxl_core.ko. Whencxl_coreis built-in, but the cxl_pci.ko driver is a loadable mdoule, this results in a link failure:ld.lld-21: error: undefined symbol:
_fwctl_alloc_deviceQuoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:695 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:695)ld.lld-21: error: undefined symbol:
fwctl_register
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:699 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:699)ld.lld-21: error: undefined symbol:
fwctl_unregisterQuoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:676 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:676)Move the 'select' into the symbol that controls the core module instead.
Fixes a53a6004e7a5 ("cxl: Add FWCTL support to CXL")Signed-off-by Arnd Bergmann <[email protected]>
Thanks for the fix Arnd. Jason can you please append this fix to your latest branch? Thanks!
Quoted 24 lines
--- drivers/cxl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cxl/Kconfig +1
-1@@ -7,6 +7,7 @@ menuconfig CXL_BUS select PCI_DOE select FIRMWARE_TABLE select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS + select FWCTL if CXL_FEATURES help CXL is a bus that is electrically compatible with PCI Express, but layers three protocols on that signalling (CXL.io, CXL.cache, and@@ -105,7 +106,6 @@ config CXL_MEM config CXL_FEATURES bool "CXL: Features" depends on CXL_PCI - select FWCTL help Enable support for CXL Features. A CXL device that includes a mailbox supports commands that allows listing, getting, and setting of
Quoted 27 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The 'FWCTL' subsystem is selected by
CXL_FEATURES, which is a 'bool' symbol with a dependency onCXL_PCI, but referenced by the cxl_core.ko. Whencxl_coreis built-in, but the cxl_pci.ko driver is a loadable mdoule, this results in a link failure:ld.lld-21: error: undefined symbol:
_fwctl_alloc_deviceQuoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:695 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:695)ld.lld-21: error: undefined symbol:
fwctl_registerQuoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:699 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:699)ld.lld-21: error: undefined symbol:
fwctl_unregisterQuoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:676 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:676)Move the 'select' into the symbol that controls the core module instead.
Fixes a53a6004e7a5 ("cxl: Add FWCTL support to CXL")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/cxl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cxl/Kconfig +0
-0
drivers/cxl/Kconfig menuconfig CXL_BUS · line 10
Quoted 4 lines
drivers/cxl/Kconfig +1
-0@@ -7,6 +7,7 @@ menuconfig CXL_BUS select PCI_DOE select FIRMWARE_TABLE select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS + select FWCTL if CXL_FEATURES
Looks good,
...I tried to find a way to keep it local to the CXL_FEATURES symbol, but it really is an optional core feature that needs to have the select from the core module like you have it.
drivers/cxl/Kconfig config CXL_MEM · line 108
Quoted 7 lines
drivers/cxl/Kconfig +0
-0help CXL is a bus that is electrically compatible with PCI Express, but layers three protocols on that signalling (CXL.io, CXL.cache, and@@ -105,7 +106,6 @@ config CXL_MEM config CXL_FEATURES bool "CXL: Features" depends on CXL_PCI
Drive-by observation for an additional cleanup that this CXL_PCI dependency is bogus. If it were real then there would be a circular dependency between cxl_pci.ko and cxl_core.ko. As is this is just noise in the Kconfig file since the dependency solver would already be screaming if this was a true dependency.
Quoted 17 lines · Dave Jiang
Quoted 14 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The 'FWCTL' subsystem is selected by
CXL_FEATURES, which is a 'bool' symbol with a dependency onCXL_PCI, but referenced by the cxl_core.ko. Whencxl_coreis built-in, but the cxl_pci.ko driver is a loadable mdoule, this results in a link failure:ld.lld-21: error: undefined symbol:
_fwctl_alloc_deviceQuoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:695 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:695)ld.lld-21: error: undefined symbol:
fwctl_registerQuoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:699 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:699)ld.lld-21: error: undefined symbol:
fwctl_unregisterQuoted 1 line
Quoted 1 line
Quoted 1 line
referenced by features.c:676 (
/home/arnd/arm-soc/drivers/cxl/core/features.c:676)
Quoted 8 lines
Quoted 4 lines
Move the 'select' into the symbol that controls the core module instead.
Fixes a53a6004e7a5 ("cxl: Add FWCTL support to CXL")Signed-off-by Arnd Bergmann <[email protected]>Acked-by Dave Jiang <[email protected]>Thanks for the fix Arnd. Jason can you please append this fix to your latest branch? Thanks!
I folded it into the Fixes commit thanks
Jason