[v4] powerpc/powernv: Enable PCI peer-to-peer

Michael Ellerman patch-notifications at ellerman.id.au
Tue Aug 8 20:55:15 AEST 2017


On Fri, 2017-08-04 at 09:55:14 UTC, Frederic Barrat wrote:
> 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.
> 
> P9 really only supports mmio stores for the time being but that's
> expected to change in the future, so the API allows to define both
> load and store operations.
> 
>     /* PCI p2p descriptor */
>     #define OPAL_PCI_P2P_ENABLE		0x1
>     #define OPAL_PCI_P2P_LOAD		0x2
>     #define OPAL_PCI_P2P_STORE		0x4
> 
>     int pnv_pci_set_p2p(struct pci_dev *initiator, struct pci_dev *target,
>     			   uint64_t desc)
> 
> It uses a new OPAL call, as the configuration magic is done on the
> PHBs by skiboot.
> 
> Signed-off-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/2552910084a5e12e280caf082ab014

cheers


More information about the Linuxppc-dev mailing list