Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5043136imu; Tue, 29 Jan 2019 11:46:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN6V8dpBEshKl9u+QFt0XtNWyChyVBhYGKqmtlxhNupGfYxjYI2SK8dbxQ042Q1UKqsnX5cQ X-Received: by 2002:a63:df13:: with SMTP id u19mr24936207pgg.294.1548791204371; Tue, 29 Jan 2019 11:46:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548791204; cv=none; d=google.com; s=arc-20160816; b=c4SpHEvpAXKsHn4vlO7OAfKJSDCfXsbjmAUpM3TNlfcPzq3HdARqYJO/aRy6WkFogf 8nDPuSk0Ndg1NUem4pN3Ot0deqVNXOWiIPjvdeGLWYQbTFUjIE78EnIeH6icozCZnhpY B9J3mqHGM2vS6bYqcIrMzC/y7CrEQPorYrLkqkKcJkzdTtcC4brt/phnNFrEoL17249W ggCmNV99BZjeXRLPAL9hYKN3t186Pl56x0pGg43IV3vxjwo/Ay5el31aHLdotYVGKaKq hiJYAGGhVmPE196d/6KIv46mc4QC1Q6sn8BLpMltLK8tQKDpp2xnIW7yNOF/f2NrNk7+ 9ROA== 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:dkim-signature; bh=Ui762Nf9phWqllFBpP0gszm+0eeFE6+RSm8nk87NWu8=; b=01qkTn6KWgjbcDsAhG6njJ6yMPGkisNxmPiZ/uiUvfxYdeUWWKgeLP/Xy5nU2Wrk6U +uGKf3Fz+NsCYRt02pSiE3qeBKuA2tkdppzJ2xLdxzcRcM7vibpzJhCiYAMGVY/rkj+H FB+A+sYrGHPsNEGMASYqzrH9s18O0HFHdxNoHF7sqj/1dqTZMliOTWorlXp6NKqFEDw7 uqtTuf92G4Kivf9F41rA8KWhgsji1+TatAsfM+E7il6xgOvyN9moTNuEE8BGcgqi6Jgg juzo8bFkvdWbDn+2egBhC1JzSg1z3x5q6urgWxaoNgUYyd2bBGezdh2jg11MyJ3k9H3s pxLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vSEbdOMd; 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 d2si36157572pfe.159.2019.01.29.11.46.28; Tue, 29 Jan 2019 11:46:44 -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; dkim=pass header.i=@kernel.org header.s=default header.b=vSEbdOMd; 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 S1729192AbfA2TqJ (ORCPT + 99 others); Tue, 29 Jan 2019 14:46:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:43002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727056AbfA2TqJ (ORCPT ); Tue, 29 Jan 2019 14:46:09 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 308A320882; Tue, 29 Jan 2019 19:46:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548791168; bh=n979B516WvO1WMnU9UTm77UKXWyQQ/SZXEgeapMTWYo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vSEbdOMdxB5zWHviLP5pUWw/pnkTofE5nbC3y6u6wmVIIjKd0uVrkqkM46iS+Zz3/ /oCcoZpH9rhZa64+PdpUEKsaAK3nyCg9x7phTjMPalaJVViQJOMrOZrwStIWdN6Tg/ hbaBioLq5FUwGZAnQ27o4GMt5X6OG52soxoLUyLg= Date: Tue, 29 Jan 2019 20:46:05 +0100 From: Greg Kroah-Hartman To: jglisse@redhat.com 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: <20190129194605.GC32069@kroah.com> References: <20190129174728.6430-1-jglisse@redhat.com> <20190129174728.6430-3-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190129174728.6430-3-jglisse@redhat.com> User-Agent: Mutt/1.11.2 (2019-01-07) 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 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. thanks, greg k-h