| Message ID | 20260916200215.21774-5-brads@mainlining.org |
|---|---|
| State | New |
| Headers | show
Return-Path:
<linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>
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=MJ5I4A2e;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=mainlining.org header.i=@mainlining.org
header.a=rsa-sha256 header.s=202507r header.b=l73A9EjS;
dkim=fail reason="signature verification failed" header.d=mainlining.org
header.i=@mainlining.org header.a=ed25519-sha256 header.s=202507e
header.b=c/LfVz7t;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) 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 4hlVDH0ysRz1y1Y
for <incoming@patchwork.ozlabs.org>; Thu, 17 Sep 2026 06:02: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:List-Subscribe:List-Help:List-Post:
List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:
Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
List-Owner; bh=89wqpAzAsvfUynjeKvhU/6axLwNRaErtKwsQmJAm0no=; b=MJ5I4A2enErFNp
B2F8g2dAO+FSjbegexAbHvr2M3xNt9+H5weNis+NIHZ+SqiSbomx54SbbFA06DQt+7RXX1Xc/OoqG
kR6zok600m54sVixJl1yd99uCXPEWCrxBsFOvWVl7tASHb3VWA9ee15xr8jY4eZEEu2FWzCc98wIU
gzD2zCLYP1INSzN2p3IaNoDM8eAlm/7ZNPVUPDfMhmI5itYRmJM0Srog5gcCOD+N8JMUAfi41FrI+
oKmiVdSoyvyvDiCdo1jkmwCeteh5ZffSiHjDlDaVugo9p8yMmYsfTx+vydyiOLZxxi4vrsgJjB39Y
5VvHMVfP6kBcIDLm99RQ==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
id 1x6vpu-0000000A4Am-0oG0;
Wed, 16 Sep 2026 20:02:30 +0000
Received: from mail.mainlining.org ([5.75.144.95])
by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
id 1x6vpr-0000000A4A4-2yuH
for linux-snps-arc@lists.infradead.org;
Wed, 16 Sep 2026 20:02:28 +0000
DKIM-Signature: v=1; a=rsa-sha256; s=202507r; d=mainlining.org;
c=relaxed/relaxed;
h=Message-ID:Date:Subject:To:From; t=1789588936; bh=RgSuWwdEtSR5tNlSbUFwtN1
6+B/ED9O57B5SFsv+Sao=; b=l73A9EjSO6yR6WdliduzVn1CIfORqheLdIQdtdeLPAZWyxa11E
0EpQWuNSbKcVrw6PeoDKKdoWN+1GVE9Y3rUy61FOsYrMa6HlNwD5eFBP/TP3STbRo5rOM15u0fY
eidU56394BfiA2yBlM5yUYZEVUwCri+GzP55lMhuMNqYZF23VD1XlvH+ZNUXSp/NAme1jN8dn/d
WQ2vxtBU2pLRQkqx12FsrNhBILKg59O6X61+8Xr1psbu/fpKurkzCb+rJn0m03Gkgwvq+cPHdpZ
sYpRIl7fzRzn6hw/P8r+DoiAg72kDqixBXDxYCFvYlf6IvbNFBDlunD7/F4ulbwfOWA==;
DKIM-Signature: v=1; a=ed25519-sha256; s=202507e; d=mainlining.org;
c=relaxed/relaxed;
h=Message-ID:Date:Subject:To:From; t=1789588936; bh=RgSuWwdEtSR5tNlSbUFwtN1
6+B/ED9O57B5SFsv+Sao=; b=c/LfVz7tNPTCmaPlbh3i+J7cFoigXYI7S5Rs8blqt5qqX61PKQ
yrpQBKSCbiZBXokixP1nlTHs/FbUvzFV2UDQ==;
From: Bradley Morgan <brads@mainlining.org>
To: Andrew Morton <akpm@linux-foundation.org>,
Vineet Gupta <vgupta@kernel.org>,
Guo Ren <guoren@kernel.org>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
Chris Zankel <chris@zankel.net>,
Max Filippov <jcmvbkbc@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
"Paul E . McKenney" <paulmck@kernel.org>,
David Laight <david.laight.linux@gmail.com>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
linux-snps-arc@lists.infradead.org,
linux-csky@vger.kernel.org,
linux-sh@vger.kernel.org,
linux-kernel@vger.kernel.org,
Bradley Morgan <brads@mainlining.org>
Subject: [PATCH v2 4/5] sh: Emulate two-byte cmpxchg
Date: Wed, 16 Sep 2026 20:02:14 +0000
Message-ID: <20260916200215.21774-5-brads@mainlining.org>
X-Mailer: git-send-email 2.47.3
In-Reply-To: <20260916200215.21774-1-brads@mainlining.org>
References: <20260916200215.21774-1-brads@mainlining.org>
MIME-Version: 1.0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20260916_130227_911374_C555DFFF
X-CRM114-Status: GOOD ( 10.35 )
X-Spam-Score: -2.1 (--)
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: SH has no byte or halfword atomic memory operations, so the
__cmpxchg() switch routes case 1 through cmpxchg_emu_u8() and lets case 2
fall through to __cmpxchg_called_with_bad_pointer(), which is decl [...]
Content analysis details: (-2.1 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 SPF_PASS SPF: sender matches SPF record
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's
domain
-0.1 DKIM_VALID Message has at least one valid DKIM or DK
signature
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
-0.0 DMARC_PASS DMARC pass policy
X-BeenThere: linux-snps-arc@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: Linux on Synopsys ARC Processors <linux-snps-arc.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-snps-arc>,
<mailto:linux-snps-arc-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-snps-arc/>
List-Post: <mailto:linux-snps-arc@lists.infradead.org>
List-Help: <mailto:linux-snps-arc-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-snps-arc>,
<mailto:linux-snps-arc-request@lists.infradead.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "linux-snps-arc" <linux-snps-arc-bounces@lists.infradead.org>
Errors-To:
linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org
|
| Series | Add two-byte cmpxchg emulation and wire it into the architectures | expand |
diff --git a/arch/sh/include/asm/cmpxchg.h b/arch/sh/include/asm/cmpxchg.h index 1e5dc5ccf7bf..477d3025a441 100644 --- a/arch/sh/include/asm/cmpxchg.h +++ b/arch/sh/include/asm/cmpxchg.h @@ -59,6 +59,8 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, switch (size) { case 1: return cmpxchg_emu_u8(ptr, old, new); + case 2: + return cmpxchg_emu_u16(ptr, old, new); case 4: return __cmpxchg_u32(ptr, old, new); }