Skip to content

Commit

Permalink
x86/smp: Remove pointless wmb()s from native_stop_other_cpus()
Browse files Browse the repository at this point in the history
commit 2affa6d upstream.

The wmb()s before sending the IPIs are not synchronizing anything.

If at all then the apic IPI functions have to provide or act as appropriate
barriers.

Remove these cargo cult barriers which have no explanation of what they are
synchronizing.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230615193330.378358382@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Thomas Gleixner authored and gregkh committed Jul 1, 2023
1 parent 8b1b43c commit 4726d74
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions arch/x86/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ static void native_stop_other_cpus(int wait)
cpumask_clear_cpu(cpu, &cpus_stop_mask);

if (!cpumask_empty(&cpus_stop_mask)) {
/* sync above data before sending IRQ */
wmb();

apic_send_IPI_allbutself(REBOOT_VECTOR);

/*
Expand All @@ -208,9 +205,6 @@ static void native_stop_other_cpus(int wait)
* CPUs to stop.
*/
if (!smp_no_nmi_ipi && !register_stop_handler()) {
/* Sync above data before sending IRQ */
wmb();

pr_emerg("Shutting down cpus with NMI\n");

for_each_cpu(cpu, &cpus_stop_mask)
Expand Down

0 comments on commit 4726d74

Please sign in to comment.