aboutsummaryrefslogtreecommitdiff
path: root/sound/arm
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-07-03 01:06:04 +0100
committerH. Peter Anvin <hpa@linux.intel.com>2011-08-29 13:45:43 -0700
commitc576a3ea905c25d50339503e0e5c7fef724e0147 (patch)
treecce69d03234f842428f42518aca329a38862207c /sound/arm
parent84eb950db13ca40a0572ce9957e14723500943d6 (diff)
x86, ticketlock: Convert spin loop to C
The inner loop of __ticket_spin_lock isn't doing anything very special, so reimplement it in C. For the 8 bit ticket lock variant, we use a register union to get direct access to the lower and upper bytes in the tickets, but unfortunately gcc won't generate a direct comparison between the two halves of the register, so the generated asm isn't quite as pretty as the hand-coded version. However benchmarking shows that this is actually a small improvement in runtime performance on some benchmarks, and never a slowdown. We also need to make sure there's a barrier at the end of the lock loop to make sure that the compiler doesn't move any instructions from within the locked region into the region where we don't yet own the lock. 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>
Diffstat (limited to 'sound/arm')
0 files changed, 0 insertions, 0 deletions