From mboxrd@z Thu Jan 1 00:00:00 1970 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 21CE5C77B7A for ; Sat, 3 Jun 2023 20:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230466AbjFCUH6 (ORCPT ); Sat, 3 Jun 2023 16:07:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbjFCUHw (ORCPT ); Sat, 3 Jun 2023 16:07:52 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF540E6E for ; Sat, 3 Jun 2023 13:07:24 -0700 (PDT) Message-ID: <20230603200459.657036052@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685822817; 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=OuVg+D0jb4HgNSp9ye4aSRcei5b/KvEx573nuovh52M=; b=2c8fwqxhQVPxRmc3T8a6DTenMMCD77hCal25+SdWF5dospABEuvQdNa7fPQ200NSevXmyM 2bDOr9OSVJYCqteJH5Z+xRmCIOVx3922ppsxRicluntiRO3yPjnPA0Yl+3oRiY2Hh6ni4F pNJH/J8rkLA8watPvcCHMG2tj2xVutVwgAQ0ietWzQyg3zIv455V6Yg4emvRqH6IbPolyq hkOs04DC1n0f2IrBNjmVvl0BT9wknSawj9wG6YB/6ocgtaZxkpMw02/TqpAGZuH0SAWKhz YJUaMh0n3ZEwmv2cxXw/MSLlmL2nml5smSvYPiRJuKJ9JComN1YswOAv9Oqhyw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685822817; 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=OuVg+D0jb4HgNSp9ye4aSRcei5b/KvEx573nuovh52M=; b=LxAcG02Z6CBSPAUoOkIBhVDAchgubOdBNxyjsaJizVfW84GwfH0L7pCA0KKKeVC9waPHh9 0B2NSgeAuIKCbKCw== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Ashok Raj , Dave Hansen , Tony Luck , Arjan van de Veen , Peter Zijlstra , Eric Biederman Subject: [patch 1/6] x86/smp: Remove pointless wmb() from native_stop_other_cpus() References: <20230603193439.502645149@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Sat, 3 Jun 2023 22:06:56 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The wmb() after the successfull atomic_cmpxchg() is complete voodoo along with the comment stating "sync above data before sending IRQ". There is no "above" data except for the atomic_t stopping_cpu which has just been acquired. The reboot IPI handler does not check any data and unconditionally disables the CPU. Remove this cargo cult barrier. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/smp.c | 3 --- 1 file changed, 3 deletions(-) --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c @@ -171,9 +171,6 @@ static void native_stop_other_cpus(int w if (atomic_cmpxchg(&stopping_cpu, -1, safe_smp_processor_id()) != -1) return; - /* sync above data before sending IRQ */ - wmb(); - apic_send_IPI_allbutself(REBOOT_VECTOR); /*