From: Anton Blanchard Date: Tue, 6 Sep 2005 03:05:58 +0000 (+1000) Subject: [PATCH] ppc64: speedup cmpxchg X-Git-Tag: v2.6.14-rc1~747^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2c0ab17ba751abe13a28508b1ac7e9ca074cd87;p=pandora-kernel.git [PATCH] ppc64: speedup cmpxchg cmpxchg has the following code: __typeof__(*(ptr)) _o_ = (o); __typeof__(*(ptr)) _n_ = (n); Unfortunately it makes gcc 4.0 store and load the variables to the stack. Eg in atomic_dec_and_test we get: stw r10,112(r1) stw r9,116(r1) lwz r9,112(r1) lwz r0,116(r1) x86 is just casting the values so do that instead. Also change __xchg* and __cmpxchg* to take unsigned values, removing a few sign extensions. Signed-off-by: Anton Blanchard Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed