diff options
author | Alan Mayer <ajm@sgi.com> | 2008-04-15 16:36:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:28:06 -0400 |
commit | 305b92a2323eeaa4b481f409d54f778dd7e21a46 (patch) | |
tree | 0f32832b033de27b2ae5909bb06d4eabdd1a9b0b /include | |
parent | 1a331957efd214fc3a84f70956dfaec65e70c031 (diff) |
x86: change FIRST_SYSTEM_VECTOR to a variable
The SGI UV system needs several more system vectors than a vanilla
x86_64 system. Rather than burden the other archs with extra system
vectors that they don't use, change FIRST_SYSTEM_VECTOR to a variable,
so that it can be dynamic.
Signed-off-by: Alan Mayer <ajm@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/desc.h | 22 | ||||
-rw-r--r-- | include/asm-x86/irq_vectors.h | 2 |
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 | |||
317 | extern int first_system_vector; | ||
318 | extern char system_vectors[]; | ||
319 | |||
320 | static 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 | |||
330 | static 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 |