__devm_irq_alloc_descs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __devm_irq_alloc_descs β€” like, the managed-device irq descriptor allocator, bestie πŸ’–

okay so real talk: this is the Kernel API Manual entry for __devm_irq_alloc_descs(9), and it's the function that goes "hey, I'mma grab you a whole range of irq descriptors, and I'mma do it in a devres-managed way so it cleans itself up later." main character energy honestly πŸ‘‘


✨ NAME ✨

__devm_irq_alloc_descs β€” allocate and initialize a range of irq descriptors for a managed device 🫢

Like yes it allocates, and yes it initializes, it's doing both, it's multitasking, we love a multihyphenate.


🌸 SYNOPSIS 🌸

int __devm_irq_alloc_descs (struct device *dev , int irq , unsigned int
from , unsigned int cnt , int node , struct module *owner , const struct
irq_affinity_desc *affinity );

Seven arguments. Seven. Count 'em. She's thorough and we respect that πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you're allocating these descriptors for. Your fave. The whole reason this is "devm" and not just a random bare alloc 😌
  • irq β€” if irq >= 0, you're allocating for a specific irq number. Like requesting a particular seat at the table, periodt.
  • from β€” where to start the search from, irq-number-wise. The starting line. The launchpad πŸš€
  • cnt β€” how many consecutive irqs you want. Consecutive!! As in next-to-each-other!! A lil squad of irqs 🌈
  • node β€” your preferred node for the irq descriptor to be allocated on. Location, location, location πŸ¦‹
  • owner β€” the owning module. Can be NULL btw, it's chill like that, no pressure.
  • affinity β€” optional pointer to an irq_affinity_desc array of size cnt that hints where the irq descriptors should be allocated and which default affinities to use. A hint, bestie β€” an advisory lil suggestion πŸ’œ

πŸ”₯ DESCRIPTION πŸ”₯

Returns the first irq number, or an error code.

That's it. That's the whole description. Short king behavior, honestly, but it said what it said β€” you get the first irq number back, or you get an error code, and there is no in-between 🌸


πŸ’€ NOTE πŸ’€

Use the provided wrappers (devm_irq_alloc_desc*) for simplicity.

fr fr, this is the low-level one β€” the devm_irq_alloc_desc* wrappers exist so you don't have to sit here passing seven arguments like a Victorian orphan. Save yourself πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./kernel/irq/devres.c β€” go read it, it's giving source of truth ⭐

A whole friend group of devm irq functions, and they all ate πŸ’…βœ¨


okay that's the page!! it lives in ./kernel/irq, it's dated October 2026, and yeah the page title is still __devm_irq_alloc_descs(9) because she's iconic and doesn't need a rebrand πŸŽ€ πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from