|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.12] Arm/atomic: correct asm() constraints in build_add_sized()
commit 36f04634ce8553edf1496ff4b0bfc41416e55d94
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Mar 12 14:42:17 2019 +0100
Commit: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Fri Apr 19 11:58:46 2019 -0700
Arm/atomic: correct asm() constraints in build_add_sized()
The memory operand is an in/out one, and the auxiliary register gets
written to early.
Take the opportunity and also drop the redundant cast (the inline
functions' parameters are already of the casted-to type).
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Julien Grall <julien.grall@xxxxxxx>
(cherry picked from commit 51ceb1623b9956440f1b9943c67010a90d61f5c5)
---
xen/include/asm-arm/atomic.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
index 50f2835e35..afb3eeea5b 100644
--- a/xen/include/asm-arm/atomic.h
+++ b/xen/include/asm-arm/atomic.h
@@ -30,7 +30,7 @@ static inline void name(volatile type *addr, type val)
\
asm volatile("ldr" size " %"width"1,%0\n" \
"add %"width"1,%"width"1,%"width"2\n" \
"str" size " %"width"1,%0" \
- : "=m" (*(volatile type *)addr), "=r" (t) \
+ : "+m" (*addr), "=&r" (t) \
: reg (val)); \
}
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |