aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/desc.h22
-rw-r--r--include/asm-x86/irq_vectors.h2
2 files changed, 22 insertions, 2 deletions
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
index 268a012bcd79..b3875d4b4fab 100644
--- a/include/asm-x86/desc.h
+++ b/include/asm-x86/desc.h
@@ -311,6 +311,28 @@ static inline void set_intr_gate(unsigned int n, void *addr)
311 _set_gate(n, GATE_INTERRUPT, addr, 0, 0, __KERNEL_CS); 311 _set_gate(n, GATE_INTERRUPT, addr, 0, 0, __KERNEL_CS);
312} 312}
313 313
314#define SYS_VECTOR_FREE 0
315#define SYS_VECTOR_ALLOCED 1
316
317extern int first_system_vector;
318extern char system_vectors[];
319
320static inline void alloc_system_vector(int vector)
321{
322 if (system_vectors[vector] == SYS_VECTOR_FREE) {
323 system_vectors[vector] = SYS_VECTOR_ALLOCED;
324 if (first_system_vector > vector)
325 first_system_vector = vector;
326 } else
327 BUG();
328}
329
330static inline void alloc_intr_gate(unsigned int n, void *addr)
331{
332 alloc_system_vector(n);
333 set_intr_gate(n, addr);
334}
335
314/* 336/*
315 * This routine sets up an interrupt gate at directory privilege level 3. 337 * This routine sets up an interrupt gate at directory privilege level 3.
316 */ 338 */
diff --git a/include/asm-x86/irq_vectors.h b/include/asm-x86/irq_vectors.h
index daceaaf0a3a4..3cb6d8c77b39 100644
--- a/include/asm-x86/irq_vectors.h
+++ b/include/asm-x86/irq_vectors.h
@@ -96,8 +96,6 @@
96# define FIRST_DEVICE_VECTOR (IRQ15_VECTOR + 2) 96# define FIRST_DEVICE_VECTOR (IRQ15_VECTOR + 2)
97#endif 97#endif
98 98
99#define FIRST_SYSTEM_VECTOR 0xef
100
101#define NR_VECTORS 256 99#define NR_VECTORS 256
102 100
103#define FPU_IRQ 13 101#define FPU_IRQ 13