include/linux/irqdomain.h
Source file repositories/reference/linux-study-clean/include/linux/irqdomain.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/irqdomain.h- Extension
.h- Size
- 26406 bytes
- Lines
- 783
- 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.
- 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/types.hlinux/irqdomain_defs.hlinux/irqhandler.hlinux/of.hlinux/mutex.hlinux/radix-tree.h
Detected Declarations
struct device_nodestruct fwnode_handlestruct irq_domainstruct irq_chipstruct irq_datastruct irq_descstruct cpumaskstruct seq_filestruct irq_affinity_descstruct msi_parent_opsstruct irq_fwspecstruct irq_fwspec_infostruct irq_domain_opsstruct irq_domain_chip_genericstruct irq_domainstruct irq_domain_chip_generic_infostruct irq_domain_infofunction irq_domain_set_pm_devicefunction is_fwnode_irqchipfunction irq_create_mappingfunction irq_find_mappingfunction __irq_domain_alloc_irqsfunction irq_domain_is_hierarchyfunction irq_domain_is_ipifunction irq_domain_is_ipi_per_cpufunction irq_domain_is_ipi_singlefunction irq_domain_is_msifunction irq_domain_is_msi_parentfunction irq_domain_is_msi_devicefunction irq_domain_is_msi_immutablefunction irq_domain_alloc_irqsfunction irq_domain_free_irqsfunction irq_domain_is_ipifunction irq_domain_is_ipi_per_cpufunction irq_domain_is_ipi_singlefunction irq_domain_is_msifunction irq_domain_is_msi_parentfunction irq_domain_is_msi_devicefunction irq_populate_fwspec_infofunction msi_device_domain_alloc_wiredfunction msi_device_domain_free_wiredfunction irq_dispose_mapping
Annotated Snippet
struct irq_fwspec {
struct fwnode_handle *fwnode;
int param_count;
u32 param[IRQ_DOMAIN_IRQ_SPEC_PARAMS];
};
/**
* struct irq_fwspec_info - firmware provided IRQ information structure
*
* @flags: Information validity flags
* @affinity: Affinity mask for this interrupt
*
* This structure reports firmware-specific information about an
* interrupt. The only significant information is the affinity of a
* per-CPU interrupt, but this is designed to be extended as required.
*/
struct irq_fwspec_info {
unsigned long flags;
const struct cpumask *affinity;
};
#define IRQ_FWSPEC_INFO_AFFINITY_VALID BIT(0)
/* Conversion function from of_phandle_args fields to fwspec */
void of_phandle_args_to_fwspec(struct device_node *np, const u32 *args,
unsigned int count, struct irq_fwspec *fwspec);
/**
* struct irq_domain_ops - Methods for irq_domain objects
* @match: Match an interrupt controller device node to a domain, returns
* 1 on a match
* @select: Match an interrupt controller fw specification. It is more generic
* than @match as it receives a complete struct irq_fwspec. Therefore,
* @select is preferred if provided. Returns 1 on a match.
* @map: Create or update a mapping between a virtual irq number and a hw
* irq number. This is called only once for a given mapping.
* @unmap: Dispose of such a mapping
* @xlate: Given a device tree node and interrupt specifier, decode
* the hardware irq number and linux irq type value.
* @alloc: Allocate @nr_irqs interrupts starting from @virq.
* @free: Free @nr_irqs interrupts starting from @virq.
* @activate: Activate one interrupt in HW (@irqd). If @reserve is set, only
* reserve the vector. If unset, assign the vector (called from
* request_irq()).
* @deactivate: Disarm one interrupt (@irqd).
* @translate: Given @fwspec, decode the hardware irq number (@out_hwirq) and
* linux irq type value (@out_type). This is a generalised @xlate
* (over struct irq_fwspec) and is preferred if provided.
* @get_fwspec_info:
* Given @fwspec, report additional firmware-provided information in
* @info. Optional.
* @debug_show: For domains to show specific data for an interrupt in debugfs.
*
* Functions below are provided by the driver and called whenever a new mapping
* is created or an old mapping is disposed. The driver can then proceed to
* whatever internal data structures management is required. It also needs
* to setup the irq_desc when returning from map().
*/
struct irq_domain_ops {
int (*match)(struct irq_domain *d, struct device_node *node,
enum irq_domain_bus_token bus_token);
int (*select)(struct irq_domain *d, struct irq_fwspec *fwspec,
enum irq_domain_bus_token bus_token);
int (*map)(struct irq_domain *d, unsigned int virq, irq_hw_number_t hw);
void (*unmap)(struct irq_domain *d, unsigned int virq);
int (*xlate)(struct irq_domain *d, struct device_node *node,
const u32 *intspec, unsigned int intsize,
unsigned long *out_hwirq, unsigned int *out_type);
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
/* extended V2 interfaces to support hierarchy irq_domains */
int (*alloc)(struct irq_domain *d, unsigned int virq,
unsigned int nr_irqs, void *arg);
void (*free)(struct irq_domain *d, unsigned int virq,
unsigned int nr_irqs);
int (*activate)(struct irq_domain *d, struct irq_data *irqd, bool reserve);
void (*deactivate)(struct irq_domain *d, struct irq_data *irq_data);
int (*translate)(struct irq_domain *d, struct irq_fwspec *fwspec,
unsigned long *out_hwirq, unsigned int *out_type);
int (*get_fwspec_info)(struct irq_fwspec *fwspec, struct irq_fwspec_info *info);
#endif
#ifdef CONFIG_GENERIC_IRQ_DEBUGFS
void (*debug_show)(struct seq_file *m, struct irq_domain *d,
struct irq_data *irqd, int ind);
#endif
};
extern const struct irq_domain_ops irq_generic_chip_ops;
struct irq_domain_chip_generic;
Annotation
- Immediate include surface: `linux/types.h`, `linux/irqdomain_defs.h`, `linux/irqhandler.h`, `linux/of.h`, `linux/mutex.h`, `linux/radix-tree.h`.
- Detected declarations: `struct device_node`, `struct fwnode_handle`, `struct irq_domain`, `struct irq_chip`, `struct irq_data`, `struct irq_desc`, `struct cpumask`, `struct seq_file`, `struct irq_affinity_desc`, `struct msi_parent_ops`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- 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.