ia64/xen-unstable

diff xen/include/xen/spinlock.h @ 18668:54d74fc0037c

spinlock: Modify recursive spinlock definitions to support up to 4095 CPUs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Oct 20 17:16:45 2008 +0100 (2008-10-20)
parents c003e5a23a4e
children 876618c33914
line diff
     1.1 --- a/xen/include/xen/spinlock.h	Mon Oct 20 16:49:25 2008 +0100
     1.2 +++ b/xen/include/xen/spinlock.h	Mon Oct 20 17:16:45 2008 +0100
     1.3 @@ -7,11 +7,11 @@
     1.4  
     1.5  typedef struct {
     1.6      raw_spinlock_t raw;
     1.7 -    s8 recurse_cpu;
     1.8 -    u8 recurse_cnt;
     1.9 +    u16 recurse_cpu:12;
    1.10 +    u16 recurse_cnt:4;
    1.11  } spinlock_t;
    1.12  
    1.13 -#define SPIN_LOCK_UNLOCKED { _RAW_SPIN_LOCK_UNLOCKED, -1, 0 }
    1.14 +#define SPIN_LOCK_UNLOCKED { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0 }
    1.15  #define DEFINE_SPINLOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED
    1.16  #define spin_lock_init(l) (*(l) = (spinlock_t)SPIN_LOCK_UNLOCKED)
    1.17