summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2020-02-22 02:47:53 +0300
committerAnup Patel <anup@brainfault.org>2020-02-22 07:34:38 +0300
commitc3b3b8f43b49e4fa8fde5e916cd8d573687e3626 (patch)
tree76ae162de471576dc6094aa137d3f274c771fdc9
parent3e7d666d7ca5eca5b4ba9c0c624a1747bbfd7bf7 (diff)
downloadopensbi-c3b3b8f43b49e4fa8fde5e916cd8d573687e3626.tar.xz
lib: Fix typo in atomic exchange functions
There is a typo in atomic operations code which prevents the usage of riscv atomic instructions even if it is supported. Fix the typo. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
-rw-r--r--lib/sbi/riscv_atomic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/riscv_atomic.c b/lib/sbi/riscv_atomic.c
index 4331864..8b85801 100644
--- a/lib/sbi/riscv_atomic.c
+++ b/lib/sbi/riscv_atomic.c
@@ -79,7 +79,7 @@ long atomic_sub_return(atomic_t *atom, long value)
#define axchg(ptr, x) \
({ \
__typeof__(*(ptr)) _x_ = (x); \
- (__typeof__(*(ptr))) __xchg((ptr), _x_, sizeof(*(ptr))); \
+ (__typeof__(*(ptr))) __axchg((ptr), _x_, sizeof(*(ptr))); \
})