linux/drivers/cxl
Keith Busch fffce2310e cxl/acpi: Fix CXL_ACPI and CXL_PMEM Kconfig tristate mismatch
commit 93d0fcdddc upstream.

Commit e7e222ad73 ("cxl: Move devm_cxl_add_nvdimm_bridge() to
cxl_pmem.ko") moves devm_cxl_add_nvdimm_bridge() into the cxl_pmem file,
which has independent config compile options for built-in or module. The
call from cxl_acpi_probe() is guarded by IS_ENABLED(CONFIG_CXL_PMEM),
which evaluates to true for both =y and =m.

When CONFIG_CXL_PMEM=m, a built-in cxl_acpi attempts to reference a
symbol exported by a module, which fails to link. CXL_PMEM cannot simply
be promoted to =y in this configuration because it depends on LIBNVDIMM,
which may itself be =m.

Add a Kconfig dependency to prevent CXL_ACPI from being built-in when
CXL_PMEM is a module. This contrains CXL_ACPI to =m when CXL_PMEM=m,
while still allowing CXL_ACPI to be freely configured when CXL_PMEM is
either built-in or disabled.

[ dj: Fix up commit reference formatting. ]

Fixes: e7e222ad73 ("cxl: Move devm_cxl_add_nvdimm_bridge() to cxl_pmem.ko")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260305204057.1516948-1-kbusch@meta.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-03-19 16:08:48 +01:00
..
core cxl: Fix race of nvdimm_bus object when creating nvdimm objects 2026-03-12 07:09:15 -04:00
acpi.c cxl/acpi: Fix setup of memory resource in cxl_acpi_set_cache_size() 2025-10-14 12:59:13 -07:00
cxl.h cxl: Fix race of nvdimm_bus object when creating nvdimm objects 2026-03-12 07:09:15 -04:00
cxlmem.h cxl/mem: Fix devm_cxl_memdev_edac_release() confusion 2026-02-26 14:59:24 -08:00
cxlpci.h cxl/test: Refactor decoder setup to reduce cxl_test burden 2025-09-18 09:54:50 -07:00
Kconfig cxl/acpi: Fix CXL_ACPI and CXL_PMEM Kconfig tristate mismatch 2026-03-19 16:08:48 +01:00
Makefile cxl/port: Fix CXL port initialization order when the subsystem is built-in 2024-10-25 16:06:49 -05:00
mem.c cxl/edac: Add CXL memory device patrol scrub control feature 2025-05-23 13:24:09 -07:00
pci.c cxl/pci: Replace mutex_lock_io() w mutex_lock() for mailbox access 2025-06-30 16:36:06 -07:00
pmem.c cxl: Fix race of nvdimm_bus object when creating nvdimm objects 2026-03-12 07:09:15 -04:00
pmu.h cxl/pci: Find and register CXL PMU devices 2023-05-30 11:20:35 -07:00
port.c cxl: Defer dport allocation for switch ports 2025-09-18 09:55:22 -07:00
security.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00