Commit f75d222b836f7febfab0954c7612b23059d748cb

Authored by Ahmed S. Darwish
Committed by Linus Torvalds
1 parent 3367b994fe

IRQ: check for PERCPU flag only when adding first irqaction

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>

Showing 1 changed file with 6 additions and 4 deletions Side-by-side Diff

... ... @@ -317,16 +317,18 @@
317 317 }
318 318  
319 319 *p = new;
320   -#if defined(CONFIG_IRQ_PER_CPU)
321   - if (new->flags & IRQF_PERCPU)
322   - desc->status |= IRQ_PER_CPU;
323   -#endif
  320 +
324 321 /* Exclude IRQ from balancing */
325 322 if (new->flags & IRQF_NOBALANCING)
326 323 desc->status |= IRQ_NO_BALANCING;
327 324  
328 325 if (!shared) {
329 326 irq_chip_set_defaults(desc->chip);
  327 +
  328 +#if defined(CONFIG_IRQ_PER_CPU)
  329 + if (new->flags & IRQF_PERCPU)
  330 + desc->status |= IRQ_PER_CPU;
  331 +#endif
330 332  
331 333 /* Setup the type (level, edge polarity) if configured: */
332 334 if (new->flags & IRQF_TRIGGER_MASK) {