STRUCT IRQ_DESC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct irq_desc(9) β€” interrupt descriptor πŸ’–

okay so this is the Kernel API Manual page for struct irq_desc, aka the interrupt descriptor. It’s giving core-kernel main character energy, and we’re gonna walk the whole struct without skipping a single field, no cap ✨

🌸 NAME 🌸

struct irq_desc β€” interrupt descriptor

✨ SYNOPSIS ✨

       struct irq_desc {
           struct irq_common_data  irq_common_data;
           struct irq_data         irq_data;
           struct irqstat __percpu *kstat_irqs;
           irq_flow_handler_t handle_irq;
           struct irqaction        *action;
           unsigned int            status_use_accessors;
           unsigned int            core_internal_state__do_not_mess_with_it;
           unsigned int            depth;
           unsigned int            wake_depth;
           unsigned long           tot_count;
           unsigned long           last_unhandled;
           unsigned int            irq_count;
           unsigned int            irqs_unhandled;
           atomic_t threads_handled;
           int threads_handled_last;
           raw_spinlock_t lock;
           struct cpumask          *percpu_enabled;
         #ifdef CONFIG_SMP;
           struct irq_redirect     redirect;
           const struct cpumask    *affinity_hint;
           struct irq_affinity_notify *affinity_notify;
         #ifdef CONFIG_GENERIC_PENDING_IRQ;
           cpumask_var_t pending_mask;
         #endif;
         #endif;
           unsigned long           threads_oneshot;
           atomic_t threads_active;
           wait_queue_head_t wait_for_threads;
         #ifdef CONFIG_PM_SLEEP;
           unsigned int            nr_actions;
           unsigned int            no_suspend_depth;
           unsigned int            cond_suspend_depth;
           unsigned int            force_resume_depth;
         #endif;
         #ifdef CONFIG_PROC_FS;
           struct proc_dir_entry   *dir;
         #endif;
         #ifdef CONFIG_GENERIC_IRQ_DEBUGFS;
           struct dentry           *debugfs_file;
           const char              *dev_name;
         #endif;
           rcuref_t refcnt;
         #ifdef CONFIG_SPARSE_IRQ;
           struct rcu_head         rcu;
           struct kobject          kobj;
         #endif;
           struct mutex            request_mutex;
           int parent_irq;
           struct module           *owner;
           const char              *name;
         #ifdef CONFIG_HARDIRQS_SW_RESEND;
           struct hlist_node       resend_node;
         #endif;
        };

πŸŽ€ Members πŸŽ€

okay bestie, here’s the member-by-member vibe check. every field is here, every description is here, and yes we’re keeping the lore intact πŸ’…

  • irq_common_data β€” per irq and chip data passed down to chip functions.
  • kstat_irqs β€” irq stats per cpu.
  • handle_irq β€” the highlevel irq-events handler.
  • action β€” the irq action chain.
  • status_use_accessors β€” status information.
  • core_internal_state__do_not_mess_with_it β€” core internal status information. and yes the field name literally says do not mess with it β€” respect the boundary 🚫.
  • depth β€” disable-depth</> for nested irq_disable calls.
  • wake_depth β€” enable depth</> for multiple irq_set_irq_wake callers.
  • tot_count β€” stats field for non-percpu irqs.
  • last_unhandled β€” aging timer for unhandled count.
  • irq_count β€” stats field to detect stalled irqs.
  • irqs_unhandled β€” stats field for spurious unhandled interrupts.
  • threads_handled β€” stats field for deferred spurious detection of threaded handlers.
  • threads_handled_last β€” comparator field for deferred spurious detection of threaded handlers.
  • lock β€” locking for SMP.
  • redirect β€” facility for redirecting interrupts via irq_work.
  • affinity_hint β€” hint to user space for preferred irq affinity.
  • affinity_notify β€” context for notification of affinity changes.
  • pending_mask β€” pending rebalanced interrupts.
  • threads_oneshot β€” bitfield to handle shared oneshot threads.
  • threads_active β€” number of irqaction threads currently running.
  • wait_for_threads β€” wait queue for sync_irq to wait for threaded handlers.
  • nr_actions β€” number of installed actions on this descriptor.
  • no_suspend_depth β€” number of irqactions on a irq descriptor with IRQF_NO_SUSPEND set.
  • force_resume_depth β€” number of irqactions on a irq descriptor with IRQF_FORCE_RESUME set.
  • dir β€” the /proc/irq/ procfs entry.
  • debugfs_file β€” dentry for the debugfs file.
  • refcnt β€” reference count mainly for /proc/interrupts.
  • rcu β€” rcu head for delayed free.
  • kobj β€” kobject used to represent this struct in sysfs.
  • request_mutex β€” mutex to protect request/free before locking desc->lock.
  • name β€” flow handler name for /proc/interrupts output.

🌈 SEE ALSO 🌈

Kernel file ./include/linux/irqdesc.h β€” plus struct irqstat(9), struct irq_redirect(9), irq_set_handler_locked(9), and irq_set_chip_handler_name_locked(9) 🫢


that’s the whole page, bestie πŸ’… β€” source path ./include/linux, dated October 2026, and it’s the struct irq_desc(9) entry in the Kernel API Manual. go forth and interrupt responsibly βœ¨πŸ‘‘

πŸ“¦ where this page comes from