x86: Rename eisa_set_level_irq to elcr_set_level_irq
[deliverable/linux.git] / arch / x86 / include / asm / hw_irq.h
CommitLineData
1965aae3
PA
1#ifndef _ASM_X86_HW_IRQ_H
2#define _ASM_X86_HW_IRQ_H
2e088436
TG
3
4/*
5 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
6 *
7 * moved some of the old arch/i386/kernel/irq.h to here. VY
8 *
9 * IRQ/IPI changes taken from work by Thomas Radke
10 * <tomsoft@informatik.tu-chemnitz.de>
11 *
12 * hacked by Andi Kleen for x86-64.
13 * unified by tglx
14 */
15
9b7dc567 16#include <asm/irq_vectors.h>
2e088436
TG
17
18#ifndef __ASSEMBLY__
19
20#include <linux/percpu.h>
21#include <linux/profile.h>
22#include <linux/smp.h>
23
60063497 24#include <linux/atomic.h>
2e088436
TG
25#include <asm/irq.h>
26#include <asm/sections.h>
27
2e088436 28/* Interrupt handlers registered during init_IRQ */
1d9090e2
AK
29extern asmlinkage void apic_timer_interrupt(void);
30extern asmlinkage void x86_platform_ipi(void);
31extern asmlinkage void kvm_posted_intr_ipi(void);
32extern asmlinkage void error_interrupt(void);
33extern asmlinkage void irq_work_interrupt(void);
34
35extern asmlinkage void spurious_interrupt(void);
36extern asmlinkage void thermal_interrupt(void);
37extern asmlinkage void reschedule_interrupt(void);
38
1d9090e2
AK
39extern asmlinkage void irq_move_cleanup_interrupt(void);
40extern asmlinkage void reboot_interrupt(void);
41extern asmlinkage void threshold_interrupt(void);
42
43extern asmlinkage void call_function_interrupt(void);
44extern asmlinkage void call_function_single_interrupt(void);
2e088436 45
cf910e83
SA
46#ifdef CONFIG_TRACING
47/* Interrupt handlers registered during init_IRQ */
48extern void trace_apic_timer_interrupt(void);
49extern void trace_x86_platform_ipi(void);
50extern void trace_error_interrupt(void);
51extern void trace_irq_work_interrupt(void);
52extern void trace_spurious_interrupt(void);
53extern void trace_thermal_interrupt(void);
54extern void trace_reschedule_interrupt(void);
55extern void trace_threshold_interrupt(void);
56extern void trace_call_function_interrupt(void);
57extern void trace_call_function_single_interrupt(void);
58#define trace_irq_move_cleanup_interrupt irq_move_cleanup_interrupt
59#define trace_reboot_interrupt reboot_interrupt
60#define trace_kvm_posted_intr_ipi kvm_posted_intr_ipi
61#endif /* CONFIG_TRACING */
62
26011eee 63#ifdef CONFIG_X86_LOCAL_APIC
74afab7a 64struct irq_data;
947045a2
JL
65struct pci_dev;
66struct msi_desc;
67
68enum irq_alloc_type {
69 X86_IRQ_ALLOC_TYPE_IOAPIC = 1,
70 X86_IRQ_ALLOC_TYPE_HPET,
71 X86_IRQ_ALLOC_TYPE_MSI,
72 X86_IRQ_ALLOC_TYPE_MSIX,
0921f1da 73 X86_IRQ_ALLOC_TYPE_DMAR,
43fe1abc 74 X86_IRQ_ALLOC_TYPE_UV,
947045a2 75};
b5dc8e6c
JL
76
77struct irq_alloc_info {
947045a2 78 enum irq_alloc_type type;
b5dc8e6c
JL
79 u32 flags;
80 const struct cpumask *mask; /* CPU mask for vector allocation */
947045a2
JL
81 union {
82 int unused;
83#ifdef CONFIG_HPET_TIMER
84 struct {
85 int hpet_id;
86 int hpet_index;
87 void *hpet_data;
88 };
89#endif
90#ifdef CONFIG_PCI_MSI
91 struct {
92 struct pci_dev *msi_dev;
93 irq_hw_number_t msi_hwirq;
94 };
95#endif
96#ifdef CONFIG_X86_IO_APIC
97 struct {
98 int ioapic_id;
99 int ioapic_pin;
100 int ioapic_node;
101 u32 ioapic_trigger : 1;
102 u32 ioapic_polarity : 1;
103 u32 ioapic_valid : 1;
104 struct IO_APIC_route_entry *ioapic_entry;
105 };
0921f1da
JL
106#endif
107#ifdef CONFIG_DMAR_TABLE
108 struct {
109 int dmar_id;
110 void *dmar_data;
111 };
49e07d8f
JL
112#endif
113#ifdef CONFIG_HT_IRQ
114 struct {
115 int ht_pos;
116 int ht_idx;
117 struct pci_dev *ht_dev;
118 void *ht_update;
119 };
43fe1abc
JL
120#endif
121#ifdef CONFIG_X86_UV
122 struct {
123 int uv_limit;
124 int uv_blade;
125 unsigned long uv_offset;
126 char *uv_name;
127 };
947045a2
JL
128#endif
129 };
b5dc8e6c
JL
130};
131
9338ad6f 132struct irq_cfg {
5f0052f9 133 unsigned int dest_apicid;
9338ad6f 134 u8 vector;
9338ad6f
DS
135};
136
55a0e2b1
JL
137extern struct irq_cfg *irq_cfg(unsigned int irq);
138extern struct irq_cfg *irqd_cfg(struct irq_data *irq_data);
74afab7a
JL
139extern void lock_vector_lock(void);
140extern void unlock_vector_lock(void);
74afab7a 141extern void setup_vector_irq(int cpu);
e32c67e0 142#ifdef CONFIG_SMP
9338ad6f 143extern void send_cleanup_vector(struct irq_cfg *);
f0e5bf75 144extern void irq_complete_move(struct irq_cfg *cfg);
e32c67e0
JL
145#else
146static inline void send_cleanup_vector(struct irq_cfg *c) { }
f0e5bf75 147static inline void irq_complete_move(struct irq_cfg *c) { }
e32c67e0 148#endif
7ec13187 149
74afab7a 150extern void apic_ack_edge(struct irq_data *data);
74afab7a 151#else /* CONFIG_X86_LOCAL_APIC */
26011eee
JL
152static inline void lock_vector_lock(void) {}
153static inline void unlock_vector_lock(void) {}
74afab7a 154#endif /* CONFIG_X86_LOCAL_APIC */
26011eee 155
2e088436
TG
156/* Statistics */
157extern atomic_t irq_err_count;
158extern atomic_t irq_mis_count;
159
ea6cd250 160extern void elcr_set_level_irq(unsigned int irq);
1a331957 161
2b97df06 162/* SMP */
1d9090e2
AK
163extern __visible void smp_apic_timer_interrupt(struct pt_regs *);
164extern __visible void smp_spurious_interrupt(struct pt_regs *);
165extern __visible void smp_x86_platform_ipi(struct pt_regs *);
166extern __visible void smp_error_interrupt(struct pt_regs *);
2c1b284e
JSR
167#ifdef CONFIG_X86_IO_APIC
168extern asmlinkage void smp_irq_move_cleanup_interrupt(void);
169#endif
3e5095d1 170#ifdef CONFIG_SMP
1d9090e2
AK
171extern __visible void smp_reschedule_interrupt(struct pt_regs *);
172extern __visible void smp_call_function_interrupt(struct pt_regs *);
173extern __visible void smp_call_function_single_interrupt(struct pt_regs *);
e7f08dfd 174#endif
2b97df06 175
3304c9c3 176extern char irq_entries_start[];
25c74b10 177#ifdef CONFIG_TRACING
3304c9c3 178#define trace_irq_entries_start irq_entries_start
25c74b10 179#endif
497c9a19 180
79a51b25
PB
181#define VECTOR_UNDEFINED (-1)
182#define VECTOR_RETRIGGERED (-2)
9345005f 183
22dc12d1
TG
184typedef int vector_irq_t[NR_VECTORS];
185DECLARE_PER_CPU(vector_irq_t, vector_irq);
2e088436 186
22dc12d1
TG
187#endif /* !ASSEMBLY_ */
188
1965aae3 189#endif /* _ASM_X86_HW_IRQ_H */
This page took 0.345756 seconds and 5 git commands to generate.