nvdimm: make CONFIG_NVDIMM_DAX 'bool'
PATCH 1/1 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.
--- drivers/dax/Kconfig | 2 +- drivers/nvdimm/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/dax/Kconfig +1 -1
@@ -14,7 +14,7 @@ if DEV_DAX config DEV_DAX_PMEM tristate "PMEM DAX: direct access to persistent memory" - depends on NVDIMM_DAX + depends on LIBNVDIMM && NVDIMM_DAX default DEV_DAX help Support raw access to persistent memory. Note that this
drivers/nvdimm/Kconfig +1 -1
@@ -89,7 +89,7 @@ config NVDIMM_PFN Select Y if unsure config NVDIMM_DAX - tristate "NVDIMM DAX: Raw access to persistent memory" + bool "NVDIMM DAX: Raw access to persistent memory" default LIBNVDIMM depends on NVDIMM_PFN help
Signature · 6 lines
2.9.0 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 22 lines · Arnd Bergmann
tatus: O
Content-Length: 2346
Lines: 60A bugfix just tried to address a randconfig build problem and introduced a variant of the same problem: with
CONFIG_LIBNVDIMM=yandCONFIG_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 tois_nd_dax' drivers/nvdimm/built-in.o: In functionnd_region_notify_driver_action.constprop.2':
region_devs.c:(.text+0x6b6c): undefined reference tois_nd_dax' region_devs.c:(.text+0x6b8c): undefined reference toto_nd_dax'drivers/nvdimm/built-in.o: In function `nd_region_probe':
region.c:(.text+0x70f3): undefined reference tond_dax_create' drivers/nvdimm/built-in.o: In functionmode_show':
namespace_devs.c:(.text+0xa196): undefined reference tois_nd_dax' drivers/nvdimm/built-in.o: In functionnvdimm_namespace_common_probe':
(.text+0xa55f): undefined reference tois_nd_dax' drivers/nvdimm/built-in.o: In functionnvdimm_namespace_common_probe':
(.text+0xa56e): undefined reference to `to_nd_dax'
Quoted 8 lines
This reverts the earlier fix, making
NVDIMM_DAXa '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 toDEV_DAX_PMEM, which ensures we can't have that one built-in if the rest is a module.Fixes 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage")Signed-off-by Arnd Bergmann <[email protected]>
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 18 lines · Arnd Bergmann
A bugfix just tried to address a randconfig build problem and introduced a variant of the same problem: with
CONFIG_LIBNVDIMM=yandCONFIG_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 tois_nd_dax' drivers/nvdimm/built-in.o: In functionnd_region_notify_driver_action.constprop.2':
region_devs.c:(.text+0x6b6c): undefined reference tois_nd_dax' region_devs.c:(.text+0x6b8c): undefined reference toto_nd_dax'drivers/nvdimm/built-in.o: In function `nd_region_probe':
region.c:(.text+0x70f3): undefined reference tond_dax_create' drivers/nvdimm/built-in.o: In functionmode_show':
namespace_devs.c:(.text+0xa196): undefined reference tois_nd_dax' drivers/nvdimm/built-in.o: In functionnvdimm_namespace_common_probe':
(.text+0xa55f): undefined reference tois_nd_dax' drivers/nvdimm/built-in.o: In functionnvdimm_namespace_common_probe':
(.text+0xa56e): undefined reference to `to_nd_dax'
Quoted 8 lines
This reverts the earlier fix, making
NVDIMM_DAXa '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 toDEV_DAX_PMEM, which ensures we can't have that one built-in if the rest is a module.Fixes 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage")Signed-off-by Arnd Bergmann <[email protected]>
Thanks, applied. I had originally thought that we should add a LIBNVDIMM dependency to the NVDIMM_PFN dependency, but this should behave like header includes. If you use the symbol include the header, don't assume another header will include the one you want.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm