All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Eric Dumazet <eric.dumazet@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	eric.dumazet@gmail.com, torvalds@linux-foundation.org,
	cl@linux.com, akpm@linux-foundation.org, JBeulich@suse.com,
	tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/asm] x86: Fix atomic64_xxx_cx8() functions
Date: Wed, 4 Jan 2012 07:32:28 -0800	[thread overview]
Message-ID: <tip-ceb7b40b65539a771d1bfaf47660ac0ee57e0c4f@git.kernel.org> (raw)
In-Reply-To: <1325608540.2320.103.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

Commit-ID:  ceb7b40b65539a771d1bfaf47660ac0ee57e0c4f
Gitweb:     http://git.kernel.org/tip/ceb7b40b65539a771d1bfaf47660ac0ee57e0c4f
Author:     Eric Dumazet <eric.dumazet@gmail.com>
AuthorDate: Tue, 3 Jan 2012 17:35:40 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 4 Jan 2012 15:01:56 +0100

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 |    4 ++--
 1 files 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

  reply	other threads:[~2012-01-04 15:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02 17:02 [PATCH] x86: fix and improve cmpxchg_double{,_local}() Jan Beulich
2012-01-03 15:00 ` Eric Dumazet
2012-01-03 15:15   ` Eric Dumazet
2012-01-03 15:41     ` Eric Dumazet
2012-01-03 16:08       ` Jan Beulich
2012-01-03 16:13         ` Eric Dumazet
2012-01-03 16:35           ` [PATCH] x86: fix atomic64_xxx_cx8() functions Eric Dumazet
2012-01-04 15:32             ` tip-bot for Eric Dumazet [this message]
2012-01-03 15:35   ` [PATCH] x86: fix and improve cmpxchg_double{,_local}() Jan Beulich
2012-01-03 17:31     ` Eric Dumazet
2012-01-04 10:36       ` David Laight
2012-01-04 10:54         ` Jan Beulich
2012-01-04 15:31 ` [tip:x86/asm] x86: Fix " tip-bot for Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-ceb7b40b65539a771d1bfaf47660ac0ee57e0c4f@git.kernel.org \
    --to=eric.dumazet@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.