# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1194430183 -32400 # Node ID ae8b895f0c553d1b2a6aa81fd2d249a2b427704c # Parent 1abbc4b58494d79905ece072cf1ca66d1e616817 fix spinlock initializer. PATCHNAME: fix_spinlock_initializer Signed-off-by: Isaku Yamahata diff -r 1abbc4b58494 -r ae8b895f0c55 xen/include/asm-ia64/linux-xen/asm/spinlock.h --- a/xen/include/asm-ia64/linux-xen/asm/spinlock.h Wed Nov 07 18:16:08 2007 +0900 +++ b/xen/include/asm-ia64/linux-xen/asm/spinlock.h Wed Nov 07 19:09:43 2007 +0900 @@ -33,8 +33,20 @@ typedef struct { #endif } spinlock_t; +#ifdef XEN +#ifdef DEBUG_SPINLOCK +#define SPIN_LOCK_UNLOCKED /*(spinlock_t)*/ { 0, NULL, -1, 0 } +#else +#define SPIN_LOCK_UNLOCKED /*(spinlock_t)*/ { 0, -1, 0 } +#endif +static inline void spin_lock_init(spinlock_t *lock) +{ + *lock = ((spinlock_t)SPIN_LOCK_UNLOCKED); +} +#else #define SPIN_LOCK_UNLOCKED /*(spinlock_t)*/ { 0 } #define spin_lock_init(x) ((x)->lock = 0) +#endif #ifdef ASM_SUPPORTED /*