]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86, ticketlock: Clean up types and accessors
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 24 Jun 2011 01:19:13 +0000 (18:19 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 22 Jul 2011 18:13:17 +0000 (11:13 -0700)
commit699f3dd4e4f8fba6ded83a3dc21e3db960323fcc
tree7fb3d2c61a44497d1133c085d1ab3b92cdb173ea
parent02f8c6aee8df3cdc935e9bdd4f2d020306035dbe
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/05552e1c97739f589cb76c20b5a6565ccd506636.1308878118.git.jeremy.fitzhardinge@citrix.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/include/asm/spinlock.h
arch/x86/include/asm/spinlock_types.h