[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] xen/arm64: __cmpxchg and __cmpxchg_mb should always be inline
commit 77639c903c97a0a5699686d236967f4c490230a5 Author: Julien Grall <julien.grall@xxxxxxx> AuthorDate: Wed Mar 27 18:45:31 2019 +0000 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Mon May 13 11:28:03 2019 +0100 xen/arm64: __cmpxchg and __cmpxchg_mb should always be inline Currently __cmpxchg_mb and __cmpxchg are only marked inline. The compiler is free to decide to not honor the inline. This will result to generate code use __bad_cmpxchg and lead a link failure. This was caught by Clang 8.0. Signed-off-by: Julien Grall <julien.grall@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/include/asm-arm/arm64/cmpxchg.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/include/asm-arm/arm64/cmpxchg.h b/xen/include/asm-arm/arm64/cmpxchg.h index ae42b2f5ff..359271173e 100644 --- a/xen/include/asm-arm/arm64/cmpxchg.h +++ b/xen/include/asm-arm/arm64/cmpxchg.h @@ -63,8 +63,9 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size extern void __bad_cmpxchg(volatile void *ptr, int size); -static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, - unsigned long new, int size) +static always_inline unsigned long __cmpxchg(volatile void *ptr, + unsigned long old, + unsigned long new, int size) { unsigned long oldval = 0, res; @@ -137,8 +138,9 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, return oldval; } -static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, - unsigned long new, int size) +static always_inline unsigned long __cmpxchg_mb(volatile void *ptr, + unsigned long old, + unsigned long new, int size) { unsigned long ret; -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |