![Ingo Molnar](/assets/img/avatar_default.png)
Valentin Rothberg reported that we use CONFIG_QUEUED_SPINLOCKS in arch/x86/kernel/paravirt_patch_32.c, while the symbol is called CONFIG_QUEUED_SPINLOCK. (Note the extra 'S') But the typo was natural: the proper English term for such a generic object would be 'queued spinlocks' - so rename this and related symbols accordingly to the plural form. Reported-by: Valentin Rothberg <valentinrothberg@gmail.com> Cc: Douglas Hatch <doug.hatch@hp.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Scott J Norton <scott.norton@hp.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Waiman Long <Waiman.Long@hp.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
44 lines
954 B
C
44 lines
954 B
C
#ifndef _ASM_X86_SPINLOCK_TYPES_H
|
|
#define _ASM_X86_SPINLOCK_TYPES_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
#ifdef CONFIG_PARAVIRT_SPINLOCKS
|
|
#define __TICKET_LOCK_INC 2
|
|
#define TICKET_SLOWPATH_FLAG ((__ticket_t)1)
|
|
#else
|
|
#define __TICKET_LOCK_INC 1
|
|
#define TICKET_SLOWPATH_FLAG ((__ticket_t)0)
|
|
#endif
|
|
|
|
#if (CONFIG_NR_CPUS < (256 / __TICKET_LOCK_INC))
|
|
typedef u8 __ticket_t;
|
|
typedef u16 __ticketpair_t;
|
|
#else
|
|
typedef u16 __ticket_t;
|
|
typedef u32 __ticketpair_t;
|
|
#endif
|
|
|
|
#define TICKET_LOCK_INC ((__ticket_t)__TICKET_LOCK_INC)
|
|
|
|
#define TICKET_SHIFT (sizeof(__ticket_t) * 8)
|
|
|
|
#ifdef CONFIG_QUEUED_SPINLOCKS
|
|
#include <asm-generic/qspinlock_types.h>
|
|
#else
|
|
typedef struct arch_spinlock {
|
|
union {
|
|
__ticketpair_t head_tail;
|
|
struct __raw_tickets {
|
|
__ticket_t head, tail;
|
|
} tickets;
|
|
};
|
|
} arch_spinlock_t;
|
|
|
|
#define __ARCH_SPIN_LOCK_UNLOCKED { { 0 } }
|
|
#endif /* CONFIG_QUEUED_SPINLOCKS */
|
|
|
|
#include <asm-generic/qrwlock_types.h>
|
|
|
|
#endif /* _ASM_X86_SPINLOCK_TYPES_H */
|