From patchwork Fri Oct 6 07:13:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9988403 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 C02D560244 for ; Fri, 6 Oct 2017 07:14:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B334D28D39 for ; Fri, 6 Oct 2017 07:14:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A791D28D5E; Fri, 6 Oct 2017 07:14:44 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 184FB28D39 for ; Fri, 6 Oct 2017 07:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbdJFHO3 (ORCPT ); Fri, 6 Oct 2017 03:14:29 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:60698 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751766AbdJFHO2 (ORCPT ); Fri, 6 Oct 2017 03:14:28 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0LfFYi-1dXsiq2g4e-00omOU; Fri, 06 Oct 2017 09:14:12 +0200 From: Arnd Bergmann To: Doug Ledford , Sean Hefty , Hal Rosenstock Cc: Arnd Bergmann , Yuval Shaia , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] infiniband: add MMU dependency for user_mem Date: Fri, 6 Oct 2017 09:13:46 +0200 Message-Id: <20171006071410.732275-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:SldSjjYw7rsndn5XBtHZxpbb5mVEX45tKfuYn9a4hQ18fijbrxZ AobI7bsOj5gpUcf0vI7/cKtsLclG31f+6r5GG2y9TjM+o4/tUsz7iFVH2UN8gkvpGSAXl2w iwUSQJ9Pgi+E58AN1OmRenaLbNG2pMz/NpM+wyEpBTc5aKYVyfpTqmhQO8dg+F8kdFQUXB7 jW/1mIYdsxIWQsUXsUWhQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:KHL7V8wJYNo=:EpbBOgw4H/cbrFM2/sKBLR KhdSs05Yl8LjwrPYNqpcOxMxEqDY2E4+DkOc1Jl6kBuUKcxd9mJczFHajYzVwDSk+FWLcJPy9 IV6psBxz/9qvreDKjT7Arun/ND3gaxDoGQKsIo0c6PepMTrGGCjG5NfVpRJRENr8ZCfufSQHF YUIOjJ/Vv9HGjDqFMzAAyFzm/sP8K+W5EkU7TZf2EeoM3ngN0DRuZb5QWBfFr2w9znDnu3i7H L8aRt7Tz5zJr1m6aDl4NOWtgoCauQPXpE0T3AFLbD59FNkhapFujhN16fmHKVyc2QoT+EzEj3 oaKR78l6mM7lb5k5bRi/cajuE+5Lt740T0V3wl8qTujTNCcULA9B7x5aIl+vl7xvTDR9no4Pm /r5HDxqZ0Wn+2nEsUNjHSskValm9xcRlvAvLU2vNePgFmrRrvu3man65DLktk+7vVIkf1e0gB MNfwONAD81Z5kzKcopLI4WSkWO0fgZUdZiidGFR+e/Wvh1wf000BeOK4hixZ7w0btsvPAdzfU aCw4Cdg36cl2QRCvej471tT3X6QV/DHbOQZdMzHfWVWlJwrMFRco+Pt+vZ6MU+Y+rQxuUjGwr FADsY6vwJINKG6BYon2Lf5L08/vj1dkm+RMfvHInWPNfgkXTsKXbMIuHXBbEfwZwwGEDKY2WX R+1tAzgCfAHPe5LX9pJYsAjknFoghI8ohMvGiCiIQJ67wV/Rgczxrtb1L5ffndcWE70DhoCnD U1OQYSKi3GPcAJTnKq9tRtHGOaMZqTSUrRmgLg== Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The infiniband subsystem causes a link failure when the umem driver is built on MMU-less systems: mm/mmu_notifier.o: In function `do_mmu_notifier_register': mmu_notifier.c:(.text+0x32): undefined reference to `mm_take_all_locks' drivers/infiniband/core/umem.o: In function `ib_umem_get': umem.c:(.text+0x132): undefined reference to `can_do_mlock' drivers/infiniband/core/umem_odp.o: In function `ib_umem_odp_map_dma_pages': umem_odp.c:(.text+0x766): undefined reference to `get_user_pages_remote' This bug has existed for a while but only become apparent in ARM randconfig builds when the dependency on PCI was lifted, as none of the ARM-NOMMU targets support PCI at the moment. We could probably get the umem driver to build by providing an alternative implementation 'can_do_mlock()' that returns false on NOMMU-systems, but then we'd still have a problem with the mmu-notifiers required by CONFIG_INFINIBAND_ON_DEMAND_PAGING, so simply forbidding umem with NOMMU seems like the simplest workaround. Fixes: 931bc0d91639 ("IB: Move PCI dependency from root KConfig to HW's KConfigs") Signed-off-by: Arnd Bergmann --- drivers/infiniband/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index b62b3b1e09cd..98ac46ed7214 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig @@ -45,6 +45,7 @@ config INFINIBAND_EXP_USER_ACCESS config INFINIBAND_USER_MEM bool depends on INFINIBAND_USER_ACCESS != n + depends on MMU default y config INFINIBAND_ON_DEMAND_PAGING