From nobody Thu Aug 01 22:27:49 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 4WZk9x4yHPz5RZY5; Thu, 01 Aug 2024 22:27:49 +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 4WZk9x2Nf0z4ZQq; Thu, 1 Aug 2024 22:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551269; 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=tWEf98xe0AtT7wGu5bUgk6P39p2EMQMaYlP6QRh8oKI=; b=dD10rauL5BsC+/7ee7CwMfgyvP2KsI+zymqc9pZTeZ2Hm4Q/L95vcCz5iYsJmZOtkWtU2c 1cPbtImPzfQEVYQ8FVjJbmsljt4FeEta0tIl12c1GtBRNtHmPjhjDiYMWPCBUoJK+NyzHL K4vHuaY0WbWT/7DxLFL6cq0nKhWqZ2M9pqFLYPoA7aXx20ZoMghEFkF2cNu/zZBxPuFCO8 2ufSsotg61PnFSp3fsW7lWx90Z6c+W6X6HrZ/krBQVSNvVKRnYtCkXs7OKl56oT1jK2iBM nUio5VUKJyiZ3ySHjznyxEQR7ISweq95WsKL30nNVFIDBYsZSWjyA+6qOfc8eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551269; a=rsa-sha256; cv=none; b=Vuk3RSKHd9rJWNNYSm0MUa1YgEVyEX2WF1lF9FNIo3g9VSUCHRmx5xgi2mUWw1AOxKyPL+ r41LeQEr+VtDpD0m+mY5JQ3AlzkIwlR4pe6OkfCAZARx6hPd/BgOYsAtyghxEtz6QJQ+iA eOdDc8As1Lmb7ixGdvyDvJ4Z+ZqodWPQG4BXabj0rvaGK55eiPSBIHc9QvF/Jt2Yqykh4u mVybJUyTbnM90CnNg64o8gnRQnfzloz76PhdJ8a2tGxJpKRvWbkUnnlKxQXUCxLaA27Ofl vGDd3jvAkvfPG4Al5kujOK3xL4Jx3GaH0Tux0VQIv6xcLBaids6MH8M/zYYyOg== 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=1722551269; 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=tWEf98xe0AtT7wGu5bUgk6P39p2EMQMaYlP6QRh8oKI=; b=rRuY+EQfW0SeyCgVQnyZznmULfZplMttyh68WU9Cu4WRyDX9qnhuqcN+TradwDJj/wZ/vx /VIiBh2RMoRvh+a9+K2/I+AN9VvsUqvyF6481xtlwH1UiJdyYJW6m74ZE8SyhXH9ntzET3 s334pLXI0vA2sP7aBMoAA7TeMbuaGWXX6W08LfYfL+dKZsSIG/TwDLOydchrKsBXoKXxSZ zk9/PyIxQC7usfaA5lT/qUmlCqxs0y5woHAmCH+UDggx3RA6zUXRZkNg5rmKdLSpx9PEiw aFG+8Dzk73nR0o9FvWIogmp9COhHZOMZ3XxAN05aUeTpmj4SYfM38f3gyw+vVQ== 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 4WZk9x20d8z12nr; Thu, 1 Aug 2024 22:27:49 +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 471MRnqs028036; Thu, 1 Aug 2024 22:27:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRnI4028033; Thu, 1 Aug 2024 22:27:49 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:49 GMT Message-Id: <202408012227.471MRnI4028033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 28b5a9b45888 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 28b5a9b458886028e64147996ff0745af23388e8 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=28b5a9b458886028e64147996ff0745af23388e8 commit 28b5a9b458886028e64147996ff0745af23388e8 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:44:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:41 +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 (cherry picked from commit 597ffdc1d3503110165dd57685c29da64386a7db) --- 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_ */