From patchwork Mon Oct 28 20:10:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 11216405 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 60A2313BD for ; Mon, 28 Oct 2019 20:11:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 21F02208C0 for ; Mon, 28 Oct 2019 20:11:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="Q6k/mUFV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21F02208C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 61FC86B0010; Mon, 28 Oct 2019 16:10:49 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5F8526B0266; Mon, 28 Oct 2019 16:10:49 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4727B6B0269; Mon, 28 Oct 2019 16:10:49 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id 1AC6E6B0266 for ; Mon, 28 Oct 2019 16:10:49 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id B614E181AC9CC for ; Mon, 28 Oct 2019 20:10:48 +0000 (UTC) X-FDA: 76094286576.14.tree33_413cc36c12557 X-Spam-Summary: 2,0,0,fa90dd2fc14a50ba,d41d8cd98f00b204,jgg@ziepe.ca,::jglisse@redhat.com:rcampbell@nvidia.com:jhubbard@nvidia.com:felix.kuehling@amd.com:linux-rdma@vger.kernel.org:dri-devel@lists.freedesktop.org:amd-gfx@lists.freedesktop.org:alexander.deucher@amd.com:bskeggs@redhat.com:boris.ostrovsky@oracle.com:christian.koenig@amd.com:david1.zhou@amd.com:dennis.dalessandro@intel.com:jgross@suse.com:mike.marciniszyn@intel.com:oleksandr_andrushchenko@epam.com:petrcvekcz@gmail.com:sstabellini@kernel.org:nouveau@lists.freedesktop.org:xen-devel@lists.xenproject.org:hch@infradead.org:jgg@mellanox.com,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1437:1515:1535:1541:1711:1730:1747:1777:1792:2393:2559:2562:2901:3138:3139:3140:3141:3142:3167:3352:3865:3867:3868:3870:3871:3872:3874:4321:5007:6261:6653:6742:7576:7903:10004:10903:11026:11473:11658:11914:12043:12048:12296:12297:12438:12517:12519:12555:12679:12895:12986:13069:13311:13357:13894:14096:14181:14384:1 4394:147 X-HE-Tag: tree33_413cc36c12557 X-Filterd-Recvd-Size: 5401 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Oct 2019 20:10:48 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id 15so9760394qkh.6 for ; Mon, 28 Oct 2019 13:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H/THPQGyz40LBFYEHcweT4lmD8Nqu8ZrqzmWM4HcCKs=; b=Q6k/mUFVxOBv3aTuq8oo7JDrjEauKE9HcDgFt84omZdU9K/XVboyEcdOWxaTkCBJ28 h0r5uedPPYCRhOvIEi8rMBg+LxDQ1kJy7G2KvTYOl8k1ftSUoOMiMEEi9CN59pf6OuOz MkDtPlTPswGrs8e2T9pzn8MdFhY0MZ1R+E+e8/2U9m/8aBR9ebJ0DsvWpb0j8hwE9f1i UuJJWkpCmSjN3VETuju98bl50r4w0WLDME6cbun6/34JTiAY6IEaZyv4ggnF2jWvcBtU qyxdFQalzd9YBNgYiQZmA0WiFjG+it9BlIMayLu3aVh2wFRpwpxXSydrKKoYGdfkI+Dw /p1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H/THPQGyz40LBFYEHcweT4lmD8Nqu8ZrqzmWM4HcCKs=; b=CV8xHFYv790GpUy5ly5m+rw2HAxVvjUsy/ZjWkP3e00SU2i/uSmxrqi1jyK37eqlzl +QYhXeOVZUP97Kt8ieRqrWLvhH9HIumC62icHXG71UgGcV0mF0vcdtz7RuGH6HPcszul sEKyFxgwggC7b2sNI3D217Xuvw+TXBkhOhKSJdGZJCdIjhccaYzA3il43UZ44fnUC3s6 4tdAvgcKP/elc0DfU+kfTFNDacBmHdcunOlqgfviw1qXyH+SipMOGB9n4wwrf4EebgFl fI7MNMt+F35swhLIsyR+vhCy2+t7FYjrh4JjKFSW/ZBNeA/x/CEyyTR2UWwVNbDtCjT6 dGBw== X-Gm-Message-State: APjAAAUfw93+S4rnMfrmxWI4B68HJZ3KMz7fpb0abqxUiPde8FriX9Ka 4Ta/tJrY/DM7qQsO4NDH6U7mhM/KdeI= X-Google-Smtp-Source: APXvYqxsKzO+DlZf4GHZfVwOfUDUz0csib+6zwvHr9p6l/rK8t+hVqnPNQxoUohuqD3TYtVARBRFtg== X-Received: by 2002:a05:620a:1410:: with SMTP id d16mr14987766qkj.284.1572293447562; Mon, 28 Oct 2019 13:10:47 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-180.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.180]) by smtp.gmail.com with ESMTPSA id q44sm8677492qtk.16.2019.10.28.13.10.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Oct 2019 13:10:43 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1iPBLf-0001gk-DA; Mon, 28 Oct 2019 17:10:43 -0300 From: Jason Gunthorpe To: linux-mm@kvack.org, Jerome Glisse , Ralph Campbell , John Hubbard , Felix.Kuehling@amd.com Cc: linux-rdma@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Alex Deucher , Ben Skeggs , Boris Ostrovsky , =?utf-8?q?Christian_K=C3=B6ni?= =?utf-8?q?g?= , David Zhou , Dennis Dalessandro , Juergen Gross , Mike Marciniszyn , Oleksandr Andrushchenko , Petr Cvek , Stefano Stabellini , nouveau@lists.freedesktop.org, xen-devel@lists.xenproject.org, Christoph Hellwig , Jason Gunthorpe Subject: [PATCH v2 08/15] xen/gntdev: Use select for DMA_SHARED_BUFFER Date: Mon, 28 Oct 2019 17:10:25 -0300 Message-Id: <20191028201032.6352-9-jgg@ziepe.ca> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191028201032.6352-1-jgg@ziepe.ca> References: <20191028201032.6352-1-jgg@ziepe.ca> MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Jason Gunthorpe DMA_SHARED_BUFFER can not be enabled by the user (it represents a library set in the kernel). The kconfig convention is to use select for such symbols so they are turned on implicitly when the user enables a kconfig that needs them. Otherwise the XEN_GNTDEV_DMABUF kconfig is overly difficult to enable. Fixes: 932d6562179e ("xen/gntdev: Add initial support for dma-buf UAPI") Cc: Oleksandr Andrushchenko Cc: Boris Ostrovsky Cc: xen-devel@lists.xenproject.org Cc: Juergen Gross Cc: Stefano Stabellini Reviewed-by: Juergen Gross Reviewed-by: Oleksandr Andrushchenko Signed-off-by: Jason Gunthorpe --- drivers/xen/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 79cc75096f4232..a50dadd0109336 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -141,7 +141,8 @@ config XEN_GNTDEV config XEN_GNTDEV_DMABUF bool "Add support for dma-buf grant access device driver extension" - depends on XEN_GNTDEV && XEN_GRANT_DMA_ALLOC && DMA_SHARED_BUFFER + depends on XEN_GNTDEV && XEN_GRANT_DMA_ALLOC + select DMA_SHARED_BUFFER help Allows userspace processes and kernel modules to use Xen backed dma-buf implementation. With this extension grant references to