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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CF13C43334 for ; Wed, 20 Jul 2022 21:21:42 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Lp7tX2Y4fz3dq6 for ; Thu, 21 Jul 2022 07:21:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=segher@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lists.ozlabs.org (Postfix) with ESMTP id 4Lp7t552Czz2xn5 for ; Thu, 21 Jul 2022 07:21:15 +1000 (AEST) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 26KLJC5e012950; Wed, 20 Jul 2022 16:19:12 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 26KLJCuN012947; Wed, 20 Jul 2022 16:19:12 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 20 Jul 2022 16:19:11 -0500 From: Segher Boessenkool To: Nicholas Piggin Subject: Re: [PATCH 1/2] powerpc: add BookS wait opcode macro Message-ID: <20220720211911.GI25951@gate.crashing.org> References: <20220711031128.151437-1-npiggin@gmail.com> <20220712162903.GO25951@gate.crashing.org> <1658310023.4smrdizxcf.astroid@bobo.none> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1658310023.4smrdizxcf.astroid@bobo.none> User-Agent: Mutt/1.4.2.3i X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, Jul 20, 2022 at 07:54:54PM +1000, Nicholas Piggin wrote: > Excerpts from Segher Boessenkool's message of July 13, 2022 2:29 am: > > The embedded extensions are no longer part of the PowerPC architecture, > > so wouldn't it be a better way forward to rename the existing one, > > instead? A bit more work now, but less in the future :-) > > And I actually misremembered this too, was off digging and asking > about it, but the change isn't strictly BookE vs BookS, but rather > the wait opcode was changed in ISA v3.0, which is a bit of an > unfortunate landmine. The current wait opcode is *new* in 3.0, but it has the same mnemonic as the old one, more formally. > It seems apparently POWER8 implemented a non-architected instruction > 'waitasec' that uses this opcode, then I suppose it was decided to > continue with that opcode in v3.0 when BookE was dropped, for reasons. The (newer) wait instruction is 0/30 while the old one is 1/30 (secondary opcodes 30 resp. 62), although 0/30 stayed open; maybe there is more history there already? Curious. > In any case, I will rename it. Precedent is divided. We have > PPC_RAW_TLBIEL_v205 for older tlbiel, and PPC_ISA_3_0_INVALIDATE_ERAT > for a new ERAT invalidation instruction. I guess making the older > instruction the exceptional case ends up being better in the long > term. Yeah exactly, it's better if the simpler name is the one that newer code should use: more readable, more writable, and importantly less room for mistakes :-) Thanks, Segher