pci_p2pmem_virt_to_bus(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« pci_p2pmem_virt_to_bus(9) β€” the Kernel API Manual glow-up πŸ’«

Okay bestie, so this one lives in the Kernel API Manual (section 9, kernel-town energy 🌈), and it's literally the little helper that hands you back a PCI bus address when all you've got is a virtual address. No cap.


✨ NAME ✨

pci_p2pmem_virt_to_bus β€” returns the PCI bus address for a given virtual address that you got from pci_alloc_p2pmem(). That's it, that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

pci_bus_addr_t pci_p2pmem_virt_to_bus (struct pci_dev *pdev , void *addr );

Look at her. Short, iconic, knows what she wants 🀌


🌸 ARGUMENTS 🌸

  • pdev β€” the device the memory was allocated from. Like, the actual origin story of this memory, bestie πŸ‘‘
  • addr β€” address of the memory that was allocated. The virtual one. The one you're holding rn πŸ’…

🫢 SEE ALSO 🫢

The whole friend group lives in the kernel file ./drivers/pci/p2pdma.c β€” go say hi to all of them:


Fr fr: if you didn't get your virtual address from pci_alloc_p2pmem(), this function is not the moment. Read the NAME section again, iykyk 🌟

And that's the page, diva πŸ’œ Straight outta ./drivers/pci, dated October 2026, served fresh from the Kernel API Manual β€” slay responsibly, and may all your bus addresses be correct the first time 🧚⭐

πŸ“¦ where this page comes from