Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1563413ybh; Thu, 16 Jul 2020 16:11:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCQV//EGOkD6ujT+9kBeJnTo6NxtNUitdKGwewcqpIcNXdR+03ChO78d3YY8Ps/xfpY/L1 X-Received: by 2002:a17:906:7c54:: with SMTP id g20mr6132479ejp.460.1594941067891; Thu, 16 Jul 2020 16:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594941067; cv=none; d=google.com; s=arc-20160816; b=sxYjcnsAIM8aL5k+BhGTvWpVhDuOWm2rBa92nZyCBd3eUoJpV5vjoiYYCimum2UoXI H2QF8M6gDY16MS/ZiaiPJ4j/VigVbjxMvEfoadOb4rf8i612cjlS5rGpCKqGc33YFFva 0Geb0VUUSFqs9XnqyH75ZNIlWU4HEQEtStIYoyhSX3PaslcUKztHGjJ8Fw/yJBUk93v2 oDybEFAlacGYAitBtemKNnCPKIPRJvLmzD7JcJUBQCtP9HAgNPBA2bxJOCiEd7r90Mx8 ggthSZS69ezZ0kEHL8rCAlBkL3xLR/ZbGTVpykDg/8dyR+ZTZJLTQlR/fKCBpFPyYdbn kU1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=h8Gj2PNAb4XsW4UOe4D2wxlSeG6imzZpo8O0nYaZPMk=; b=r5M1jQaACfmhl20KkewIqFp3w+saZu8JCd2ZklDGXCA9i/Js2jOzfp1e24cw6RTipP nwdzewKe5w/+v18h9HRTh4QO4RI7yuXeP4GVCLaF3OyBpibq845hjICajA6eeUiihswP MrHSaoxhAYh10DCc34yZUB48b/PQjrCpcDj7hoV45duQd4nIFc3h7oqqP6T8akZdH3Zw DlbhMRC1QY5swrQSJy2SEYS3Enq23HH2dI8dd/zu4S5f/12JFP4dxdELup1r2w6raNWl S2bkTM27DD6Krwnya0qSoKFmigTa93qPVyL3TAyQpf7S9+Nlv7CwPAsR8iMMVMySrVDQ 774w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si4015123edo.512.2020.07.16.16.10.45; Thu, 16 Jul 2020 16:11:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728107AbgGPXJn (ORCPT + 99 others); Thu, 16 Jul 2020 19:09:43 -0400 Received: from kernel.crashing.org ([76.164.61.194]:38540 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbgGPXJf (ORCPT ); Thu, 16 Jul 2020 19:09:35 -0400 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 06GMcUf3029747 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 16 Jul 2020 17:38:33 -0500 Message-ID: Subject: Re: [PATCH] powerpc/64: Fix an out of date comment about MMIO ordering From: Benjamin Herrenschmidt To: Palmer Dabbelt , Will Deacon Cc: mpe@ellerman.id.au, paulus@samba.org, npiggin@gmail.com, msuchanek@suse.de, tglx@linutronix.de, bigeasy@linutronix.de, jniethe5@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kernel-team@android.com, Palmer Dabbelt Date: Fri, 17 Jul 2020 08:38:29 +1000 In-Reply-To: <20200716193820.1141936-1-palmer@dabbelt.com> References: <20200716193820.1141936-1-palmer@dabbelt.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-07-16 at 12:38 -0700, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > This primitive has been renamed, but because it was spelled incorrectly in the > first place it must have escaped the fixup patch. As far as I can tell this > logic is still correct: smp_mb__after_spinlock() uses the default smp_mb() > implementation, which is "sync" rather than "hwsync" but those are the same > (though I'm not that familiar with PowerPC). Typo ? That must be me ... :) Looks fine. Yes, sync and hwsync are the same (by opposition to lwsync which is lighter weight and doesn't order cache inhibited). Cheers, Ben. > Signed-off-by: Palmer Dabbelt > --- > arch/powerpc/kernel/entry_64.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S > index b3c9f15089b6..7b38b4daca93 100644 > --- a/arch/powerpc/kernel/entry_64.S > +++ b/arch/powerpc/kernel/entry_64.S > @@ -357,7 +357,7 @@ _GLOBAL(_switch) > * kernel/sched/core.c). > * > * Uncacheable stores in the case of involuntary preemption must > - * be taken care of. The smp_mb__before_spin_lock() in __schedule() > + * be taken care of. The smp_mb__after_spinlock() in __schedule() > * is implemented as hwsync on powerpc, which orders MMIO too. So > * long as there is an hwsync in the context switch path, it will > * be executed on the source CPU after the task has performed