genirq: Make sure the initial affinity is not empty
authorSrinivas Ramana <sramana@codeaurora.org>
Thu, 20 Dec 2018 13:35:57 +0000 (19:05 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Mar 2019 16:57:59 +0000 (17:57 +0100)
commit10a1f3195914fe650b326364ccbb942080ce72dd
tree1e272ada60a17b627d7ceba7a96f6cf1c5a8f6c3
parentc6733e3433ad463a6d64cabbf3d0a320f453bced
genirq: Make sure the initial affinity is not empty

[ Upstream commit bddda606ec76550dd63592e32a6e87e7d32583f7 ]

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>
kernel/irq/manage.c