Skip to content

Commit 2affa6d

Browse files
committed
x86/smp: Remove pointless wmb()s from native_stop_other_cpus()
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
1 parent 9b04045 commit 2affa6d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

arch/x86/kernel/smp.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,6 @@ static void native_stop_other_cpus(int wait)
184184
cpumask_clear_cpu(cpu, &cpus_stop_mask);
185185

186186
if (!cpumask_empty(&cpus_stop_mask)) {
187-
/* sync above data before sending IRQ */
188-
wmb();
189-
190187
apic_send_IPI_allbutself(REBOOT_VECTOR);
191188

192189
/*
@@ -208,9 +205,6 @@ static void native_stop_other_cpus(int wait)
208205
* CPUs to stop.
209206
*/
210207
if (!smp_no_nmi_ipi && !register_stop_handler()) {
211-
/* Sync above data before sending IRQ */
212-
wmb();
213-
214208
pr_emerg("Shutting down cpus with NMI\n");
215209

216210
for_each_cpu(cpu, &cpus_stop_mask)

0 commit comments

Comments
 (0)