From nobody Sun Feb 8 05:41:13 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F9D1EB64DA for ; Thu, 15 Jun 2023 20:34:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237562AbjFOUeG (ORCPT ); Thu, 15 Jun 2023 16:34:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232067AbjFOUd4 (ORCPT ); Thu, 15 Jun 2023 16:33:56 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C8E12711 for ; Thu, 15 Jun 2023 13:33:56 -0700 (PDT) Message-ID: <20230615193330.378358382@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686861234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=1+WMbgfctMXWtOKcGKW/wJHvdbPeyuqNojFzRQeoCU8=; b=nUb0Dcd9Wxw6PxWAFilnXXJDm3n0Hf3nSKfqXxWsDlM7mbktaUcmJctrcP9SYfyabnw2hC 5qyHXKmjYRXGw+qgkO1C4Jde5AlWm4C+rOpMSBFJXGXKZL3zU2Jmp+TbGHUoRIBY92hvdY C9fJFhu+lqjrx3t0EQzpEbBZXwcbMEGQxTgFKXB2WwO/C4a9OzrjqH1l2lBzElxvquE1r+ WIg38DEhP61uumeEFZsfRX4iKLRh9ITsbMPB2iCwWEVMAMSrBrftJWdcinwGmes0wKsBF4 xD9Iw4pDCKXMhaVLpeWAQ3nC8BGmRXj4b5EGW+5NWXq+JdMWKyNXNIUxLO1SgA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686861234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=1+WMbgfctMXWtOKcGKW/wJHvdbPeyuqNojFzRQeoCU8=; b=vfWJWIssuqpvGT6HKL9HUhoEwkD5Lk4wGLv8q2r4naRUuPPfJ2L5kKHHKCsTr4Sc8Fo3p2 W1YK1YIMjsjup5Ag== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Mario Limonciello , Tom Lendacky , Tony Battersby , Ashok Raj , Tony Luck , Arjan van de Veen , Eric Biederman Subject: [patch v3 3/7] x86/smp: Remove pointless wmb()s from native_stop_other_cpus() References: <20230615190036.898273129@linutronix.de> MIME-Version: 1.0 Date: Thu, 15 Jun 2023 22:33:54 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Borislav Petkov (AMD) --- V3: Remove second instance and reword changelog - PeterZ --- arch/x86/kernel/smp.c | 6 ------ 1 file changed, 6 deletions(-) --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c @@ -184,9 +184,6 @@ static void native_stop_other_cpus(int w cpumask_clear_cpu(cpu, &cpus_stop_mask); =20 if (!cpumask_empty(&cpus_stop_mask)) { - /* sync above data before sending IRQ */ - wmb(); - apic_send_IPI_allbutself(REBOOT_VECTOR); =20 /* @@ -210,9 +207,6 @@ static void native_stop_other_cpus(int w if (!smp_no_nmi_ipi && !register_stop_handler()) { u32 dm; =20 - /* Sync above data before sending IRQ */ - wmb(); - pr_emerg("Shutting down cpus with NMI\n"); =20 dm =3D apic->dest_mode_logical ? APIC_DEST_LOGICAL : APIC_DEST_PHYSICAL;