aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-08-02 16:38:25 -0400
committerThomas Gleixner <tglx@linutronix.de>2015-08-05 18:14:59 -0400
commit44825757a3ee37c030165a94d6b4dd79c564f661 (patch)
treebc43332e6821498489ff36802d9cce212a52346e
parent7276c6a2cb5f7ae46fd0c9539af02dbcb7c4f3f5 (diff)
x86/irq: Get rid of an indentation level
Make the code simpler to read. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Jiang Liu <jiang.liu@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Bjorn Helgaas <bhelgaas@google.com> Link: http://lkml.kernel.org/r/20150802203609.555253675@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/irq.c72
1 files changed, 35 insertions, 37 deletions
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 931bdd2f9759..140950fb9902 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -342,47 +342,45 @@ int check_irq_vectors_for_cpu_disable(void)
342 this_count = 0; 342 this_count = 0;
343 for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) { 343 for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
344 irq = __this_cpu_read(vector_irq[vector]); 344 irq = __this_cpu_read(vector_irq[vector]);
345 if (irq >= 0) { 345 if (irq < 0)
346 desc = irq_to_desc(irq); 346 continue;
347 if (!desc) 347 desc = irq_to_desc(irq);
348 continue; 348 if (!desc)
349 continue;
349 350
350 /* 351 /*
351 * Protect against concurrent action removal, 352 * Protect against concurrent action removal, affinity
352 * affinity changes etc. 353 * changes etc.
353 */ 354 */
354 raw_spin_lock(&desc->lock); 355 raw_spin_lock(&desc->lock);
355 data = irq_desc_get_irq_data(desc); 356 data = irq_desc_get_irq_data(desc);
356 cpumask_copy(&affinity_new, 357 cpumask_copy(&affinity_new, irq_data_get_affinity_mask(data));
357 irq_data_get_affinity_mask(data)); 358 cpumask_clear_cpu(this_cpu, &affinity_new);
358 cpumask_clear_cpu(this_cpu, &affinity_new);
359
360 /* Do not count inactive or per-cpu irqs. */
361 if (!irq_has_action(irq) || irqd_is_per_cpu(data)) {
362 raw_spin_unlock(&desc->lock);
363 continue;
364 }
365 359
360 /* Do not count inactive or per-cpu irqs. */
361 if (!irq_has_action(irq) || irqd_is_per_cpu(data)) {
366 raw_spin_unlock(&desc->lock); 362 raw_spin_unlock(&desc->lock);
367 /* 363 continue;
368 * A single irq may be mapped to multiple
369 * cpu's vector_irq[] (for example IOAPIC cluster
370 * mode). In this case we have two
371 * possibilities:
372 *
373 * 1) the resulting affinity mask is empty; that is
374 * this the down'd cpu is the last cpu in the irq's
375 * affinity mask, or
376 *
377 * 2) the resulting affinity mask is no longer
378 * a subset of the online cpus but the affinity
379 * mask is not zero; that is the down'd cpu is the
380 * last online cpu in a user set affinity mask.
381 */
382 if (cpumask_empty(&affinity_new) ||
383 !cpumask_subset(&affinity_new, &online_new))
384 this_count++;
385 } 364 }
365
366 raw_spin_unlock(&desc->lock);
367 /*
368 * A single irq may be mapped to multiple cpu's
369 * vector_irq[] (for example IOAPIC cluster mode). In
370 * this case we have two possibilities:
371 *
372 * 1) the resulting affinity mask is empty; that is
373 * this the down'd cpu is the last cpu in the irq's
374 * affinity mask, or
375 *
376 * 2) the resulting affinity mask is no longer a
377 * subset of the online cpus but the affinity mask is
378 * not zero; that is the down'd cpu is the last online
379 * cpu in a user set affinity mask.
380 */
381 if (cpumask_empty(&affinity_new) ||
382 !cpumask_subset(&affinity_new, &online_new))
383 this_count++;
386 } 384 }
387 385
388 count = 0; 386 count = 0;