STRUCT IRQ_DOMAIN(9)
πΈ struct irq_domain(9) β your fave kernel API manual, bestie πΈ
okay so this is literally the struct irq_domain page from the Kernel API Manual, and ngl it's a whole vibe β it's the Hardware interrupt number translation object, and yes she's the main character of interrupt land π
β¨ NAME β¨
struct irq_domain β the Hardware interrupt number translation object π
π¦ SYNOPSIS π¦
struct irq_domain {
struct list_head link;
const char *name;
const struct irq_domain_ops *ops;
void *host_data;
unsigned int flags;
unsigned int mapcount;
struct mutex mutex;
struct irq_domain *root;
struct fwnode_handle *fwnode;
enum irq_domain_bus_token bus_token;
struct irq_domain_chip_generic *gc;
struct device *dev;
struct device *pm_dev;
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY;
struct irq_domain *parent;
#endif;
#ifdef CONFIG_GENERIC_MSI_IRQ;
const struct msi_parent_ops *msi_parent_ops;
#endif;
void (*exit)(struct irq_domain *d);
irq_hw_number_t hwirq_max;
unsigned int revmap_size;
struct radix_tree_root revmap_tree;
struct irq_data *revmap[];
};
like, look at her. iconic. no notes π
π Members π
okay bestie, field-by-field, let's go:
linkβ this is the element sitting in the globalirq_domainlist. she's on the list, she belongs there π«Άnameβ the name of the interrupt domain. every queen needs a name β¨opsβ pointer to theirq_domainmethods. this is where all her tricks live πhost_dataβ a private data pointer, strictly for the owner's use. theirq_domaincore code literally does not touch it, hands off, not her business πflagsβ the per-irq_domainflags π©mapcountβ the number of mapped interrupts. she's counting, bestie π₯mutexβ the domain lock! lowkey important: hierarchical domains use the root domain's lock, not their own. iykyk πrootβ pointer to the root domain, or to the containing structure if it's non-hierarchical π³fwnodeβ pointer to the firmware node associated with theirq_domain. and it's pretty easy to swap it out for theof_nodevia theirq_domain_get_of_nodeaccessor β cute little shortcut πbus_tokenβ here's the tea: afwnode'sdevice_nodemight get used for several irq domains. BUT when it's paired up withbus_token, the pair has to be unique in a system. no duplicates allowed, periodt πgcβ pointer to a list of generic chips. there's a helper function for setting up one or more generic chips for interrupt controller drivers using the generic chip library, and that library uses this pointer. she's connected β¨devβ pointer to the device that instantiated the irqdomain. heads up: with per-device irq domains, this is not necessarily the same aspm_dev. they're different girls, don't conflate them π¦pm_devβ pointer to a device that can be utilized for power management purposes related to the irq domain. sleepy-time device π΄parentβ pointer to the parentirq_domain, there to support hierarchy irq_domains. it's giving family tree πmsi_parent_opsβ pointer to the MSI parent domain methods for per-device domain init πexitβ function called when the domain is destroyed. rip, she's gone πhwirq_maxβ the top limit for the HW irq number. this one matters, fr: it's especially there to avoid conflicts/failures with reserved HW irqs. and yes, it can be~0π₯revmap_sizeβ the size of the linear map tablerevmapπrevmap_treeβ the radix map tree for hwirqs that don't fit in the linear map. overflow girlies stand up πΈrevmapβ linear table ofirq_datapointers. simple, linear, slaying β
π Description π
Optional elements, bestie:
- Revmap data, used internally by the irq domain code:
(yes that's the whole description, she's a woman of few words and i respect it π)
π§ SEE ALSO π§
Kernel file ./include/linux/irqdomain.h plus all her friends:
struct irq_fwspec(9)struct irq_fwspec_info(9)struct irq_domain_ops(9)struct irq_domain_info(9)irq_domain_create_linear(9)irq_create_mapping(9)irq_resolve_mapping(9)irq_find_mapping(9)irq_domain_create_hierarchy(9)irq_domain_alloc_irqs(9)
okay that's the whole page, no skips, no cuts π«Ά and for the cute sign-off: this one lives over in ./include/linux, it's dated October 2026, and it's filed under struct irq_domain(9) β go off, interrupt queen πβ¨π
π¦ 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