arch/x86/include/asm/hw_irq.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/hw_irq.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/hw_irq.h- Extension
.h- Size
- 2985 bytes
- Lines
- 132
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- 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
asm/irq_vectors.hlinux/percpu.hlinux/profile.hlinux/smp.hlinux/atomic.hasm/irq.hasm/sections.h
Detected Declarations
struct irq_datastruct pci_devstruct msi_descstruct ioapic_alloc_infostruct uv_alloc_infostruct irq_alloc_infostruct irq_cfgenum irq_alloc_typefunction vector_schedule_cleanupfunction lock_vector_lock
Annotated Snippet
struct ioapic_alloc_info {
int pin;
int node;
u32 is_level : 1;
u32 active_low : 1;
u32 valid : 1;
};
struct uv_alloc_info {
int limit;
int blade;
unsigned long offset;
char *name;
};
/**
* irq_alloc_info - X86 specific interrupt allocation info
* @type: X86 specific allocation type
* @flags: Flags for allocation tweaks
* @devid: Device ID for allocations
* @hwirq: Associated hw interrupt number in the domain
* @mask: CPU mask for vector allocation
* @desc: Pointer to msi descriptor
* @data: Allocation specific data
*
* @ioapic: IOAPIC specific allocation data
* @uv: UV specific allocation data
*/
struct irq_alloc_info {
enum irq_alloc_type type;
u32 flags;
u32 devid;
irq_hw_number_t hwirq;
const struct cpumask *mask;
struct msi_desc *desc;
void *data;
union {
struct ioapic_alloc_info ioapic;
struct uv_alloc_info uv;
};
};
struct irq_cfg {
unsigned int dest_apicid;
unsigned int vector;
};
extern struct irq_cfg *irq_cfg(unsigned int irq);
extern struct irq_cfg *irqd_cfg(struct irq_data *irq_data);
#ifdef CONFIG_SMP
extern void vector_schedule_cleanup(struct irq_cfg *);
extern void irq_complete_move(struct irq_cfg *cfg);
#else
static inline void vector_schedule_cleanup(struct irq_cfg *c) { }
static inline void irq_complete_move(struct irq_cfg *c) { }
#endif
extern void apic_ack_edge(struct irq_data *data);
#endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */
#ifdef CONFIG_X86_LOCAL_APIC
extern void lock_vector_lock(void);
extern void unlock_vector_lock(void);
#else
static inline void lock_vector_lock(void) {}
static inline void unlock_vector_lock(void) {}
#endif
extern void elcr_set_level_irq(unsigned int irq);
extern char irq_entries_start[];
#ifdef CONFIG_TRACING
#define trace_irq_entries_start irq_entries_start
#endif
extern char spurious_entries_start[];
#define VECTOR_UNUSED NULL
#define VECTOR_SHUTDOWN ((void *)-1L)
#define VECTOR_RETRIGGERED ((void *)-2L)
typedef struct irq_desc* vector_irq_t[NR_VECTORS];
DECLARE_PER_CPU(vector_irq_t, vector_irq);
#endif /* !__ASSEMBLER__ */
#endif /* _ASM_X86_HW_IRQ_H */
Annotation
- Immediate include surface: `asm/irq_vectors.h`, `linux/percpu.h`, `linux/profile.h`, `linux/smp.h`, `linux/atomic.h`, `asm/irq.h`, `asm/sections.h`.
- Detected declarations: `struct irq_data`, `struct pci_dev`, `struct msi_desc`, `struct ioapic_alloc_info`, `struct uv_alloc_info`, `struct irq_alloc_info`, `struct irq_cfg`, `enum irq_alloc_type`, `function vector_schedule_cleanup`, `function lock_vector_lock`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.