Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5051984imu; Tue, 29 Jan 2019 11:57:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN7oa0YmrUF9+u5SZWjVqI5t0J+wWSKpOi2pHlaNonPzTJEysXrimVlhH0vQFj7IEMzXlTX/ X-Received: by 2002:a62:938f:: with SMTP id r15mr27399572pfk.27.1548791845209; Tue, 29 Jan 2019 11:57:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548791845; cv=none; d=google.com; s=arc-20160816; b=z2F0oTprrtyaxKORrbWieoCCPNTwPRWD6jamXLqhQ7XkMQulS4rppJJj9FohdyZ/6S NX41FeIPvEB7di1HH4q2qY6rpUnFB+NZA/16+/hT+QsOZvJtATiuF/3okwMGcNvLneR+ HIv6Yglm2PtseOECt+hUFZdFmYKKQojrZiY5Sj1ICQI5ghvqvXDV51gaO/x78ydOpg4V HxI4i/xE7zCh7I4Vm9JaOGahUlve811mkRGDSViU54dWM3qQWkv6IblkN5gMbamNlgjL va9Mmc0+CJ8fTHWHLnTVAfH4hyY/GjlKMPpYCp3olt7zBy7+zLvgX/kDmQ7A3qii/ScC V/Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ZzB2//56DOjYDqpsMcUi6sQ0CFC8hIxqArgHRj7qkRw=; b=yY+UqMo8Coz8DFv5ngxxZeMRqdTUwt8pZhR9jbecxMFZs43FeX2ro321MNKCdIPqp0 4wRTrlCUI6mv/s0m0hwPpHDOc2B/PDC2qVSNlU3uNEGu1Age/SzkrGu57EeACAXx2Sbf HZGUoUTH+vGPsSgPcjdxrXf6OD2IUhYLtsy546NYSkoXlEGpy0c2Nn/B6BJzERLEfl0P WTraX4TDcm/FM54uam9oVpqNohTG5+buyOS2EQDdRmynC7xN0QRBJD4V+rEixixsIJ21 xuBoaVaL8O0AV/reWuytRtzf3rHC/PtMiOvApbreUZVtwpPTekiaMLYBDLpPmqdEu/dH +01Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si21859506plo.108.2019.01.29.11.57.09; Tue, 29 Jan 2019 11:57:25 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729408AbfA2T46 (ORCPT + 99 others); Tue, 29 Jan 2019 14:56:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37592 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726984AbfA2T45 (ORCPT ); Tue, 29 Jan 2019 14:56:57 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E41A2DD2A; Tue, 29 Jan 2019 19:56:56 +0000 (UTC) Received: from redhat.com (ovpn-122-2.rdu2.redhat.com [10.10.122.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE021600CC; Tue, 29 Jan 2019 19:56:53 +0000 (UTC) Date: Tue, 29 Jan 2019 14:56:52 -0500 From: Jerome Glisse To: Greg Kroah-Hartman Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Logan Gunthorpe , "Rafael J . Wysocki" , Bjorn Helgaas , Christian Koenig , Felix Kuehling , Jason Gunthorpe , linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org, Christoph Hellwig , Marek Szyprowski , Robin Murphy , Joerg Roedel , iommu@lists.linux-foundation.org Subject: Re: [RFC PATCH 2/5] drivers/base: add a function to test peer to peer capability Message-ID: <20190129195651.GK3176@redhat.com> References: <20190129174728.6430-1-jglisse@redhat.com> <20190129174728.6430-3-jglisse@redhat.com> <20190129194605.GC32069@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190129194605.GC32069@kroah.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 29 Jan 2019 19:56:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 29, 2019 at 08:46:05PM +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 29, 2019 at 12:47:25PM -0500, jglisse@redhat.com 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. > > There is no defintion of "peer to peer" in the driver/device model, so > why should this be in the driver core at all? > > Especially as you only do this for PCI, why not just keep it in the PCI > layer, that way you _know_ you are dealing with the right pointer types > and there is no need to mess around with the driver core at all. Ok i will drop the core device change. I wanted to allow other non PCI to join latter on (ie allow PCI device to export to non PCI device) but if that ever happen then we can update pci exporter at the same time we introduce non pci importer. Cheers, J?r?me