diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-19 14:35:03 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-19 14:35:03 -0400 |
commit | dbeb2be21d678c49a8d8bbf774903df15dd55474 (patch) | |
tree | cea1b478ec3af36134aa06633be1a45787f35f75 /arch/x86/kernel/traps_32.c | |
parent | 39743c9ef717fd4f2b5583f010115c5f2482b8ae (diff) |
i386: introduce "used_vectors" bitmap which can be used to reserve vectors.
This simplifies the io_apic.c __assign_irq_vector() logic and removes
the explicit SYSCALL_VECTOR check, and also allows for vectors to be
reserved by other mechanisms (ie. lguest).
[ tglx: arch/x86 adaptation ]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/traps_32.c')
-rw-r--r-- | arch/x86/kernel/traps_32.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 3f02e0f42e6a..47e6d10902fe 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -63,6 +63,9 @@ | |||
63 | 63 | ||
64 | int panic_on_unrecovered_nmi; | 64 | int panic_on_unrecovered_nmi; |
65 | 65 | ||
66 | DECLARE_BITMAP(used_vectors, NR_VECTORS); | ||
67 | EXPORT_SYMBOL_GPL(used_vectors); | ||
68 | |||
66 | asmlinkage int system_call(void); | 69 | asmlinkage int system_call(void); |
67 | 70 | ||
68 | /* Do we ignore FPU interrupts ? */ | 71 | /* Do we ignore FPU interrupts ? */ |
@@ -1120,6 +1123,8 @@ static void __init set_task_gate(unsigned int n, unsigned int gdt_entry) | |||
1120 | 1123 | ||
1121 | void __init trap_init(void) | 1124 | void __init trap_init(void) |
1122 | { | 1125 | { |
1126 | int i; | ||
1127 | |||
1123 | #ifdef CONFIG_EISA | 1128 | #ifdef CONFIG_EISA |
1124 | void __iomem *p = ioremap(0x0FFFD9, 4); | 1129 | void __iomem *p = ioremap(0x0FFFD9, 4); |
1125 | if (readl(p) == 'E'+('I'<<8)+('S'<<16)+('A'<<24)) { | 1130 | if (readl(p) == 'E'+('I'<<8)+('S'<<16)+('A'<<24)) { |
@@ -1179,6 +1184,11 @@ void __init trap_init(void) | |||
1179 | 1184 | ||
1180 | set_system_gate(SYSCALL_VECTOR,&system_call); | 1185 | set_system_gate(SYSCALL_VECTOR,&system_call); |
1181 | 1186 | ||
1187 | /* Reserve all the builtin and the syscall vector. */ | ||
1188 | for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) | ||
1189 | set_bit(i, used_vectors); | ||
1190 | set_bit(SYSCALL_VECTOR, used_vectors); | ||
1191 | |||
1182 | /* | 1192 | /* |
1183 | * Should be a barrier for any external CPU state. | 1193 | * Should be a barrier for any external CPU state. |
1184 | */ | 1194 | */ |