summaryrefslogtreecommitdiffstats
path: root/kernel/irq/manage.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-07 17:05:08 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 12:58:07 +0100
commit569bda8df11effa03e618729293c7961696abb10 (patch)
treeb0aed74a4b00a481738dc76a739f6f67e09a99c1 /kernel/irq/manage.c
parentb008207cbd0d5ce606a1a2ac52826e0ab37d0b99 (diff)
downloadblackbird-op-linux-569bda8df11effa03e618729293c7961696abb10.tar.gz
blackbird-op-linux-569bda8df11effa03e618729293c7961696abb10.zip
genirq: Always apply cpu online mask
If the affinity had been set by the user, then a later request_irq() will honour that setting. But online cpus can have changed. So apply the online mask and for this case as well. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r--kernel/irq/manage.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 591c927b135c..ade65bfb466d 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -256,6 +256,8 @@ EXPORT_SYMBOL_GPL(irq_set_affinity_notifier);
*/
static int setup_affinity(unsigned int irq, struct irq_desc *desc)
{
+ struct cpumask *set = irq_default_affinity;
+
/* Excludes PER_CPU and NO_BALANCE interrupts */
if (!irq_can_set_affinity(irq))
return 0;
@@ -265,15 +267,13 @@ static int setup_affinity(unsigned int irq, struct irq_desc *desc)
* one of the targets is online.
*/
if (desc->status & (IRQ_AFFINITY_SET)) {
- if (cpumask_any_and(desc->irq_data.affinity, cpu_online_mask)
- < nr_cpu_ids)
- goto set_affinity;
+ if (cpumask_intersects(desc->irq_data.affinity,
+ cpu_online_mask))
+ set = desc->irq_data.affinity;
else
desc->status &= ~IRQ_AFFINITY_SET;
}
-
- cpumask_and(desc->irq_data.affinity, cpu_online_mask, irq_default_affinity);
-set_affinity:
+ cpumask_and(desc->irq_data.affinity, cpu_online_mask, set);
desc->irq_data.chip->irq_set_affinity(&desc->irq_data, desc->irq_data.affinity, false);
return 0;
OpenPOWER on IntegriCloud