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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_RED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40F15C433E0 for ; Sat, 13 Mar 2021 02:37:04 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7BA564F83 for ; Sat, 13 Mar 2021 02:37:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7BA564F83 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9C42C60650; Sat, 13 Mar 2021 02:37:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lqg8VbYnG7YO; Sat, 13 Mar 2021 02:37:02 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTP id 948AE605EB; Sat, 13 Mar 2021 02:37:02 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6DA74C000B; Sat, 13 Mar 2021 02:37:02 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 734CBC0001 for ; Sat, 13 Mar 2021 02:37:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4C573605EB for ; Sat, 13 Mar 2021 02:37:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KUs3Z9184Hqj for ; Sat, 13 Mar 2021 02:36:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by smtp3.osuosl.org (Postfix) with ESMTPS id 06825600C9 for ; Sat, 13 Mar 2021 02:36:58 +0000 (UTC) IronPort-SDR: wAZU+3ETDWez6ZiOQhUD1Xo2vNgnm8WmGoQ2HZ3g+5ceMLHQ24uZrGSV6R057ijESEG+sziYG1 /+hYfQOexZVw== X-IronPort-AV: E=McAfee;i="6000,8403,9921"; a="176042824" X-IronPort-AV: E=Sophos;i="5.81,245,1610438400"; d="scan'208";a="176042824" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2021 18:36:58 -0800 IronPort-SDR: vWH9MrQPUopS4cxXwdJS5su75dKHztdNXjGGlH9ufjynLLu86PmrmvGK6dqQ7nNaiN1giHbb0p Ed7tLl9U/OgQ== X-IronPort-AV: E=Sophos;i="5.81,245,1610438400"; d="scan'208";a="404614708" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2021 18:36:57 -0800 Date: Fri, 12 Mar 2021 18:36:57 -0800 From: Ira Weiny To: Logan Gunthorpe Subject: Re: [RFC PATCH v2 07/11] dma-mapping: Add flags to dma_map_ops to indicate PCI P2PDMA support Message-ID: <20210313023657.GC3402637@iweiny-DESK2.sc.intel.com> References: <20210311233142.7900-1-logang@deltatee.com> <20210311233142.7900-8-logang@deltatee.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210311233142.7900-8-logang@deltatee.com> User-Agent: Mutt/1.11.1 (2018-12-01) Cc: Minturn Dave B , Matthew Wilcox , Jason Gunthorpe , linux-pci@vger.kernel.org, Daniel Vetter , Dave Hansen , Ira Weiny , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Stephen Bates , linux-block@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Christian =?iso-8859-1?Q?K=F6nig?= , Jason Ekstrand , John Hubbard , Dan Williams , Jakowski Andrzej , Christoph Hellwig , Xiong Jianxin X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Thu, Mar 11, 2021 at 04:31:37PM -0700, Logan Gunthorpe wrote: > +int dma_pci_p2pdma_supported(struct device *dev) ^^^ bool? > +{ > + const struct dma_map_ops *ops = get_dma_ops(dev); > + > + return !ops || ops->flags & DMA_F_PCI_P2PDMA_SUPPORTED; Is this logic correct? I would have expected. return (ops && ops->flags & DMA_F_PCI_P2PDMA_SUPPORTED); Ira _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu