Skip to content

Commit 867dfe3

Browse files
arndbdjbw
authored andcommitted
nvdimm: make CONFIG_NVDIMM_DAX 'bool'
A bugfix just tried to address a randconfig build problem and introduced a variant of the same problem: with CONFIG_LIBNVDIMM=y and CONFIG_NVDIMM_DAX=m, the nvdimm module now fails to link: drivers/nvdimm/built-in.o: In function `to_nd_device_type': bus.c:(.text+0x1b5d): undefined reference to `is_nd_dax' drivers/nvdimm/built-in.o: In function `nd_region_notify_driver_action.constprop.2': region_devs.c:(.text+0x6b6c): undefined reference to `is_nd_dax' region_devs.c:(.text+0x6b8c): undefined reference to `to_nd_dax' drivers/nvdimm/built-in.o: In function `nd_region_probe': region.c:(.text+0x70f3): undefined reference to `nd_dax_create' drivers/nvdimm/built-in.o: In function `mode_show': namespace_devs.c:(.text+0xa196): undefined reference to `is_nd_dax' drivers/nvdimm/built-in.o: In function `nvdimm_namespace_common_probe': (.text+0xa55f): undefined reference to `is_nd_dax' drivers/nvdimm/built-in.o: In function `nvdimm_namespace_common_probe': (.text+0xa56e): undefined reference to `to_nd_dax' This reverts the earlier fix, making NVDIMM_DAX a 'bool' option again as it should be (it gets linked into the libnvdimm module). To fix the original problem, I'm adding a dependency on LIBNVDIMM to DEV_DAX_PMEM, which ensures we can't have that one built-in if the rest is a module. Fixes: 4e65e93 ("/dev/dax: fix Kconfig dependency build breakage") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 3115bb0 commit 867dfe3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/dax/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if DEV_DAX
1414

1515
config DEV_DAX_PMEM
1616
tristate "PMEM DAX: direct access to persistent memory"
17-
depends on NVDIMM_DAX
17+
depends on LIBNVDIMM && NVDIMM_DAX
1818
default DEV_DAX
1919
help
2020
Support raw access to persistent memory. Note that this

drivers/nvdimm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ config NVDIMM_PFN
8989
Select Y if unsure
9090

9191
config NVDIMM_DAX
92-
tristate "NVDIMM DAX: Raw access to persistent memory"
92+
bool "NVDIMM DAX: Raw access to persistent memory"
9393
default LIBNVDIMM
9494
depends on NVDIMM_PFN
9595
help

0 commit comments

Comments
 (0)