Subject: Re: [PATCH v2] powerpc/powernv: Enable PCI peer-to-peer

From: Benjamin Herrenschmidt <[email-masked]>
Date: Thu, 13 Jul 2017 08:39:39 +1000

On Mon, 2017-06-26 at 20:08 +0200, Frederic Barrat wrote:
> +       if (desc & OPAL_PCI_P2P_ENABLE) {
> +               pe_init->p2p_initiator_count++;
> +       } else {
> +               if (pe_init->p2p_initiator_count > 0) {
> +                       pe_init->p2p_initiator_count--;
> +                       if (!pe_init->p2p_initiator_count)
> +                               pnv_pci_ioda2_set_bypass(pe_init, true);
> +               }

So you have the initiator refcounting in Linux and the target
refcounting in OPAL ... any reason for that ?

Cheers,
Ben.