Thread (6 messages) 6 messages, 3 authors, 2017-07-13

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

From: Frederic Barrat <hidden>
Date: 2017-07-12 23:01:41


Le 12/07/2017 à 17:39, Benjamin Herrenschmidt a écrit :
On Mon, 2017-06-26 at 20:08 +0200, Frederic Barrat wrote:
quoted
+       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 ?
The initiator refcount is per PE and skiboot doesn't track PEs. Also 
when the initiator refcount falls back to 0, we should restore the 
default bypass setting for the TVE, and that's more easily done from 
linux, since it knows the start and end address of the memory. So for 
those reasons, I don't really have the choice, the initiator refcount 
seems better suited in linux.

The target refcount is per PHB and it just seemed easier to keep it in opal.

Does the lack of symmetry bother you?

   Fred
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help