From: Tim Deegan Date: Mon, 7 Mar 2011 11:21:11 +0000 (+0000) Subject: x86: make spinlock's 16-bit asm operand explicitly 16-bit. X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=26315747810e1a520daeb5fc0042ab083dead693;p=xen.git x86: make spinlock's 16-bit asm operand explicitly 16-bit. This is needed to compile xen with clang. Signed-off-by: Tim Deegan Acked-by: Keir Fraser --- diff --git a/xen/include/asm-x86/spinlock.h b/xen/include/asm-x86/spinlock.h index 35ed9759e7..b7cd945584 100644 --- a/xen/include/asm-x86/spinlock.h +++ b/xen/include/asm-x86/spinlock.h @@ -27,7 +27,7 @@ static always_inline int _raw_spin_trylock(raw_spinlock_t *lock) asm volatile ( "xchgw %w0,%1" :"=r" (oldval), "=m" (lock->lock) - :"0" (0) : "memory" ); + :"0" ((s16)0) : "memory" ); return (oldval > 0); }