Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2989125rdh; Mon, 27 Nov 2023 04:14:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkU5EhXCxgPILXYTEaU7dUfQMm7xMJ4zI58BYJmlBAuKC2fizqdtSLC/dE0vSt/E3JRvua X-Received: by 2002:a05:6e02:e0d:b0:35c:ac42:f9b6 with SMTP id a13-20020a056e020e0d00b0035cac42f9b6mr4525023ilk.31.1701087277798; Mon, 27 Nov 2023 04:14:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701087277; cv=none; d=google.com; s=arc-20160816; b=RpVdHNTuMgZ8cLSpHgN1niDRslnCHz8pmLngC1nJpL2uIeYsQeOjMQCPSdGGw+7UIc 71igVQsbG+PkE2lm517tUOktnLGIx5nDo/FDSbJJ93Plc26BnJ2Cd/dnF8WZBVTzarNc J/6rR0bvm00rpf9Emaa6qygTQzg6E6HeSXpExsuF2opKu/QV7uo1lUU5beF3ftn2ADBw Fb7OIrG+CmUmbH9nzYMpJQHiiXHLRM7auK7y2i26NzccexuFi7TGX3sQhNf+99G7csN3 Qj+Ct122o3bJsaoGa35htJq3Ehv7GOW006fokyKqDtMXTfmX8WPlrpBXfeN71N6RKTdK ByaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=8m1l+3vHjSE8GrQvx2I8SNvqA+HFhorLgghmXa0kM4A=; fh=qpuJkzyXr6/w0gS7OmQRVzmo6K8QNF6gp2TqPsdey+4=; b=XuB9Wf/hX2ZACc892ry48WNvWSqrV0A3DvN/RlQU/pU8bBl0Zwtr213noXZmZ8osUg ZUqHsDJhERrIiLEQZRVDp2+6CknJDwpDEC7TUVXW6Ua/J0uBsTmv5imGct155hl19jiK /lNTqjoOuhjjlKkeiHG7JJnA06AO2ogIG7QoSr4OAnGWjYFt83efhtULxqFpg5qqTuye puvyRfWy5ZT7uKoPegW/F/LCf5QZ1LrRWC2f9PC9bG+6yMEGZYNtZTk7VV48mHSTzxkt oTyea8k7NGtCCBBWvNHBbBfEMwj7v+XJySyuCD3uljLToS79Qa6KWc+5K3xNM6oJTPXH Y2vQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id be5-20020a656e45000000b005c1f51c706bsi10238618pgb.599.2023.11.27.04.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 04:14:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 3D5068068FFE; Mon, 27 Nov 2023 04:14:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233118AbjK0MOP (ORCPT + 99 others); Mon, 27 Nov 2023 07:14:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233072AbjK0MOO (ORCPT ); Mon, 27 Nov 2023 07:14:14 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 64F20F5; Mon, 27 Nov 2023 04:14:20 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A70492F4; Mon, 27 Nov 2023 04:15:07 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.43.171]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A59403F73F; Mon, 27 Nov 2023 04:14:16 -0800 (PST) Date: Mon, 27 Nov 2023 12:14:13 +0000 From: Mark Rutland To: Peter Zijlstra Cc: Jonas Oberhauser , Christoph Muellner , linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Andrew Morton , Shuah Khan , Jonathan Corbet , Anup Patel , Philipp Tomsich , Andrew Jones , Guo Ren , Daniel Henrique Barboza , Conor Dooley , =?us-ascii?Q?Bj=22orn_T=22opel?= , Alan Stern , Andrea Parri , Will Deacon , Daniel Lustig Subject: Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support Message-ID: References: <20231124072142.2786653-1-christoph.muellner@vrull.eu> <20231124101519.GP3818@noisy.programming.kicks-ass.net> <59da3e41-abb3-405a-8f98-c74bdf26935b@huaweicloud.com> <20231124115430.GS3818@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231124115430.GS3818@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 27 Nov 2023 04:14:35 -0800 (PST) On Fri, Nov 24, 2023 at 12:54:30PM +0100, Peter Zijlstra wrote: > On Fri, Nov 24, 2023 at 12:04:09PM +0100, Jonas Oberhauser wrote: > > > I think ARM64 approached this problem by adding the > > > load-acquire/store-release instructions and for TSO based code, > > > translate into those (eg. x86 -> arm64 transpilers). > > > > Although those instructions have a bit more ordering constraints. > > > > I have heard rumors that the apple chips also have a register that can be > > set at runtime. > > Oh, I thought they made do with the load-acquire/store-release thingies. > But to be fair, I haven't been paying *that* much attention to the apple > stuff. > > I did read about how they fudged some of the x86 flags thing. I don't know what others may have built specifically, but architecturally on arm64 we expect people to express ordering requirements through instructions. ARMv8.0 has load-acquire and store-release, ARMv8.3 added RCpc forms of load-acquire as part of FEAT_LRCPC, and ARMv8.4 added a number of instructions as part of FEAT_LRCPC2. For a number of reasons we avoid IMPLEMENTATION DEFINED controls for things like this. Thanks Mark.