git: 72b4bd2df77c - stable/14 - arm: add missing atomic-pointer functions

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Sun, 01 Dec 2024 04:57:26 UTC
The branch stable/14 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=72b4bd2df77c52f184bad81dcaaa4851e917e86b

commit 72b4bd2df77c52f184bad81dcaaa4851e917e86b
Author:     Elliott Mitchell <ehem+freebsd@m5p.com>
AuthorDate: 2024-05-09 23:04:35 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-12-01 02:46:08 +0000

    arm: add missing atomic-pointer functions
    
    The pointer function types were missing for these functions, so add
    them.  Valuable for places where type sizes vary by architecture.
    
    Differential Revision: https://reviews.freebsd.org/D37778
    Reviewed by: imp, andrew
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1126
    
    (cherry picked from commit 98c276811aece750cd93cec53cd6c8f926519da5)
---
 sys/arm/include/atomic.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h
index d632a6db89df..f39de8eaabdf 100644
--- a/sys/arm/include/atomic.h
+++ b/sys/arm/include/atomic.h
@@ -1059,6 +1059,12 @@ atomic_thread_fence_seq_cst(void)
 	dmb();
 }
 
+#define atomic_add_ptr			atomic_add_32
+#define atomic_add_acq_ptr		atomic_add_acq_32
+#define atomic_add_rel_ptr		atomic_add_rel_32
+#define atomic_subtract_ptr		atomic_subtract_32
+#define atomic_subtract_acq_ptr		atomic_subtract_acq_32
+#define atomic_subtract_rel_ptr		atomic_subtract_rel_32
 #define atomic_clear_ptr		atomic_clear_32
 #define atomic_clear_acq_ptr		atomic_clear_acq_32
 #define atomic_clear_rel_ptr		atomic_clear_rel_32
@@ -1066,15 +1072,16 @@ atomic_thread_fence_seq_cst(void)
 #define atomic_set_acq_ptr		atomic_set_acq_32
 #define atomic_set_rel_ptr		atomic_set_rel_32
 #define atomic_fcmpset_ptr		atomic_fcmpset_32
-#define atomic_fcmpset_rel_ptr		atomic_fcmpset_rel_32
 #define atomic_fcmpset_acq_ptr		atomic_fcmpset_acq_32
+#define atomic_fcmpset_rel_ptr		atomic_fcmpset_rel_32
 #define atomic_cmpset_ptr		atomic_cmpset_32
 #define atomic_cmpset_acq_ptr		atomic_cmpset_acq_32
 #define atomic_cmpset_rel_ptr		atomic_cmpset_rel_32
+#define atomic_fetchadd_ptr		atomic_fetchadd_32
+#define atomic_readandclear_ptr		atomic_readandclear_32
 #define atomic_load_acq_ptr		atomic_load_acq_32
 #define atomic_store_rel_ptr		atomic_store_rel_32
 #define atomic_swap_ptr			atomic_swap_32
-#define atomic_readandclear_ptr		atomic_readandclear_32
 
 #define atomic_add_int			atomic_add_32
 #define atomic_add_acq_int		atomic_add_acq_32