From mboxrd@z Thu Jan 1 00:00:00 1970 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=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 8AFBAC43464 for ; Fri, 18 Sep 2020 02:22:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5621C23119 for ; Fri, 18 Sep 2020 02:22:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="R77uLUoO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727961AbgIRCWl (ORCPT ); Thu, 17 Sep 2020 22:22:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:26505 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729505AbgIRCRK (ORCPT ); Thu, 17 Sep 2020 22:17:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600395428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ku+sICGKzWJ9hbk/lDryotAHNAcONZujUxBnYspdRTU=; b=R77uLUoOKad2WFiiuIkiJVwmx34ntgsjcuSE/1RiM3Sgn2XQK58CTB2cUQpqivFvAUAd/F B1EhYVPc0c6DfrAgj9XzqynG5pQLy7B7hW22vK2UjQIsREyHipwILI2t0GAI/QYBFHdlr/ arcrnwg/MMthyZ9Kg6XlVkAGs4VGHqs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-137-wx2RmR3bNLelwWeZZ_RbzQ-1; Thu, 17 Sep 2020 22:17:06 -0400 X-MC-Unique: wx2RmR3bNLelwWeZZ_RbzQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3B88110BBEE6; Fri, 18 Sep 2020 02:17:05 +0000 (UTC) Received: from [10.72.13.167] (ovpn-13-167.pek2.redhat.com [10.72.13.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4314510013C1; Fri, 18 Sep 2020 02:16:58 +0000 (UTC) Subject: Re: [PATCH v2 -next] vdpa: mlx5: change Kconfig depends to fix build errors To: Randy Dunlap , virtualization@lists.linux-foundation.org, "netdev@vger.kernel.org" , LKML , Stephen Rothwell , "Michael S. Tsirkin" , Saeed Mahameed , Leon Romanovsky References: <22a2bd60-d895-2bfb-50be-4ac3d131ed82@infradead.org> From: Jason Wang Message-ID: Date: Fri, 18 Sep 2020 10:16:57 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <22a2bd60-d895-2bfb-50be-4ac3d131ed82@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/9/18 上午3:45, Randy Dunlap wrote: > From: Randy Dunlap > > drivers/vdpa/mlx5/ uses vhost_iotlb*() interfaces, so add a dependency > on 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 > --- > v2: change from select to depends (Saeed) > > drivers/vdpa/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- linux-next-20200917.orig/drivers/vdpa/Kconfig > +++ linux-next-20200917/drivers/vdpa/Kconfig > @@ -31,7 +31,7 @@ config IFCVF > > config MLX5_VDPA > bool "MLX5 VDPA support library for ConnectX devices" > - depends on MLX5_CORE > + depends on VHOST && MLX5_CORE It looks to me that depending on VHOST is too heavyweight. I guess what it really needs is VHOST_IOTLB. So we can use select VHOST_IOTLB here. Thanks > default n > help > Support library for Mellanox VDPA drivers. Provides code that is >