]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: CPU hotplug: pass in proper affinity mask on IRQ migration
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 21 Jul 2011 14:07:56 +0000 (15:07 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:42 +0000 (08:34 +0200)
Now that the GIC takes care of selecting a target interrupt from the
affinity mask, we don't need all this complexity in the core code
anymore.  Just detect when we need to break affinity.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/irq.c

index 3e34b1f0586b96b44313a1ad66b223f7273f9679..30d68062028146affb802453d2db13742dbbd968 100644 (file)
@@ -142,17 +142,15 @@ int __init arch_probe_nr_irqs(void)
 
 static bool migrate_one_irq(struct irq_data *d)
 {
-       unsigned int cpu = cpumask_any_and(d->affinity, cpu_online_mask);
+       const struct cpumask *affinity = d->affinity;
        bool ret = false;
 
-       if (cpu >= nr_cpu_ids) {
-               cpu = cpumask_any(cpu_online_mask);
+       if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
+               affinity cpu_online_mask;
                ret = true;
        }
 
-       pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", d->irq, d->node, cpu);
-
-       d->chip->irq_set_affinity(d, cpumask_of(cpu), true);
+       d->chip->irq_set_affinity(d, affinity, true);
 
        return ret;
 }