x86, ticketlock: Clean up types and accessors
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 2 Jul 2010 22:26:36 +0000 (23:26 +0100)
committerH. Peter Anvin <hpa@linux.intel.com>
Mon, 29 Aug 2011 20:45:19 +0000 (13:45 -0700)
commit84eb950db13ca40a0572ce9957e14723500943d6
treef2912697d8dbaade7fb1a948a6ba439a501fc03a
parent8b8bc2f7311c3223213dbe346d9cc2e299fdb5eb
x86, ticketlock: Clean up types and accessors

A few cleanups to the way spinlocks are defined and accessed:
 - define __ticket_t which is the size of a spinlock ticket (ie, enough
   bits to hold all the cpus)
 - Define struct arch_spinlock as a union containing plain slock and
   the head and tail tickets
 - Use head and tail to implement some of the spinlock predicates.
 - Make all ticket variables unsigned.
 - Use TICKET_SHIFT to form constants

Most of this will be used in later patches.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Link: http://lkml.kernel.org/r/4E5BCC40.3030501@goop.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/include/asm/spinlock.h
arch/x86/include/asm/spinlock_types.h