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.

Caught by clang 3.5.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Julien Grall authored and Ian Campbell committed 2014-04-08 15:52:44 +01:00
1 parent 7d53525589
commit d2b4c27c07
1 file changed
+3 -2
+3 -2
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.