pci_swizzle_interrupt_pin(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pci_swizzle_interrupt_pin β€” from the Kernel API Manual, bestie ✨

Okay so picture this: it's pci_swizzle_interrupt_pin(9), it lives in the Kernel API Manual, and it's here to do exactly one iconic little thing β€” swizzle INTx for a device behind a bridge. That's the whole vibe. Let's get into it 🫢


✨ SYNOPSIS ✨

u8 pci_swizzle_interrupt_pin (const struct pci_dev *dev , u8 pin );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the PCI device, fr. This is your main character here πŸ’–
  • pin β€” the INTx pin, and the mapping is not mysterious, bestie, it's literally this: 1=INTA, 2=INTB, 3=INTC, 4=INTD. Memorize it, it's giving flashcards 🌸

πŸ”₯ DESCRIPTION πŸ”₯

So what does it actually do? It performs INTx swizzling for a device that's sitting behind one level of bridge. One. Level. Don't get cute with it πŸ’…

And this isn't just a fun idea someone had β€” it's required by section 9.1 of the PCI-to-PCI bridge specification for devices behind bridges on add-in cards. So yeah, spec-mandated behavior, no cap πŸ‘‘

Now here's the little plot twist: for devices with ARI enabled, the slot number is always 0. That's per the Implementation Note in section 2.2.8.1 of the PCI Express Base Specification, Revision 2.1. Write that down πŸ“

Lowkey the whole function is just "fix the pin number so the interrupt actually lands where it should." Small function, big slay ✨

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/pci/irq.c, and also these besties:


And that's the page, gorgeous 🌈 β€” brought to you from the ./drivers/pci directory, dated October 2026, under the header pci_swizzle_interrupt_pin(9) in the Kernel API Manual. Go swizzle responsibly, mwah πŸ’œπŸ§š

πŸ“¦ where this page comes from