Skip to content

Commit 93d0fcd

Browse files
keithbuschdavejiang
authored andcommitted
cxl/acpi: Fix CXL_ACPI and CXL_PMEM Kconfig tristate mismatch
Commit e7e222a ("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: e7e222a ("cxl: Move devm_cxl_add_nvdimm_bridge() to cxl_pmem.ko") Signed-off-by: Keith Busch <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Dan Williams <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Dave Jiang <[email protected]>
1 parent 77b310b commit 93d0fcd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/cxl/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ config CXL_ACPI
5959
tristate "CXL ACPI: Platform Support"
6060
depends on ACPI
6161
depends on ACPI_NUMA
62+
depends on CXL_PMEM || !CXL_PMEM
6263
default CXL_BUS
6364
select ACPI_TABLE_LIB
6465
select ACPI_HMAT

0 commit comments

Comments
 (0)