]> err.no Git - linux-2.6/commitdiff
IRQ: check for PERCPU flag only when adding first irqaction
authorAhmed S. Darwish <darwish.07@gmail.com>
Tue, 8 May 2007 07:27:55 +0000 (00:27 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:06 +0000 (11:15 -0700)
An irqaction structure won't be added to an IRQ descriptor irqaction list if
it doesn't agree with other irqactions on the IRQF_PERCPU flag.  Don't check
for this flag to change IRQ descriptor `status' for every irqaction added to
the list, Doing the check only for the first irqaction added is enough.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/irq/manage.c

index 5597c157442a19a5e5bbe7de068d86c261e98951..203a518b6f1437d134c115ce7d43e1e04e1d5c25 100644 (file)
@@ -317,10 +317,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
        }
 
        *p = new;
-#if defined(CONFIG_IRQ_PER_CPU)
-       if (new->flags & IRQF_PERCPU)
-               desc->status |= IRQ_PER_CPU;
-#endif
+
        /* Exclude IRQ from balancing */
        if (new->flags & IRQF_NOBALANCING)
                desc->status |= IRQ_NO_BALANCING;
@@ -328,6 +325,11 @@ int setup_irq(unsigned int irq, struct irqaction *new)
        if (!shared) {
                irq_chip_set_defaults(desc->chip);
 
+#if defined(CONFIG_IRQ_PER_CPU)
+               if (new->flags & IRQF_PERCPU)
+                       desc->status |= IRQ_PER_CPU;
+#endif
+
                /* Setup the type (level, edge polarity) if configured: */
                if (new->flags & IRQF_TRIGGER_MASK) {
                        if (desc->chip && desc->chip->set_type)