]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Fix atomic64_xxx_cx8() functions
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 3 Jan 2012 16:35:40 +0000 (17:35 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 4 Jan 2012 14:01:56 +0000 (15:01 +0100)
commit99d4efb295ce2a2aa5e43bfdecef3593fd798732
tree77bae0c2bf43b9f415d99d1e3a8dc0667404f965
parentf3ad83528ddda854b6b64f296b5dc2640fb2dad2
x86: Fix atomic64_xxx_cx8() functions

It appears about all functions in arch/x86/lib/atomic64_cx8_32.S
are wrong in case cmpxchg8b must be restarted, because
LOCK_PREFIX macro defines a label "1" clashing with other local
labels :

1:
some_instructions
LOCK_PREFIX
cmpxchg8b (%ebp)
jne 1b  / jumps to beginning of LOCK_PREFIX !

A possible fix is to use a magic label "672" in LOCK_PREFIX asm
definition, similar to the "671" one we defined in
LOCK_PREFIX_HERE.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1325608540.2320.103.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/alternative-asm.h