summaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2019-01-05 00:05:46 +0100
committerHelge Deller <deller@gmx.de>2019-02-21 20:37:11 +0100
commitf73493eb4aecdd6edd8a749890e6e2dcfa0a7978 (patch)
treeb8796bae21acf185d1f69eb33cbc8fd3ca0da5d4 /arch/parisc
parentb102f29b2d8603f15071384e88125b8eab5f8faa (diff)
downloadlinux-0-day-f73493eb4aecdd6edd8a749890e6e2dcfa0a7978.tar.gz
linux-0-day-f73493eb4aecdd6edd8a749890e6e2dcfa0a7978.tar.xz
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: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/irq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 6f19f364c20ab..23040a67583e4 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -117,7 +117,10 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)
return -EINVAL;
/* 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;
}