Commit 1028375e authored by Rusty Russell's avatar Rusty Russell

lguest: clean up lguest_init_IRQ

Copy from arch/x86/kernel/irqinit_32.c: we don't use the vectors beyond
LGUEST_IRQS (if any), but we might as well set them all.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 56739c80
...@@ -628,13 +628,12 @@ static void __init lguest_init_IRQ(void) ...@@ -628,13 +628,12 @@ static void __init lguest_init_IRQ(void)
{ {
unsigned int i; unsigned int i;
for (i = 0; i < LGUEST_IRQS; i++) { for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
int vector = FIRST_EXTERNAL_VECTOR + i;
/* Some systems map "vectors" to interrupts weirdly. Lguest has /* Some systems map "vectors" to interrupts weirdly. Lguest has
* a straightforward 1 to 1 mapping, so force that here. */ * a straightforward 1 to 1 mapping, so force that here. */
__get_cpu_var(vector_irq)[vector] = i; __get_cpu_var(vector_irq)[i] = i - FIRST_EXTERNAL_VECTOR;
if (vector != SYSCALL_VECTOR) if (i != SYSCALL_VECTOR)
set_intr_gate(vector, interrupt[i]); set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]);
} }
/* This call is required to set up for 4k stacks, where we have /* This call is required to set up for 4k stacks, where we have
* separate stacks for hard and soft interrupts. */ * separate stacks for hard and soft interrupts. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment