Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5081422imu; Tue, 29 Jan 2019 12:26:22 -0800 (PST) X-Google-Smtp-Source: AHgI3IaqdHkL7y4ybiJs+U9rBFq0KgjkoLVnptCoDaQQsb0uZmH8EqOXx0WVW4eKcBqLxsKiJXN1 X-Received: by 2002:a62:5007:: with SMTP id e7mr15356706pfb.92.1548793582600; Tue, 29 Jan 2019 12:26:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548793582; cv=none; d=google.com; s=arc-20160816; b=MN7VRbqz4czjgOjxZUCc3+tIHc+CSFCjBpisSSePv4wawQe/F0DscdvOHGEoWBd078 WjkwIrp0JDvc1Yw+fQM28fHVFj4C5A6Hw8qpgt8SgFsIH2L51Tzr0iW9VBi78ajhDhcI BPgAlUZZKYg5E4DmfdJwu+dOGARHPcsj4lHMCvln3ysYWupVveXieVB3bW0RfWGvjQ/1 npIwHFwX9ccc5/rD2WzdNCGCUDBQPcyRAFENFb77VFCjfsEsmerruDfWhbbjO+u+PJCf 94kMSJkpQRH82Zp5JjI2BU+CVtX0eBJz4iZw62DkZKkyjp1o3gXikJZo2JdZor9q1lFe b5kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=DAbYKTTDsRFKBrrEeJAxFsfJ5sQigQTed9Xbt6PPYHY=; b=jp9TkfbINBhTMXGfck4OrUdF9/Ipz123eWY6UvuQklFxGf0U98w4kCDG98v/1yAw8l fmaeKhBMEgzQLcILUjPpw62nVs7zXKbQ140zMw2uf3X6jePNY7eZ61mjWwa/NHSqusX8 wDscmfgYeLoigZGHLpkHxSfLVXTWtcTbi2F1QO+OFCnO8L4iKNfb7DtPWMw/jPnU4nwg UdenX3ygLnCaqfEXMVcxMiljmL5cPh+15y568qgkg1tu0RTU5HM4w4nMxrWArROTeK0r +K3NuZNCb81nhKeSG/lvN9dkAo2fi61rN13WEVcOrEFLf/Qk4HhLARRoPXVTGthQNLws jEPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si23492763plr.376.2019.01.29.12.26.06; Tue, 29 Jan 2019 12:26:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729499AbfA2UY7 (ORCPT + 99 others); Tue, 29 Jan 2019 15:24:59 -0500 Received: from ale.deltatee.com ([207.54.116.67]:59832 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727342AbfA2UY7 (ORCPT ); Tue, 29 Jan 2019 15:24:59 -0500 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1goZwA-0006Yf-64; Tue, 29 Jan 2019 13:24:51 -0700 To: Alex Deucher , Jerome Glisse Cc: linux-mm , Joerg Roedel , "Rafael J . Wysocki" , Greg Kroah-Hartman , Felix Kuehling , LKML , Maling list - DRI developers , Christoph Hellwig , iommu@lists.linux-foundation.org, Jason Gunthorpe , Linux PCI , Bjorn Helgaas , Robin Murphy , Christian Koenig , Marek Szyprowski References: <20190129174728.6430-1-jglisse@redhat.com> <20190129174728.6430-2-jglisse@redhat.com> From: Logan Gunthorpe Message-ID: <83acb590-25a5-f8ae-1616-bdb8b069fa0f@deltatee.com> Date: Tue, 29 Jan 2019 13:24:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: m.szyprowski@samsung.com, christian.koenig@amd.com, robin.murphy@arm.com, bhelgaas@google.com, linux-pci@vger.kernel.org, jgg@mellanox.com, iommu@lists.linux-foundation.org, hch@lst.de, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Felix.Kuehling@amd.com, gregkh@linuxfoundation.org, rafael@kernel.org, jroedel@suse.de, linux-mm@kvack.org, jglisse@redhat.com, alexdeucher@gmail.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_FREE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [RFC PATCH 1/5] pci/p2p: add a function to test peer to peer capability X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-01-29 12:56 p.m., Alex Deucher wrote: > On Tue, Jan 29, 2019 at 12:47 PM wrote: >> >> From: Jérôme Glisse >> >> device_test_p2p() return true if two devices can peer to peer to >> each other. We add a generic function as different inter-connect >> can support peer to peer and we want to genericaly test this no >> matter what the inter-connect might be. However this version only >> support PCIE for now. >> > > What about something like these patches: > https://cgit.freedesktop.org/~deathsimple/linux/commit/?h=p2p&id=4fab9ff69cb968183f717551441b475fabce6c1c > https://cgit.freedesktop.org/~deathsimple/linux/commit/?h=p2p&id=f90b12d41c277335d08c9dab62433f27c0fadbe5 > They are a bit more thorough. Those new functions seem to have a lot of overlap with the code that is already upstream in p2pdma.... Perhaps you should be improving the p2pdma functions if they aren't suitable for what you want already instead of creating new ones. Logan