From patchwork Tue Apr 17 01:51:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10344135 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 01A3A60542 for ; Tue, 17 Apr 2018 01:52:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE8CD2896F for ; Tue, 17 Apr 2018 01:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2A6F28973; Tue, 17 Apr 2018 01:52:58 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 2D3012896F for ; Tue, 17 Apr 2018 01:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751164AbeDQBwz (ORCPT ); Mon, 16 Apr 2018 21:52:55 -0400 Received: from merlin.infradead.org ([205.233.59.134]:59412 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbeDQBwz (ORCPT ); Mon, 16 Apr 2018 21:52:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YfPfsCpRZIwn3Kf+TbahaLCCqLWP3S4I1Q9Mli3b4IY=; b=t7fJ8trl3Ue6XvAGBWERnJ4ZNj q/ZzahvvWiu+CVW/1G+K7zS9Bx+TTPw69dcFsEvBjH8hU2yKuctGZWqzPlwogW56gjC/0U7Ijdofg GTfxCU1IjwdXlWT9DrSq8Ke22F51PArTH2tQq6bdJenhS+f8Vx4xFoR2A5RCN1QYtRCjsLo/rbRWu 2g0h4zo6ObUb36HClx6QRFYhsqtdHzFER/BZZWZXEuIiRPMtXzWoeu/k1eb2sM5ZhmIryM4CNsOIc jI/J07i/FYgiWeBOulvQTW+W1iJKYHT3iX7wZNOIMkm+DRGCkXD+Dt+7KAR4n3eQs+ds0cafcFG4B oif0Y1nw==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8FnN-0007BJ-G9; Tue, 17 Apr 2018 01:52:51 +0000 To: "linux-rdma@vger.kernel.org" Cc: LKML , Matan Barak , Jason Gunthorpe , Leon Romanovsky , Doug Ledford From: Randy Dunlap Subject: [PATCH v2] infiniband: mlx5: fix build errors when INFINIBAND_USER_ACCESS=m Message-ID: Date: Mon, 16 Apr 2018 18:51:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Language: en-US 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 From: Randy Dunlap Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y. The build error occurs when the mlx5 driver code attempts to use USER_ACCESS interfaces, which are built as a loadable module. Fixes these build errors: drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root': ../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to `uverbs_default_get_objects' ../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to `uverbs_alloc_spec_tree' drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root': ../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to `uverbs_free_spec_tree' Build-tested with multiple config combinations. Reported-by: kbuild test robot Signed-off-by: Randy Dunlap Cc: Matan Barak Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: Doug Ledford Cc: linux-rdma@vger.kernel.org Cc: stable@vger.kernel.org # reported against 4.16 --- v2: allow building mxl5 even when INFINIBAND_USER_ACCESS is disabled. drivers/infiniband/hw/mlx5/Kconfig | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- lnx-417-rc1.orig/drivers/infiniband/hw/mlx5/Kconfig +++ lnx-417-rc1/drivers/infiniband/hw/mlx5/Kconfig @@ -1,6 +1,7 @@ config MLX5_INFINIBAND tristate "Mellanox Connect-IB HCA support" depends on NETDEVICES && ETHERNET && PCI && MLX5_CORE + depends on INFINIBAND_USER_ACCESS || INFINIBAND_USER_ACCESS=n ---help--- This driver provides low-level InfiniBand support for Mellanox Connect-IB PCI Express host channel adapters (HCAs).