]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
alpha: xchg/cmpxchg cleanup and fixes
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>
Tue, 31 Mar 2009 22:23:35 +0000 (15:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:16 +0000 (08:59 -0700)
commita6209d6d71f2ab8c63cc1587ef65490d83022baf
tree2490d7adf757c9ea00c30fb8f75171d6b8772d3a
parenta94066992b3050a7bd9a82bf73bf19f6052d2f82
alpha: xchg/cmpxchg cleanup and fixes

- "_local" versions of xchg/cmpxchg functions duplicate code
  of non-local ones (quite a few pages of assembler), except
  memory barriers. We can generate these two variants from a
  single header file using simple macros;

- convert xchg macro back to inline function using always_inline
  attribute;

- use proper argument types for cmpxchg_u8/u16 functions
  to fix a problem with negative arguments.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/alpha/include/asm/system.h
arch/alpha/include/asm/xchg.h [new file with mode: 0644]