pci_p2pdma_enable_store(9)
π pci_p2pdma_enable_store(9) β from the Kernel API Manual, bestie edition π
okay so real talk, this one is pci_p2pdma_enable_store from the Kernel API Manual, and yes we are absolutely going to understand it together. grab a boba, we got this π§β¨
β¨ NAME β¨
pci_p2pdma_enable_store β it parses a configfs/sysfs attribute store so you can enable p2pdma. that's literally her whole job π
πΈ SYNOPSIS πΈ
int pci_p2pdma_enable_store (const char *page , struct pci_dev **p2p_dev
, bool *use_p2pdma );
she's giving "three arguments, zero drama" energy. periodt π₯
π¦ ARGUMENTS π¦
pageβ the contents of the value that's being stored. like, what actually landed in the attribute β¨p2p_devβ this one returns the PCI device that got selected to be used. and yes, only if one was actually specified in the stored value β if not, nothing to hand back πuse_p2pdmaβ returns whether we should enable p2pdma or not. cute little on/off verdict π
π DESCRIPTION π
so what she does: she parses an attribute value to decide whether to enable p2pdma. that's the whole vibe check π«Ά
and the value can be one of two things:
- a PCI device β picked out using its full BDF device name π
- a boolean β in any format
kstrtoboolaccepts, so she's flexible like that π
here's the mapping, and this part matters so pay attention bestie:
- a false value disables p2pdma π«
- a true value means the caller is expected to automatically find a compatible device π
- specifying a PCI device means the caller is expected to use that specific provider π
also, quick side note: pci_p2pdma_enable_show should be used as the show operation for the attribute. they're a matching set, iykyk π
and the best part? Returns 0 on success. iconic. no notes. β¨
π SEE ALSO π
kernel file ./drivers/pci/p2pdma.c, plus the whole friend group:
pcim_p2pdma_init(9)pcim_p2pdma_provider(9)pci_p2pdma_add_resource(9)pci_p2pdma_distance_many(9)pci_has_p2pmem(9)pci_p2pmem_find_many(9)pci_alloc_p2pmem(9)pci_free_p2pmem(9)pci_p2pmem_virt_to_bus(9)pci_p2pmem_alloc_sgl(9)pci_p2pmem_free_sgl(9)pci_p2pmem_publish(9)pci_p2pdma_map_type(9)pci_p2pdma_enable_show(9)
okay that's the whole page, you ate that fr fr π this lil slice of ./drivers/pci was brought to you by October 2026 β mwah, slay, see you in the next man page ππ¦β
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms