Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp369833rwe; Thu, 1 Sep 2022 00:20:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR5vcDyCnazN7o2SVuH85b+7N21AYsJnUgwSXqQENyxWhbSb53/3/mnizbOOPNjmeMdbCLmd X-Received: by 2002:a50:fe91:0:b0:43d:c97d:1b93 with SMTP id d17-20020a50fe91000000b0043dc97d1b93mr28610672edt.67.1662016859623; Thu, 01 Sep 2022 00:20:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1662016859; cv=pass; d=google.com; s=arc-20160816; b=Y8ecII4Om657ZQCy0pD8xAQ8fwB2UDQRLaPwgO2r/uH7tZoitPpe9C5XM12bvIBWc6 OrPE7dadY43mvOb7us78d94OoZBDzjhTb8hFMsk+V21wuLUV9H4lDG7GCRFAlWQoMuwV 09S0ECdm380J2AoHLgsfKzyIR+wIaIx7fqtEdCy+UW5voTNotthZ61naSRGHLVUFKwEZ S4842ScR2lq3CBDlJHier7tEdRWPDJ1ZpK9oOEw/648ZZbZH0LFUsKupYDoDBIJBv8+W U1Cw4zETXADjKaM6ziWYnGhmKSzxtXItpaKepTypH9iMhJZjpGXM0FHIyREApV1JEiuE otlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=fnV0CizH8dcvktIq5eI/9X8XK/uSA7GZIMmjPPdXKmc=; b=Llwfk5GpBJqfbRAB8wq9VbQzxEHfh/B2HzvjxEhwfeGgeEvyG8VPAYe0eITXDlhr4Q LxhpZNsi/A6zmQqmPoP6ch+/ap+O9Z6+G5G5Gd6W2LjcBLON16sFCke1eeIsmiVnBKk6 GUWAXOv5lCbi+1wSP2ZCcTvl917SATIpdq/ILAxzdyd0TAXSrT8C1ONL6EUQaRMCpsA8 VskoGIPPqXC+SGbz41OA82WVcELwIRKqG4FXjMaBHSaFrwmbfsQLDktp56VmvLcNCPva tpV6wX2iaOvx19jl8bH/oVs2/stp+IYTX1iZtHxik3RCIcU+EbOfT+yisBMt6q6KmC0U XkUg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Q8ecf3Gm; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb12-20020a170907160c00b007306d4b5435si13147085ejc.522.2022.09.01.00.20.33; Thu, 01 Sep 2022 00:20:59 -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=@amd.com header.s=selector1 header.b=Q8ecf3Gm; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233110AbiIAGyn (ORCPT + 99 others); Thu, 1 Sep 2022 02:54:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232065AbiIAGyg (ORCPT ); Thu, 1 Sep 2022 02:54:36 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2087.outbound.protection.outlook.com [40.107.243.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA6D4120F92; Wed, 31 Aug 2022 23:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X+NDT6Y+cLtD9vAzvH2t9Fv2VsNuuQK+rTPl2GpXRfFZGAhR1/Ns+WK+2xR2/O47ZRo8Upt11THjEN6kWzIMzBm83m5cDMH5TYJ1tzVAE58lJjz5/fyNiebKj1BACEKfzFRCJGyA1gYyw/v8uzXOxLYgMF3I0NIJyWChD+kioXLvIfGSAYiXbP4CM/CDprp2P+pxvjnntyI6wiuIi3y5jGZkhhjsouP1HVFyuQQBGxXuft4wkvz5yVFfDEzTdeeMoI1ZHRITIfx6d/skpjBNMdiS2WXGxrGqhumFFZfXyIorPD4OPr7Qlrbkz5tL9pdR5bBzb6LbbwOG6keusKcpwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fnV0CizH8dcvktIq5eI/9X8XK/uSA7GZIMmjPPdXKmc=; b=ISiKeu2muqDjAay1K330TnEW3O8WojWoXLKE5qtD6K4s2oCPF1tUEXeMD4L3uYm5IX0wqTUm/uW1TgNxOkyA26EVdx06/2KP1MywcXTNVz0wKGiKDhQbIpI5Xw4cNyS8ak5tDlMzJkPtVNeFMscUQD5cDQyGzhM1AItLBLMpRfboHf13mbGG8XxyWzsX9XeO2/Sbr+DU+VdudN3cvtcu1vDtmuTGembURgnnTGspj5S8E+r66AzHDliHsRb+jxJK3TrwZnu+Y4AAT+JgiM2r+N3Klw7a5z7vrk69M0ciWuMRO6ENW5cfblMoanXSG79lbWqmBD7gXvjmH3Zp6Ljfnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fnV0CizH8dcvktIq5eI/9X8XK/uSA7GZIMmjPPdXKmc=; b=Q8ecf3GmZF1oZOeqqBCb71xeHxp/0+R7o5ez6u/cPjjeI3RdxTd2yhLKbMu278QJhJj6lhOjRCSaId5tmr0/tpM7wEqk4GaAhHoWG79Xkdqp8wUcJnowgj8R38aZiyszsmIeJUfXYNGujy+59wIKVCXPaD10Ct+yUo25yqFUlHE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) by DM6PR12MB4315.namprd12.prod.outlook.com (2603:10b6:5:223::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Thu, 1 Sep 2022 06:54:34 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::4524:eda6:873a:8f94]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::4524:eda6:873a:8f94%7]) with mapi id 15.20.5588.011; Thu, 1 Sep 2022 06:54:33 +0000 Message-ID: <99e9d22b-5787-cc3f-eb6f-ae137f0282fd@amd.com> Date: Thu, 1 Sep 2022 08:54:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v4 10/21] RDMA/umem: Prepare to dynamic dma-buf locking specification Content-Language: en-US To: Dmitry Osipenko , 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 , "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 , Jason Gunthorpe , Leon Romanovsky , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Tomi Valkeinen , Russell King , Lucas Stach , Christian Gmeiner 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 References: <20220831153757.97381-1-dmitry.osipenko@collabora.com> <20220831153757.97381-11-dmitry.osipenko@collabora.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: <20220831153757.97381-11-dmitry.osipenko@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: AS8P251CA0020.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::16) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 307beed9-aa49-4c9e-27cd-08da8be6d397 X-MS-TrafficTypeDiagnostic: DM6PR12MB4315:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ezeKQnlO5zA6F3MTU9NXidfFlkJIyZs9v1dzgZH9iWqs6cnFmPv/fc76pPlB3CXkMKjYt4MuJ0DtGysEboLN6KAPsvyVFhIl8XTxHNfi4oYPasG2babZGeop7LiDJ3rU2X45HUFmgxfuM4SxKr4HTdsl50TrNTnsdUX8AzeSEIYbiT2SJjtKD5cePqZ5SI8xNIsy9HeuubV4hDOAex1WPc4kiKDReFE0ExZoITB4HjWiWV+m3jhZgF0LM5E/MCnV9sW301CCts1/CGnkUS3b4IuUuSNTDqS6xOY0K5k1GuCcHirupxASA/aIWtlU7/mhf3eK25/APnmcrMZcck2RFI9fra0un1sLbV1u2mCu6kplOBQzmwEnm7PbVR/enlzRmH4Yiy1clwZcv8eZ/3FUvo7hwgrP05L9JQYIzxpuMUalCd7Qxyatv/WPaSAxq07XuWPRkezyOrygt+DEGGPvDfeujHlqIEqO/lsPdXuvyKU99p58E7rvK/z3Lp4Vt2MpQ3cyP5KdZsb9ZskOE5lNPB5i5kuxCmIthfkZgkkOOvxeBACuyCNx4f46xLcJ1VGNgQjo1St/J7Oe5X5een6eH5rRCG4Ruf1NPUAbmAQVmNxUv5Eux5r1CLetE2Qv6x4RfpTgclSO4ZedN1kGJBsbTvaG5utpQ6lHZld7/acIKmDFHnThigTnEOiA7uFerQbSmV9K7dGP00C5snyf8CcUxjTcCNeGMxzLfWW9oHihjp+cV2y2R7nvHeNJrLY16XMbyvX+vXFlxthKr79rPs49Yf8af5SIhzr76RJ4b38uTmy/COXjj0vpGQw3vtEjUxjt X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3587.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(396003)(136003)(366004)(376002)(346002)(31696002)(86362001)(41300700001)(36756003)(31686004)(38100700002)(6512007)(66574015)(6506007)(6666004)(186003)(2616005)(26005)(110136005)(66476007)(8676002)(4326008)(83380400001)(66946007)(8936002)(316002)(6486002)(478600001)(66556008)(7406005)(7416002)(921005)(2906002)(5660300002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Anti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?L0VuVDFyVGl3WVVnUWxWNzYxMEpLcmNmV3AxdXBMTTdpVVZBZ0k4QWk2UjB1?= =?utf-8?B?UDVVSGZlak9HZi9SclZYWHBnWmdwMVRXODF5Y2ZuVHlzVU9CUmsvanV5Nlpi?= =?utf-8?B?RDVVK0NTaXVGaUhvRFhIdzc4N0JXZGQ1NVFPaGI0czlQK25mN291RmIxWEM4?= =?utf-8?B?T3diMGpqalNKN2dqUHIrQkFjd0ZWVW9YemdjWWxwMFl0cGthZHdJTVF3ZWxI?= =?utf-8?B?eUgxSC84ZFoxbTRXVUdseDNjUEZ4R3Q1Ky9yWFJ6SHl6QVhnQjFvVm1DQ0kr?= =?utf-8?B?U0lqNmxJcHFHZTRZaHN3SW1xcEIvQTVmalBJMHVxMjZObmJiZytqK1UzMmJC?= =?utf-8?Q?+a15ShS2/2B3hYxbFLm99S1+f?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 307beed9-aa49-4c9e-27cd-08da8be6d397 X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 06:54:33.6859 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oU9/KTnB6nlu+f+6YJpX8z4UxcGCbDL8WeNjfrmYPO5JDurNWO/L800I6nxkIh0V X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4315 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Am 31.08.22 um 17:37 schrieb Dmitry Osipenko: > Prepare InfiniBand drivers to the common dynamic dma-buf locking > convention by starting to use the unlocked versions of dma-buf API > functions. > > Signed-off-by: Dmitry Osipenko Acked-by: Christian König > --- > 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; > }