summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-11-07 13:58:46 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-09 22:23:54 +0100
commit612e3684c1b7752d2890510e4f90115fd1eb2afb (patch)
tree77d8b8de0a4ae3805cb38bfe60ed2b107fc87cad /kernel/irq
parentf6d87f4bd259cf33e092cd1a8fde05f291c47af1 (diff)
downloadlinux-612e3684c1b7752d2890510e4f90115fd1eb2afb.tar.bz2
genirq: fix the affinity setting in setup_irq
The affinity setting in setup irq is called before the NO_BALANCING flag is checked and might therefore override affinity settings from the calling code with the default setting. Move the NO_BALANCING flag check before the call to the affinity setting. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/manage.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 634a2a955104..948a22a2c013 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -123,7 +123,7 @@ int do_irq_select_affinity(unsigned int irq, struct irq_desc *desc)
* Preserve an userspace affinity setup, but make sure that
* one of the targets is online.
*/
- if (desc->status & IRQ_AFFINITY_SET) {
+ if (desc->status & (IRQ_AFFINITY_SET | IRQ_NO_BALANCING)) {
if (cpus_intersects(desc->affinity, cpu_online_map))
mask = desc->affinity;
else
@@ -483,6 +483,10 @@ __setup_irq(unsigned int irq, struct irq_desc * desc, struct irqaction *new)
/* Undo nested disables: */
desc->depth = 1;
+ /* Exclude IRQ from balancing if requested */
+ if (new->flags & IRQF_NOBALANCING)
+ desc->status |= IRQ_NO_BALANCING;
+
/* Set default affinity mask once everything is setup */
do_irq_select_affinity(irq, desc);
@@ -497,10 +501,6 @@ __setup_irq(unsigned int irq, struct irq_desc * desc, struct irqaction *new)
*p = new;
- /* Exclude IRQ from balancing */
- if (new->flags & IRQF_NOBALANCING)
- desc->status |= IRQ_NO_BALANCING;
-
/* Reset broken irq detection when installing new handler */
desc->irq_count = 0;
desc->irqs_unhandled = 0;