mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
genirq: Make sure the initial affinity is not empty
[ Upstream commit bddda606ec
]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c6733e3433
commit
10a1f31959
|
@ -360,6 +360,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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user