blob: f63b905e9f2a744354fb668c95f317f2e2ac3d77 [file] [log] [blame]
From 3185f1190b4eef7408c54d8118c0c5c9bbf11e38 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:44:44 -0500
Subject: [PATCH] x86: ioapic lock section fix
commit 7af93a8c480198ed9cb994ebe4d2d0dc1a235494 in tip.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 07bee33..8d3aa2d 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3263,7 +3263,6 @@ unsigned int create_irq_nr(unsigned int irq_want, int node)
if (irq_want < nr_irqs_gsi)
irq_want = nr_irqs_gsi;
- raw_spin_lock_irqsave(&vector_lock, flags);
for (new = irq_want; new < nr_irqs; new++) {
desc_new = irq_to_desc_alloc_node(new, node);
if (!desc_new) {
@@ -3275,14 +3274,15 @@ unsigned int create_irq_nr(unsigned int irq_want, int node)
if (cfg_new->vector != 0)
continue;
+ raw_spin_lock_irqsave(&vector_lock, flags);
desc_new = move_irq_desc(desc_new, node);
cfg_new = desc_new->chip_data;
if (__assign_irq_vector(new, cfg_new, apic->target_cpus()) == 0)
irq = new;
+ raw_spin_unlock_irqrestore(&vector_lock, flags);
break;
}
- raw_spin_unlock_irqrestore(&vector_lock, flags);
if (irq > 0)
dynamic_irq_init_keep_chip_data(irq);
--
1.7.1.1