From nobody Sun Dec 01 04:57:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5b6tWgz5gCs1; Sun, 01 Dec 2024 04:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5b49snz49hk; Sun, 1 Dec 2024 04:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uqoEd6dl7W6j8L3pnDnnRnKoAFmyG1vS4bCT3BLaVYE=; b=obu3RxHDVR1IozZOEMNzxZDtG/u9zC/+cmxmk1oCXiZ5icKA81hVB+5aHHtStvta94LO++ 2/uiyxiQg6oiPnma49EfvvmqTrM2Owh2x11PaPLx+NGu13Rhpu4T0FOZ8/yHWCBQQc4mXP in8hYNiB1tvY/jn62b4Wr62LuRUVkc7sr0CfU9C2H6CE/ephfaZlToqOnyMs6tBOILEwZv b5eOY3X5sW1lcpquGTL6sopxz9Cra0blJiuOt2YcVA/V13eWIGYYMv36QhC/ESA+efRmUp QDT/tMGtBQdcEIVeIkzdWlm4KIswcDKfEXuFykUzUFM5MUkE01pBSCvC1Lp8ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uqoEd6dl7W6j8L3pnDnnRnKoAFmyG1vS4bCT3BLaVYE=; b=O+yCeZIkBLpQ8x+Ib+fQlm1xuh0pnhV6d4Zh17pnF3D4V/JufsgJe031PXHNoOiPz1j0cr DiF+ZmjbieYxmzsD/XZBgXuP1b0ce0bwap11TolLA2m3VLRq/Ps6Wuo5U0AL6tJ4Ix8B74 RRturtIRPXFHhDXcQ0/kzZ63Mndu5J5Znm9ShBUk58CMQvt9sO2tj4b27Ep0dDBspwoBPL QsD6/XINwtoSn2umkNxJAXb2Jw++rPADwmmJm5zfXsT1uQA8+U2rcslAKXPK2Hu+cztrXF Yjdbi0RLyI39EcfYxhsIhk+103MI+OOwNTFJUKGSMnr4Tc2R8r2POVITVDCfoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029043; a=rsa-sha256; cv=none; b=GjI5Pa9erkVoUmg8wKDtacMYJVdI9yvv4uk4Y2NavMxx6/dz7IXNFT5O2ARUwtEoYq2g73 ZWJs+kOd2WWgHqRZabidZghT2eGSa6zAB64ULq3JfXtuyv5sW7wxmvF++aZF24anz7bnYf hP+/m4XSxRwlUKmCLeqSmqqth+6w5waJgLJWPKHzGwlv4imzMKuUYxXZ2joTX3oqXjG9zy pOHSwdfoFqn6FCwNcDogvRnkka+Sr0XtJOfI12dvyuN3U4X5KO9W4w08o/OoDlXmCXyz4J 2X7r0NvqEeZOeIGlbSZlKVjGrP+7F0hsKZtnRqlNH8/cydkvhreyCodPZngmSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5b3mNKzdxh; Sun, 1 Dec 2024 04:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vNN7095814; Sun, 1 Dec 2024 04:57:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vN1C095811; Sun, 1 Dec 2024 04:57:23 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:23 GMT Message-Id: <202412010457.4B14vN1C095811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 994b7127f670 - stable/14 - arm: Implement atomic_testandset_acq_long as a simple wrapper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 994b7127f670db8ab0799e5954ea2f40042c1c3a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=994b7127f670db8ab0799e5954ea2f40042c1c3a commit 994b7127f670db8ab0799e5954ea2f40042c1c3a Author: John Baldwin AuthorDate: 2024-11-19 15:22:50 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:07 +0000 arm: Implement atomic_testandset_acq_long as a simple wrapper Use a memory barrier after calling the existing atomic_testandset_long rather than using the fcmpset-based fallback version from . Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47628 (cherry picked from commit 987c5a1944183cf82884fdb96b0432bd810aa8b9) --- sys/arm/include/atomic.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index 2cf97017b04a..dd2ad47e9bed 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -960,6 +960,17 @@ atomic_testandset_long(volatile u_long *p, u_int v) } #define atomic_testandset_long atomic_testandset_long +static __inline int +atomic_testandset_acq_long(volatile u_long *p, u_int v) +{ + int ret; + + ret = atomic_testandset_32((volatile uint32_t *)p, v); + dmb(); + return (ret); +} +#define atomic_testandset_acq_long atomic_testandset_acq_long + static __inline int atomic_testandset_64(volatile uint64_t *p, u_int v) { @@ -1097,7 +1108,6 @@ atomic_thread_fence_seq_cst(void) * For: * - atomic_load_acq_8 * - atomic_load_acq_16 - * - atomic_testandset_acq_long */ #include