irq_create_direct_mapping(9)
π irq_create_direct_mapping(9) β like, the kernel API manual, bestie β¨
okay so real talk, this is a page from the Kernel API Manual and it's about irq_create_direct_mapping β literally the glow-up your irq controller gets when it wants to be the main character of interrupt numbering π stay with me, it's actually so good.
β¨ NAME β¨
irq_create_direct_mapping β allocate an irq for direct mapping π¦
πΈ SYNOPSIS πΈ
unsigned int irq_create_direct_mapping (struct irq_domain *domain );
like yes, it returns an unsigned int, and yes, it takes exactly one thing. slay. π
π«Ά ARGUMENTS π«Ά
domainβ the domain you're allocating the irq for, orNULLfor the default domain. that's it. that's the whole parameter list. iconic honestly.
π DESCRIPTION π
so this routine exists for irq controllers that can, like, choose the hardware interrupt numbers they generate β they're picky in a cute way, they get a say π and in that situation, the simplest vibe is to just use the linux irq as the hardware interrupt number. one number, doing double duty, no cap.
it still uses the linear or radix tree to store the mapping, so nothing's being skipped or skipped-ish β the bookkeeping is still there, bestie. but the irq controller can optimize the revmap path by using the hwirq directly π₯ like it gets a shortcut because it already knows where it's going. main character energy fr fr.
π SEE ALSO π
the whole group chat, in one long read-receipt π and also the kernel file ./kernel/irq/irqdomain.c:
__irq_domain_alloc_fwnode(9)irq_domain_free_fwnode(9)irq_domain_instantiate(9)irq_domain_remove(9)irq_domain_create_simple(9)irq_find_matching_fwspec(9)irq_set_default_domain(9)irq_get_default_domain(9)irq_create_mapping_affinity(9)irq_dispose_mapping(9)__irq_resolve_mapping(9)irq_domain_xlate_onecell(9)irq_domain_xlate_twocell(9)irq_domain_xlate_twothreecell(9)irq_domain_xlate_onetwocell(9)irq_domain_translate_onecell(9)irq_domain_translate_twocell(9)irq_domain_translate_twothreecell(9)irq_domain_reset_irq_data(9)irq_domain_disconnect_hierarchy(9)irq_domain_get_irq_data(9)irq_domain_set_hwirq_and_chip(9)irq_domain_set_info(9)irq_domain_free_irqs_common(9)irq_domain_free_irqs_top(9)__irq_domain_alloc_irqs(9)irq_domain_push_irq(9)irq_domain_pop_irq(9)irq_domain_free_irqs(9)irq_domain_alloc_irqs_parent(9)irq_domain_free_irqs_parent(9)irq_domain_activate_irq(9)irq_domain_deactivate_irq(9)
likeβ¦ go off, that's the entire extended family π§
ngl this page lives under./kernel/irq, dated October 2026, and it's theirq_create_direct_mapping(9)page β so if you ever forget where you found it, that's the receipt π
and that's the whole thing, bestie β ily, go allocate something πβ
π¦ 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