arm: Fix atomic long APIs to correct 'u_long' signedness

As defined in atomic(9) and implemented on other architectures, the
atomic(9) functions all act on unsigned pointers and types.  Prior to this
revision, arm implemented some atomic(9) 'long' sized routines with correct
unsigned type, but others were incorrectly signed.

Reviewed by:	tinderbox
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2020-03-23 23:00:13 +00:00
parent 47172feb8d
commit 2596eb8847
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359264

View File

@ -325,31 +325,31 @@ atomic_fcmpset_rel_32(volatile uint32_t *_ptr, uint32_t *_old, uint32_t _new)
}
static __inline int
atomic_fcmpset_long(volatile long *_ptr, long *_old, long _new)
atomic_fcmpset_long(volatile u_long *_ptr, u_long *_old, u_long _new)
{
int ret;
ATOMIC_FCMPSET_CODE(ret, long, "");
ATOMIC_FCMPSET_CODE(ret, u_long, "");
return (ret);
}
static __inline int
atomic_fcmpset_acq_long(volatile long *_ptr, long *_old, long _new)
atomic_fcmpset_acq_long(volatile u_long *_ptr, u_long *_old, u_long _new)
{
int ret;
ATOMIC_FCMPSET_CODE(ret, long, "");
ATOMIC_FCMPSET_CODE(ret, u_long, "");
dmb();
return (ret);
}
static __inline int
atomic_fcmpset_rel_long(volatile long *_ptr, long *_old, long _new)
atomic_fcmpset_rel_long(volatile u_long *_ptr, u_long *_old, u_long _new)
{
int ret;
dmb();
ATOMIC_FCMPSET_CODE(ret, long, "");
ATOMIC_FCMPSET_CODE(ret, u_long, "");
return (ret);
}
@ -509,7 +509,7 @@ atomic_cmpset_rel_32(volatile uint32_t *_ptr, uint32_t _old, uint32_t _new)
}
static __inline int
atomic_cmpset_long(volatile long *_ptr, long _old, long _new)
atomic_cmpset_long(volatile u_long *_ptr, u_long _old, u_long _new)
{
int ret;
@ -518,7 +518,7 @@ atomic_cmpset_long(volatile long *_ptr, long _old, long _new)
}
static __inline int
atomic_cmpset_acq_long(volatile long *_ptr, long _old, long _new)
atomic_cmpset_acq_long(volatile u_long *_ptr, u_long _old, u_long _new)
{
int ret;
@ -528,7 +528,7 @@ atomic_cmpset_acq_long(volatile long *_ptr, long _old, long _new)
}
static __inline int
atomic_cmpset_rel_long(volatile long *_ptr, long _old, long _new)
atomic_cmpset_rel_long(volatile u_long *_ptr, u_long _old, u_long _new)
{
int ret;