__devm_irq_alloc_descs(9)
π __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β ifirq >= 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 beNULLbtw, it's chill like that, no pressure.affinityβ optional pointer to anirq_affinity_descarray of sizecntthat 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 β
devm_request_threaded_irq(9)devm_request_any_context_irq(9)devm_free_irq(9)devm_irq_alloc_generic_chip(9)devm_irq_setup_generic_chip(9)devm_irq_domain_instantiate(9)
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
- 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