diff options
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 2430b31c9857..937150e4c06d 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -1256,11 +1256,16 @@ static void __clear_irq_vector(int irq, struct irq_cfg *cfg) | |||
1256 | void __setup_vector_irq(int cpu) | 1256 | void __setup_vector_irq(int cpu) |
1257 | { | 1257 | { |
1258 | /* Initialize vector_irq on a new cpu */ | 1258 | /* Initialize vector_irq on a new cpu */ |
1259 | /* This function must be called with vector_lock held */ | ||
1260 | int irq, vector; | 1259 | int irq, vector; |
1261 | struct irq_cfg *cfg; | 1260 | struct irq_cfg *cfg; |
1262 | struct irq_desc *desc; | 1261 | struct irq_desc *desc; |
1263 | 1262 | ||
1263 | /* | ||
1264 | * vector_lock will make sure that we don't run into irq vector | ||
1265 | * assignments that might be happening on another cpu in parallel, | ||
1266 | * while we setup our initial vector to irq mappings. | ||
1267 | */ | ||
1268 | spin_lock(&vector_lock); | ||
1264 | /* Mark the inuse vectors */ | 1269 | /* Mark the inuse vectors */ |
1265 | for_each_irq_desc(irq, desc) { | 1270 | for_each_irq_desc(irq, desc) { |
1266 | cfg = desc->chip_data; | 1271 | cfg = desc->chip_data; |
@@ -1279,6 +1284,7 @@ void __setup_vector_irq(int cpu) | |||
1279 | if (!cpumask_test_cpu(cpu, cfg->domain)) | 1284 | if (!cpumask_test_cpu(cpu, cfg->domain)) |
1280 | per_cpu(vector_irq, cpu)[vector] = -1; | 1285 | per_cpu(vector_irq, cpu)[vector] = -1; |
1281 | } | 1286 | } |
1287 | spin_unlock(&vector_lock); | ||
1282 | } | 1288 | } |
1283 | 1289 | ||
1284 | static struct irq_chip ioapic_chip; | 1290 | static struct irq_chip ioapic_chip; |