linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
To: David Laight <David.Laight@ACULAB.COM>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"mikey@neuling.org" <mikey@neuling.org>,
	"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"brking@linux.vnet.ibm.com" <brking@linux.vnet.ibm.com>,
	"clsoto@linux.vnet.ibm.com" <clsoto@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] powerpc/powernv: Enable PCI peer-to-peer
Date: Tue, 27 Jun 2017 20:52:44 +0200	[thread overview]
Message-ID: <4b4ae1e5-a172-c962-65c3-8ee0624b34e3@linux.vnet.ibm.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD002BE3A@AcuExch.aculab.com>



Le 27/06/2017 à 14:32, David Laight a écrit :
> From: Frederic Barrat
>> Sent: 26 June 2017 19:09
>> P9 has support for PCI peer-to-peer, enabling a device to write in the
>> mmio space of another device directly, without interrupting the CPU.
>>
>> This patch adds support for it on powernv, by adding a new API to be
>> called by drivers. The pnv_pci_set_p2p(...) call configures an
>> 'initiator', i.e the device which will issue the mmio operation, and a
>> 'target', i.e. the device on the receiving side.
> ...
> 
> Two questions:
> 
> 1) How does the driver get the correct address to give to the 'initiator'
>     in order to perform an access to the 'target'?

That's left out of this patch intentionally. The assumption is that 
there's some handshake happening between the 2 drivers. But that's an 
area where we could work to make it easier in the future.

> 2) Surely the API call the driver makes should be architecture neutral,
>     returning an error on other architectures.

The point of the patch is just to enable it on p9. I've heard of a more 
generic, on-going effort, at the PCI API level, which would be 
cross-arch. But here we just want to allow it for p9 to allow some early 
drivers to take advantage of it if they choose to.

   Fred


> At least some x86 cpus also support peer-to-peer writes,
> I believe they can work between cpu chips.
> PCIe bridges might support them (or be configurable to support them).
> 
> 	David
> 

  reply	other threads:[~2017-06-27 18:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26 18:08 [PATCH v2] powerpc/powernv: Enable PCI peer-to-peer Frederic Barrat
2017-06-27 12:32 ` David Laight
2017-06-27 18:52   ` Frederic Barrat [this message]
2017-07-12 22:39 ` Benjamin Herrenschmidt
2017-07-12 23:01   ` Frederic Barrat
2017-07-13  0:25     ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b4ae1e5-a172-c962-65c3-8ee0624b34e3@linux.vnet.ibm.com \
    --to=fbarrat@linux.vnet.ibm.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=benh@kernel.crashing.org \
    --cc=brking@linux.vnet.ibm.com \
    --cc=clsoto@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).