From patchwork Tue Oct 25 15:52:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9394927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4852D6077F for ; Tue, 25 Oct 2016 15:53:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B4C729677 for ; Tue, 25 Oct 2016 15:53:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3030C2967B; Tue, 25 Oct 2016 15:53:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=2.0 tests=BAYES_40, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 123E929677 for ; Tue, 25 Oct 2016 15:53:14 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C53731A1E57; Tue, 25 Oct 2016 08:53:13 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org 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) Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0MXH2D-1cSMSX42AX-00WE7T; Tue, 25 Oct 2016 17:52:53 +0200 From: Arnd Bergmann To: Dan Williams 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= X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, "Paul E. McKenney" MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Ross Zwisler --- 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