Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3005175rwb; Sat, 8 Oct 2022 19:32:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Wt72Ep3aXC9Q0nbLd1PY8FYXmD5ZyP8DNgnj6Iwu3uFj5Pw5bw2F75/cUGTuCcLGBYbzn X-Received: by 2002:a17:903:234f:b0:17f:6711:1f9f with SMTP id c15-20020a170903234f00b0017f67111f9fmr12163108plh.32.1665282778058; Sat, 08 Oct 2022 19:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665282778; cv=none; d=google.com; s=arc-20160816; b=Pj4L4e8spqpedYVVJluQpalWoI5DT3ka1aF9Z8bUE0jtNgcybc30U15ISW0ADWsHzz gH1rvc/hJFAkVqNSfPQl8aniDyvaa4Uo4Dyc2tt+b/ePrlVMLcUbX5ZLnhbmLnNpbAUy mRxdDuaNv3FW7CD1cIHgKeaLMRal/y9rsVlWibxD0uNC7saKJSuL67Z44WcmYmAZYRvz cYECKK52cV9yIFybvcJfHP66E0uwYCMAVplYDNvB9pdF7wEwIo/Ccw1pQ2mBwtniMeZK FuhcXzAsBr5MF0oUkJhv2oUq8tooRf/ljEKEPTHu5nbn6ojTGYRZVhyWWAjfmHA68Dgd v53w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:from:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=7Z4rpIv3tz5lhum0815qSm65UrXtN2oZK+FmKHgKaX0=; b=LDJ9XKZAhXao04O34/uta3UUqaYJv2RIKn/ssTxJmyIvSFaV4FVps8VB6eXWe0xlA/ 2p/zJY1IfbASq1hC/Jr2cMnT0msKS3MM90Iu19z+9xwi9RGGSRxeP2tAWWy3RygYfKUS aGuxn1+qW0LNOLbZsuXJ2vRAPEvRvXQ7Ip+gY/IALAAOYJn5Ax7bsuqQOd8mFc852SUs Pxm0Nvdad25xrMZXuGiZk5u9E3TJNGNWcWVsnz+DNuh28egCI6iI6NUSDBIagZ41f1gM 02FjOxrxNPzFq+qncXsPACzKQe2ZlpitcqJB82pSwr5wHzq7F6oHgaSs2i83cMRgZo39 VQjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fH3GVJPP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020a630e12000000b004526f7f9d46si7852923pgl.25.2022.10.08.19.32.42; Sat, 08 Oct 2022 19:32: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=@collabora.com header.s=mail header.b=fH3GVJPP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229450AbiJIAJL (ORCPT + 99 others); Sat, 8 Oct 2022 20:09:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiJIAJI (ORCPT ); Sat, 8 Oct 2022 20:09:08 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B32D237F6; Sat, 8 Oct 2022 17:09:06 -0700 (PDT) Received: from [192.168.2.145] (109-252-119-114.nat.spd-mgts.ru [109.252.119.114]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id AD61E6602303; Sun, 9 Oct 2022 01:08:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1665274142; bh=tRu/AWDhf1iOYLNP6D5ccZEJMnF9oPGtd04+Gk3jRuA=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=fH3GVJPP0Agx7FoWitfSeocWjORT1LvnTSnPwSqsxinARwwXtUpOaikNENp0bqUrC PEWSWFEjMZP7lDmv6EU2Grv25zWS7RZ/h7CyD+7zKtjl4QAfnnCEScMPlrHhseb+En Gz6vFJUxlSWNVwbR41RbruaqwCZ47lCdToK+BcEO9GuR8so0PP/P07QqERBUWyAJVb MMo4+FZKLISPnrknOSkksa6Ta/zh2p7kUJ5bKem5cyumvth/JLc9RmmGae3HPvGZFj 1usDID4w07q/Pi3FDQyJlsU/m9taGaBUzV9f+UEhS80kUisNvUwJDrtVlek5svMZjQ SedcaWbpdnMdw== Message-ID: Date: Sun, 9 Oct 2022 03:08:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v6 10/21] RDMA/umem: Prepare to dynamic dma-buf locking specification From: Dmitry Osipenko To: Jason Gunthorpe , Leon Romanovsky Cc: 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 , =?UTF-8?Q?Christian_K=c3=b6nig?= , "Pan, Xinhui" , Thierry Reding , Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Alex Deucher , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , =?UTF-8?Q?Thomas_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 References: <20220928191600.5874-1-dmitry.osipenko@collabora.com> <20220928191600.5874-11-dmitry.osipenko@collabora.com> Content-Language: en-US In-Reply-To: <20220928191600.5874-11-dmitry.osipenko@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 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? -- Best regards, Dmitry