From patchwork Mon Aug 5 19:20:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 1969158 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=lU9fwioU; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=aCHw9O+3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wd5r73X08z1ybS for ; Tue, 6 Aug 2024 05:20:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=MYdvFqQM6hAikHQhdKwFCMObDSKJkEflYGKzSUQu9B0=; b=lU9 fwioUioHr0RqX2nYN4o+HC4weCkWjjV1JLU6MOD5/mvWh7wxBd39l4tZNDRd+cdwNz4wrfyoczfeV F922vfMAcv/WRJNHgE4Y2lVbsRYQeBg4p5+6F2TPrnd1Jm1fmQVkeSRtTisu8F02CvX4tsJzzlETS SZ6XtF0FeRPa0AefhJb1dW674msUnr1jHDZG0sMZhP3ozdQ0ge6kbM3BYMwn7A2c13ETwEEp/+k7l 9LwSKyQeRmABEMbr9EhyzvcvgnYIHZVZdSuBd2HEneYMzZ1U+lrEdY76BK2AxcDiaJ96naS1kLTFT CD6ke9hFyYT8lXIzguTG6QzLvoEo9EQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3Fz-0000000GzGW-0ytV; Mon, 05 Aug 2024 19:20:35 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3Fw-0000000GzFp-2QMD for linux-snps-arc@lists.infradead.org; Mon, 05 Aug 2024 19:20:34 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E8013CE0B6D; Mon, 5 Aug 2024 19:20:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DA8AC4AF0B; Mon, 5 Aug 2024 19:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722885630; bh=yDMt0EqrqAyLKxe7X4rCEOBXWgRTFVTEgyEZvPiduZo=; h=Date:From:To:Cc:Subject:Reply-To:From; b=aCHw9O+3I7TwTqw2bgfYVX6WUAu1hjbYIeBT6Tvsk5RZkdWLdrx1y79mOL30w9ic+ T3B2USrL8Lb6wosurq1IxTway3u1g6PZo6ctQ+rfZ/41S/ad2pfmEZ0CrBrhSrby6F Yw23/AFYdNfctK6rax3X9KEaoWk8DzIzIeG+ospSOHPd0wlfaQUkVs9ECdl18vZYcZ pOON4GD3hv3t3ETaOq+GIaJPOJQ5v3VWHEWl5TaTQjP2p7LKrDB+XYk6sm8eZjgaj6 IwEjGGRDVcgxCwlHZXSY3p27ALgGEhws0COdLj9PqOjJZkfcqrfoRf3n/a/xSZcmPW LRA2d52n+Y2IQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id BFCC1CE0A6F; Mon, 5 Aug 2024 12:20:29 -0700 (PDT) Date: Mon, 5 Aug 2024 12:20:29 -0700 From: "Paul E. McKenney" To: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Cc: elver@google.com, akpm@linux-foundation.org, tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, arnd@arndb.de, geert@linux-m68k.org, palmer@rivosinc.com, mhiramat@kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org Subject: [PATCH cmpxchg 0/3] Provide emulation for one-byte cmpxchg() Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_122032_807584_3DCE76AF X-CRM114-Status: UNSURE ( 8.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.5 (----) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello! This series provides an emulation function for one-byte cmpxchg(), and uses it for the remaining architectures not supporting these in hardware and not providing emulation. The emulation is in terms o [...] Content analysis details: (-4.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [145.40.73.55 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [145.40.73.55 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [145.40.73.55 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [145.40.73.55 listed in bl.score.senderscore.com] -0.1 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: paulmck@kernel.org Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hello! This series provides an emulation function for one-byte cmpxchg(), and uses it for the remaining architectures not supporting these in hardware and not providing emulation. The emulation is in terms of the fully ordered four-byte cmpxchg() that is supplied by all of these architectures. The emulation has been used in mainline since v6.9 by csky. Once this emulation is in place for all architectures needing it, RCU Tasks will use this capability in place of the current rcu_trc_cmpxchg_need_qs() open-coding of this emulation. 1. xtensa: Emulate one-byte cmpxchg. 2. ARC: Emulate one-byte cmpxchg. 3. sh: Emulate one-byte cmpxchg. Thanx, Paul ------------------------------------------------------------------------ arc/Kconfig | 1 + arc/include/asm/cmpxchg.h | 33 ++++++++++++++++++++++++--------- sh/Kconfig | 1 + sh/include/asm/cmpxchg.h | 3 +++ xtensa/Kconfig | 1 + xtensa/include/asm/cmpxchg.h | 2 ++ 6 files changed, 32 insertions(+), 9 deletions(-)