]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86/ticketlock: clean up types and accessors
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 2 Jul 2010 22:26:36 +0000 (23:26 +0100)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 26 Aug 2011 20:22:58 +0000 (13:22 -0700)
commitfc4bcb84ef681a956306ed592c69f4f3b1484d4f
treeb5b49ce6ac00536620aa492e4fe41d442dfd74fb
parenta4a2f9a584a9298444acdfcce19f3a7d747f8522
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>
arch/x86/include/asm/spinlock.h
arch/x86/include/asm/spinlock_types.h