diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-10-11 05:20:03 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-11 05:20:03 -0400 |
commit | 96a388de5dc53a8b234b3fd41f3ae2cedc9ffd42 (patch) | |
tree | d947a467aa2da3140279617bc4b9b101640d7bf4 /include/asm-x86/hw_irq_64.h | |
parent | 27bd0c955648646abf2a353a8371d28c37bcd982 (diff) |
i386/x86_64: move headers to include/asm-x86
Move the headers to include/asm-x86 and fixup the
header install make rules
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/hw_irq_64.h')
-rw-r--r-- | include/asm-x86/hw_irq_64.h | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/include/asm-x86/hw_irq_64.h b/include/asm-x86/hw_irq_64.h new file mode 100644 index 000000000000..09dfc18a6dd0 --- /dev/null +++ b/include/asm-x86/hw_irq_64.h | |||
@@ -0,0 +1,175 @@ | |||
1 | #ifndef _ASM_HW_IRQ_H | ||
2 | #define _ASM_HW_IRQ_H | ||
3 | |||
4 | /* | ||
5 | * linux/include/asm/hw_irq.h | ||
6 | * | ||
7 | * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar | ||
8 | * | ||
9 | * moved some of the old arch/i386/kernel/irq.h to here. VY | ||
10 | * | ||
11 | * IRQ/IPI changes taken from work by Thomas Radke | ||
12 | * <tomsoft@informatik.tu-chemnitz.de> | ||
13 | * | ||
14 | * hacked by Andi Kleen for x86-64. | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASSEMBLY__ | ||
18 | #include <asm/atomic.h> | ||
19 | #include <asm/irq.h> | ||
20 | #include <linux/profile.h> | ||
21 | #include <linux/smp.h> | ||
22 | #include <linux/percpu.h> | ||
23 | #endif | ||
24 | |||
25 | #define NMI_VECTOR 0x02 | ||
26 | /* | ||
27 | * IDT vectors usable for external interrupt sources start | ||
28 | * at 0x20: | ||
29 | */ | ||
30 | #define FIRST_EXTERNAL_VECTOR 0x20 | ||
31 | |||
32 | #define IA32_SYSCALL_VECTOR 0x80 | ||
33 | |||
34 | |||
35 | /* Reserve the lowest usable priority level 0x20 - 0x2f for triggering | ||
36 | * cleanup after irq migration. | ||
37 | */ | ||
38 | #define IRQ_MOVE_CLEANUP_VECTOR FIRST_EXTERNAL_VECTOR | ||
39 | |||
40 | /* | ||
41 | * Vectors 0x30-0x3f are used for ISA interrupts. | ||
42 | */ | ||
43 | #define IRQ0_VECTOR FIRST_EXTERNAL_VECTOR + 0x10 | ||
44 | #define IRQ1_VECTOR IRQ0_VECTOR + 1 | ||
45 | #define IRQ2_VECTOR IRQ0_VECTOR + 2 | ||
46 | #define IRQ3_VECTOR IRQ0_VECTOR + 3 | ||
47 | #define IRQ4_VECTOR IRQ0_VECTOR + 4 | ||
48 | #define IRQ5_VECTOR IRQ0_VECTOR + 5 | ||
49 | #define IRQ6_VECTOR IRQ0_VECTOR + 6 | ||
50 | #define IRQ7_VECTOR IRQ0_VECTOR + 7 | ||
51 | #define IRQ8_VECTOR IRQ0_VECTOR + 8 | ||
52 | #define IRQ9_VECTOR IRQ0_VECTOR + 9 | ||
53 | #define IRQ10_VECTOR IRQ0_VECTOR + 10 | ||
54 | #define IRQ11_VECTOR IRQ0_VECTOR + 11 | ||
55 | #define IRQ12_VECTOR IRQ0_VECTOR + 12 | ||
56 | #define IRQ13_VECTOR IRQ0_VECTOR + 13 | ||
57 | #define IRQ14_VECTOR IRQ0_VECTOR + 14 | ||
58 | #define IRQ15_VECTOR IRQ0_VECTOR + 15 | ||
59 | |||
60 | /* | ||
61 | * Special IRQ vectors used by the SMP architecture, 0xf0-0xff | ||
62 | * | ||
63 | * some of the following vectors are 'rare', they are merged | ||
64 | * into a single vector (CALL_FUNCTION_VECTOR) to save vector space. | ||
65 | * TLB, reschedule and local APIC vectors are performance-critical. | ||
66 | */ | ||
67 | #define SPURIOUS_APIC_VECTOR 0xff | ||
68 | #define ERROR_APIC_VECTOR 0xfe | ||
69 | #define RESCHEDULE_VECTOR 0xfd | ||
70 | #define CALL_FUNCTION_VECTOR 0xfc | ||
71 | /* fb free - please don't readd KDB here because it's useless | ||
72 | (hint - think what a NMI bit does to a vector) */ | ||
73 | #define THERMAL_APIC_VECTOR 0xfa | ||
74 | #define THRESHOLD_APIC_VECTOR 0xf9 | ||
75 | /* f8 free */ | ||
76 | #define INVALIDATE_TLB_VECTOR_END 0xf7 | ||
77 | #define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f7 used for TLB flush */ | ||
78 | |||
79 | #define NUM_INVALIDATE_TLB_VECTORS 8 | ||
80 | |||
81 | /* | ||
82 | * Local APIC timer IRQ vector is on a different priority level, | ||
83 | * to work around the 'lost local interrupt if more than 2 IRQ | ||
84 | * sources per level' errata. | ||
85 | */ | ||
86 | #define LOCAL_TIMER_VECTOR 0xef | ||
87 | |||
88 | /* | ||
89 | * First APIC vector available to drivers: (vectors 0x30-0xee) | ||
90 | * we start at 0x41 to spread out vectors evenly between priority | ||
91 | * levels. (0x80 is the syscall vector) | ||
92 | */ | ||
93 | #define FIRST_DEVICE_VECTOR (IRQ15_VECTOR + 2) | ||
94 | #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in irq.h */ | ||
95 | |||
96 | |||
97 | #ifndef __ASSEMBLY__ | ||
98 | |||
99 | /* Interrupt handlers registered during init_IRQ */ | ||
100 | void apic_timer_interrupt(void); | ||
101 | void spurious_interrupt(void); | ||
102 | void error_interrupt(void); | ||
103 | void reschedule_interrupt(void); | ||
104 | void call_function_interrupt(void); | ||
105 | void irq_move_cleanup_interrupt(void); | ||
106 | void invalidate_interrupt0(void); | ||
107 | void invalidate_interrupt1(void); | ||
108 | void invalidate_interrupt2(void); | ||
109 | void invalidate_interrupt3(void); | ||
110 | void invalidate_interrupt4(void); | ||
111 | void invalidate_interrupt5(void); | ||
112 | void invalidate_interrupt6(void); | ||
113 | void invalidate_interrupt7(void); | ||
114 | void thermal_interrupt(void); | ||
115 | void threshold_interrupt(void); | ||
116 | void i8254_timer_resume(void); | ||
117 | |||
118 | typedef int vector_irq_t[NR_VECTORS]; | ||
119 | DECLARE_PER_CPU(vector_irq_t, vector_irq); | ||
120 | extern void __setup_vector_irq(int cpu); | ||
121 | extern spinlock_t vector_lock; | ||
122 | |||
123 | /* | ||
124 | * Various low-level irq details needed by irq.c, process.c, | ||
125 | * time.c, io_apic.c and smp.c | ||
126 | * | ||
127 | * Interrupt entry/exit code at both C and assembly level | ||
128 | */ | ||
129 | |||
130 | extern void disable_8259A_irq(unsigned int irq); | ||
131 | extern void enable_8259A_irq(unsigned int irq); | ||
132 | extern int i8259A_irq_pending(unsigned int irq); | ||
133 | extern void make_8259A_irq(unsigned int irq); | ||
134 | extern void init_8259A(int aeoi); | ||
135 | extern void send_IPI_self(int vector); | ||
136 | extern void init_VISWS_APIC_irqs(void); | ||
137 | extern void setup_IO_APIC(void); | ||
138 | extern void disable_IO_APIC(void); | ||
139 | extern void print_IO_APIC(void); | ||
140 | extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); | ||
141 | extern void send_IPI(int dest, int vector); | ||
142 | extern void setup_ioapic_dest(void); | ||
143 | |||
144 | extern unsigned long io_apic_irqs; | ||
145 | |||
146 | extern atomic_t irq_err_count; | ||
147 | extern atomic_t irq_mis_count; | ||
148 | |||
149 | #define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) | ||
150 | |||
151 | #define __STR(x) #x | ||
152 | #define STR(x) __STR(x) | ||
153 | |||
154 | #include <asm/ptrace.h> | ||
155 | |||
156 | #define IRQ_NAME2(nr) nr##_interrupt(void) | ||
157 | #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr) | ||
158 | |||
159 | /* | ||
160 | * SMP has a few special interrupts for IPI messages | ||
161 | */ | ||
162 | |||
163 | #define BUILD_IRQ(nr) \ | ||
164 | asmlinkage void IRQ_NAME(nr); \ | ||
165 | __asm__( \ | ||
166 | "\n.p2align\n" \ | ||
167 | "IRQ" #nr "_interrupt:\n\t" \ | ||
168 | "push $~(" #nr ") ; " \ | ||
169 | "jmp common_interrupt"); | ||
170 | |||
171 | #define platform_legacy_irq(irq) ((irq) < 16) | ||
172 | |||
173 | #endif | ||
174 | |||
175 | #endif /* _ASM_HW_IRQ_H */ | ||