Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B3FFC43464 for ; Thu, 17 Sep 2020 20:11:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3865220707 for ; Thu, 17 Sep 2020 20:11:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600373510; bh=qyJdM6F52/Q1voZiWeq2UVFE1j/RfRq6JpEmt5HrtKs=; h=Subject:From:To:Cc:Date:In-Reply-To:References:List-ID:From; b=cjaGNwJ8esM5niyQnIftsk1lQdMpENp+/6/Frd3bdYRKJL8TNY8B00ihZLsyaWe/T 8LHrv8mxh76VXfV5NNiMSfe3R+MivMN9OoUJ2quZtibhFJ5vvPe7kJdebIYmKPaKsT s1ORQGFG6eV+d5vVt3vBDlP2K1H3c/a9fAPg1ikY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726621AbgIQULs (ORCPT ); Thu, 17 Sep 2020 16:11:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:34538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbgIQULj (ORCPT ); Thu, 17 Sep 2020 16:11:39 -0400 Received: from lt-jalone-7480.mtl.com (c-24-6-56-119.hsd1.ca.comcast.net [24.6.56.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2E0AE20707; Thu, 17 Sep 2020 19:34:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600371264; bh=qyJdM6F52/Q1voZiWeq2UVFE1j/RfRq6JpEmt5HrtKs=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=nl87bhq0c52XQGZSTqrkMQjJQK2LDpZiLIfNrMmyTyp4HjdmKZyyA/GVJn1T7cv2y 1ztlfS7jeG9uKgfG0hM9TalYvO6pW26KOD6++2q2bwpphVrqgkvJWEPM09Y322unKU nuYQBxFPoXB2fhaYjnMpZYM/BHBSSU5Hmh7UpXFw= Message-ID: Subject: Re: [PATCH -next] vdpa: mlx5: select VHOST to fix build errors From: Saeed Mahameed To: Randy Dunlap , LKML , virtualization@lists.linux-foundation.org, "netdev@vger.kernel.org" Cc: "Michael S. Tsirkin" , Jason Wang , Leon Romanovsky , Stephen Rothwell Date: Thu, 17 Sep 2020 12:34:23 -0700 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-09-17 at 11:58 -0700, Randy Dunlap wrote: > From: Randy Dunlap > > drivers/vdpa/mlx5/ uses vhost_iotlb*() interfaces, so select > VHOST to eliminate build errors. > > ld: drivers/vdpa/mlx5/core/mr.o: in function `add_direct_chain': > mr.c:(.text+0x106): undefined reference to `vhost_iotlb_itree_first' > ld: mr.c:(.text+0x1cf): undefined reference to > `vhost_iotlb_itree_next' > ld: mr.c:(.text+0x30d): undefined reference to > `vhost_iotlb_itree_first' > ld: mr.c:(.text+0x3e8): undefined reference to > `vhost_iotlb_itree_next' > ld: drivers/vdpa/mlx5/core/mr.o: in function `_mlx5_vdpa_create_mr': > mr.c:(.text+0x908): undefined reference to `vhost_iotlb_itree_first' > ld: mr.c:(.text+0x9e6): undefined reference to > `vhost_iotlb_itree_next' > ld: drivers/vdpa/mlx5/core/mr.o: in function > `mlx5_vdpa_handle_set_map': > mr.c:(.text+0xf1d): undefined reference to `vhost_iotlb_itree_first' > > Signed-off-by: Randy Dunlap > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: virtualization@lists.linux-foundation.org > Cc: Saeed Mahameed > Cc: Leon Romanovsky > Cc: netdev@vger.kernel.org > --- > Note: This patch may not be the right thing, but it fixes the build > errors. > > drivers/vdpa/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > --- linux-next-20200917.orig/drivers/vdpa/Kconfig > +++ linux-next-20200917/drivers/vdpa/Kconfig > @@ -32,6 +32,7 @@ config IFCVF > config MLX5_VDPA > bool "MLX5 VDPA support library for ConnectX devices" > depends on MLX5_CORE > + select VHOST select keyword usually complicates things. It is better if you add a dependency rather than forcing VHOST. Just do: depends on VHOST & MLX5_CORE > default n > help > Support library for Mellanox VDPA drivers. Provides code that > is >