Received: by 10.213.65.68 with SMTP id h4csp574539imn; Wed, 28 Mar 2018 08:49:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+e0nxw+OiNdFalnInncKi8rYTvOdssl/d4S0Nx7G1Rapwl/mTQTx5KBlWkFy05w9CMadBg X-Received: by 2002:a17:902:3341:: with SMTP id a59-v6mr4379457plc.68.1522252190644; Wed, 28 Mar 2018 08:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522252190; cv=none; d=google.com; s=arc-20160816; b=SZfzAexXELD6EZ2j4vBD4Al3DZPBusdcrgzSoBOicfc0EYgtD0XFJB0uI3ytG+sX4b zUMTCwg6YtHv/ISrI8qsmbJUAXepY2u4AUOihBUrukObc/2e9iZwINzu0380tTMAfWdc qkIGBhIcsnBhikLhUlwFR4eKvqHtZ74PkDQr8PmsaaoZt4pDQrBExoFZ9fsZmo73Qr01 VvaceFGOMMdPWROfTnNpFROngFg+Kv2p7ASOJZARuPsWe4nVeHZPFo5mw7gAOzpT0GHj UiwsskfJ7ns5cz2dIDMYj98xBPOmodfbgejMSyhoZaaqPEnBrDLLtRiaKYFf14B/uSWa lCAw== 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:arc-authentication-results; bh=/ECpaIA6/pJBKYQF5pZnvLQTw0VDqLm1ZCEwjJh1q+4=; b=F7IETLt/2DEohpeWM4bNyFcvovFKfGFDBlUdNY5NV3AhbgwRUQiKF8bslUEL/0XLsS DozM/EkcE7CwdbwlMHxK2N/dfAmNyvMgFwvkhnmKH423lohiXlLfeIOeO7TRl0A2a3Hd R+OHRBafIUEuQvEsgyy+OzQn1DKGF/2VU9U/O1xcD88QsBTH2T9+CVoi8xA3UikM8PxK 1GvhuLpZL1u2M2XVzaGVvS5XH1W9T1ikcU2zF4QiF5tL0bmYo+qMRBEemOif3oy+O0By y1iW0mFwgzAsjrZW/4zTV9Ev9fdzjt2cM8rXkDSdVinwCWl4uLpM3F53pFBnB9++XJy1 2xKw== 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 t13si2894413pfa.294.2018.03.28.08.49.35; Wed, 28 Mar 2018 08:49:50 -0700 (PDT) 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 S1754189AbeC1Prz (ORCPT + 99 others); Wed, 28 Mar 2018 11:47:55 -0400 Received: from ale.deltatee.com ([207.54.116.67]:39382 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753816AbeC1Prx (ORCPT ); Wed, 28 Mar 2018 11:47:53 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1f1DIk-0006WG-L3; Wed, 28 Mar 2018 09:47:53 -0600 To: christian.koenig@amd.com, Christoph Hellwig Cc: linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20180325110000.2238-1-christian.koenig@amd.com> <20180325110000.2238-2-christian.koenig@amd.com> <20180328123830.GB25060@infradead.org> <613a6c91-7e72-5589-77e6-587ec973d553@gmail.com> From: Logan Gunthorpe Message-ID: Date: Wed, 28 Mar 2018 09:47:48 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <613a6c91-7e72-5589-77e6-587ec973d553@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, hch@infradead.org, christian.koenig@amd.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-7.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,LR_URI_NUMERIC_ENDING,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev() 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 28/03/18 09:07 AM, Christian König wrote: > Am 28.03.2018 um 14:38 schrieb Christoph Hellwig: >> On Sun, Mar 25, 2018 at 12:59:54PM +0200, Christian König wrote: >>> From: "wdavis@nvidia.com" >>> >>> Add an interface to find the first device which is upstream of both >>> devices. >> Please work with Logan and base this on top of the outstanding peer >> to peer patchset. > > Can you point me to that? The last code I could find about that was from > 2015. The latest posted series is here: https://lkml.org/lkml/2018/3/12/830 However, we've made some significant changes to the area that's similar to what you are doing. You can find lasted un-posted here: https://github.com/sbates130272/linux-p2pmem/tree/pci-p2p-v4-pre2 Specifically this function would be of interest to you: https://github.com/sbates130272/linux-p2pmem/blob/0e9468ae2a5a5198513dd12990151e09105f0351/drivers/pci/p2pdma.c#L239 However, the difference between what we are doing is that we are interested in the distance through the common upstream device and you appear to be finding the actual common device. Thanks, Logan