cpqhp_find_slot(9)
β¨ cpqhp_find_slot(9) β¨
okay so this is a page from the Kernel API Manual, and honestly? it's a little baby page and it's iconic for it π like, three sections, zero fluff, all business β we love a minimal queen.
π NAME π
cpqhp_find_slot β literally just: find the struct slot of a given device ππ
like that's the whole job. you hand it a device, it hands you the slot. no cap.
π¦ SYNOPSIS π¦
struct slot * cpqhp_find_slot (struct controller *ctrl , u8 device );
it's giving "short function signature, big responsibilities" π note the return type bestie β it's a struct slot *, so you're getting a pointer back, not a whole struct copy. periodt.
πΈ ARGUMENTS πΈ
ctrlβ scan lots of this controller ποΈ like, this is the controller you're gonna rummage through. it's the search zone.deviceβ the device id to find π au8, so keep it smol and keep it valid. this is the thing we're hunting for.
that's it. two args. she's low maintenance π«Ά
ngl there are no options, no env vars, no exit statuses, no signals on this one β the whole page is just this. sometimes simplicity is the moment β¨
π SEE ALSO π
bestie, this is the part where the friend group shows up π all of these live in the kernel file ./drivers/pci/hotplug/cpqphp_ctrl.c and honestly it's a whole crew:
sort_by_size(9)sort_by_max_size(9)do_pre_bridge_resource_split(9)do_bridge_resource_split(9)get_io_resource(9)get_max_resource(9)get_resource(9)cpqhp_resource_sort_and_combine(9)cpqhp_slot_create(9)slot_remove(9)bridge_slot_remove(9)cpqhp_slot_find(9)set_controller_speed(9)board_replaced(9)board_added(9)remove_board(9)cpqhp_pushbutton_thread(9)switch_leds(9)cpqhp_hardware_test(9)configure_new_device(9)configure_new_function(9)
iykyk π₯ that's the entire PCI hotplug extended universe right there.
okay bye bestie, go find your slot π
this little page lives under ./drivers/pci/hotplug and it was dated October 2026 β so yeah, fresh off the presses, timestamped and slaying ππ«
π¦ 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