]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
alpha: Send stop IPI to send to online CPUs
authorPrarit Bhargava <prarit@redhat.com>
Tue, 5 Jan 2021 15:16:27 +0000 (10:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:21:05 +0000 (13:21 +0200)
commit742e85fa9e802bf611ce645caa1c39bdd0a1d2a8
tree45589ee59291b32f3ad41645c8c1754b2d72fea0
parent26946d21395cf9ca4d29da1bdd5ad959db91e5cb
alpha: Send stop IPI to send to online CPUs

[ Upstream commit caace6ca4e06f09413fb8f8a63319594cfb7d47d ]

This issue was noticed while debugging a shutdown issue where some
secondary CPUs are not being shutdown correctly.  A fix for that [1] requires
that secondary cpus be offlined using the cpu_online_mask so that the
stop operation is a no-op if CPU HOTPLUG is disabled.  I, like the author in
[1] looked at the architectures and found that alpha is one of two
architectures that executes smp_send_stop() on all possible CPUs.

On alpha, smp_send_stop() sends an IPI to all possible CPUs but only needs
to send them to online CPUs.

Send the stop IPI to only the online CPUs.

[1] https://lkml.org/lkml/2020/1/10/250

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/alpha/kernel/smp.c