From: "Jan Beulich" <JBeulich@suse.com>
To: "Eric Dumazet" <eric.dumazet@gmail.com>
Cc: <mingo@elte.hu>, <tglx@linutronix.de>,
"Christoph Lameter" <cl@linux.com>,
<linux-kernel@vger.kernel.org>, "netdev" <netdev@vger.kernel.org>,
<hpa@zytor.com>
Subject: Re: [PATCH] x86: fix and improve cmpxchg_double{,_local}()
Date: Tue, 03 Jan 2012 16:08:44 +0000 [thread overview]
Message-ID: <4F03361C020000780006A3A5@nat28.tlf.novell.com> (raw)
In-Reply-To: <1325605290.2320.76.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
>>> On 03.01.12 at 16:41, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le mardi 03 janvier 2012 à 16:15 +0100, Eric Dumazet a écrit :
>
>> Very old it seems...
>>
>> arch/x86/lib/atomic64_cx8_32.S
>>
>> all "jxx 1b" are wrong if a LOCK_PREFIX is included after the 1: label
>>
>> 1:
>> inst1
>> LOCK_PREFIX
>> cmpxchg8b (%ebp)
>> jne 1b / jumps to beginning of LOCK_PREFIX, inst1 is not replayed
>>
>>
>>
>>
>
> A possible fix would be to not use "1" label in LOCK_PREFIX macro,
> but 672 magic value.
>
> Not sure if we can use a local label in a macro ?
"1" and "672" are both local labels, so both are okay. As long as there's
no other (colliding) use of 672 anywhere, that would seem to be the
preferred fix (feel free to put my ack on the patch when you formally
submit it).
Jan
> 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
next prev parent reply other threads:[~2012-01-03 16:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4F01F12A020000780006A19B@nat28.tlf.novell.com>
2012-01-03 15:00 ` [PATCH] x86: fix and improve cmpxchg_double{,_local}() Eric Dumazet
2012-01-03 15:15 ` Eric Dumazet
2012-01-03 15:41 ` Eric Dumazet
2012-01-03 16:08 ` Jan Beulich [this message]
2012-01-03 16:13 ` Eric Dumazet
2012-01-03 16:35 ` [PATCH] x86: fix atomic64_xxx_cx8() functions Eric Dumazet
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
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=4F03361C020000780006A3A5@nat28.tlf.novell.com \
--to=jbeulich@suse.com \
--cc=cl@linux.com \
--cc=eric.dumazet@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox