STRUCT IRQ_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct irq_data(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– this one is about struct irq_data, which is literally the per irq chip data that gets passed down to chip functions. yes. that's the whole vibe. it's giving "little backpack of interrupt facts that every chip function gets handed" πŸŽ’βœ¨


πŸ¦‹ NAME πŸ¦‹

struct irq_data β€” per irq chip data passed down to chip functions πŸ’…


🌸 SYNOPSIS 🌸

like, here's the whole thing, character for character, no cap:

struct irq_data {
    u32 mask;
    unsigned int            irq;
    irq_hw_number_t hwirq;
    struct irq_common_data  *common;
    struct irq_chip         *chip;
    struct irq_domain       *domain;
  #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY;
    struct irq_data         *parent_data;
  #endif;
    void *chip_data;
 };

note the #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY; bit, okay? parent_data only shows up when that config is on. the semicolons in there are just how it's written, don't come for me πŸ™ˆ


πŸŽ€ Members πŸŽ€

so we're gonna go through every single one, because every single one matters:

  • mask β€” precomputed bitmask for accessing the chip registers. it's already crunched for you, bestie, no math needed at runtime πŸ”₯
  • irq β€” the interrupt number. yes, that one 🫢
  • hwirq β€” hardware interrupt number, local to the interrupt domain. so it's the hardware's own little name for it, not the linux one πŸ‘‘
  • common β€” point to data shared by all irqchips πŸ’œ
  • chip β€” low level interrupt hardware access. this is where the actual chip methods live, the gritty stuff ⭐
  • domain β€” Interrupt translation domain; responsible for mapping between hwirq number and linux irq number. so basically it's the translator between hardware-speak and linux-speak, a whole bilingual icon 🌈
  • parent_data β€” pointer to parent struct irq_data to support hierarchy irq_domain. it's the nepo baby field, it literally points at its parent πŸ’€ (and remember, it's inside that CONFIG_IRQ_DOMAIN_HIERARCHY #ifdef)
  • chip_data β€” platform-specific per-chip private data for the chip methods, to allow shared chip implementations. iykyk πŸ“

πŸ’« SEE ALSO πŸ’«

go read these next, bestie, they're all in the kernel file ./include/linux/irq.h:

  • struct irq_common_data(9)
  • struct irq_chip(9)
  • struct irq_chip_regs(9)
  • struct irq_chip_type(9)
  • struct irq_chip_generic(9)
  • enum irq_gc_flags(9)
  • struct irq_domain_chip_generic_info(9)

ngl this page is short but every field is doing main character energy work. don't skip any of them, fr fr 😭

that's a wrap, love you, bye πŸ’œβœ¨ this page came to you from ./include/linux, dated October 2026, and it's filed under struct irq_data(9) if you ever need to find it again πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from