Date: Thu, 1 Aug 2024 22:27:49 GMT From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 28b5a9b45888 - stable/14 - LinuxKPI: Add smp_store_release and smp_load_acquire functions Message-ID: <202408012227.471MRnI4028033@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=28b5a9b458886028e64147996ff0745af23388e8 commit 28b5a9b458886028e64147996ff0745af23388e8 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2024-06-26 20:44:37 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> 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_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408012227.471MRnI4028033>