sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget)/translations/zh_CN/driver-api/pci/p2pdmamodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/zh_TW/driver-api/pci/p2pdmamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/it_IT/driver-api/pci/p2pdmamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ja_JP/driver-api/pci/p2pdmamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ko_KR/driver-api/pci/p2pdmamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/sp_SP/driver-api/pci/p2pdmamodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhC/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma.rsthKubhsection)}(hhh](htitle)}(hPCI Peer-to-Peer DMA Supporth]hPCI Peer-to-Peer DMA Support}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXThe PCI bus has pretty decent support for performing DMA transfers between two devices on the bus. This type of transaction is henceforth called Peer-to-Peer (or P2P). However, there are a number of issues that make P2P transactions tricky to do in a perfectly safe way.h]hXThe PCI bus has pretty decent support for performing DMA transfers between two devices on the bus. This type of transaction is henceforth called Peer-to-Peer (or P2P). However, there are a number of issues that make P2P transactions tricky to do in a perfectly safe way.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXsOne of the biggest issues is that PCI doesn't require forwarding transactions between hierarchy domains, and in PCIe, each Root Port defines a separate hierarchy domain. To make things worse, there is no simple way to determine if a given Root Complex supports this or not. (See PCIe r4.0, sec 1.3.1). Therefore, as of this writing, the kernel only supports doing P2P when the endpoints involved are all behind the same PCI bridge, as such devices are all in the same PCI hierarchy domain, and the spec guarantees that all transactions within the hierarchy will be routable, but it does not require routing between hierarchies.h]hXuOne of the biggest issues is that PCI doesn’t require forwarding transactions between hierarchy domains, and in PCIe, each Root Port defines a separate hierarchy domain. To make things worse, there is no simple way to determine if a given Root Complex supports this or not. (See PCIe r4.0, sec 1.3.1). Therefore, as of this writing, the kernel only supports doing P2P when the endpoints involved are all behind the same PCI bridge, as such devices are all in the same PCI hierarchy domain, and the spec guarantees that all transactions within the hierarchy will be routable, but it does not require routing between hierarchies.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hX<The second issue is that to make use of existing interfaces in Linux, memory that is used for P2P transactions needs to be backed by struct pages. However, PCI BARs are not typically cache coherent so there are a few corner case gotchas with these pages so developers need to be careful about what they do with them.h]hX<The second issue is that to make use of existing interfaces in Linux, memory that is used for P2P transactions needs to be backed by struct pages. However, PCI BARs are not typically cache coherent so there are a few corner case gotchas with these pages so developers need to be careful about what they do with them.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hDriver Writer's Guideh]hDriver Writer’s Guide}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hcIn a given P2P implementation there may be three or more different types of kernel drivers in play:h]hcIn a given P2P implementation there may be three or more different types of kernel drivers in play:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hhhhubh bullet_list)}(hhh](h list_item)}(hqProvider - A driver which provides or publishes P2P resources like memory or doorbell registers to other drivers.h]h)}(hqProvider - A driver which provides or publishes P2P resources like memory or doorbell registers to other drivers.h]hqProvider - A driver which provides or publishes P2P resources like memory or doorbell registers to other drivers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h^Client - A driver which makes use of a resource by setting up a DMA transaction to or from it.h]h)}(h^Client - A driver which makes use of a resource by setting up a DMA transaction to or from it.h]h^Client - A driver which makes use of a resource by setting up a DMA transaction to or from it.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hj3ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h[Orchestrator - A driver which orchestrates the flow of data between clients and providers. h]h)}(hZOrchestrator - A driver which orchestrates the flow of data between clients and providers.h]hZOrchestrator - A driver which orchestrates the flow of data between clients and providers.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjKubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhK$hhhhubh)}(hIn many cases there could be overlap between these three types (i.e., it may be typical for a driver to be both a provider and a client).h]hIn many cases there could be overlap between these three types (i.e., it may be typical for a driver to be both a provider and a client).}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hhhhubh)}(hubjp)}(hhh]h)}(h"the device to allocate memory fromh]h"the device to allocate memory from}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhM4hjZubah}(h]h ]h"]h$]h&]uh1johj>ubeh}(h]h ]h"]h$]h&]uh1jOhjYhM4hj;ubjP)}(h,``size_t size`` number of bytes to allocate h](jV)}(h``size_t size``h]j)}(hj}h]h size_t size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM5hjwubjp)}(hhh]h)}(hnumber of bytes to allocateh]hnumber of bytes to allocate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1johjwubeh}(h]h ]h"]h$]h&]uh1jOhjhM5hj;ubeh}(h]h ]h"]h$]h&]uh1jJhjubh)}(h**Description**h]j5)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM7hjubh)}(h.Returns the allocated memory or NULL on error.h]h.Returns the allocated memory or NULL on error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM6hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j*hj&hhhNhNubj8)}(hhh]h}(h]h ]h"]h$]h&]entries](jDpci_free_p2pmem (C function)c.pci_free_p2pmemhNtauh1j7hj&hhhNhNubjI)}(hhh](jN)}(hDvoid pci_free_p2pmem (struct pci_dev *pdev, void *addr, size_t size)h]jT)}(hCvoid pci_free_p2pmem(struct pci_dev *pdev, void *addr, size_t size)h](jZ)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMXubjl)}(h h]h }(hj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhj hMXubj})}(hpci_free_p2pmemh]j)}(hpci_free_p2pmemh]hpci_free_p2pmem}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjhhhj hMXubj)}(h/(struct pci_dev *pdev, void *addr, size_t size)h](j)}(hstruct pci_dev *pdevh](j)}(hjh]hstruct}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubjl)}(h h]h }(hjGhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj6ubh)}(hhh]j)}(hpci_devh]hpci_dev}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjZmodnameN classnameNjj)}j]j)}jj sbc.pci_free_p2pmemasbuh1hhj6ubjl)}(h h]h }(hjxhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj6ubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj6ubj)}(hpdevh]hpdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj2ubj)}(h void *addrh](jZ)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(haddrh]haddr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj2ubj)}(h size_t sizeh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jtc.pci_free_p2pmemasbuh1hhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj2ubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhj hMXubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjhhhj hMXubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jMhj hMXhjhhubj)}(hhh]h)}(hfree peer-to-peer DMA memoryh]hfree peer-to-peer DMA memory}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMXhjDhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj hMXubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%j_j&j_j'j(j)uh1jHhhhj&hNhNubj+)}(h**Parameters** ``struct pci_dev *pdev`` the device the memory was allocated from ``void *addr`` address of the memory that was allocated ``size_t size`` number of bytes that were allocatedh](h)}(h**Parameters**h]j5)}(hjih]h Parameters}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjgubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM\hjcubjK)}(hhh](jP)}(hB``struct pci_dev *pdev`` the device the memory was allocated from h](jV)}(h``struct pci_dev *pdev``h]j)}(hjh]hstruct pci_dev *pdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMYhjubjp)}(hhh]h)}(h(the device the memory was allocated fromh]h(the device the memory was allocated from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMYhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMYhjubjP)}(h8``void *addr`` address of the memory that was allocated h](jV)}(h``void *addr``h]j)}(hjh]h void *addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMZhjubjp)}(hhh]h)}(h(address of the memory that was allocatedh]h(address of the memory that was allocated}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMZhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMZhjubjP)}(h3``size_t size`` number of bytes that were allocatedh](jV)}(h``size_t size``h]j)}(hjh]h size_t size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM\hjubjp)}(hhh]h)}(h#number of bytes that were allocatedh]h#number of bytes that were allocated}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM[hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhM\hjubeh}(h]h ]h"]h$]h&]uh1jJhjcubeh}(h]h ] kernelindentah"]h$]h&]uh1j*hj&hhhNhNubj8)}(hhh]h}(h]h ]h"]h$]h&]entries](jD#pci_p2pmem_virt_to_bus (C function)c.pci_p2pmem_virt_to_bushNtauh1j7hj&hhhNhNubjI)}(hhh](jN)}(hHpci_bus_addr_t pci_p2pmem_virt_to_bus (struct pci_dev *pdev, void *addr)h]jT)}(hGpci_bus_addr_t pci_p2pmem_virt_to_bus(struct pci_dev *pdev, void *addr)h](h)}(hhh]j)}(hpci_bus_addr_th]hpci_bus_addr_t}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjYmodnameN classnameNjj)}j]j)}jpci_p2pmem_virt_to_bussbc.pci_p2pmem_virt_to_busasbuh1hhjPhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMiubjl)}(h h]h }(hjyhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjPhhhjxhMiubj})}(hpci_p2pmem_virt_to_bush]j)}(hjuh]hpci_p2pmem_virt_to_bus}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjPhhhjxhMiubj)}(h"(struct pci_dev *pdev, void *addr)h](j)}(hstruct pci_dev *pdevh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubh)}(hhh]j)}(hpci_devh]hpci_dev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jsc.pci_p2pmem_virt_to_busasbuh1hhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hpdevh]hpdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h void *addrh](jZ)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubjl)}(h h]h }(hj$hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(haddrh]haddr}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjPhhhjxhMiubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjLhhhjxhMiubah}(h]jGah ](jjeh"]h$]h&]jj)jhuh1jMhjxhMihjIhhubj)}(hhh]h)}(hWreturn the PCI bus address for a given virtual address obtained with pci_alloc_p2pmem()h]hWreturn the PCI bus address for a given virtual address obtained with pci_alloc_p2pmem()}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMihjfhhubah}(h]h ]h"]h$]h&]uh1jhjIhhhjxhMiubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%jj&jj'j(j)uh1jHhhhj&hNhNubj+)}(h**Parameters** ``struct pci_dev *pdev`` the device the memory was allocated from ``void *addr`` address of the memory that was allocatedh](h)}(h**Parameters**h]j5)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMmhjubjK)}(hhh](jP)}(hB``struct pci_dev *pdev`` the device the memory was allocated from h](jV)}(h``struct pci_dev *pdev``h]j)}(hjh]hstruct pci_dev *pdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMkhjubjp)}(hhh]h)}(h(the device the memory was allocated fromh]h(the device the memory was allocated from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMkhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMkhjubjP)}(h7``void *addr`` address of the memory that was allocatedh](jV)}(h``void *addr``h]j)}(hjh]h void *addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMmhjubjp)}(hhh]h)}(h(address of the memory that was allocatedh]h(address of the memory that was allocated}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMlhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMmhjubeh}(h]h ]h"]h$]h&]uh1jJhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j*hj&hhhNhNubj8)}(hhh]h}(h]h ]h"]h$]h&]entries](jD!pci_p2pmem_alloc_sgl (C function)c.pci_p2pmem_alloc_sglhNtauh1j7hj&hhhNhNubjI)}(hhh](jN)}(hastruct scatterlist * pci_p2pmem_alloc_sgl (struct pci_dev *pdev, unsigned int *nents, u32 length)h]jT)}(h_struct scatterlist *pci_p2pmem_alloc_sgl(struct pci_dev *pdev, unsigned int *nents, u32 length)h](j)}(hjh]hstruct}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMubjl)}(h h]h }(hjKhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj9hhhjJhMubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj^modnameN classnameNjj)}j]j)}jpci_p2pmem_alloc_sglsbc.pci_p2pmem_alloc_sglasbuh1hhj9hhhjJhMubjl)}(h h]h }(hj}hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj9hhhjJhMubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj9hhhjJhMubj})}(hpci_p2pmem_alloc_sglh]j)}(hjzh]hpci_p2pmem_alloc_sgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1j|hj9hhhjJhMubj)}(h7(struct pci_dev *pdev, unsigned int *nents, u32 length)h](j)}(hstruct pci_dev *pdevh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubh)}(hhh]j)}(hpci_devh]hpci_dev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jxc.pci_p2pmem_alloc_sglasbuh1hhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hpdevh]hpdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hunsigned int *nentsh](jZ)}(hunsignedh]hunsigned}(hj'hhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhj#ubjl)}(h h]h }(hj5hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj#ubjZ)}(hinth]hint}(hjChhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhj#ubjl)}(h h]h }(hjQhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj#ubj)}(hjjh]h*}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#ubj)}(hnentsh]hnents}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h u32 lengthh](h)}(hhh]j)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jxc.pci_p2pmem_alloc_sglasbuh1hhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hlengthh]hlength}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhj9hhhjJhMubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhj5hhhjJhMubah}(h]j0ah ](jjeh"]h$]h&]jj)jhuh1jMhjJhMhj2hhubj)}(hhh]h)}(h1allocate peer-to-peer DMA memory in a scatterlisth]h1allocate peer-to-peer DMA memory in a scatterlist}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhj2hhhjJhMubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%jj&jj'j(j)uh1jHhhhj&hNhNubj+)}(hX)**Parameters** ``struct pci_dev *pdev`` the device to allocate memory from ``unsigned int *nents`` the number of SG entries in the list ``u32 length`` number of bytes to allocate **Return** ``NULL`` on error or :c:type:`struct scatterlist ` pointer and **nents** on successh](h)}(h**Parameters**h]j5)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubjK)}(hhh](jP)}(h<``struct pci_dev *pdev`` the device to allocate memory from h](jV)}(h``struct pci_dev *pdev``h]j)}(hjh]hstruct pci_dev *pdev}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubjp)}(hhh]h)}(h"the device to allocate memory fromh]h"the device to allocate memory from}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMhj5ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhj4hMhjubjP)}(h=``unsigned int *nents`` the number of SG entries in the list h](jV)}(h``unsigned int *nents``h]j)}(hjXh]hunsigned int *nents}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjRubjp)}(hhh]h)}(h$the number of SG entries in the listh]h$the number of SG entries in the list}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjnubah}(h]h ]h"]h$]h&]uh1johjRubeh}(h]h ]h"]h$]h&]uh1jOhjmhMhjubjP)}(h+``u32 length`` number of bytes to allocate h](jV)}(h``u32 length``h]j)}(hjh]h u32 length}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubjp)}(hhh]h)}(hnumber of bytes to allocateh]hnumber of bytes to allocate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMhjubeh}(h]h ]h"]h$]h&]uh1jJhjubh)}(h **Return**h]j5)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubh)}(h```NULL`` on error or :c:type:`struct scatterlist ` pointer and **nents** on successh](j)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh on error or }(hjhhhNhNubh)}(h*:c:type:`struct scatterlist `h]j)}(hjh]hstruct scatterlist}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjj)}j]sbj" scatterlistuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubh pointer and }(hjhhhNhNubj5)}(h **nents**h]hnents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjubh on success}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j*hj&hhhNhNubj8)}(hhh]h}(h]h ]h"]h$]h&]entries](jD pci_p2pmem_free_sgl (C function)c.pci_p2pmem_free_sglhNtauh1j7hj&hhhNhNubjI)}(hhh](jN)}(hHvoid pci_p2pmem_free_sgl (struct pci_dev *pdev, struct scatterlist *sgl)h]jT)}(hGvoid pci_p2pmem_free_sgl(struct pci_dev *pdev, struct scatterlist *sgl)h](jZ)}(hvoidh]hvoid}(hjWhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjShhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMubjl)}(h h]h }(hjfhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjShhhjehMubj})}(hpci_p2pmem_free_sglh]j)}(hpci_p2pmem_free_sglh]hpci_p2pmem_free_sgl}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjShhhjehMubj)}(h/(struct pci_dev *pdev, struct scatterlist *sgl)h](j)}(hstruct pci_dev *pdevh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubh)}(hhh]j)}(hpci_devh]hpci_dev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjzsbc.pci_p2pmem_free_sglasbuh1hhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hpdevh]hpdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj&modnameN classnameNjj)}j]jc.pci_p2pmem_free_sglasbuh1hhjubjl)}(h h]h }(hjBhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hsglh]hsgl}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjShhhjehMubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjOhhhjehMubah}(h]jJah ](jjeh"]h$]h&]jj)jhuh1jMhjehMhjLhhubj)}(hhh]h)}(h6free a scatterlist allocated by pci_p2pmem_alloc_sgl()h]h6free a scatterlist allocated by pci_p2pmem_alloc_sgl()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjLhhhjehMubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%jj&jj'j(j)uh1jHhhhj&hNhNubj+)}(h**Parameters** ``struct pci_dev *pdev`` the device to allocate memory from ``struct scatterlist *sgl`` the allocated scatterlisth](h)}(h**Parameters**h]j5)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubjK)}(hhh](jP)}(h<``struct pci_dev *pdev`` the device to allocate memory from h](jV)}(h``struct pci_dev *pdev``h]j)}(hjh]hstruct pci_dev *pdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubjp)}(hhh]h)}(h"the device to allocate memory fromh]h"the device to allocate memory from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMhjubjP)}(h5``struct scatterlist *sgl`` the allocated scatterlisth](jV)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubjp)}(hhh]h)}(hthe allocated scatterlisth]hthe allocated scatterlist}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMhjubeh}(h]h ]h"]h$]h&]uh1jJhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j*hj&hhhNhNubj8)}(hhh]h}(h]h ]h"]h$]h&]entries](jDpci_p2pmem_publish (C function)c.pci_p2pmem_publishhNtauh1j7hj&hhhNhNubjI)}(hhh](jN)}(h(const char *page, struct pci_dev **p2p_dev, bool *use_p2pdma)h](j)}(hconst char *pageh](j)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubjZ)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hpageh]hpage}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj~ubj)}(hstruct pci_dev **p2p_devh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubh)}(hhh]j)}(hpci_devh]hpci_dev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjlsbc.pci_p2pdma_enable_storeasbuh1hhjubjl)}(h h]h }(hj"hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hjjh]h*}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hp2p_devh]hp2p_dev}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj~ubj)}(hbool *use_p2pdmah](jZ)}(hjh]hbool}(hjchhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhj_ubjl)}(h h]h }(hjphhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj_ubj)}(hjjh]h*}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj_ubj)}(h use_p2pdmah]h use_p2pdma}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj~ubeh}(h]h ]h"]h$]h&]hhuh1jhjEhhhjWhMubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjAhhhjWhMubah}(h]j<ah ](jjeh"]h$]h&]jj)jhuh1jMhjWhMhj>hhubj)}(hhh]h)}(h7parse a configfs/sysfs attribute store to enable p2pdmah]h7parse a configfs/sysfs attribute store to enable p2pdma}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhj>hhhjWhMubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%jj&jj'j(j)uh1jHhhhj&hNhNubj+)}(hX**Parameters** ``const char *page`` contents of the value to be stored ``struct pci_dev **p2p_dev`` returns the PCI device that was selected to be used (if one was specified in the stored value) ``bool *use_p2pdma`` returns whether to enable p2pdma or not **Description** Parses an attribute value to decide whether to enable p2pdma. The value can select a PCI device (using its full BDF device name) or a boolean (in any format kstrtobool() accepts). A false value disables p2pdma, a true value expects the caller to automatically find a compatible device and specifying a PCI device expects the caller to use the specific provider. pci_p2pdma_enable_show() should be used as the show operation for the attribute. Returns 0 on successh](h)}(h**Parameters**h]j5)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubjK)}(hhh](jP)}(h8``const char *page`` contents of the value to be stored h](jV)}(h``const char *page``h]j)}(hjh]hconst char *page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubjp)}(hhh]h)}(h"contents of the value to be storedh]h"contents of the value to be stored}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhj hMhjubjP)}(h|``struct pci_dev **p2p_dev`` returns the PCI device that was selected to be used (if one was specified in the stored value) h](jV)}(h``struct pci_dev **p2p_dev``h]j)}(hj/h]hstruct pci_dev **p2p_dev}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhj)ubjp)}(hhh]h)}(h^returns the PCI device that was selected to be used (if one was specified in the stored value)h]h^returns the PCI device that was selected to be used (if one was specified in the stored value)}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjEubah}(h]h ]h"]h$]h&]uh1johj)ubeh}(h]h ]h"]h$]h&]uh1jOhjDhMhjubjP)}(h=``bool *use_p2pdma`` returns whether to enable p2pdma or not h](jV)}(h``bool *use_p2pdma``h]j)}(hjih]hbool *use_p2pdma}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjcubjp)}(hhh]h)}(h'returns whether to enable p2pdma or noth]h'returns whether to enable p2pdma or not}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hMhjubah}(h]h ]h"]h$]h&]uh1johjcubeh}(h]h ]h"]h$]h&]uh1jOhj~hMhjubeh}(h]h ]h"]h$]h&]uh1jJhjubh)}(h**Description**h]j5)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubh)}(hXiParses an attribute value to decide whether to enable p2pdma. The value can select a PCI device (using its full BDF device name) or a boolean (in any format kstrtobool() accepts). A false value disables p2pdma, a true value expects the caller to automatically find a compatible device and specifying a PCI device expects the caller to use the specific provider.h]hXiParses an attribute value to decide whether to enable p2pdma. The value can select a PCI device (using its full BDF device name) or a boolean (in any format kstrtobool() accepts). A false value disables p2pdma, a true value expects the caller to automatically find a compatible device and specifying a PCI device expects the caller to use the specific provider.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubh)}(hPpci_p2pdma_enable_show() should be used as the show operation for the attribute.h]hPpci_p2pdma_enable_show() should be used as the show operation for the attribute.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubh)}(hReturns 0 on successh]hReturns 0 on success}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j*hj&hhhNhNubj8)}(hhh]h}(h]h ]h"]h$]h&]entries](jD#pci_p2pdma_enable_show (C function)c.pci_p2pdma_enable_showhNtauh1j7hj&hhhNhNubjI)}(hhh](jN)}(hUssize_t pci_p2pdma_enable_show (char *page, struct pci_dev *p2p_dev, bool use_p2pdma)h]jT)}(hTssize_t pci_p2pdma_enable_show(char *page, struct pci_dev *p2p_dev, bool use_p2pdma)h](h)}(hhh]j)}(hssize_th]hssize_t}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jpci_p2pdma_enable_showsbc.pci_p2pdma_enable_showasbuh1hhjhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM.ubjl)}(h h]h }(hj,hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhj+hM.ubj})}(hpci_p2pdma_enable_showh]j)}(hj(h]hpci_p2pdma_enable_show}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjhhhj+hM.ubj)}(h6(char *page, struct pci_dev *p2p_dev, bool use_p2pdma)h](j)}(h char *pageh](jZ)}(hcharh]hchar}(hjYhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjUubjl)}(h h]h }(hjghhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjUubj)}(hjjh]h*}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjUubj)}(hpageh]hpage}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjQubj)}(hstruct pci_dev *p2p_devh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubh)}(hhh]j)}(hpci_devh]hpci_dev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j&c.pci_p2pdma_enable_showasbuh1hhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hp2p_devh]hp2p_dev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjQubj)}(hbool use_p2pdmah](jZ)}(hjh]hbool}(hj hhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(h use_p2pdmah]h use_p2pdma}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjQubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhj+hM.ubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjhhhj+hM.ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jMhj+hM.hjhhubj)}(hhh]h)}(hDshow a configfs/sysfs attribute indicating whether p2pdma is enabledh]hDshow a configfs/sysfs attribute indicating whether p2pdma is enabled}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM.hjMhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj+hM.ubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%jhj&jhj'j(j)uh1jHhhhj&hNhNubj+)}(hX^**Parameters** ``char *page`` contents of the stored value ``struct pci_dev *p2p_dev`` the selected p2p device (NULL if no device is selected) ``bool use_p2pdma`` whether p2pdma has been enabled **Description** Attributes that use pci_p2pdma_enable_store() should use this function to show the value of the attribute. Returns 0 on successh](h)}(h**Parameters**h]j5)}(hjrh]h Parameters}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjpubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM2hjlubjK)}(hhh](jP)}(h,``char *page`` contents of the stored value h](jV)}(h``char *page``h]j)}(hjh]h char *page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM0hjubjp)}(hhh]h)}(hcontents of the stored valueh]hcontents of the stored value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM0hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhM0hjubjP)}(hT``struct pci_dev *p2p_dev`` the selected p2p device (NULL if no device is selected) h](jV)}(h``struct pci_dev *p2p_dev``h]j)}(hjh]hstruct pci_dev *p2p_dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM1hjubjp)}(hhh]h)}(h7the selected p2p device (NULL if no device is selected)h]h7the selected p2p device (NULL if no device is selected)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM1hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhM1hjubjP)}(h4``bool use_p2pdma`` whether p2pdma has been enabled h](jV)}(h``bool use_p2pdma``h]j)}(hjh]hbool use_p2pdma}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM2hjubjp)}(hhh]h)}(hwhether p2pdma has been enabledh]hwhether p2pdma has been enabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM2hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhM2hjubeh}(h]h ]h"]h$]h&]uh1jJhjlubh)}(h**Description**h]j5)}(hj>h]h Description}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j4hj<ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM4hjlubh)}(hjAttributes that use pci_p2pdma_enable_store() should use this function to show the value of the attribute.h]hjAttributes that use pci_p2pdma_enable_store() should use this function to show the value of the attribute.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM3hjlubh)}(hReturns 0 on successh]hReturns 0 on success}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM6hjlubeh}(h]h ] kernelindentah"]h$]h&]uh1j*hj&hhhNhNubeh}(h]p2p-dma-support-libraryah ]h"]p2p dma support libraryah$]h&]uh1hhhhhhhhKubeh}(h]pci-peer-to-peer-dma-supportah ]h"]pci peer-to-peer dma supportah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjj#j jrjojjjjjjj~j{u nametypes}(jj#jrjjjj~uh}(jhj hjojjjujjjjj{j&jFjOjyj~j j j j jjjGjLj0j5jJjOjNjSj<jAjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.