Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1160761rwi; Mon, 10 Oct 2022 12:05:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Faw1TU5SmQcvYdbcKMLRmqVzWTp8c8FboiTGZzWW9fRWR6J7xqZc655eOBuJnknBEQ0Ei X-Received: by 2002:a17:903:11c3:b0:17a:e62:16e8 with SMTP id q3-20020a17090311c300b0017a0e6216e8mr21347463plh.137.1665428758865; Mon, 10 Oct 2022 12:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665428758; cv=none; d=google.com; s=arc-20160816; b=IV0+C8OUOwJpSysdoAtlUPCcz26b/AJina9TQdl9NvFUL5zW34z8jFFY4yjPnHZQ/5 5LXIuOVHeCMGrkFzj/hN3u3n3QEqowffh8nsMkwObm6lSQ91iTQwxR9N1rEfTW70K++6 fupCXlyWweeWdIK+GDzEJtcAkgcKZiAqZsHrmq/JX9jT31NaF42tTbAa+4QEDTDLt3+S XBekX2GIuNqmWOKjDyc/IXes9kmkOdM93ppZjOmws70fiuOQqoYAnBEaJx2r0+/LZN4J WiisWoRcrDcyXhaQvrVM4GPuSaXjP44hoznM2Q8m0RQEW+j3aDarr1fhqk5rt5svjNfQ higQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mfdinePb/h+FQryCI1VnJk1iVMwwW9XbS8GRZ1SXnEM=; b=XJqXAnhhQ1jfVs8BRYXYyYZjyg2vvCmexuoRYsJPZwRKTHcuAAgAnhktINBQCp1wnR Pr02lxde7BV19k9SRzur8CAwB6F4E26AG5L7csObXkYCRdUkXjWJLg0oJzPUZcLKaLEg ycBLyA6tnudoiXaKt+u5yjVyzpZaKrcqE6wcuCQBcjfScR8Ncz1JHzIG8PfAunGT3bYP SA0RWKO/7YF66xMPbDTZYt+M8cNGZ5eBrDkheSr6e7pX85gt0vse6fgF37nBhjb9coTF H8noWzpGJsdsTIagFOn1Z5HSGqrsD1vmrmbuFB/iraSZnc/SqWtXMjFz0lltro5Z+Hoq k4OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=Y1FJnNxK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q24-20020a170902789800b0016f5e7d0febsi11481878pll.244.2022.10.10.12.05.46; Mon, 10 Oct 2022 12:05:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=Y1FJnNxK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229501AbiJJS5B (ORCPT + 99 others); Mon, 10 Oct 2022 14:57:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbiJJS4n (ORCPT ); Mon, 10 Oct 2022 14:56:43 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF2D0564EE for ; Mon, 10 Oct 2022 11:56:39 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id a5so2177292qkl.6 for ; Mon, 10 Oct 2022 11:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=mfdinePb/h+FQryCI1VnJk1iVMwwW9XbS8GRZ1SXnEM=; b=Y1FJnNxKCCmUeBjERypSSpOT5hLZIa3B6ZfL7TmeBlDcYn7G53u+wzaqGztD4xstS6 H56NjZrTnnAs/mwbv/53uHY1GhzxoFxOLWj+6+255TR+XIgzukZ2wrhnTPfXH4rpl0ll x20RYa7gkPKPOAB+2GjUbYRf86UKilK/+RP5mPzo1iTwxgbIcI/NL1hAwcQva+CI+c58 wXQg1m452/c0qjzqE/xGhDgd9xycIGhUX5tiX7SJhqTWnYftDSAsnXqQ0qceqqSNwxFf a0gsQbHVGj7OQXKVN8LpCmOTHmcWT/lMPoHErC7k7GBXJjyyytJ8h/nDzI7STIfMcpme CGHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mfdinePb/h+FQryCI1VnJk1iVMwwW9XbS8GRZ1SXnEM=; b=yON8UXI0XiisdQVE2AZbXF8ZKvl2IYM53jpUOg0MKvyeZ3R6qp3SiJr1wacpSKEAtT kAOYe2e2D6Hp9XBywKsYbMnhi7gwZyMCTpxmZ77STQUYhUHSpvqLIuXKMV/Fy+X8qtE8 8VWl9ykY9T3X15C8vRUOWa0YUw+ojBf92/ryXWYmzynd+bM3fEjRh29h/aZAYqA80/BI aH1/8beFBuH0w6+my/OBrJDbEP3p3ENJ7Wm0w5Vne1wCcYOGxRD23WY4LW+wo/FK22Ad uPumpyaxXJ4yWcUfw2MRBU4quKlI1LdlMMg9wTEFkg+8k39NM94DD5n/KkrxcqRWat0r s0qw== X-Gm-Message-State: ACrzQf3p8gD7Mu0Li1GfKQk0NEuCNWGVtZ7sUdr6oRY/T6TPpBm3dEuv T4qB3YS3C4JmY8v0KC7PtIHn4w== X-Received: by 2002:a05:620a:4397:b0:6e1:345a:e080 with SMTP id a23-20020a05620a439700b006e1345ae080mr13783062qkp.677.1665428198984; Mon, 10 Oct 2022 11:56:38 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-47-55-122-23.dhcp-dynamic.fibreop.ns.bellaliant.net. [47.55.122.23]) by smtp.gmail.com with ESMTPSA id j8-20020a05620a288800b006bb2cd2f6d1sm10684472qkp.127.2022.10.10.11.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 11:56:38 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1ohxx7-0012V5-CO; Mon, 10 Oct 2022 15:56:37 -0300 Date: Mon, 10 Oct 2022 15:56:37 -0300 From: Jason Gunthorpe To: Dmitry Osipenko Cc: Leon Romanovsky , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dmitry Osipenko , linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, kernel@collabora.com, virtualization@lists.linux-foundation.org, linux-rdma@vger.kernel.org, linux-arm-msm@vger.kernel.org, David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Clark , Sumit Semwal , Christian =?utf-8?B?S8O2bmln?= , "Pan, Xinhui" , Thierry Reding , Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Alex Deucher , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Thomas =?utf-8?Q?Hellstr=C3=B6m?= , Qiang Yu , Srinivas Kandagatla , Amol Maheshwari , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Tomi Valkeinen , Russell King , Lucas Stach , Christian Gmeiner , Ruhl Michael J Subject: Re: [PATCH v6 10/21] RDMA/umem: Prepare to dynamic dma-buf locking specification Message-ID: References: <20220928191600.5874-1-dmitry.osipenko@collabora.com> <20220928191600.5874-11-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 09, 2022 at 03:08:56AM +0300, Dmitry Osipenko wrote: > On 9/28/22 22:15, Dmitry Osipenko wrote: > > Prepare InfiniBand drivers to the common dynamic dma-buf locking > > convention by starting to use the unlocked versions of dma-buf API > > functions. > > > > Acked-by: Christian König > > Signed-off-by: Dmitry Osipenko > > --- > > drivers/infiniband/core/umem_dmabuf.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/infiniband/core/umem_dmabuf.c b/drivers/infiniband/core/umem_dmabuf.c > > index 04c04e6d24c3..43b26bc12288 100644 > > --- a/drivers/infiniband/core/umem_dmabuf.c > > +++ b/drivers/infiniband/core/umem_dmabuf.c > > @@ -26,7 +26,8 @@ int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf) > > if (umem_dmabuf->sgt) > > goto wait_fence; > > > > - sgt = dma_buf_map_attachment(umem_dmabuf->attach, DMA_BIDIRECTIONAL); > > + sgt = dma_buf_map_attachment_unlocked(umem_dmabuf->attach, > > + DMA_BIDIRECTIONAL); > > if (IS_ERR(sgt)) > > return PTR_ERR(sgt); > > > > @@ -102,8 +103,8 @@ void ib_umem_dmabuf_unmap_pages(struct ib_umem_dmabuf *umem_dmabuf) > > umem_dmabuf->last_sg_trim = 0; > > } > > > > - dma_buf_unmap_attachment(umem_dmabuf->attach, umem_dmabuf->sgt, > > - DMA_BIDIRECTIONAL); > > + dma_buf_unmap_attachment_unlocked(umem_dmabuf->attach, umem_dmabuf->sgt, > > + DMA_BIDIRECTIONAL); > > > > umem_dmabuf->sgt = NULL; > > } > > Jason / Leon, > > Could you please ack this patch? You probably don't need it, for something so simple, but sure Acked-by: Jason Gunthorpe Jason