Re: [PATCH] cxl: fix FWCTL dependency

From: Jason Gunthorpe
Date: Mon Mar 17 2025 - 13:43:05 EST


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@xxxxxxxx>
> >
> > 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@xxxxxxxx>
>
> Acked-by: Dave Jiang <dave.jiang@xxxxxxxxx>
>
> 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