pcim_pin_device(9)
π pcim_pin_device β like, the kernel API manual bestie π
okay so welcome to pcim_pin_device(9), straight out of the Kernel API Manual β¨ this one's a lil function that does exactly one thing and does it iconically.
πΈ NAME πΈ
pcim_pin_device β pins a managed PCI device. that's it. that's the whole vibe. it pins it. pinned device = stays put π
β¨ SYNOPSIS β¨
void pcim_pin_device (struct pci_dev *pdev );
literally one argument, returns nothing, no cap π«Ά
π¦ ARGUMENTS π¦
pdevβ the PCI device you're pinning π yes bestie, this is the PCI device to pin.
π DESCRIPTION π
okay so picture this: you call pcim_pin_device and it pins the managed PCI device pdev. and what does "pin" mean?? it means the pinned device won't be disabled on driver detach β it just stays enabled, main character energy, refusing to leave the party π
π₯
β οΈ but like, important:pdevmust have been enabled withpcim_enable_device. fr fr, if you didn't do that first, you're not it. do the enable first, then pin. that's the order, periodt π
π₯ SEE ALSO π₯
peep the kernel file ./drivers/pci/devres.c for the whole friend group π§ and also go read these, they're all lowkey iconic:
devm_pci_remap_iospace(9)devm_pci_remap_cfgspace(9)devm_pci_remap_cfg_resource(9)pcim_set_mwi(9)pcim_intx(9)pcim_enable_device(9)pcim_iomap_table(9)pcim_iomap(9)pcim_iounmap(9)pcim_iomap_region(9)pcim_iounmap_region(9)pcim_iomap_regions(9)pcim_request_region(9)pcim_release_region(9)pcim_release_all_regions(9)pcim_request_all_regions(9)pcim_iomap_range(9)
okay that's the whole page bestie!! π this one lives over in ./drivers/pci, and it was dated October 2026 β so likeβ¦ future vibes but make it kernel ππ slay, go pin some devices responsibly π
π¦ 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