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>
Этот коммит содержится в:

коммит произвёл
Thomas Gleixner

родитель
39743c9ef7
Коммит
dbeb2be21d
@@ -1198,7 +1198,7 @@ static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 }
|
||||
static int __assign_irq_vector(int irq)
|
||||
{
|
||||
static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0;
|
||||
int vector, offset, i;
|
||||
int vector, offset;
|
||||
|
||||
BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
|
||||
|
||||
@@ -1215,11 +1215,8 @@ next:
|
||||
}
|
||||
if (vector == current_vector)
|
||||
return -ENOSPC;
|
||||
if (vector == SYSCALL_VECTOR)
|
||||
if (test_and_set_bit(vector, used_vectors))
|
||||
goto next;
|
||||
for (i = 0; i < NR_IRQ_VECTORS; i++)
|
||||
if (irq_vector[i] == vector)
|
||||
goto next;
|
||||
|
||||
current_vector = vector;
|
||||
current_offset = offset;
|
||||
@@ -2295,6 +2292,12 @@ static inline void __init check_timer(void)
|
||||
|
||||
void __init setup_IO_APIC(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Reserve all the system vectors. */
|
||||
for (i = FIRST_SYSTEM_VECTOR; i < NR_VECTORS; i++)
|
||||
set_bit(i, used_vectors);
|
||||
|
||||
enable_IO_APIC();
|
||||
|
||||
if (acpi_ioapic)
|
||||
|
Ссылка в новой задаче
Block a user