From nobody Mon Sep 02 09:12:44 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 4Wy31m642Rz5Mqnc; Mon, 02 Sep 2024 09:12:44 +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 4Wy31m4gBxz4C9V; Mon, 2 Sep 2024 09:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725268364; 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=p842QrH7MSB+dDRDRahjxr2EyYAYdoffVeBZ/mTVuIA=; b=P6pnON/AmcWaWv7PyACFYTPV+9JrU91d3Rw+Mua0wbaFiYBk/wzyFHTMGNb3bD1OFTbLzK wctxJ/QWWxTCjQFqxVLYPn+izfC76jSVnDuoPx4aABYATdCxvbX7Jc2+fTouwBlneinb6L 1s3tIm0E3CgeJk63Q+7cXicq3InttF+3VYwPL7CJCmrjkSSKdn3JD5n/R31K+UCWrXpcW1 1YDe3+1L3qIET5lcPNCDVDCMlMK1GylMjSUIXANfxDgWEASi6XRZSuEiH3WcIPcLN4iRcm Tkk7piqS4FaBwUFzRkrHpS4k5/nR7es3FPbLfQn6JijDp8URr/00eqOW9r8ugw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725268364; a=rsa-sha256; cv=none; b=FQJ9txblGI/ehJcUAQqfMHYK8DzNIs7xLAUDyUat7sg1IvPL6GViGs60AGnv6b1EgZoUJ2 Nbwx2yzENDkLWW7CK1A6uxeFLmwwrQj2xrZoSMAYGKGin84cQOdeIMPorqjtIG/8PSg3Fu Toagah0304V8oG57Z2yI7FzzCTQ/sfGMjJdyhsW5Iq2i2umUjEBcDEu4u0fdvAyPY+RfDz uCG9ytZpa0CPe/tYy5ONOCoboefLVeteHS26x+eADslF/+20NipSDVmHzlijdw8gwtbh4r wqDXDvT/7idlpJ6NmacWYNKV+x/6e4B0wn9IoF8Iz5OtG52i29RIQ9Kx6435GQ== 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=1725268364; 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=p842QrH7MSB+dDRDRahjxr2EyYAYdoffVeBZ/mTVuIA=; b=RnR18wmzHKo/sqFcK27EOkqzZj+Fe8iMB5/V3ALXtFQOxL2XYnX7dT3u1HRgdgjT2NNLL7 hzWpTUpsjbckY4DP4c9ueoG+LUtA7H9AVUuhfxTqRhZ7lXmwiF5LIh5nZ9T2k9cOsDccKz ZxaRDB4pUpdwoGhUoeSPtSnaexa/koAYWQfYTD+0MrxCdxF06bl1WKj3eHRgM6heM6VAYf kfSmKcfuH430Y/vmA0me4KRg1ZsPDNbq4/930w3lVzjjhTBm8/SrpM9nnl8dkRzwVjimdH wRYYp286FLWRYQgNiVJqxQN/harH4tgNnsDzTqaN4HIy8fc8ilSSVqOv6VoV5g== 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 4Wy31m2zdGz16Dl; Mon, 2 Sep 2024 09:12:44 +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 4829CiGP049832; Mon, 2 Sep 2024 09:12:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4829CiiI049829; Mon, 2 Sep 2024 09:12:44 GMT (envelope-from git) Date: Mon, 2 Sep 2024 09:12:44 GMT Message-Id: <202409020912.4829CiiI049829@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: 351c7a18d429 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 351c7a18d429cc179238cf3ae65e98f95ec5b12f Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=351c7a18d429cc179238cf3ae65e98f95ec5b12f commit 351c7a18d429cc179238cf3ae65e98f95ec5b12f Author: Andrew Turner AuthorDate: 2024-07-29 10:28:33 +0000 Commit: Andrew Turner CommitDate: 2024-09-02 09:11:57 +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 77a8e5ec65b8..39c75dd5b09f 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);