* [PATCH] cxl: fix FWCTL dependency
@ 2025-03-10 13:51 Arnd Bergmann
2025-03-10 15:24 ` Dave Jiang
2025-03-10 18:27 ` Dan Williams
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2025-03-10 13:51 UTC (permalink / raw)
To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
Vishal Verma, Ira Weiny, Dan Williams, Li Ming, Jason Gunthorpe
Cc: Arnd Bergmann, Robert Richter, Mike Rapoport (Microsoft),
Masahiro Yamada, linux-cxl, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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
>>> referenced by features.c:695 (/home/arnd/arm-soc/drivers/cxl/core/features.c:695)
ld.lld-21: error: undefined symbol: fwctl_register
>>> referenced by features.c:699 (/home/arnd/arm-soc/drivers/cxl/core/features.c:699)
ld.lld-21: error: undefined symbol: fwctl_unregister
>>> 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 <arnd@arndb.de>
---
drivers/cxl/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/Kconfig b/drivers/cxl/Kconfig
index ed49e7e7e5bc..cf1ba673b8c2 100644
--- a/drivers/cxl/Kconfig
+++ b/drivers/cxl/Kconfig
@@ -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
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: fix FWCTL dependency
2025-03-10 13:51 [PATCH] cxl: fix FWCTL dependency Arnd Bergmann
@ 2025-03-10 15:24 ` Dave Jiang
2025-03-17 17:42 ` Jason Gunthorpe
2025-03-10 18:27 ` Dan Williams
1 sibling, 1 reply; 4+ messages in thread
From: Dave Jiang @ 2025-03-10 15:24 UTC (permalink / raw)
To: Arnd Bergmann, Davidlohr Bueso, Jonathan Cameron,
Alison Schofield, Vishal Verma, Ira Weiny, Dan Williams, Li Ming,
Jason Gunthorpe
Cc: Arnd Bergmann, Robert Richter, Mike Rapoport (Microsoft),
Masahiro Yamada, linux-cxl, linux-kernel
On 3/10/25 6:51 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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
>>>> referenced by features.c:695 (/home/arnd/arm-soc/drivers/cxl/core/features.c:695)
> ld.lld-21: error: undefined symbol: fwctl_register
>>>> referenced by features.c:699 (/home/arnd/arm-soc/drivers/cxl/core/features.c:699)
> ld.lld-21: error: undefined symbol: fwctl_unregister
>>>> 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 <arnd@arndb.de>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Thanks for the fix Arnd. Jason can you please append this fix to your latest branch? Thanks!
> ---
> drivers/cxl/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/Kconfig b/drivers/cxl/Kconfig
> index ed49e7e7e5bc..cf1ba673b8c2 100644
> --- a/drivers/cxl/Kconfig
> +++ b/drivers/cxl/Kconfig
> @@ -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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: fix FWCTL dependency
2025-03-10 13:51 [PATCH] cxl: fix FWCTL dependency Arnd Bergmann
2025-03-10 15:24 ` Dave Jiang
@ 2025-03-10 18:27 ` Dan Williams
1 sibling, 0 replies; 4+ messages in thread
From: Dan Williams @ 2025-03-10 18:27 UTC (permalink / raw)
To: Arnd Bergmann, Davidlohr Bueso, Jonathan Cameron, Dave Jiang,
Alison Schofield, Vishal Verma, Ira Weiny, Dan Williams, Li Ming,
Jason Gunthorpe
Cc: Arnd Bergmann, Robert Richter, Mike Rapoport (Microsoft),
Masahiro Yamada, linux-cxl, linux-kernel
Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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
> >>> referenced by features.c:695 (/home/arnd/arm-soc/drivers/cxl/core/features.c:695)
> ld.lld-21: error: undefined symbol: fwctl_register
> >>> referenced by features.c:699 (/home/arnd/arm-soc/drivers/cxl/core/features.c:699)
> ld.lld-21: error: undefined symbol: fwctl_unregister
> >>> 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 <arnd@arndb.de>
> ---
> drivers/cxl/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/Kconfig b/drivers/cxl/Kconfig
> index ed49e7e7e5bc..cf1ba673b8c2 100644
> --- a/drivers/cxl/Kconfig
> +++ b/drivers/cxl/Kconfig
> @@ -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,
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
...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.
> 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
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: fix FWCTL dependency
2025-03-10 15:24 ` Dave Jiang
@ 2025-03-17 17:42 ` Jason Gunthorpe
0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2025-03-17 17:42 UTC (permalink / raw)
To: Dave Jiang
Cc: Arnd Bergmann, Davidlohr Bueso, Jonathan Cameron,
Alison Schofield, Vishal Verma, Ira Weiny, Dan Williams, Li Ming,
Arnd Bergmann, Robert Richter, Mike Rapoport (Microsoft),
Masahiro Yamada, linux-cxl, linux-kernel
On Mon, Mar 10, 2025 at 08:24:44AM -0700, Dave Jiang wrote:
>
>
> On 3/10/25 6:51 AM, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > 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
> >>>> referenced by features.c:695 (/home/arnd/arm-soc/drivers/cxl/core/features.c:695)
> > ld.lld-21: error: undefined symbol: fwctl_register
> >>>> referenced by features.c:699 (/home/arnd/arm-soc/drivers/cxl/core/features.c:699)
> > ld.lld-21: error: undefined symbol: fwctl_unregister
> >>>> 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 <arnd@arndb.de>
>
> Acked-by: Dave Jiang <dave.jiang@intel.com>
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-17 17:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 13:51 [PATCH] cxl: fix FWCTL dependency Arnd Bergmann
2025-03-10 15:24 ` Dave Jiang
2025-03-17 17:42 ` Jason Gunthorpe
2025-03-10 18:27 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox