pci_irq_vector(9)
π pci_irq_vector β like, the Kernel API Manual page, bestie
Ok so welcome to pci_irq_vector(9), a tiny little function page that's honestly kind of iconic once you get what it does π
πΈ NAME
pci_irq_vector β bestie, it gets you the Linux IRQ number of a device interrupt vector. That's it. That's the whole vibe β¨
π SYNOPSIS
int pci_irq_vector (struct pci_dev *dev , unsigned int nr );
π ARGUMENTS
devβ the PCI device we're operating on. The main character of this call, fr fr π«Άnrβ the device-relative interrupt vector index, and it's 0-based (so like, zero is the first one, we don't do that 1-indexed nonsense here). Heads up though: this little number has different meanings depending on which interrupt mode you're in π which is exactly what the next section is about:
β¨ DESCRIPTION
So <italic>nr</italic> lowkey means different things per mode, and here's the whole rundown:
- MSI-X β it's the index in the MSI-X vector table π
- MSI β it's the index of the enabled MSI vectors β
- INTx β it must be
0. No notes, no wiggle room, it's just gotta be zero π
π₯ RETURN
You get the Linux IRQ number back, or -EINVAL if nr is out of range π That's the whole deal.
π¦ SEE ALSO
Kernel file ./drivers/pci/msi/api.c, plus the whole friend group:
pci_enable_msi(9), pci_disable_msi(9), pci_msix_vec_count(9), pci_enable_msix_range(9), pci_msix_can_alloc_dyn(9), pci_msix_alloc_irq_at(9), pci_msix_free_irq(9), pci_disable_msix(9), pci_alloc_irq_vectors(9), pci_alloc_irq_vectors_affinity(9), pci_irq_get_affinity(9), pci_free_irq_vectors(9), pci_restore_msi_state(9), pci_msi_enabled(9)
Bye bestie!! π§ This page lives in ./drivers/pci/msi , it's dated October 2026, and it's brought to you by the Kernel API Manual π slay πβ¨
π¦ 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