From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A55701A1E57 for ; Tue, 25 Oct 2016 08:53:11 -0700 (PDT) From: Arnd Bergmann Subject: [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool' Date: Tue, 25 Oct 2016 17:52:04 +0200 Message-Id: <20161025155246.4174413-1-arnd@arndb.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Dan Williams Cc: Arnd Bergmann , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, "Paul E. McKenney" List-ID: 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 --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758403AbcJYPxT (ORCPT ); Tue, 25 Oct 2016 11:53:19 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:64071 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755624AbcJYPxP (ORCPT ); Tue, 25 Oct 2016 11:53:15 -0400 From: Arnd Bergmann To: Dan Williams Cc: Arnd Bergmann , Johannes Thumshirn , "Paul E. McKenney" , Ross Zwisler , linux-kernel@vger.kernel.org, linux-nvdimm@ml01.01.org Subject: [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool' Date: Tue, 25 Oct 2016 17:52:04 +0200 Message-Id: <20161025155246.4174413-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:DOR2nIc4CeMdAPUF5mm0k3iY2VoMwX12dErez7YGneSbjdzcIPx T6hrQn58CiFMD21yg2+7V9UHpM322CF/RvnxFB29exPC2SYnyiUnBTSPb+m9VTfECsE0UWZ TE63SOcooa/DoJ0eiYJtq+WcDWKzxIr95Tp8VJ/Ki49mawO5X5uuRabARvHSmU15LH0+vYV V5pCrsnHThbDKP8vZ2lyw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Sa6BNuPJ+pY=:Gz4uFmJpg4woVaJviMFgsz 7wHjXXr2pB4iDwbCI+FKr5HdS0H1Uuj1TPJzsKaYXPhbt9snBKf1dnDGNF2vn17okfGc/lO4E kOcKGkjyenugVNO12sKaq0mb10y3EatVWotSEGcQLnbAfHANeq4wnyARwO8VTdKlEyaB6UPy+ 0Ms1bq+PzdtM259ocTwp1bIQwJvuI9OYoG57wA/XDVkOHseFjDTGSvVfGq6dNr1WVeikK+Nd/ e2yuUonsvTnZHyeXgViZzAw0xW693cQI5cFMs3upyS4rgDSgFmUwhF8Dvr4ITuj24dGwlmPLP Z+E94ZAHuRZP9DE4oD+bz+vBYRpkpVoL/pq21bV6aF+35GT7uARYEQJsdwqlB3pN+LrDgt+fg 8BCaEjCPLOpPF/ZKJNihwZdVK2qmhXZhBzzNZmAyHtzn2CdHBGu2B78X43RX7ln57jM3UuS/+ jEVJNb0y3s/kBIvZqLrE8Lv8dkimNO91wFFGcnacZ/3BfsWf5m27l05XwinJ8nniEkLPd73IR 2wuqDP4LZ1bQ224d00sCFCV1q50ehlcf5UfNsHOyKUshuzM2Te5KeMgv0IkSP+3h2U5ijpns7 /akN55sDGlQM/mqnW/K1Bnp5pa6YvLLBnVoaQuG6xDUm+Uj26X+iek+1Y9f58BJCu8vDQIzc9 GCjwavZIErrkPXlFeZzr3uDiSXogweqtqUfvA8yfwmnrwTa1pEoLiwfOESuS4H9RDHTk= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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