Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3976027pxf; Tue, 16 Mar 2021 02:33:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4VSNU1TYgwCutKF+78i3G1tHcLsrEuxQc4ztI5I6FROz6HkdTBdoBiuDdigSjoAU5wqnU X-Received: by 2002:a05:6402:520b:: with SMTP id s11mr35434839edd.212.1615887202860; Tue, 16 Mar 2021 02:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615887202; cv=none; d=google.com; s=arc-20160816; b=0He2dt06M97UEHyEpcS8000G0ouEpLZ6uabHeiXLhwUY4tnYn00JIDTeDIeni5arwe X1KTCOyAY46ehcqlNAwL71qpLokA4NAHWubbmSiQllVGr7uJ8KvZxt/l63m07sigxDak TJ4DYN8TDI0+b7f3MQWVjjBzi0jyJ8xPOnhVHY/KSo179IdcI8APTIKL7NRS610V81nf 2XLRtIi9/82BQNf6NdgBQCMR/arkAwcdKCYc0U1fRx83K3pq1YYi4Cr0MWKfE4eRRqxn YPeeoO2lvRf5WZB5fSgJmUc7c78g9ihbUTqaDWsZZ7W5oEjCDHyQkXkf6y+azXwOMvhx RF0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=8QOmYp6ks88XfeIfcAtUoiuSLjQgn8bnEMFLSkv7guY=; b=FHqKdBhqNe4vQMoQQXftwbyZPcnWN3+hzEV37v0tehX4FKrcjtDLyY+bicjnIrzjCb jfsJXzh3sNgztN5VmgsDCVPhAHGRoVrdOdYx6ZLva7DE0Y6JhE8XvWUB2i8U4rDbdzNa i9qFCb21aQ3lbIhyfr8UsnE8PIFA/bgWB4HQoHOwKx6KgU5CTRwi03ENx5fLHLNmbGpC o9nwt/DpSUZCik4EyKuJSFfmLGBesB9JirHMJsfSt6m+x6IkRBTKBadYxiOdRZspuIHY WqIZPVKZrVupfMMgMF4jUE5mcCjM6gJYqOk73yW1mbOqyYdyaHD8YYb86XpMI/3/P25z PXTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si13318455eja.156.2021.03.16.02.33.00; Tue, 16 Mar 2021 02:33:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234293AbhCPIQP (ORCPT + 99 others); Tue, 16 Mar 2021 04:16:15 -0400 Received: from verein.lst.de ([213.95.11.211]:59022 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234278AbhCPIP4 (ORCPT ); Tue, 16 Mar 2021 04:15:56 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 6154568C4E; Tue, 16 Mar 2021 09:15:54 +0100 (CET) Date: Tue, 16 Mar 2021 09:15:53 +0100 From: Christoph Hellwig To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Stephen Bates , Christoph Hellwig , Dan Williams , Jason Gunthorpe , Christian =?iso-8859-1?Q?K=F6nig?= , Ira Weiny , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Jakowski Andrzej , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin Subject: Re: [RFC PATCH v2 07/11] dma-mapping: Add flags to dma_map_ops to indicate PCI P2PDMA support Message-ID: <20210316081553.GC16595@lst.de> References: <20210311233142.7900-1-logang@deltatee.com> <20210311233142.7900-8-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210311233142.7900-8-logang@deltatee.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 11, 2021 at 04:31:37PM -0700, Logan Gunthorpe wrote: > +int dma_pci_p2pdma_supported(struct device *dev) > +{ > + const struct dma_map_ops *ops = get_dma_ops(dev); > + > + return !ops || ops->flags & DMA_F_PCI_P2PDMA_SUPPORTED; > +} > +EXPORT_SYMBOL(dma_pci_p2pdma_supported); EXPORT_SYMBOL_GPL like all new DMA APIs.