From patchwork Tue Jun 20 13:00:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 110464 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3656754vqr; Tue, 20 Jun 2023 06:16:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7z8e4nQh4egDxg2MglWdlHzn/jW8fkxcFTIPTfl8FHK0oPQhagcd1sd+/+ePr42G8w5Aqd X-Received: by 2002:a05:6a00:ac3:b0:66a:2ff1:dee2 with SMTP id c3-20020a056a000ac300b0066a2ff1dee2mr289327pfl.10.1687266965185; Tue, 20 Jun 2023 06:16:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687266965; cv=none; d=google.com; s=arc-20160816; b=MbQ5Z4oeRY5fMXBAT5GRPLS9OLbfW2+t85jpFlJ8ih8DcucoEFOmr8aepfNa0qHEmu teWHH08OmgvWItGu0s6cSK+V37v/Jq5zHM/K4fh3iZcdhg20Sl7rqR3pAJBMtAsNT1Jg oRMvL+XBc/WQ75ijBoe3jWmExtdbHFh3fXHQdLuFZDl+URDxTeF8QFIP8pSVrFU+bZMn ZZx6e5fNfDettfhHUTUmz5KlTvq5iIeVDC7O7UnTY6inMuRAHuIr8OWR+95pLBFDOaYI zzZuUpfhPtYlkCsRpk1J9HdrWoaUc6khlJR+O9kXVJHAkUCGoHE5YnpdPGo0v4dBH4En R6Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=FqBcLkeqh5aYZLHq2KtPr0BsS5m73Epy5K0pPEmT8hY=; b=a+bt2DWv/4OUVh+eF+ofDrIXwzfP4CeT3WlSUdNZn0Mfbdy5jupUZiJkzs2GN15QxB Z3Oksw0nwtuR57vVflznQHVXUtr6SLtP0bZvXcYsIuEnGMvmVmzd/hgrKstLQfElHIci K9uzAG0/0Hws7JxryLEVK9JvvD590xlaADV59zSgRQ+rAQLJAX/43oZ4lD3rdX4fON9D NFv1uLrifPWXlVJId3XtpCUBi16OTGjeO7K2M+vsWcOsU2P1YiFR6qbJELQDibDV36dE lwIGLu0/2JsLW+ug89GWDIDRhkUi7PgExSyU/LjeyE9h+e3RCmpli7wkPtrZEjapOa+9 tI5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YxdR8RPn; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k84-20020a628457000000b0066868af25ffsi1764675pfd.21.2023.06.20.06.15.47; Tue, 20 Jun 2023 06:16:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YxdR8RPn; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232841AbjFTNBn (ORCPT + 99 others); Tue, 20 Jun 2023 09:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232662AbjFTNBR (ORCPT ); Tue, 20 Jun 2023 09:01:17 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB03119AB; Tue, 20 Jun 2023 06:00:53 -0700 (PDT) Date: Tue, 20 Jun 2023 13:00:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687266052; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FqBcLkeqh5aYZLHq2KtPr0BsS5m73Epy5K0pPEmT8hY=; b=YxdR8RPnZuF2m0qhyttRSqTE0GAnxOzZMGGaR+mZGxt+pznxLT8620EZuTHDN4XdELdGFM wWHpkZuswoq22IU5M4TXUS+Bc7tLdTxvqLfoQqPnIkCihTldbhKkdAV699HKTB7+c15V9D WjxApCK0zbfBS4XDw6GlNM3xeLVVOJ42i5e4GuMDaWqRJf6XMbOL2iTO0BuS0gVWTRIs0H f7LxyEm2dJc/9sevhAzNWwR7OWo9V/ck//uP4c+bHzWxJKKr9lcXeZUEjvL2FXhDFu6NIm wbUQCQQJyxkAgVs/CYny8/VgNzAvIwPPtm2oGopeYrMUEELi86gKjBKyy2lyYw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687266052; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FqBcLkeqh5aYZLHq2KtPr0BsS5m73Epy5K0pPEmT8hY=; b=UGUxET9Ks98DFFpDaso9wT9wK9vHuEaJMlVWCgZMtbcI8VQ4RqD5vHTMJzNbAJWRVpYJnY C0c2iap+OtZC8aDg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86/smp: Remove pointless wmb()s from native_stop_other_cpus() Cc: Thomas Gleixner , "Borislav Petkov (AMD)" , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230615193330.378358382@linutronix.de> References: <20230615193330.378358382@linutronix.de> MIME-Version: 1.0 Message-ID: <168726605177.404.10010804348087139293.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768803649682243656?= X-GMAIL-MSGID: =?utf-8?q?1769227645373368194?= The following commit has been merged into the x86/core branch of tip: Commit-ID: 2affa6d6db28855e6340b060b809c23477aa546e Gitweb: https://git.kernel.org/tip/2affa6d6db28855e6340b060b809c23477aa546e Author: Thomas Gleixner AuthorDate: Thu, 15 Jun 2023 22:33:54 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 20 Jun 2023 14:51:46 +02:00 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 Reviewed-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230615193330.378358382@linutronix.de --- arch/x86/kernel/smp.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 935bc65..d842875 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c @@ -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); /* @@ -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)