Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c995e9a9 authored by Srinivas Ramana's avatar Srinivas Ramana
Browse files

genirq: Make sure the affinity to be set is not empty



If the default_affinity is managed/initialized by a system and
all the cpus present in irq_default_affinity are hotplugged out
we may end up passing a cpumask of 0 to irq_do_set_affinity().

Fix this by falling back to cpu_online_mask in case the
calculated affinity becomes zero.

Change-Id: I11f6e6dd7e44865330296f7c48aa2d0594d31610
Signed-off-by: default avatarSrinivas Ramana <sramana@codeaurora.org>
parent c0fb4952
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -363,6 +363,9 @@ int irq_setup_affinity(struct irq_desc *desc)
	}

	cpumask_and(&mask, cpu_online_mask, set);
	if (cpumask_empty(&mask))
		cpumask_copy(&mask, cpu_online_mask);

	if (node != NUMA_NO_NODE) {
		const struct cpumask *nodemask = cpumask_of_node(node);