summaryrefslogtreecommitdiffstats
path: root/kernel/irq/manage.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-08 17:22:00 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 12:58:20 +0100
commit2bdd10558c8d93009cb6c32ce9e30800fbb08add (patch)
treef25b36c02faa8709628e2dbb93748f370678bb52 /kernel/irq/manage.c
parentbce43032ad79fae0ce5b6174ce1321e643ceb54b (diff)
genirq: Move IRQ_AFFINITY_SET to core
Keep status in sync until last abuser is gone. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r--kernel/irq/manage.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 550ae97a004..8246afc8195 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -164,7 +164,8 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *mask)
kref_get(&desc->affinity_notify->kref);
schedule_work(&desc->affinity_notify->work);
}
- desc->status |= IRQ_AFFINITY_SET;
+ irq_compat_set_affinity(desc);
+ irqd_set(&desc->irq_data, IRQD_AFFINITY_SET);
raw_spin_unlock_irqrestore(&desc->lock, flags);
return ret;
}
@@ -272,12 +273,14 @@ setup_affinity(unsigned int irq, struct irq_desc *desc, struct cpumask *mask)
* Preserve an userspace affinity setup, but make sure that
* one of the targets is online.
*/
- if (desc->status & (IRQ_AFFINITY_SET)) {
+ if (irqd_has_set(&desc->irq_data, IRQD_AFFINITY_SET)) {
if (cpumask_intersects(desc->irq_data.affinity,
cpu_online_mask))
set = desc->irq_data.affinity;
- else
- desc->status &= ~IRQ_AFFINITY_SET;
+ else {
+ irq_compat_clr_affinity(desc);
+ irqd_clear(&desc->irq_data, IRQD_AFFINITY_SET);
+ }
}
cpumask_and(mask, cpu_online_mask, set);