diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index c8dc8ba3dc..29149d1537 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -132,7 +132,7 @@ static always_inline u16 observe_head(spinlock_tickets_t *t) void _spin_lock(spinlock_t *lock) { - spinlock_tickets_t tickets = { .tail = 1, }; + spinlock_tickets_t tickets = SPINLOCK_TICKET_INC; LOCK_PROFILE_VAR; check_lock(&lock->debug); diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h index 311685a011..9286543bea 100644 --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -132,6 +132,8 @@ typedef union { }; } spinlock_tickets_t; +#define SPINLOCK_TICKET_INC { .head_tail = 0x10000, } + typedef struct spinlock { spinlock_tickets_t tickets; u16 recurse_cpu:12;