]> err.no Git - linux-2.6/commitdiff
[PATCH] genirq: cleanup: merge pending_irq_cpumask[] into irq_desc[]
authorIngo Molnar <mingo@elte.hu>
Thu, 29 Jun 2006 09:24:42 +0000 (02:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 29 Jun 2006 17:26:22 +0000 (10:26 -0700)
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>
arch/i386/kernel/io_apic.c
include/linux/irq.h
kernel/irq/manage.c
kernel/irq/migration.c

index 4a74b696c6a3c82eb5e743189bd5ffbeb45b36e0..afe54f257cb80b65b977ba27546053feaa37c5c0 100644 (file)
@@ -581,7 +581,7 @@ static int balanced_irq(void *unused)
        
        /* push everything to CPU 0 to give us a starting point.  */
        for (i = 0 ; i < NR_IRQS ; i++) {
-               pending_irq_cpumask[i] = cpumask_of_cpu(0);
+               irq_desc[i].pending_mask = cpumask_of_cpu(0);
                set_pending_irq(i, cpumask_of_cpu(0));
        }
 
index 1022c5d425464c33d6b0dd94d55274adb37f8262..81f3d976bb327e47f297fc43ad3ad4a58900132e 100644 (file)
@@ -83,6 +83,7 @@ struct irq_desc {
        cpumask_t               affinity;
 #endif
 #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
+       cpumask_t               pending_mask;
        unsigned int            move_irq;       /* need to re-target IRQ dest */
 #endif
 #ifdef CONFIG_PROC_FS
@@ -120,7 +121,6 @@ static inline void set_native_irq_info(int irq, cpumask_t mask)
 #ifdef CONFIG_SMP
 
 #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
-extern cpumask_t pending_irq_cpumask[NR_IRQS];
 
 void set_pending_irq(unsigned int irq, cpumask_t mask);
 void move_native_irq(int irq);
index 6a6f1d3dd3996c8b996f09b946c24ad784a3db57..ca9b5d36abe8ee7a0d020ca09f689e17cd893c69 100644 (file)
 
 #ifdef CONFIG_SMP
 
-#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE)
-cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
-#endif
-
 /**
  *     synchronize_irq - wait for pending IRQ handlers (on other CPUs)
  *     @irq: interrupt number to wait for
index a571c3abb79337acb91178fa38c9698dc50444b5..a57ebe9fa6f6b89169eb7e7e093167c341caed71 100644 (file)
@@ -8,7 +8,7 @@ void set_pending_irq(unsigned int irq, cpumask_t mask)
 
        spin_lock_irqsave(&desc->lock, flags);
        desc->move_irq = 1;
-       pending_irq_cpumask[irq] = mask;
+       irq_desc[irq].pending_mask = mask;
        spin_unlock_irqrestore(&desc->lock, flags);
 }
 
@@ -30,7 +30,7 @@ void move_native_irq(int irq)
 
        desc->move_irq = 0;
 
-       if (unlikely(cpus_empty(pending_irq_cpumask[irq])))
+       if (unlikely(cpus_empty(irq_desc[irq].pending_mask)))
                return;
 
        if (!desc->chip->set_affinity)
@@ -38,7 +38,7 @@ void move_native_irq(int irq)
 
        assert_spin_locked(&desc->lock);
 
-       cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
+       cpus_and(tmp, irq_desc[irq].pending_mask, cpu_online_map);
 
        /*
         * If there was a valid mask to work with, please
@@ -58,5 +58,5 @@ void move_native_irq(int irq)
                if (likely(!(desc->status & IRQ_DISABLED)))
                        desc->chip->enable(irq);
        }
-       cpus_clear(pending_irq_cpumask[irq]);
+       cpus_clear(irq_desc[irq].pending_mask);
 }