From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
Dan Williams <dan.j.williams@intel.com>,
linux-nvdimm@ml01.01.org
Subject: [PATCH] /dev/dax: fix Kconfig dependency build breakage
Date: Fri, 9 Sep 2016 11:56:52 -0600 [thread overview]
Message-ID: <20160909175652.10267-1-ross.zwisler@linux.intel.com> (raw)
The function dax_pmem_probe() in drivers/dax/pmem.c is compiled under the
CONFIG_DEV_DAX_PMEM tri-state config option. This config option currently
only depends on CONFIG_NVDIMM_DAX, which means that the following
configuration is possible:
CONFIG_LIBNVDIMM=m
...
CONFIG_NVDIMM_DAX=y
CONFIG_DEV_DAX=y
CONFIG_DEV_DAX_PMEM=y
With this config LIBNVDIMM is compiled as a module with NVDIMM_DAX=y just
meaning that we will compile drivers/nvdimm/dax_devs.c into that module.
However, dax_pmem_probe() depends on several symbols defined in
drivers/nvdimm/dax_devs.c, which results in the following build errors:
drivers/built-in.o: In function `dax_pmem_probe':
linux/drivers/dax/pmem.c:70: undefined reference to `to_nd_dax'
linux/drivers/dax/pmem.c:74: undefined reference to `nvdimm_namespace_common_probe'
linux/drivers/dax/pmem.c:80: undefined reference to `devm_nsio_enable'
linux/drivers/dax/pmem.c:81: undefined reference to `nvdimm_setup_pfn'
linux/drivers/dax/pmem.c:84: undefined reference to `devm_nsio_disable'
linux/drivers/dax/pmem.c:122: undefined reference to `to_nd_region'
drivers/built-in.o: In function `dax_pmem_init':
linux/drivers/dax/pmem.c:147: undefined reference to `__nd_driver_register'
Fix this by making CONFIG_DEV_DAX_PMEM explicitly depend on
CONFIG_LIBNVDIMM. This prevents dax_devs.c from being built as a built-in
while its dependencies are in the libnvdimm.ko module.
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
---
drivers/dax/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index cedab75..5cd9436 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -15,6 +15,7 @@ if DEV_DAX
config DEV_DAX_PMEM
tristate "PMEM DAX: direct access to persistent memory"
depends on NVDIMM_DAX
+ depends on LIBNVDIMM
default DEV_DAX
help
Support raw access to persistent memory. Note that this
--
2.9.0
next reply other threads:[~2016-09-09 17:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-09 17:56 Ross Zwisler [this message]
2016-09-09 18:14 ` Dan Williams
2016-09-12 16:15 ` [PATCH v2] " Ross Zwisler
2016-09-13 0:33 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160909175652.10267-1-ross.zwisler@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@ml01.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®