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)}(h**Parameters** ``struct pci_dev *pdev`` PCI device to checkh](h)}(h**Parameters**h]j5)}(hj h]h Parameters}(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.chMhj ubjK)}(hhh]jP)}(h,``struct pci_dev *pdev`` PCI device to checkh](jV)}(h``struct pci_dev *pdev``h]j)}(hj h]hstruct pci_dev *pdev}(hj hhhNhNubah}(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)}(hPCI device to checkh]hPCI device to check}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhj ubah}(h]h ]h"]h$]h&]uh1johj ubeh}(h]h ]h"]h$]h&]uh1jOhj hMhj ubah}(h]h ]h"]h$]h&]uh1jJhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j*hj&hhhNhNubj8)}(hhh]h}(h]h ]h"]h$]h&]entries](jD!pci_p2pmem_find_many (C function)c.pci_p2pmem_find_manyhNtauh1j7hj&hhhNhNubjI)}(hhh](jN)}(hPstruct pci_dev * pci_p2pmem_find_many (struct device **clients, int num_clients)h]jT)}(hNstruct pci_dev *pci_p2pmem_find_many(struct device **clients, int num_clients)h](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMubjl)}(h h]h }(hj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj hhhj hMubh)}(hhh]j)}(hpci_devh]hpci_dev}(hj! hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj# modnameN classnameNjj)}j]j)}jpci_p2pmem_find_manysbc.pci_p2pmem_find_manyasbuh1hhj hhhj hMubjl)}(h h]h }(hjB hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj hhhj hMubj)}(hjjh]h*}(hjP hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj hhhj hMubj})}(hpci_p2pmem_find_manyh]j)}(hj? h]hpci_p2pmem_find_many}(hja hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj] ubah}(h]h ](jjeh"]h$]h&]hhuh1j|hj hhhj hMubj)}(h*(struct device **clients, int num_clients)h](j)}(hstruct device **clientsh](j)}(hjh]hstruct}(hj| hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjx ubjl)}(h h]h }(hj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjx ubh)}(hhh]j)}(hdeviceh]hdevice}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j= c.pci_p2pmem_find_manyasbuh1hhjx ubjl)}(h h]h }(hj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjx ubj)}(hjjh]h*}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjx ubj)}(hjjh]h*}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjx ubj)}(hclientsh]hclients}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjx ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjt ubj)}(hint num_clientsh](jZ)}(hinth]hint}(hj hhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhj ubjl)}(h h]h }(hj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj ubj)}(h num_clientsh]h num_clients}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjt ubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhj hhhj hMubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jMhj hMhj hhubj)}(hhh]h)}(hifind a peer-to-peer DMA memory device compatible with the specified list of clients and shortest distanceh]hifind a peer-to-peer DMA memory device compatible with the specified list of clients and shortest distance}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhj< hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%jW j&jW j'j(j)uh1jHhhhj&hNhNubj+)}(hX**Parameters** ``struct device **clients`` array of devices to check (NULL-terminated) ``int num_clients`` number of client devices in the list **Description** If multiple devices are behind the same switch, the one "closest" to the client devices in use will be chosen first. (So if one of the providers is the same as one of the clients, that provider will be used ahead of any other providers that are unrelated). If multiple providers are an equal distance away, one will be chosen at random. Returns a pointer to the PCI device with a reference taken (use pci_dev_put to return the reference) or NULL if no compatible device is found. The found provider will also be assigned to the client list.h](h)}(h**Parameters**h]j5)}(hja h]h Parameters}(hjc 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.chMhj[ ubjK)}(hhh](jP)}(hH``struct device **clients`` array of devices to check (NULL-terminated) h](jV)}(h``struct device **clients``h]j)}(hj h]hstruct device **clients}(hj hhhNhNubah}(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.chMhjz ubjp)}(hhh]h)}(h+array of devices to check (NULL-terminated)h]h+array of devices to check (NULL-terminated)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1johjz ubeh}(h]h ]h"]h$]h&]uh1jOhj hMhjw ubjP)}(h9``int num_clients`` number of client devices in the list h](jV)}(h``int num_clients``h]j)}(hj h]hint num_clients}(hj hhhNhNubah}(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$number of client devices in the listh]h$number of client devices in the list}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1johj ubeh}(h]h ]h"]h$]h&]uh1jOhj hMhjw ubeh}(h]h ]h"]h$]h&]uh1jJhj[ ubh)}(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.chMhj[ ubh)}(hXPIf multiple devices are behind the same switch, the one "closest" to the client devices in use will be chosen first. (So if one of the providers is the same as one of the clients, that provider will be used ahead of any other providers that are unrelated). If multiple providers are an equal distance away, one will be chosen at random.h]hXTIf multiple devices are behind the same switch, the one “closest” to the client devices in use will be chosen first. (So if one of the providers is the same as one of the clients, that provider will be used ahead of any other providers that are unrelated). If multiple providers are an equal distance away, one will be chosen at random.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhj[ ubh)}(hReturns a pointer to the PCI device with a reference taken (use pci_dev_put to return the reference) or NULL if no compatible device is found. The found provider will also be assigned to the client list.h]hReturns a pointer to the PCI device with a reference taken (use pci_dev_put to return the reference) or NULL if no compatible device is found. The found provider will also be assigned to the client list.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhj[ ubeh}(h]h ] kernelindentah"]h$]h&]uh1j*hj&hhhNhNubj8)}(hhh]h}(h]h ]h"]h$]h&]entries](jDpci_alloc_p2pmem (C function)c.pci_alloc_p2pmemhNtauh1j7hj&hhhNhNubjI)}(hhh](jN)}(h;void * pci_alloc_p2pmem (struct pci_dev *pdev, size_t size)h]jT)}(h9void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size)h](jZ)}(hvoidh]hvoid}(hjHhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjDhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM:ubjl)}(h h]h }(hjWhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjDhhhjVhM:ubj)}(hjjh]h*}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjDhhhjVhM:ubj})}(hpci_alloc_p2pmemh]j)}(hpci_alloc_p2pmemh]hpci_alloc_p2pmem}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjDhhhjVhM:ubj)}(h#(struct pci_dev *pdev, size_t size)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)}jjxsbc.pci_alloc_p2pmemasbuh1hhjubjl)}(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 size_t sizeh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]jc.pci_alloc_p2pmemasbuh1hhjubjl)}(h h]h }(hj%hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hsizeh]hsize}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjDhhhjVhM:ubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhj@hhhjVhM:ubah}(h]j;ah ](jjeh"]h$]h&]jj)jhuh1jMhjVhM:hj=hhubj)}(hhh]h)}(h allocate peer-to-peer DMA memoryh]h allocate peer-to-peer DMA memory}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM4hjZhhubah}(h]h ]h"]h$]h&]uh1jhj=hhhjVhM:ubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%juj&juj'j(j)uh1jHhhhj&hNhNubj+)}(h**Parameters** ``struct pci_dev *pdev`` the device to allocate memory from ``size_t size`` number of bytes to allocate **Description** Returns the allocated memory or NULL on error.h](h)}(h**Parameters**h]j5)}(hjh]h Parameters}(hjhhhNhNubah}(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.chM8hjyubjK)}(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.chM5hjubjp)}(hhh]h)}(h"the device to allocate memory fromh]h"the device to allocate memory from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhM5hjubjP)}(h,``size_t size`` number of bytes to allocate h](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.chM6hjubjp)}(hhh]h)}(hnumber of bytes to allocateh]hnumber of bytes to allocate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM6hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhM6hjubeh}(h]h ]h"]h$]h&]uh1jJhjyubh)}(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.chM8hjyubh)}(h.Returns the allocated memory or NULL on error.h]h.Returns the allocated memory or NULL on error.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM8hjyubeh}(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}(hjWhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjShhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM^ubjl)}(h h]h }(hjfhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjShhhjehM^ubj})}(hpci_free_p2pmemh]j)}(hpci_free_p2pmemh]hpci_free_p2pmem}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjShhhjehM^ubj)}(h/(struct pci_dev *pdev, void *addr, size_t size)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_free_p2pmemasbuh1hhjubjl)}(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 }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(haddrh]haddr}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h size_t sizeh](h)}(hhh]j)}(hsize_th]hsize_t}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjMmodnameN classnameNjj)}j]jc.pci_free_p2pmemasbuh1hhjDubjl)}(h h]h }(hjihhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjDubj)}(hsizeh]hsize}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjShhhjehM^ubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjOhhhjehM^ubah}(h]jJah ](jjeh"]h$]h&]jj)jhuh1jMhjehM^hjLhhubj)}(hhh]h)}(hfree peer-to-peer DMA memoryh]hfree peer-to-peer DMA memory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMYhjhhubah}(h]h ]h"]h$]h&]uh1jhjLhhhjehM^ubeh}(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 allocated ``size_t size`` number of bytes that were 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.chM]hjubjK)}(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.chMZhjubjp)}(hhh]h)}(h(the device the memory was allocated fromh]h(the device the memory was allocated from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMZhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMZhjubjP)}(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.chM[hjubjp)}(hhh]h)}(h(address of the memory that was allocatedh]h(address of the memory that was allocated}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hM[hj1ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhj0hM[hjubjP)}(h3``size_t size`` number of bytes that were allocatedh](jV)}(h``size_t size``h]j)}(hjTh]h size_t size}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM]hjNubjp)}(hhh]h)}(h#number of bytes that were allocatedh]h#number of bytes that were allocated}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM\hjjubah}(h]h ]h"]h$]h&]uh1johjNubeh}(h]h ]h"]h$]h&]uh1jOhjihM]hjubeh}(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_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}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jpci_p2pmem_virt_to_bussbc.pci_p2pmem_virt_to_busasbuh1hhjhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMoubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhjhMoubj})}(hpci_p2pmem_virt_to_bush]j)}(hjh]hpci_p2pmem_virt_to_bus}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjhhhjhMoubj)}(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 }(hj hhhNhNubah}(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 reftargetj modnameN classnameNjj)}j]jc.pci_p2pmem_virt_to_busasbuh1hhjubjl)}(h h]h }(hj<hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hpdevh]hpdev}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h void *addrh](jZ)}(hvoidh]hvoid}(hjphhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjlubjl)}(h h]h }(hj~hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjlubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjlubj)}(haddrh]haddr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMoubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjhhhjhMoubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jMhjhMohjhhubj)}(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()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMjhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMoubeh}(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.chMnhjubjK)}(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.chMlhjubjp)}(hhh]h)}(h(the device the memory was allocated fromh]h(the device the memory was allocated from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMlhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMlhjubjP)}(h7``void *addr`` address of the memory that was allocatedh](jV)}(h``void *addr``h]j)}(hj=h]h void *addr}(hj?hhhNhNubah}(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.chMnhj7ubjp)}(hhh]h)}(h(address of the memory that was allocatedh]h(address of the memory that was allocated}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMmhjSubah}(h]h ]h"]h$]h&]uh1johj7ubeh}(h]h ]h"]h$]h&]uh1jOhjRhMnhjubeh}(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}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhjhMubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jpci_p2pmem_alloc_sglsbc.pci_p2pmem_alloc_sglasbuh1hhjhhhjhMubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhjhMubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj})}(hpci_p2pmem_alloc_sglh]j)}(hjh]hpci_p2pmem_alloc_sgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjhhhjhMubj)}(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&]uh1jhj ubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj ubh)}(hhh]j)}(hpci_devh]hpci_dev}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj1modnameN classnameNjj)}j]jc.pci_p2pmem_alloc_sglasbuh1hhj ubjl)}(h h]h }(hjMhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj ubj)}(hjjh]h*}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubj)}(hpdevh]hpdev}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned int *nentsh](jZ)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhj}ubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj}ubjZ)}(hinth]hint}(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhj}ubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj}ubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj}ubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(h u32 lengthh](h)}(hhh]j)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.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&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jMhjhMhjhhubj)}(hhh]h)}(h1allocate peer-to-peer DMA memory in a scatterlisth]h1allocate peer-to-peer DMA memory in a scatterlist}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhj5hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%jPj&jPj'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)}(hjZh]h Parameters}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j4hjXubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjTubjK)}(hhh](jP)}(h<``struct pci_dev *pdev`` the device to allocate memory from h](jV)}(h``struct pci_dev *pdev``h]j)}(hjyh]hstruct pci_dev *pdev}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjsubjp)}(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&]uh1johjsubeh}(h]h ]h"]h$]h&]uh1jOhjhMhjpubjP)}(h=``unsigned int *nents`` the number of SG entries in the list h](jV)}(h``unsigned int *nents``h]j)}(hjh]hunsigned int *nents}(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 number of SG entries in the listh]h$the number of SG entries in the list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMhjpubjP)}(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&]uh1jOhjhMhjpubeh}(h]h ]h"]h$]h&]uh1jJhjTubh)}(h **Return**h]j5)}(hj&h]hReturn}(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.chMhjTubh)}(h```NULL`` on error or :c:type:`struct scatterlist ` pointer and **nents** on successh](j)}(h``NULL``h]hNULL}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh on error or }(hj<hhhNhNubh)}(h*:c:type:`struct scatterlist `h]j)}(hjTh]hstruct scatterlist}(hjVhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjRubah}(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.chMhj<ubh pointer and }(hj<hhhNhNubj5)}(h **nents**h]hnents}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j4hj<ubh on success}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjthMhjTubeh}(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}(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhjhMubj})}(hpci_p2pmem_free_sglh]j)}(hpci_p2pmem_free_sglh]hpci_p2pmem_free_sgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjhhhjhMubj)}(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}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.pci_p2pmem_free_sglasbuh1hhjubjl)}(h h]h }(hj,hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hpdevh]hpdev}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubjl)}(h h]h }(hjmhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj\ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j(c.pci_p2pmem_free_sglasbuh1hhj\ubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj\ubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj\ubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jMhjhMhjhhubj)}(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&]uh1jhjhhhjhMubeh}(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)}(hj"h]hstruct pci_dev *pdev}(hj$hhhNhNubah}(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.chMhjubjp)}(hhh]h)}(h"the device to allocate memory fromh]h"the device to allocate memory from}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMhj8ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhj7hMhjubjP)}(h5``struct scatterlist *sgl`` the allocated scatterlisth](jV)}(h``struct scatterlist *sgl``h]j)}(hj[h]hstruct scatterlist *sgl}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjUubjp)}(hhh]h)}(hthe allocated scatterlisth]hthe allocated scatterlist}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjqubah}(h]h ]h"]h$]h&]uh1johjUubeh}(h]h ]h"]h$]h&]uh1jOhjphMhjubeh}(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)}(hhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hpdevh]hpdev}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h bool publishh](jZ)}(hjh]hbool}(hjdhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhj`ubjl)}(h h]h }(hjqhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj`ubj)}(hpublishh]hpublish}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jMhjhMhjhhubj)}(hhh]h)}(hSpublish the peer-to-peer DMA memory for use by other devices with pci_p2pmem_find()h]hSpublish the peer-to-peer DMA memory for use by other devices with pci_p2pmem_find()}(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&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%jj&jj'j(j)uh1jHhhhj&hNhNubj+)}(hX**Parameters** ``struct pci_dev *pdev`` the device with peer-to-peer DMA memory to publish ``bool publish`` set to true to publish the memory, false to unpublish it **Description** Published memory can be used by other PCI device drivers for peer-2-peer DMA operations. Non-published memory is reserved for exclusive use of the device driver that registers the peer-to-peer memory.h](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)}(hL``struct pci_dev *pdev`` the device with peer-to-peer DMA memory to publish 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)}(h2the device with peer-to-peer DMA memory to publishh]h2the device with peer-to-peer DMA memory to publish}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMhjubjP)}(hJ``bool publish`` set to true to publish the memory, false to unpublish it h](jV)}(h``bool publish``h]j)}(hj#h]h bool publish}(hj%hhhNhNubah}(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.chMhjubjp)}(hhh]h)}(h8set to true to publish the memory, false to unpublish ith]h8set to true to publish the memory, false to unpublish it}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj9ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhj8hMhjubeh}(h]h ]h"]h$]h&]uh1jJhjubh)}(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.chMhjubh)}(hPublished memory can be used by other PCI device drivers for peer-2-peer DMA operations. Non-published memory is reserved for exclusive use of the device driver that registers the peer-to-peer memory.h]hPublished memory can be used by other PCI device drivers for peer-2-peer DMA operations. Non-published memory is reserved for exclusive use of the device driver that registers the peer-to-peer memory.}(hjthhhNhNubah}(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_store (C function)c.pci_p2pdma_enable_storehNtauh1j7hj&hhhNhNubjI)}(hhh](jN)}(hZint pci_p2pdma_enable_store (const char *page, struct pci_dev **p2p_dev, bool *use_p2pdma)h]jT)}(hYint pci_p2pdma_enable_store(const char *page, struct pci_dev **p2p_dev, bool *use_p2pdma)h](jZ)}(hinth]hint}(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM'ubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhjhM'ubj})}(hpci_p2pdma_enable_storeh]j)}(hpci_p2pdma_enable_storeh]hpci_p2pdma_enable_store}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1j|hjhhhjhM'ubj)}(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 }(hj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hpageh]hpage}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct pci_dev **p2p_devh](j)}(hjh]hstruct}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubjl)}(h h]h }(hjKhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj:ubh)}(hhh]j)}(hpci_devh]hpci_dev}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj^modnameN classnameNjj)}j]j)}jjsbc.pci_p2pdma_enable_storeasbuh1hhj:ubjl)}(h h]h }(hj|hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj:ubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:ubj)}(hjjh]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:ubj)}(hp2p_devh]hp2p_dev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hbool *use_p2pdmah](jZ)}(hjh]hbool}(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)}(h use_p2pdmah]h use_p2pdma}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhM'ubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjhhhjhM'ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jMhjhM'hjhhubj)}(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.chMhj hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM'ubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%j'j&j'j'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)}(hj1h]h Parameters}(hj3hhhNhNubah}(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.chMhj+ubjK)}(hhh](jP)}(h8``const char *page`` contents of the value to be stored h](jV)}(h``const char *page``h]j)}(hjPh]hconst char *page}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1jUh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMhjJubjp)}(hhh]h)}(h"contents of the value to be storedh]h"contents of the value to be stored}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMhjfubah}(h]h ]h"]h$]h&]uh1johjJubeh}(h]h ]h"]h$]h&]uh1jOhjehMhjGubjP)}(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)}(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.chMhjubjp)}(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)}(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&]uh1jOhjhMhjGubjP)}(h=``bool *use_p2pdma`` returns whether to enable p2pdma or not 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.chMhjubjp)}(hhh]h)}(h'returns whether to enable p2pdma or noth]h'returns whether to enable p2pdma or not}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhjhMhjGubeh}(h]h ]h"]h$]h&]uh1jJhj+ubh)}(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.chMhj+ubh)}(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.chMhj+ubh)}(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.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM"hj+ubh)}(hReturns 0 on successh]hReturns 0 on success}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chM%hj+ubeh}(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}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjfmodnameN classnameNjj)}j]j)}jpci_p2pdma_enable_showsbc.pci_p2pdma_enable_showasbuh1hhj]hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMVubjl)}(h h]h }(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj]hhhjhMVubj})}(hpci_p2pdma_enable_showh]j)}(hjh]hpci_p2pdma_enable_show}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1j|hj]hhhjhMVubj)}(h6(char *page, struct pci_dev *p2p_dev, bool use_p2pdma)h](j)}(h char *pageh](jZ)}(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&]noemphhhuh1jhjubj)}(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]jc.pci_p2pdma_enable_showasbuh1hhjubjl)}(h h]h }(hj1hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj)}(hjjh]h*}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hp2p_devh]hp2p_dev}(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hbool use_p2pdmah](jZ)}(hjh]hbool}(hjehhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjaubjl)}(h h]h }(hjrhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjaubj)}(h use_p2pdmah]h use_p2pdma}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhj]hhhjhMVubeh}(h]h ]h"]h$]h&]hhjuh1jSjjhjYhhhjhMVubah}(h]jTah ](jjeh"]h$]h&]jj)jhuh1jMhjhMVhjVhhubj)}(hhh]h)}(hDshow a configfs/sysfs attribute indicating whether p2pdma is enabledh]hDshow a configfs/sysfs attribute indicating whether p2pdma is enabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMKhjhhubah}(h]h ]h"]h$]h&]uh1jhjVhhhjhMVubeh}(h]h ](jfunctioneh"]h$]h&]j$jj%jj&jj'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)}(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.chMOhjubjK)}(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.chMMhjubjp)}(hhh]h)}(hcontents of the stored valueh]hcontents of the stored value}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMMhj ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jOhj hMMhjubjP)}(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)}(hj$ h]hstruct pci_dev *p2p_dev}(hj& hhhNhNubah}(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.chMNhj ubjp)}(hhh]h)}(h7the selected p2p device (NULL if no device is selected)h]h7the selected p2p device (NULL if no device is selected)}(hj= hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9 hMNhj: ubah}(h]h ]h"]h$]h&]uh1johj ubeh}(h]h ]h"]h$]h&]uh1jOhj9 hMNhjubjP)}(h4``bool use_p2pdma`` whether p2pdma has been enabled h](jV)}(h``bool use_p2pdma``h]j)}(hj] h]hbool use_p2pdma}(hj_ hhhNhNubah}(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.chMOhjW ubjp)}(hhh]h)}(hwhether p2pdma has been enabledh]hwhether p2pdma has been enabled}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr hMOhjs ubah}(h]h ]h"]h$]h&]uh1johjW ubeh}(h]h ]h"]h$]h&]uh1jOhjr hMOhjubeh}(h]h ]h"]h$]h&]uh1jJhjubh)}(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.chMQhjubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMQhjubh)}(hReturns 0 on successh]hReturns 0 on success}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/pci/p2pdma:130: ./drivers/pci/p2pdma.chMThjubeh}(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_handlerj!error_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}(j j j#j jrjojjjjjjj j u nametypes}(j j#jrjjjj uh}(j hj hjojjjujjjjj j&jFjOjyj~j j j j j;j@jJjOjjjjjjjjjjjTjYu 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.