cxl: fix CONFIG_FW_LOADER dependency
PATCH 1/1 cxl: fix CONFIG_FW_LOADER dependency
From: Arnd Bergmann <[email protected]>
When FW_LOADER is disabled, cxl fails to link:
arm-linux-gnueabi-ld: drivers/cxl/core/memdev.o: in function `cxl_memdev_setup_fw_upload':
memdev.c:(.text+0x90e): undefined reference to firmware_upload_register' memdev.c:(.text+0x93c): undefined reference to firmware_upload_unregister'
In order to use the firmware_upload_register() function, both FW_LOADER and FW_UPLOAD have to be enabled, which is a bit confusing. In addition, the dependency is on the wrong symbol, as the caller is part of the cxl_core.ko module, not the cxl_mem.ko module.
--- drivers/cxl/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cxl/Kconfig +2 -1
@@ -2,6 +2,8 @@ menuconfig CXL_BUS tristate "CXL (Compute Express Link) Devices Support" depends on PCI + select FW_LOADER + select FW_UPLOAD select PCI_DOE help CXL is a bus that is electrically compatible with PCI Express, but
@@ -82,7 +84,6 @@ config CXL_PMEM config CXL_MEM tristate "CXL: Memory Expansion" depends on CXL_PCI - select FW_UPLOAD default CXL_BUS help The CXL.mem protocol allows a device to act as a provider of "System
Signature · 1 line
2.39.2
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When
FW_LOADERis disabled, cxl fails to link:arm-linux-gnueabi-ld:
drivers/cxl/core/memdev.o: in function `cxl_memdev_setup_fw_upload':
memdev.c:(.text+0x90e): undefined reference tofirmware_upload_register' memdev.c:(.text+0x93c): undefined reference tofirmware_upload_unregister'
Quoted 7 lines
In order to use the
firmware_upload_register()function, bothFW_LOADERandFW_UPLOADhave to be enabled, which is a bit confusing. In addition, the dependency is on the wrong symbol, as the caller is part of the cxl_core.ko module, not the cxl_mem.ko module.Fixes 9521875bbe005 ("cxl: add a firmware update mechanism using the sysfs firmware loader")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 25 lines
--- drivers/cxl/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/cxl/Kconfig +2
-1@@ -2,6 +2,8 @@ menuconfig CXL_BUS tristate "CXL (Compute Express Link) Devices Support" depends on PCI + select FW_LOADER + select FW_UPLOAD select PCI_DOE help CXL is a bus that is electrically compatible with PCI Express, but@@ -82,7 +84,6 @@ config CXL_PMEM config CXL_MEM tristate "CXL: Memory Expansion" depends on CXL_PCI - select FW_UPLOAD default CXL_BUS help The CXL.mem protocol allows a device to act as a provider of "System
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann<[email protected]>
When
FW_LOADERis disabled, cxl fails to link:arm-linux-gnueabi-ld:
drivers/cxl/core/memdev.o: in function `cxl_memdev_setup_fw_upload':
memdev.c:(.text+0x90e): undefined reference tofirmware_upload_register' memdev.c:(.text+0x93c): undefined reference tofirmware_upload_unregister'
Quoted 7 lines
In order to use the
firmware_upload_register()function, bothFW_LOADERandFW_UPLOADhave to be enabled, which is a bit confusing. In addition, the dependency is on the wrong symbol, as the caller is part of the cxl_core.ko module, not the cxl_mem.ko module.Fixes 9521875bbe005 ("cxl: add a firmware update mechanism using the sysfs firmware loader")Signed-off-by Arnd Bergmann<[email protected]>
Hi Arnd,
It makes sense.
Best Regards,
Xiao Yang