From owner-dev-commits-src-all@freebsd.org Mon Mar 8 14:03:55 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E356D5732DE; Mon, 8 Mar 2021 14:03:54 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DvKnk113kz4gxr; Mon, 8 Mar 2021 14:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C96672386; Mon, 8 Mar 2021 14:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 128E3rQM067114; Mon, 8 Mar 2021 14:03:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 128E3rm1067113; Mon, 8 Mar 2021 14:03:53 GMT (envelope-from git) Date: Mon, 8 Mar 2021 14:03:53 GMT Message-Id: <202103081403.128E3rm1067113@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: cc24f5bc6f6e - stable/13 - riscv: fix errors in some atomic type aliases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cc24f5bc6f6eb56a959bd23ebb051d3bf6ebf670 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2021 14:03:56 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=cc24f5bc6f6eb56a959bd23ebb051d3bf6ebf670 commit cc24f5bc6f6eb56a959bd23ebb051d3bf6ebf670 Author: Mitchell Horne AuthorDate: 2021-03-04 17:52:45 +0000 Commit: Mitchell Horne CommitDate: 2021-03-08 14:03:01 +0000 riscv: fix errors in some atomic type aliases This appears to be a copy-and-paste error that has simply been overlooked. The tree contains only two calls to any of the affected variants, but recent additions to the test suite started exercising the call to atomic_clear_rel_int() in ng_leave_write(), reliably causing panics. Apparently, the issue was inherited from the arm64 atomic header. That instance was addressed in c90baf6817a0, but the fix did not make its way to RISC-V. Note that the particular test case ng_macfilter_test:main still appears to fail on this platform, but this change reduces the panic to a timeout. PR: 253237 Reported by: Jenkins, arichardson Reviewed by: kp, arichardson (cherry picked from commit 0d3b3beeb253e09b2b6b3805065594aecc7e2c2f) --- sys/riscv/include/atomic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index d08047593861..d743fce6f1ff 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -288,7 +288,7 @@ atomic_store_rel_32(volatile uint32_t *p, uint32_t val) #define atomic_subtract_acq_int atomic_subtract_acq_32 #define atomic_add_rel_int atomic_add_rel_32 -#define atomic_clear_rel_int atomic_add_rel_32 +#define atomic_clear_rel_int atomic_clear_rel_32 #define atomic_cmpset_rel_int atomic_cmpset_rel_32 #define atomic_fcmpset_rel_int atomic_fcmpset_rel_32 #define atomic_set_rel_int atomic_set_rel_32 @@ -490,7 +490,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val) } #define atomic_add_acq_long atomic_add_acq_64 -#define atomic_clear_acq_long atomic_add_acq_64 +#define atomic_clear_acq_long atomic_clear_acq_64 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 #define atomic_fcmpset_acq_long atomic_fcmpset_acq_64 #define atomic_load_acq_long atomic_load_acq_64 @@ -498,7 +498,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val) #define atomic_subtract_acq_long atomic_subtract_acq_64 #define atomic_add_acq_ptr atomic_add_acq_64 -#define atomic_clear_acq_ptr atomic_add_acq_64 +#define atomic_clear_acq_ptr atomic_clear_acq_64 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_64 #define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_64 #define atomic_load_acq_ptr atomic_load_acq_64