Commit f73493eb authored by Helge Deller's avatar Helge Deller

parisc: Improve initial IRQ to CPU assignment

On parisc, each IRQ can only be handled by one CPU, and currently CPU0
is choosen as default for handling all IRQs by default.
With this patch we now assign each requested IRQ to one of the online
CPUs (and thus distribute the IRQs across all CPUs), even without an
instance of irqbalance running.
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent b102f29b
...@@ -117,7 +117,10 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest) ...@@ -117,7 +117,10 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)
return -EINVAL; return -EINVAL;
/* whatever mask they set, we just allow one CPU */ /* whatever mask they set, we just allow one CPU */
cpu_dest = cpumask_first_and(dest, cpu_online_mask); cpu_dest = cpumask_next_and(d->irq & (num_online_cpus()-1),
dest, cpu_online_mask);
if (cpu_dest >= nr_cpu_ids)
cpu_dest = cpumask_first_and(dest, cpu_online_mask);
return cpu_dest; return cpu_dest;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment