diff options
author | Yinghai Lu <yinghai@kernel.org> | 2008-12-19 18:23:44 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-23 16:37:28 -0500 |
commit | b77b881f21b29aa7efa668fde69ee3dc0372ae3f (patch) | |
tree | a4039161e9bcab3e9c2fd2e2aa70fee16103857b /drivers/lguest/interrupts_and_traps.c | |
parent | a7883dece6ef82097e6bdf19c1d0a20351e06056 (diff) |
x86: fix lguest used_vectors breakage, -v2
Impact: fix lguest, clean up
32-bit lguest used used_vectors to record vectors, but that model of
allocating vectors changed and got broken, after we changed vector
allocation to a per_cpu array.
Try enable that for 64bit, and the array is used for all vectors that
are not managed by vector_irq per_cpu array.
Also kill system_vectors[], that is now a duplication of the
used_vectors bitmap.
[ merged in cpus4096 due to io_apic.c cpumask changes. ]
[ -v2, fix build failure ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/lguest/interrupts_and_traps.c')
-rw-r--r-- | drivers/lguest/interrupts_and_traps.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c index a1039068f95c..415fab0125ac 100644 --- a/drivers/lguest/interrupts_and_traps.c +++ b/drivers/lguest/interrupts_and_traps.c | |||
@@ -222,11 +222,16 @@ bool check_syscall_vector(struct lguest *lg) | |||
222 | int init_interrupts(void) | 222 | int init_interrupts(void) |
223 | { | 223 | { |
224 | /* If they want some strange system call vector, reserve it now */ | 224 | /* If they want some strange system call vector, reserve it now */ |
225 | if (syscall_vector != SYSCALL_VECTOR | 225 | if (syscall_vector != SYSCALL_VECTOR) { |
226 | && test_and_set_bit(syscall_vector, used_vectors)) { | 226 | if (test_bit(syscall_vector, used_vectors) || |
227 | printk("lg: couldn't reserve syscall %u\n", syscall_vector); | 227 | vector_used_by_percpu_irq(syscall_vector)) { |
228 | return -EBUSY; | 228 | printk(KERN_ERR "lg: couldn't reserve syscall %u\n", |
229 | syscall_vector); | ||
230 | return -EBUSY; | ||
231 | } | ||
232 | set_bit(syscall_vector, used_vectors); | ||
229 | } | 233 | } |
234 | |||
230 | return 0; | 235 | return 0; |
231 | } | 236 | } |
232 | 237 | ||