include/linux/interrupt.h
Source file repositories/reference/linux-study-clean/include/linux/interrupt.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/interrupt.h- Extension
.h- Size
- 27921 bytes
- Lines
- 883
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/bitops.hlinux/cleanup.hlinux/irqreturn.hlinux/irqnr.hlinux/hardirq.hlinux/irqflags.hlinux/hrtimer.hlinux/kref.hlinux/cpumask_types.hlinux/workqueue.hlinux/jump_label.hlinux/atomic.hasm/ptrace.hasm/irq.hasm/sections.h
Detected Declarations
struct irqactionstruct devicestruct irq_affinity_notifystruct irq_affinitystruct irq_affinity_descstruct softirq_actionstruct tasklet_structstruct seq_fileenum irqchip_irq_statefunction request_threaded_irqfunction request_percpu_irqfunction devm_request_irqfunction irq_update_affinity_hintfunction irq_set_affinity_and_hintfunction irq_set_affinity_hintfunction irq_set_affinityfunction irq_force_affinityfunction irq_can_set_affinityfunction irq_select_affinityfunction irq_update_affinity_hintfunction irq_set_affinity_and_hintfunction irq_set_affinity_hintfunction irq_update_affinity_descfunction irq_set_affinity_notifierfunction irq_create_affinity_masksfunction irq_calc_affinity_vectorsfunction disable_irq_nosync_lockdepfunction disable_irq_nosync_lockdep_irqsavefunction enable_irq_lockdepfunction enable_irq_lockdep_irqrestorefunction enable_irq_wakefunction disable_irq_wakefunction do_softirq_post_smp_call_flushfunction local_timers_pending_force_thfunction raise_timer_softirqfunction local_timers_pendingfunction tasklet_trylockfunction tasklet_trylockfunction tasklet_unlockfunction tasklet_schedulefunction tasklet_hi_schedulefunction tasklet_disable_nosyncfunction tasklet_disable_in_atomicfunction tasklet_disablefunction tasklet_enablefunction probe_irq_onfunction probe_irq_offfunction probe_irq_mask
Annotated Snippet
struct irqaction {
irq_handler_t handler;
union {
void *dev_id;
void __percpu *percpu_dev_id;
};
const struct cpumask *affinity;
struct irqaction *next;
irq_handler_t thread_fn;
struct task_struct *thread;
struct irqaction *secondary;
unsigned int irq;
unsigned int flags;
unsigned long thread_flags;
unsigned long thread_mask;
const char *name;
struct proc_dir_entry *dir;
} ____cacheline_internodealigned_in_smp;
extern irqreturn_t no_action(int cpl, void *dev_id);
/*
* If a (PCI) device interrupt is not connected we set dev->irq to
* IRQ_NOTCONNECTED. This causes request_irq() to fail with -ENOTCONN, so we
* can distinguish that case from other error returns.
*
* 0x80000000 is guaranteed to be outside the available range of interrupts
* and easy to distinguish from other possible incorrect values.
*/
#define IRQ_NOTCONNECTED (1U << 31)
extern int __must_check
request_threaded_irq(unsigned int irq, irq_handler_t handler,
irq_handler_t thread_fn,
unsigned long flags, const char *name, void *dev);
/**
* request_irq - Add a handler for an interrupt line
* @irq: The interrupt line to allocate
* @handler: Function to be called when the IRQ occurs.
* Primary handler for threaded interrupts
* If NULL, the default primary handler is installed
* @flags: Handling flags
* @name: Name of the device generating this interrupt
* @dev: A cookie passed to the handler function
*
* This call allocates an interrupt and establishes a handler; see
* the documentation for request_threaded_irq() for details.
*/
static inline int __must_check
request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags,
const char *name, void *dev)
{
return request_threaded_irq(irq, handler, NULL, flags | IRQF_COND_ONESHOT, name, dev);
}
extern int __must_check
request_any_context_irq(unsigned int irq, irq_handler_t handler,
unsigned long flags, const char *name, void *dev_id);
extern int __must_check
request_percpu_irq_affinity(unsigned int irq, irq_handler_t handler, const char *devname,
const cpumask_t *affinity, void __percpu *percpu_dev_id);
extern int __must_check
request_nmi(unsigned int irq, irq_handler_t handler, unsigned long flags,
const char *name, void *dev);
static inline int __must_check
request_percpu_irq(unsigned int irq, irq_handler_t handler,
const char *devname, void __percpu *percpu_dev_id)
{
return request_percpu_irq_affinity(irq, handler, devname,
NULL, percpu_dev_id);
}
extern int __must_check
request_percpu_nmi(unsigned int irq, irq_handler_t handler, const char *name,
const struct cpumask *affinity, void __percpu *dev_id);
extern const void *free_irq(unsigned int, void *);
extern void free_percpu_irq(unsigned int, void __percpu *);
extern const void *free_nmi(unsigned int irq, void *dev_id);
extern void free_percpu_nmi(unsigned int irq, void __percpu *percpu_dev_id);
struct device;
extern int __must_check
devm_request_threaded_irq(struct device *dev, unsigned int irq,
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/bitops.h`, `linux/cleanup.h`, `linux/irqreturn.h`, `linux/irqnr.h`, `linux/hardirq.h`, `linux/irqflags.h`, `linux/hrtimer.h`.
- Detected declarations: `struct irqaction`, `struct device`, `struct irq_affinity_notify`, `struct irq_affinity`, `struct irq_affinity_desc`, `struct softirq_action`, `struct tasklet_struct`, `struct seq_file`, `enum irqchip_irq_state`, `function request_threaded_irq`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.