public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cxl/acpi: Fix CXL_ACPI and CXL_PMEM Kconfig tristate mismatch
@ 2026-03-05 20:40 Keith Busch
  2026-03-05 22:12 ` Gregory Price
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Keith Busch @ 2026-03-05 20:40 UTC (permalink / raw)
  To: linux-cxl; +Cc: dan.j.williams, dave.jiang, gourry, Keith Busch

From: Keith Busch <kbusch@kernel.org>

Commit e7e222ad73d9 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.

Fixes: e7e222ad73d9 ("cxl: Move devm_cxl_add_nvdimm_bridge() to cxl_pmem.ko")
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/cxl/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cxl/Kconfig b/drivers/cxl/Kconfig
index 4589bf11d3fe0..80aeb0d556bd7 100644
--- a/drivers/cxl/Kconfig
+++ b/drivers/cxl/Kconfig
@@ -59,6 +59,7 @@ config CXL_ACPI
 	tristate "CXL ACPI: Platform Support"
 	depends on ACPI
 	depends on ACPI_NUMA
+	depends on CXL_PMEM || !CXL_PMEM
 	default CXL_BUS
 	select ACPI_TABLE_LIB
 	select ACPI_HMAT
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-03-06 15:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 20:40 [PATCH] cxl/acpi: Fix CXL_ACPI and CXL_PMEM Kconfig tristate mismatch Keith Busch
2026-03-05 22:12 ` Gregory Price
2026-03-05 22:43   ` Keith Busch
2026-03-05 22:56     ` Gregory Price
2026-03-05 23:26       ` Keith Busch
2026-03-06  1:07 ` dan.j.williams
2026-03-06  1:26   ` Keith Busch
2026-03-06  1:55     ` dan.j.williams
2026-03-06 10:50       ` Jonathan Cameron
2026-03-06 15:23 ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox