pci_hp_add(9)
β¨ pci_hp_add(9) β¨
okay so bestie, welcome to the pci_hp_add page from the Kernel API Manual gang β this is section 9, the kernel-dev one, iykyk π
πΈ NAME πΈ
pci_hp_add β literally the function that publishes a hotplug slot to user space π
π¦ SYNOPSIS π¦
int pci_hp_add (struct hotplug_slot *slot );
π ARGUMENTS π
slotβ a pointer to thestruct hotplug_slotyou wanna publish. that's it, that's the whole arg π«Ά
π DESCRIPTION π
so what this does: it makes a hotplug slot's sysfs interface available, and then it tells user space "hey, new slot just dropped β¨" by sending a uevent.
β οΈ real talk though β from this exact point on, the hotplug driver must be prepared to handle all struct hotplug_slot_ops callbacks. no cap. like, every single one. so don't call this until you're actually ready to slay π
Returns 0 on success, or a negative int on error π
π₯ SEE ALSO π₯
- Kernel file
./drivers/pci/hotplug/pci_hotplug_core.cβ go read it, it's giving main character energy π __pci_hp_register(9)__pci_hp_initialize(9)pci_hp_deregister(9)pci_hp_del(9)pci_hp_destroy(9)pci_hp_ignore_link_change(9)pci_hp_unignore_link_change(9)pci_hp_spurious_link_change(9)
and that's the whole page bestie, go forth and register your hotplug slots π
okay bye ily β this one's from ./drivers/pci/hotplug, dated October 2026, and it's pci_hp_add(9) signing off πππ
π¦ 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