of_irq_parse_pci(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_irq_parse_pci(9) πŸ’…

okay so bestie, welcome to the of_irq_parse_pci(9) page β€” straight out of the Kernel API Manual, and honestly? it's giving "tiny function, big job." let's get into it 🫢


✨ NAME ✨

of_irq_parse_pci β€” resolve the interrupt for a PCI device πŸŽ€

like, you've got a PCI device and you need to know what its interrupt is. that's the whole vibe. that's the assignment. periodt.


🌸 SYNOPSIS 🌸

int of_irq_parse_pci (const struct pci_dev *pdev , struct
of_phandle_args *out_irq );

so she takes two things and hands you back an int, no cap. πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pdev β€” the device whose interrupt is to be resolved. yes literally that one. the device in question. her interrupt is the mystery we're solving πŸ”
  • out_irq β€” a struct of_phandle_args that this function fills for you. it's the lil container where the answer lives after she's done. think of it as the group chat where the tea finally gets spilled πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the lore. this function resolves the PCI interrupt for a given PCI device. that's her whole personality.

and the way she does it is honestly so main character energy, because it depends on what she finds:

  • if a device node exists for a given pci_dev, she just uses normal OF tree walking. clean. straightforward. she knows where she's going. ✨
  • if not? bestie, she does not panic. she implements standard swizzling and walks up the PCI tree until a device node is found β€” and at that point she finishes resolving using the OF tree walking. like, she climbs the tree until she finds home and then she slays the rest of the way πŸ§šπŸ’…

no cap, that's the entire algorithm. swizzle, climb, then OF-walk to the finish line. iconic behavior fr fr πŸ‘‘


🌈 SEE ALSO 🌈

the kernel file for this one lives at ./drivers/pci/of.c β€” go say hi to the neighbors, they're all in the same friend group 🫢

like a whole little friend group of of_pci_* functions. iykyk πŸ’œ


and that's the whole page, bestie!! 🌟 this one came from the ./drivers/pci source, October 2026 era, and she's filed under of_irq_parse_pci(9) in the Kernel API Manual πŸŽ€βœ¨ go resolve some interrupts, ily, bye!! πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from