diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-11-07 07:58:46 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-09 16:23:54 -0500 |
commit | 612e3684c1b7752d2890510e4f90115fd1eb2afb (patch) | |
tree | 77d8b8de0a4ae3805cb38bfe60ed2b107fc87cad /kernel | |
parent | f6d87f4bd259cf33e092cd1a8fde05f291c47af1 (diff) |
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')
-rw-r--r-- | kernel/irq/manage.c | 10 |
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) | |||
123 | * Preserve an userspace affinity setup, but make sure that | 123 | * Preserve an userspace affinity setup, but make sure that |
124 | * one of the targets is online. | 124 | * one of the targets is online. |
125 | */ | 125 | */ |
126 | if (desc->status & IRQ_AFFINITY_SET) { | 126 | if (desc->status & (IRQ_AFFINITY_SET | IRQ_NO_BALANCING)) { |
127 | if (cpus_intersects(desc->affinity, cpu_online_map)) | 127 | if (cpus_intersects(desc->affinity, cpu_online_map)) |
128 | mask = desc->affinity; | 128 | mask = desc->affinity; |
129 | else | 129 | else |
@@ -483,6 +483,10 @@ __setup_irq(unsigned int irq, struct irq_desc * desc, struct irqaction *new) | |||
483 | /* Undo nested disables: */ | 483 | /* Undo nested disables: */ |
484 | desc->depth = 1; | 484 | desc->depth = 1; |
485 | 485 | ||
486 | /* Exclude IRQ from balancing if requested */ | ||
487 | if (new->flags & IRQF_NOBALANCING) | ||
488 | desc->status |= IRQ_NO_BALANCING; | ||
489 | |||
486 | /* Set default affinity mask once everything is setup */ | 490 | /* Set default affinity mask once everything is setup */ |
487 | do_irq_select_affinity(irq, desc); | 491 | do_irq_select_affinity(irq, desc); |
488 | 492 | ||
@@ -497,10 +501,6 @@ __setup_irq(unsigned int irq, struct irq_desc * desc, struct irqaction *new) | |||
497 | 501 | ||
498 | *p = new; | 502 | *p = new; |
499 | 503 | ||
500 | /* Exclude IRQ from balancing */ | ||
501 | if (new->flags & IRQF_NOBALANCING) | ||
502 | desc->status |= IRQ_NO_BALANCING; | ||
503 | |||
504 | /* Reset broken irq detection when installing new handler */ | 504 | /* Reset broken irq detection when installing new handler */ |
505 | desc->irq_count = 0; | 505 | desc->irq_count = 0; |
506 | desc->irqs_unhandled = 0; | 506 | desc->irqs_unhandled = 0; |