All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool'
@ 2016-10-25 15:52 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-10-25 15:52 UTC (permalink / raw)
  To: Dan Williams; +Cc: Arnd Bergmann, linux-nvdimm, linux-kernel, Paul E. McKenney

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: 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/dax/Kconfig    | 2 +-
 drivers/nvdimm/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index daadd20aa936..3e2ab3b14eea 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -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
diff --git a/drivers/nvdimm/Kconfig b/drivers/nvdimm/Kconfig
index 8b2b740d6679..124c2432ac9c 100644
--- a/drivers/nvdimm/Kconfig
+++ b/drivers/nvdimm/Kconfig
@@ -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
-- 
2.9.0

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool'
@ 2016-10-25 15:52 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-10-25 15:52 UTC (permalink / raw)
  To: Dan Williams
  Cc: Arnd Bergmann, Johannes Thumshirn, Paul E. McKenney,
	Ross Zwisler, linux-kernel, linux-nvdimm

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: 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/dax/Kconfig    | 2 +-
 drivers/nvdimm/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index daadd20aa936..3e2ab3b14eea 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -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
diff --git a/drivers/nvdimm/Kconfig b/drivers/nvdimm/Kconfig
index 8b2b740d6679..124c2432ac9c 100644
--- a/drivers/nvdimm/Kconfig
+++ b/drivers/nvdimm/Kconfig
@@ -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
-- 
2.9.0

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

* Re: [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool'
  2016-10-25 15:52 ` Arnd Bergmann
@ 2016-10-25 16:24   ` Ross Zwisler
  -1 siblings, 0 replies; 6+ messages in thread
From: Ross Zwisler @ 2016-10-25 16:24 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-nvdimm, linux-kernel, Paul E. McKenney

On Tue, Oct 25, 2016 at 05:52:04PM +0200, Arnd Bergmann wrote:
> tatus: O
> Content-Length: 2346
> Lines: 60
> 
> 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: 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* Re: [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool'
@ 2016-10-25 16:24   ` Ross Zwisler
  0 siblings, 0 replies; 6+ messages in thread
From: Ross Zwisler @ 2016-10-25 16:24 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Dan Williams, Johannes Thumshirn, Paul E. McKenney, Ross Zwisler,
	linux-kernel, linux-nvdimm

On Tue, Oct 25, 2016 at 05:52:04PM +0200, Arnd Bergmann wrote:
> tatus: O
> Content-Length: 2346
> Lines: 60
> 
> 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: 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>

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

* Re: [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool'
  2016-10-25 15:52 ` Arnd Bergmann
@ 2016-10-27 23:22   ` Dan Williams
  -1 siblings, 0 replies; 6+ messages in thread
From: Dan Williams @ 2016-10-27 23:22 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-nvdimm, Paul E. McKenney, linux-kernel

On Tue, Oct 25, 2016 at 8:52 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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: 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* Re: [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool'
@ 2016-10-27 23:22   ` Dan Williams
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Williams @ 2016-10-27 23:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Johannes Thumshirn, Paul E. McKenney, Ross Zwisler, linux-kernel,
	linux-nvdimm@lists.01.org

On Tue, Oct 25, 2016 at 8:52 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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: 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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.

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

end of thread, other threads:[~2016-10-27 23:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-25 15:52 [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool' Arnd Bergmann
2016-10-25 15:52 ` Arnd Bergmann
2016-10-25 16:24 ` Ross Zwisler
2016-10-25 16:24   ` Ross Zwisler
2016-10-27 23:22 ` Dan Williams
2016-10-27 23:22   ` Dan Williams

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.