STRUCT IRQ_DOMAIN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 global irq_domain list. she's on the list, she belongs there 🫢
  • name β€” the name of the interrupt domain. every queen needs a name ✨
  • ops β€” pointer to the irq_domain methods. this is where all her tricks live πŸ’…
  • host_data β€” a private data pointer, strictly for the owner's use. the irq_domain core code literally does not touch it, hands off, not her business πŸ™ˆ
  • flags β€” the per-irq_domain flags 🚩
  • 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 the irq_domain. and it's pretty easy to swap it out for the of_node via the irq_domain_get_of_node accessor β€” cute little shortcut πŸŽ€
  • bus_token β€” here's the tea: a fwnode's device_node might get used for several irq domains. BUT when it's paired up with bus_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 as pm_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 parent irq_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 table revmap πŸ“
  • revmap_tree β€” the radix map tree for hwirqs that don't fit in the linear map. overflow girlies stand up 🌸
  • revmap β€” linear table of irq_data pointers. 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:


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