From patchwork Fri Sep 28 21:20:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10620325 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 523EA913 for ; Fri, 28 Sep 2018 21:20:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 416F32BE85 for ; Fri, 28 Sep 2018 21:20:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3591B2BE99; Fri, 28 Sep 2018 21:20:42 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 B51E72BE85 for ; Fri, 28 Sep 2018 21:20:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726496AbeI2DqP (ORCPT ); Fri, 28 Sep 2018 23:46:15 -0400 Received: from mail-eopbgr20051.outbound.protection.outlook.com ([40.107.2.51]:39994 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726451AbeI2DqO (ORCPT ); Fri, 28 Sep 2018 23:46:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xwQiKHayZZa3snshOlxKjZsPkBwHDtf0uYDqmBHGrFA=; b=viJHz/slpa+PU6ppFocHFDt9UgjuXTGD+HHgt1MfrJNvj33Qw/y8Wi1JNqWABKvCSCMyYnuMzqoalgO+rHmGC8YJHl7ZLzsSaY89wmDM3BFrAQV8k4Fp+9rMTd+HcBTrtHXzZQAg/6S90iLgsPvJ4SWLty5vktABpmLE71zWOZU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jgg@mellanox.com; Received: from mlx.ziepe.ca (174.3.196.123) by DB7PR05MB4460.eurprd05.prod.outlook.com (2603:10a6:5:1b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.22; Fri, 28 Sep 2018 21:20:34 +0000 Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1g60BT-0007WM-As; Fri, 28 Sep 2018 15:20:23 -0600 Date: Fri, 28 Sep 2018 15:20:23 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org, Arnd Bergmann Subject: [PATCH] RDMA: Fix building with CONFIG_MMU=n Message-ID: <20180928212023.GA28889@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [174.3.196.123] X-ClientProxiedBy: YTXPR0101CA0036.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00::49) To DB7PR05MB4460.eurprd05.prod.outlook.com (2603:10a6:5:1b::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d3a5ea6a-8a10-4a07-dada-08d625883a53 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:DB7PR05MB4460; X-Microsoft-Exchange-Diagnostics: 1;DB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RCiYjESAHPFOapYeFg+WZkvwfkFOwLuV4QpqrM+TyCP8i4PAHdqg4+yQ/HkRKtUTX1DvOYpYSuKKHHsww05zPzoXciX+GClGXz8/hzlOUJKGuGwlizGSVbXsTwVN+lywxZQfBrNGMdLyRZJ7E8GDsFSV3cJ/WySZDfctl3sz68jhH2yXwV+TiWu5VCSiPNcKVD7Nx5lzrP4zxt6cNif4sh9RiZkScHQIZlEbKaFOqukjdSvOlNS8nv5umMCvETUtQzPSije+/9jDV1WAsY2LNkTDgbNDSIukjX02hXs+oelzw4jcAzRp2WiebXD6GxMRN3nxnghzFc7kkD4pLsLF+wIv0wwtqiU2k9Oge7myd;4:ajzRahzWMzTzUgyIpCjRLm6bXp4oJuRWxcis4D1Itf/d47Ac7rLqFGBL7vm9Cg+c8dn2UMHiSnCenmf7yk7+ewqOHHEIywAdIAlV30sdszp9fAArd75p8VYRS5SoahjxlXVzfPBv7niuEuF7TamElniexlp9lq1JHD6dncnrGHqv1Br+4srIjxmOhZJ9Xl4WcsRGtcR76ke+4H8sGJ/JJCtosOOtAzBqBUVagPqDEQPxD4h0cr0FYr65KTW7QqHjr87saGuXSN6dzrdgIvkbnQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051);SRVR:DB7PR05MB4460;BCL:0;PCL:0;RULEID:;SRVR:DB7PR05MB4460; X-Forefront-PRVS: 0809C12563 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(136003)(366004)(396003)(346002)(39860400002)(376002)(189003)(199004)(86362001)(47776003)(68736007)(97736004)(1857600001)(316002)(26005)(46656002)(9686003)(69596002)(16586007)(57986006)(106356001)(83796002)(50466002)(186003)(2906002)(4006002)(7736002)(58126008)(53936002)(66066001)(386003)(105586002)(305945005)(36756003)(23726003)(486006)(9746002)(3846002)(5660300001)(1076002)(52116002)(8676002)(478600001)(14444005)(8936002)(6116002)(9786002)(34290500001)(6916009)(33896004)(122856001)(81166006)(81156014)(476003)(33656002)(18370500001)(24400500001)(42262002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR05MB4460;H:mlx.ziepe.ca;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;DB7PR05MB4460;23:9fAV9YYktjFLOPnjo84SXrTPdUAL3t3cpJxACZDf5aLS24k7XcosG6IAOEf28TQ6BXaIkkh9Mvw4wufmUrJ4Gu8rT+05bU19NmXsT8qfF2Scqefmf62G7cTBR5uKIKjhzynGvKDFY7l+2SbPud/r1wqf/R3VHaIyeF17dVlq+aIHDXU2ReWK+Epu3KOmAKP41uGuuD4jJwJm2Kiv2pKZatRzBiattz3Vpx4lRUuXpAXYHCs4aU72wxbeZCDM/7iuexoNv3xfU0ZQDToKKPeQ5w8+CC4DtrqLDlsVQezJ7iAkTwyyI7Yxn+rMcmPylXA3UmeGzKzXKoYEvzeWUGVt1pLQ8NcpVOLY6OxIRrSTXUhxwcMHO/Ex2gdseoBAyRkpibLKMDrqwuK2th8lzewmy6d3YzXdOnXxpXAetzW+/x7aGeaRzdX4CexgNngh74kaFCGQHPxkc7gVGJMe/Su/vzzE6sKqEbbT86VnGPGsbeU7hS7u/Iwr3n9lvLV8BFn49fuD0D46xt8pVK8dZccmM1rir9UMQyackJsdcHjMb31GFpJN4Ry+Tmv4xFJeInTpb1dwuRygXiQhXK4/jTVlh04ZnQp2YyOQkVBKGBwOKL9/ujao7PVmfejN3G95EFQtzw1KM5eq5smSplGLruga28TO8tStxT83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dhbl2FnZmYaAFavEmo7N6eViuxZK0ZbCNvJPmTdpSCkrBJOwlShr/iG1f65wOOXAE+T05sV9ViE9jCgvh6ZLJXaBTKIS/YRsXD+Iiwxy5vAO3WDYaK9yoaw40QcZmd8WVJoC7kk2uerJlr3ub/a0OeWwI4WkQ+gMEYTAfO1pjMKG6AJIQTY19oxF8ukdUQF1P8iIwb8qcUlXga+MoChZI0t0LJssnAnQFZhxzb+j4RhOn9gUw6zr2/hsN/gh52o8zNqYhapRGJicStl/d8PkZfdDLCjQrPaCVUbt4HsgLCiz3zmfCkdra7istRQ+rYkSE9xpYLjV8srsru63QhQQ5Yg0qOypQgpCiX/mNq1aTnBAbeOgb5WOC/iAIPVlE+10wK1XBZSvs5fiYSgJMBSTJj+GQvWLpay7pADy2ERHhnn+RoixKyG04Dszfee+JEZvxY2ChA4QuqNWA==;5:VtMob8s7LZild4gLRBQJfWRTi2fYGjOXYTE5+jPwMcxpKfUYwl9QyNhfMAdXYIsFCkp/SNX61y/H2yM3FICVYlnbvNkDIC7KMot869QJdE8AeUB7vWNqQw87uHJbBAa0swm4aLQ8pTnouXIjYl8Tj0EFfkxChjokB/gL4N/ZZUI=;7:JtML9Qd8R0sQWgc1qAZFIxgjiLARmszkbq9DnEkgLb4iN3kKv/mrqo7kM4xeaYKUHdayfuwtMBt/xQqOvl3YrngUlS03jTk1k00CDUzuiJJobXCxnsTOEsh7Ui2ZqZPRigOyQ+SFakOOA/OEt8iekgRvSN95uMlQp3HtDSKFTfi2wluy0ckIPFgzMavYSCGKVeZPPa2ShTrMeuA8OYJTMSaQ3TN9jwQIq+QK4nh0Kl9MS2pggxzsQzWwQGrX9a2B SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2018 21:20:34.3847 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d3a5ea6a-8a10-4a07-dada-08d625883a53 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4460 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 zap_vma_ptes() is declared but not defined on NOMMU kernels, causing a link error for the newly added uverbs code: drivers/infiniband/core/uverbs_main.o: In function `uverbs_user_mmap_disassociate': uverbs_main.c:(.text+0x114c): undefined reference to `zap_vma_ptes' drivers/infiniband/core/uverbs_main.o: In function `rdma_umap_open': uverbs_main.c:(.text+0x53c): undefined reference to `zap_vma_ptes' Since all user access for all of our drivers depend on remapping pages to user space disable USER_ACCESS when there is no mmu. Fixes: 5f9794dc94f5 ("RDMA/ucontext: Add a core API for mmaping driver IO memory") Reported-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe --- drivers/infiniband/Kconfig | 1 + 1 file changed, 1 insertion(+) Here is the revised version of Arnd's earlier patch, as requested. diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index abb6660c099c9f..0a3ec7c726ec20 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig @@ -26,6 +26,7 @@ config INFINIBAND_USER_MAD config INFINIBAND_USER_ACCESS tristate "InfiniBand userspace access (verbs and CM)" select ANON_INODES + depends on MMU ---help--- Userspace InfiniBand access support. This enables the kernel side of userspace verbs and the userspace