In native_stop_other_cpus(), cpus_stop_mask is initialized to cpu_online_mask minus the calling CPU. However, apic_send_IPI_allbutself(REBOOT_VECTOR) uses the APIC broadcast shorthand when enabled, which delivers the IPI to all physical APICs including offline CPUs.
Use __apic_send_IPI_mask(&cpus_stop_mask, REBOOT_VECTOR) so that REBOOT_VECTOR is sent only to the target online CPUs in cpus_stop_mask. Signed-off-by: Pasha Tatashin <[email protected]> --- arch/x86/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 985103cab16c..2449d15c6667 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c @@ -192,7 +192,7 @@ static void native_stop_other_cpus(int wait) cpumask_clear_cpu(this_cpu, &cpus_stop_mask); if (!cpumask_empty(&cpus_stop_mask)) { - apic_send_IPI_allbutself(REBOOT_VECTOR); + __apic_send_IPI_mask(&cpus_stop_mask, REBOOT_VECTOR); /* * Don't wait longer than a second for IPI completion. The -- 2.55.0.1082.g2b9226bbc0-goog

