From nobody Wed Jun 26 20:54:41 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 4W8Yq636LMz5QCtC; Wed, 26 Jun 2024 20:54:42 +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 4W8Yq573cmz4LXj; Wed, 26 Jun 2024 20:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435282; 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=0kEzr4DXKwdSWgtMVTqvXob9RJKrycNe4ZIdT8fNVSQ=; b=T8zMSHUC1DfCp68nsIkLt8rkEOoGWsjI4uuzdAQ9o7mXJmLKTg5KW2FyiVidTSw5njVwbB QyD1H1UnOalOtsHK9ZetYD3HYtZEX3eD2eEqwUVD1ybYvEbj4Nu9MYPvv0qet2SFRR0Gpk yrapX03DMaZhB/CU0OeUDBAapCb7JqceAwLcImFRxTVTQT9qM87mnJEqvTz0IPKvvUS5we TrseXrAStFiC7iKWIpLUq+R8JPDfGUTE7QGPRApHkT71GZZQ/dGrwe4ip4nfoc+ytavM2b SEz46KtLKVioYutLCyy+D7fDGes8ssIGmRN0CMSY7y3xskkQw1xCnxNfRkDKmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435282; a=rsa-sha256; cv=none; b=b/4QLBZze3CiiLfOpWuKCT3USjf9Uc54/IsfP/LAU3Zusp/ezIY7nJymTKhIEYHxoBn1Go u7ZIvny6n6ly/40Y0dPqdcAsy9KC8uaKcQNi0vYLV2cIKswenywQK0063qmHiHaNFNlgox MxT99hNZp4exwMLEbrTj9Dnh6hqi2gKYHMOACcM11SMpWFBfueWUlKf5fLuduidtjyLGrl JYm4iY55SNJ+1k9YfGwPK9PweecgH4PkX+DPB4PXwwnBF2u1LncJKrFoH6pBpF3cv3PtNO 3WG9AYxQpUzB6zq75F1lW5ifKCtmRMerfsEqRcZ+10WLZk/b6Q+nyPwcmibm6g== 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=1719435282; 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=0kEzr4DXKwdSWgtMVTqvXob9RJKrycNe4ZIdT8fNVSQ=; b=pIohH4qg4KD25uUiM85h07vtiMb+JJi3+SUKBvQhTZA/NXePbJUMluhvFQW9pRWZc4e3/I 4mIZpxjQ+iVrOxvLh+0XrKwAJ3Y7wq0HuE50hHvPLBKmMpVRfSSfbtBPlfZJUcKAsTUcyR HO1XTnv9gB022VJuwBENEJLcxKwNyLLl24zRjVlGFHrB890gKa3ERkGpLHALeLSjfOq4u0 KkOSDw4d7qpIeErF9bW50+ic3ihr/pbP+1H2v692Bh99NWr5XNdoXbp6SqmS/ZYca7YkEj Is3Iu/rYdG1d1U/CuXVe/bdd9DI6+KZJaVu7gcf1DSuQIxAJ9LZ+KJRCon3lrg== 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 4W8Yq56YzGz10ly; Wed, 26 Jun 2024 20:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45QKsfFo092435; Wed, 26 Jun 2024 20:54:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKsftm092432; Wed, 26 Jun 2024 20:54:41 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:41 GMT Message-Id: <202406262054.45QKsftm092432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 597ffdc1d350 - main - LinuxKPI: Add smp_store_release and smp_load_acquire functions 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 597ffdc1d3503110165dd57685c29da64386a7db Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=597ffdc1d3503110165dd57685c29da64386a7db commit 597ffdc1d3503110165dd57685c29da64386a7db Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:44:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:44:37 +0000 LinuxKPI: Add smp_store_release and smp_load_acquire functions Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45611 --- sys/compat/linuxkpi/common/include/asm/barrier.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/barrier.h b/sys/compat/linuxkpi/common/include/asm/barrier.h index d09f9c6d2c97..39c5139cb322 100644 --- a/sys/compat/linuxkpi/common/include/asm/barrier.h +++ b/sys/compat/linuxkpi/common/include/asm/barrier.h @@ -58,4 +58,7 @@ #define smp_mb__before_atomic() barrier() #define smp_mb__after_atomic() barrier() +#define smp_store_release(p, v) do { smp_mb(); WRITE_ONCE(*p, v); } while (0) +#define smp_load_acquire(p) ({ typeof(*p) _v = READ_ONCE(*p); smp_mb(); _v; }) + #endif /* _LINUXKPI_ASM_BARRIER_H_ */