[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1325608540.2320.103.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Date: Tue, 03 Jan 2012 17:35:40 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jan Beulich <JBeulich@...e.com>
Cc: mingo@...e.hu, tglx@...utronix.de,
Christoph Lameter <cl@...ux.com>, linux-kernel@...r.kernel.org,
netdev <netdev@...r.kernel.org>, hpa@...or.com
Subject: [PATCH] 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@...il.com>
Acked-by: Jan Beulich <JBeulich@...e.com>
CC: Christoph Lameter <cl@...ux.com>
CC: Ingo Molnar <mingo@...e.hu>
CC: H. Peter Anvin <hpa@...or.com>
Cc: stable@...r.kernel.org [2.6.35+]
---
arch/x86/include/asm/alternative-asm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/alternative-asm.h b/arch/x86/include/asm/alternative-asm.h
index 091508b..952bd01 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists