From nobody Tue Nov 19 15:28:46 2024 X-Original-To: dev-commits-src-main@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 4Xt7gg246Wz5f7l3; Tue, 19 Nov 2024 15:28:47 +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 4Xt7gf72FMz4CSP; Tue, 19 Nov 2024 15:28:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030127; 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=BxLiozocYwahAWArXE+wgbJL60QexL5nrILTZ6sARcg=; b=iX13wHU6FeA1pR4sSuvyOX9SP6RkNagT71dS0WMvTKK52l5Kw2jQA/n5vWIHzz6QkQvXuz v50vfnbsbMaU6MUZVcxSo6L+KlFIFPxygBnMR+ar5wwCe0+RaJPiIBIdoychCHA2OZz9jB i3uBsneHgaFH0LJUjAEEXmHnQ3S9Mq6bZ6BKGm0zzIuYpCHOYG9h5G5g5lNSF0WmCSOV/k /+x63Jj4ZY73X78ZiOHqauU+W3z31ykq0Qkr7MrrIPnuXRbvy1gJ3NkH/AAYJeIVcs9i82 iObuWdWjikuMc/4aSnCCkYnzhDLvCQWh+2Foyb9dNEXKI9juYqcsZxHemJpJnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732030127; 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=BxLiozocYwahAWArXE+wgbJL60QexL5nrILTZ6sARcg=; b=YWMXIKvOpQhGzWIFovdfo7RTd0XCvoT12ClzfkaTEhCZhQweycRQvGnvz9XKfiQc7+llzS MLGKFVPZlaMPOqfWLczROyZKnaZ+ienvzPVrrPN9LDdLM+Q7G4zd7qU5syf3YH690zxlsD F4Po7GM3W6FI/Ti2BsBfZL/AIHFFgI6WokUgmeqxIl6vEIcU9pMSQQTBViJeF5sVQtCXDo VYj3jfGq8fVw1dl4B2crRthi9OQYPMwoXGvagNLmNkYefcMKfw5ti+7EB642zuxGnGsfQV UIy81wiH5eOznW94nsGvVFNP3GYeZC1P3yoxCYz9OYzTBxE8By1PJrLseY2Pjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732030127; a=rsa-sha256; cv=none; b=p3D5AImU2J0rXA5+shvvDfYcUL+tgSczyE2KSvxF8SMyyfW1JIDdsCUSEl0UwY5GieMuC5 L7/PF98zuyLv3oRH3o/8Xv3IZLt3HMnpMk7jLhzFPpEOvLQTvG2d8z6OieLGPMoGxQ+qiU 8yrE0yTvOoC+SHFV1YD3WHo7vTbelXfP+2r8phbF8ZsfDOYCH/lbOOLarkij6WiV7xiiJg fPOUUmwFRuh7aqWsI3e3QM8j5DzLVJWc6/iKEfrYjZ6pPGTiExNvUrUmfG5DvGN8avK8Nx v77I5DhCpNkOvrAGBYZvE9xB2VYq0Rtq4RdgVmqNhcmuyomYQ0f8M4QktUsHpQ== 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 4Xt7gf6fp3zFVR; Tue, 19 Nov 2024 15:28:46 +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 4AJFSki5041419; Tue, 19 Nov 2024 15:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJFSkbq041416; Tue, 19 Nov 2024 15:28:46 GMT (envelope-from git) Date: Tue, 19 Nov 2024 15:28:46 GMT Message-Id: <202411191528.4AJFSkbq041416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 590e7a0eb5b9 - main - rangelock: Use atomic_testandset_ptr List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 590e7a0eb5b96225a2b856403b731ed9b063c030 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=590e7a0eb5b96225a2b856403b731ed9b063c030 commit 590e7a0eb5b96225a2b856403b731ed9b063c030 Author: John Baldwin AuthorDate: 2024-11-19 15:25:08 +0000 Commit: John Baldwin CommitDate: 2024-11-19 15:25:08 +0000 rangelock: Use atomic_testandset_ptr Reviewed by: imp, kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47632 --- sys/kern/kern_rangelock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 3437e3da77ba..59112acfb03d 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -364,8 +364,8 @@ rl_e_unmark(const struct rl_q_entry *e) static void rl_e_mark(struct rl_q_entry *e) { -#if defined(INVARIANTS) && defined(__LP64__) - int r = atomic_testandset_long((uintptr_t *)&e->rl_q_next, 0); +#if defined(INVARIANTS) + int r = atomic_testandset_ptr((uintptr_t *)&e->rl_q_next, 0); MPASS(r == 0); #else atomic_set_ptr((uintptr_t *)&e->rl_q_next, 1);