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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C248EC433F5 for ; Mon, 10 Oct 2022 19:08:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 879B310E708; Mon, 10 Oct 2022 19:08:50 +0000 (UTC) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6E60F10E6B5 for ; Mon, 10 Oct 2022 18:56:40 +0000 (UTC) Received: by mail-qk1-x72f.google.com with SMTP id x13so4675446qkg.11 for ; Mon, 10 Oct 2022 11:56:40 -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=TrX2uxaaj0jX0qxEQ0z9Y2A95i5gDe6lrVy3qQjEYt9dPE7o0J5xaASQXKn9umb6j4 RrjxaOhGf+nhW8y5daC86jboqDjmY61cM7M/Ve3NTBbZrLLyT5p0L7aKwsV78P54sjRy Itbwly5jeQLlADQQZKM0eE+XNQ01gEGHoGZWaYXOYGdkvQ6gsfj+WNiG5k7jpkjJdkK6 xZJW4ZKfxEQkL78V8MaY+pY6hcGDGomPM3B5xwJldAYJDcXpZmFa95o14HtUwxyDpSjC yyKpA/z2DwC8QxLf6rutvDXCFe1tephDXFGXGFqXKxjLWYfERpGcKlJd96/5Td8reMKB z2IQ== X-Gm-Message-State: ACrzQf0A3KGdDx3bACBneuq0szVmS9rDiL9ALjg4dfNDXFTFvEMiZp2r P1A9aFZRYSEI1n9EHOjFn2JmZg== X-Google-Smtp-Source: AMsMyM4cq1ZiSompu2ffs6ddf24dPwkk/2Lnq1GVt1O6/KQn3scUPTnTqdwZ/uWcjL7riJrPyy9iDQ== 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 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-Mailman-Approved-At: Mon, 10 Oct 2022 19:08:47 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Almeida , Joonas Lahtinen , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, Ruhl Michael J , Thierry Reding , Srinivas Kandagatla , Gerd Hoffmann , Dmitry Osipenko , kernel@collabora.com, Sumit Semwal , Marek Szyprowski , Mauro Carvalho Chehab , Leon Romanovsky , linux-rdma@vger.kernel.org, Thomas =?utf-8?Q?Hellstr=C3=B6m?= , Russell King , Daniel Stone , Gustavo Padovan , Chia-I Wu , linux-media@vger.kernel.org, Thomas Zimmermann , Tvrtko Ursulin , linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , linaro-mm-sig@lists.linaro.org, Christian Gmeiner , Stefano Stabellini , Jani Nikula , Rodrigo Vivi , Gurchetan Singh , Juergen Gross , David Airlie , amd-gfx@lists.freedesktop.org, Tomi Valkeinen , Tomeu Vizoso , Gert Wollny , "Pan, Xinhui" , linux-kernel@vger.kernel.org, Tomasz Figa , Oleksandr Tyshchenko , Rob Clark , Qiang Yu , Daniel Vetter , Alex Deucher , Amol Maheshwari , Christian =?utf-8?B?S8O2bmln?= , Lucas Stach Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" 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