xen/arm32: __cmpxchg_mb should be marked always_inline
PATCH 1/1 xen/arm32: __cmpxchg_mb should be marked always_inline
Currently __cmpxchg_mb is only marked inline. The compiler can decide to not inline this function. In this case, the call to __cmpxchg will be inlined but not optimised. This will result linking failure because of __bad_cmpxchg.
Catched by clang 3.5.
--- xen/include/asm-arm/arm32/cmpxchg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
xen/include/asm-arm/arm32/cmpxchg.h +3 -2
@@ -112,8 +112,9 @@ static always_inline unsigned long __cmpxchg(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;
Signature · 1 line
1.7.10.4
Quoted 5 lines · Julien Grall
Currently
__cmpxchg_mbis only marked inline. The compiler can decide to not inline this function. In this case, the call to__cmpxchgwill be inlined but not optimised. This will result linking failure because of__bad_cmpxchg.Catched by clang 3.5.
"caught".
But there is no S-o-b. If you offer one here I'll fix the spelling as I commit.
Quoted 20 lines
--- xen/include/asm-arm/arm32/cmpxchg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)xen/include/asm-arm/arm32/cmpxchg.h +3
-2@@ -112,8 +112,9 @@ static always_inline unsigned long __cmpxchg(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;
Quoted 5 lines · Ian Campbell
Quoted 4 lines · Julien Grall
Currently
__cmpxchg_mbis only marked inline. The compiler can decide to not inline this function. In this case, the call to__cmpxchgwill be inlined but not optimised. This will result linking failure because of__bad_cmpxchg.
Quoted 8 lines
Quoted 1 line
Catched by clang 3.5.
"caught".
Acked-by Ian Campbell <[email protected]>But there is no S-o-b. If you offer one here I'll fix the spelling as I commit.
Oops, sorry.
Regards,
Signature · 1 line
Julien Grall
Ian Campbell
AppliedQuoted 10 lines · Julien Grall
Quoted 9 lines · Ian Campbell
Quoted 5 lines · Julien Grall
Currently
__cmpxchg_mbis only marked inline. The compiler can decide to not inline this function. In this case, the call to__cmpxchgwill be inlined but not optimised. This will result linking failure because of__bad_cmpxchg.Catched by clang 3.5.
"caught".
Quoted 8 lines
Quoted 4 lines
Acked-by Ian Campbell <[email protected]>But there is no S-o-b. If you offer one here I'll fix the spelling as I commit.
Oops, sorry.
Signed-off-by Julien Grall <[email protected]>
Applied.