From: Eric Dumazet Date: Tue, 3 Jan 2012 16:35:40 +0000 (+0100) Subject: x86: Fix atomic64_xxx_cx8() functions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ceb7b40b65539a771d1bfaf47660ac0ee57e0c4f;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Acked-by: Jan Beulich Cc: Christoph Lameter Cc: Linus Torvalds Cc: Andrew Morton Link: http://lkml.kernel.org/r/1325608540.2320.103.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/include/asm/alternative-asm.h b/arch/x86/include/asm/alternative-asm.h index 091508b533b4..952bd0100c5c 100644 --- a/arch/x86/include/asm/alternative-asm.h +++ b/arch/x86/include/asm/alternative-asm.h @@ -4,10 +4,10 @@ #ifdef CONFIG_SMP .macro LOCK_PREFIX -1: lock +672: lock .section .smp_locks,"a" .balign 4 - .long 1b - . + .long 672b - . .previous .endm #else