Skip to content

Commit cd916d3

Browse files
Ingo MolnarLinus Torvalds
authored andcommitted
[PATCH] genirq: cleanup: merge pending_irq_cpumask[] into irq_desc[]
Consolidation: remove the pending_irq_cpumask[NR_IRQS] array and move it into the irq_desc[NR_IRQS].pending_mask field. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 4a733ee commit cd916d3

4 files changed

Lines changed: 6 additions & 10 deletions

File tree

‎arch/i386/kernel/io_apic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ static int balanced_irq(void *unused)
581581

582582
/* push everything to CPU 0 to give us a starting point. */
583583
for (i = 0 ; i < NR_IRQS ; i++) {
584-
pending_irq_cpumask[i] = cpumask_of_cpu(0);
584+
irq_desc[i].pending_mask = cpumask_of_cpu(0);
585585
set_pending_irq(i, cpumask_of_cpu(0));
586586
}
587587

‎include/linux/irq.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ struct irq_desc {
8383
cpumask_t affinity;
8484
#endif
8585
#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
86+
cpumask_t pending_mask;
8687
unsigned int move_irq; /* need to re-target IRQ dest */
8788
#endif
8889
#ifdef CONFIG_PROC_FS
@@ -120,7 +121,6 @@ static inline void set_native_irq_info(int irq, cpumask_t mask)
120121
#ifdef CONFIG_SMP
121122

122123
#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
123-
extern cpumask_t pending_irq_cpumask[NR_IRQS];
124124

125125
void set_pending_irq(unsigned int irq, cpumask_t mask);
126126
void move_native_irq(int irq);

‎kernel/irq/manage.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616

1717
#ifdef CONFIG_SMP
1818

19-
#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE)
20-
cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
21-
#endif
22-
2319
/**
2420
* synchronize_irq - wait for pending IRQ handlers (on other CPUs)
2521
* @irq: interrupt number to wait for

‎kernel/irq/migration.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ void set_pending_irq(unsigned int irq, cpumask_t mask)
88

99
spin_lock_irqsave(&desc->lock, flags);
1010
desc->move_irq = 1;
11-
pending_irq_cpumask[irq] = mask;
11+
irq_desc[irq].pending_mask = mask;
1212
spin_unlock_irqrestore(&desc->lock, flags);
1313
}
1414

@@ -30,15 +30,15 @@ void move_native_irq(int irq)
3030

3131
desc->move_irq = 0;
3232

33-
if (unlikely(cpus_empty(pending_irq_cpumask[irq])))
33+
if (unlikely(cpus_empty(irq_desc[irq].pending_mask)))
3434
return;
3535

3636
if (!desc->chip->set_affinity)
3737
return;
3838

3939
assert_spin_locked(&desc->lock);
4040

41-
cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
41+
cpus_and(tmp, irq_desc[irq].pending_mask, cpu_online_map);
4242

4343
/*
4444
* If there was a valid mask to work with, please
@@ -58,5 +58,5 @@ void move_native_irq(int irq)
5858
if (likely(!(desc->status & IRQ_DISABLED)))
5959
desc->chip->enable(irq);
6060
}
61-
cpus_clear(pending_irq_cpumask[irq]);
61+
cpus_clear(irq_desc[irq].pending_mask);
6262
}

0 commit comments

Comments
 (0)