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: 13753976 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6244364AB; Mon, 5 Aug 2024 19:20:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722885630; cv=none; b=FqCghGW34JOL3ZFPVcP/oOc4u90Q+3Ttz0swhcMhOEJd451g5+gHyHLuV0h3BscwkjplqOdiAOne8OtaGQIey/Q8Hbu9aQ8fd+GhnCar3Oiuuow06m9FiH9WKYQZIagrOkTi5QP2infhmS13oMv9TDPAC9kiin2Ql2qnXIZZ81A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722885630; c=relaxed/simple; bh=yDMt0EqrqAyLKxe7X4rCEOBXWgRTFVTEgyEZvPiduZo=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=mRyrQPIUaQ/6rR2N20Z3Abui+F/23WzcwMak0HyMCZ0CQdYyz32w5HJL57M1qqmxaq62OUbL0dgmA1Aa4GMena7ML/MW1VU/NpiISQVd/FRvuZluv5/ejkOAOdhwTsqcqsN4IXdmE8OyFWRJ3q9UOP3oqTSIeRA2FwokSSuTSu0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aCHw9O+3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aCHw9O+3" 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: Reply-To: paulmck@kernel.org Precedence: bulk X-Mailing-List: linux-sh@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline 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(-)