Skip to content

Commit bddda60

Browse files
Srinivas RamanaKAGA-KOKO
authored andcommitted
genirq: Make sure the initial affinity is not empty
If all CPUs in the irq_default_affinity mask are offline when an interrupt is initialized then irq_setup_affinity() can set an empty affinity mask for a newly allocated interrupt. Fix this by falling back to cpu_online_mask in case the resulting affinity mask is zero. Signed-off-by: Srinivas Ramana <sramana@codeaurora.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-arm-msm@vger.kernel.org Link: https://lkml.kernel.org/r/1545312957-8504-1-git-send-email-sramana@codeaurora.org
1 parent 1c7fc5c commit bddda60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/irq/manage.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ int irq_setup_affinity(struct irq_desc *desc)
393393
}
394394

395395
cpumask_and(&mask, cpu_online_mask, set);
396+
if (cpumask_empty(&mask))
397+
cpumask_copy(&mask, cpu_online_mask);
398+
396399
if (node != NUMA_NO_NODE) {
397400
const struct cpumask *nodemask = cpumask_of_node(node);
398401

0 commit comments

Comments
 (0)