From: Jaccon Bastiaansen Date: Mon, 13 May 2013 16:28:27 +0000 (+0100) Subject: ARM: 7720/1: ARM v6/v7 cmpxchg64 shouldn't clear upper 32 bits of the old/new value X-Git-Tag: v3.10-rc2~27^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eabb3301b1facee669d9938f7c5a0295c21d71d;p=pandora-kernel.git ARM: 7720/1: ARM v6/v7 cmpxchg64 shouldn't clear upper 32 bits of the old/new value The implementation of cmpxchg64() for the ARM v6 and v7 architecture casts parameter 2 and 3 (the old and new 64bit values) to an unsigned long before calling the atomic_cmpxchg64() function. This clears the top 32 bits of the old and new values, resulting in the wrong values being compare-exchanged. Luckily, this only appears to be used for 64-bit sched_clock, which we don't (yet) have on ARM. This bug was introduced by commit 3e0f5a15f500 ("ARM: 7404/1: cmpxchg64: use atomic64 and local64 routines for cmpxchg64"). Cc: Acked-by: Will Deacon Signed-off-by: Jaccon Bastiaansen Signed-off-by: Russell King --- Reading git-diff-tree failed