pci_acpi_set..._lookup_hook(9)
π pci_acpi_set..._lookup_hook(9) β like, the kernel API manual bestie π
okay so this is a page from the Kernel API Manual and the star of the show is literally pci_acpi_set..._lookup_hook(9). yes the title is abbreviated with dots, no we're not gonna fight about it, that's just how the man page header vibes β¨
πΈ NAME πΈ
pci_acpi_set_companion_lookup_hook β set that ACPI companion lookup callback, bestie π
β¨ SYNOPSIS β¨
int pci_acpi_set_companion_lookup_hook (struct acpi_device
*(*func)(struct pci_dev *) );
like yes it's a function pointer returning a struct acpi_device * and taking a struct pci_dev *, and yes it returns an int. we love a signature that eats π
π¦ ARGUMENTS π¦
funcβ your ACPI companion lookup callback pointer, orNULLif that's the mood π«Ά (NULLis allowed, no cap)
π DESCRIPTION π
okay so what this does is set a special ACPI companion lookup callback for PCI devices whose companion objects in the ACPI namespace have _ADR with non-standard bus-device-function encodings. like, the normal encoding wasn't serving, so this hook is the moment β¨ iykyk
it returns 0 on success or a negative error code on failure β and on failure, bestie, no changes are made. literally nothing happens. the vibe check failed, we move on π
also super important: the caller is responsible for the appropriate ordering of the invocations of this function with respect to the enumeration of the PCI devices needing the callback installed by it. like the ordering is not the function's problem, it's yours. main character responsibility energy π
π SEE ALSO π
kernel file ./drivers/pci/pci-acpi.c β go read it, it's giving source code realness π
and the whole friend group:
pciehp_is_native(9)shpchp_is_native(9)pci_acpi_wake_bus(9)pci_acpi_wake_dev(9)pci_acpi_add_root_pm_notifier(9)pci_acpi_add_pm_notifier(9)pci_dev_acpi_reset(9)pci_acpi_clear_companion_lookup_hook(9)pci_acpi_optimize_delay(9)pci_msi_register_fwnode_provider(9)pci_host_bridge_acpi_msi_domain(9)
look at that list. iconic. no notes π
aaaand that's the page, bestie π it lives in ./drivers/pci, it's dated October 2026, and it answers to the name pci_acpi_set..._lookup_hook(9). slay, go forth and hook those lookups π
β¨
π¦ 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