From nobody Mon Sep 02 08:50:51 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 4Wy2XW67hSz5Mp41; Mon, 02 Sep 2024 08:50:51 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wy2XW43qxz42ST; Mon, 2 Sep 2024 08:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725267051; 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=Hz2dtQHA6NzTAvt5HdBvOxnt2tqmo1RHVMhwL8tCYvc=; b=Mi9podq6+a+94dOXrQ+6wOT4quar0+M5Njt/cbAdcAhs2u8y2HksJ5GcnyhJlui0p4gaJS iiluLF60WOVJfKTFtrVJjm2NGfB9CaCM9HJyuqqd8p1mjvTDPtEKDCjh2mELcMV7bO+HBx RrnpPp+BDvZ6jyqPQNejlv0NrHYU/iW00Mk7VF+vbFFubpxFHKfIRWHA3MvQMbvMvKA8h5 OnN/eh4lkQPZnda/ilW3G0Vf2lhiC+aG1HrDNqRB9xyclKkm/6mXEk/0POQXU1D9TtuMTJ kZnh6yawLZT7Ine3rSBkMyt9iWEyz6qRAhuKm2j5rpKZIM2rsUMYn9OXw0llUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725267051; a=rsa-sha256; cv=none; b=CyW31pyKo8fh3RDOxS6Z1eoqB4/cLnf8SucJiVJNIb68k4v+QMulWCaYFYu9cstXKWcsDb 0lLn+XdT8T6DA6DwKH9AJDgO+GGqYhacSo2ZgkprFepZ1nnF0WwpB6oopwM6We8KMjKiyz C45SFnMKQbb1qwaBId7PZuBAWOYag2oNV3BT2jJiF+zY7RIOdNm1QgurO4vDxkZnlqlyA9 J4hrDUIxTKSUeYsBsylFW6EP8CHEWQUuAwIW+8heiz7dg9Yi9d4ns62rH4Vw6Ee5ksHVOU IHJF3+Ag+UyD7afDbqnvYa9Xs1xGlLUAN8oHnEkjRL/I5ReOlPd+XpROWgxpNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725267051; 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=Hz2dtQHA6NzTAvt5HdBvOxnt2tqmo1RHVMhwL8tCYvc=; b=XsXLyMXWSNs2rDJrjgpaLOY2JmfW/eLF4iwIYYYJCUbNfgKjI6OIFgUGOxvDdGBZlm8wvV X4gPA4BYQLebC14KZzzisJWGYcrgBqqMtVBvIN6oSVrvsVVo07SqYpwF9SfOKBILltiM1k 5oyg6V9gYOoDxmovUfah88ZUsxUXg9lI6r9RGVyPU7VFgNX3G9CAbIjEr/9DZNHsKfUGly 5oVUPiNEnB9HY7z0aTDC+h3Zj4Guge0ACJlQh7yOMq2WTKKuCl3J4EZ7VPIhXsWRV/H7t2 TNIC/JClalvgHmH8crSztpWZyxj3TVIORm78GIV9W+ggY/blQqSIz9TTThshYg== 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 4Wy2XW3Wk5z15P0; Mon, 2 Sep 2024 08:50:51 +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 4828opOp007503; Mon, 2 Sep 2024 08:50:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4828op7D007500; Mon, 2 Sep 2024 08:50:51 GMT (envelope-from git) Date: Mon, 2 Sep 2024 08:50:51 GMT Message-Id: <202409020850.4828op7D007500@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: be17061faf3b - stable/14 - buf_ring: Consistently use atomic_*_32 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: be17061faf3b9811202b335cbf19b2b14aacfa01 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=be17061faf3b9811202b335cbf19b2b14aacfa01 commit be17061faf3b9811202b335cbf19b2b14aacfa01 Author: Andrew Turner AuthorDate: 2024-07-29 10:28:33 +0000 Commit: Andrew Turner CommitDate: 2024-09-02 08:49:38 +0000 buf_ring: Consistently use atomic_*_32 We are operating on uint32_t values, use uint32_t atomic functions. Reviewed by: alc, imp, kib, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D46150 (cherry picked from commit 17a597bc13aa59ee90facaf9b8dada80f32eb52d) --- sys/sys/buf_ring.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/sys/buf_ring.h b/sys/sys/buf_ring.h index 2d61f393712d..47ed04f570c1 100644 --- a/sys/sys/buf_ring.h +++ b/sys/sys/buf_ring.h @@ -94,7 +94,7 @@ buf_ring_enqueue(struct buf_ring *br, void *buf) } continue; } - } while (!atomic_cmpset_acq_int(&br->br_prod_head, prod_head, prod_next)); + } while (!atomic_cmpset_acq_32(&br->br_prod_head, prod_head, prod_next)); #ifdef DEBUG_BUFRING if (br->br_ring[prod_head] != NULL) panic("dangling value in enqueue"); @@ -108,7 +108,7 @@ buf_ring_enqueue(struct buf_ring *br, void *buf) */ while (br->br_prod_tail != prod_head) cpu_spinwait(); - atomic_store_rel_int(&br->br_prod_tail, prod_next); + atomic_store_rel_32(&br->br_prod_tail, prod_next); critical_exit(); return (0); } @@ -132,7 +132,7 @@ buf_ring_dequeue_mc(struct buf_ring *br) critical_exit(); return (NULL); } - } while (!atomic_cmpset_acq_int(&br->br_cons_head, cons_head, cons_next)); + } while (!atomic_cmpset_acq_32(&br->br_cons_head, cons_head, cons_next)); buf = br->br_ring[cons_head]; #ifdef DEBUG_BUFRING @@ -146,7 +146,7 @@ buf_ring_dequeue_mc(struct buf_ring *br) while (br->br_cons_tail != cons_head) cpu_spinwait(); - atomic_store_rel_int(&br->br_cons_tail, cons_next); + atomic_store_rel_32(&br->br_cons_tail, cons_next); critical_exit(); return (buf);