[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1325611899.2320.111.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Date: Tue, 03 Jan 2012 18:31:39 +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: Re: [PATCH] x86: fix and improve cmpxchg_double{,_local}()
Le mardi 03 janvier 2012 à 15:35 +0000, Jan Beulich a écrit :
> And in atomic64_set_cx8 it's the other way around: The comment
> explains why supposedly no LOCK prefix is needed, but that's again
> in conflict with above quoted paragraph from the manual.
BTW atomic64_set() asm() contraints are wrong :
static inline void atomic64_set(atomic64_t *v, long long i)
{
unsigned high = (unsigned)(i >> 32);
unsigned low = (unsigned)i;
asm volatile(ATOMIC64_ALTERNATIVE(set)
: "+b" (low), "+c" (high)
: "S" (v)
: "eax", "edx", "memory"
);
}
ebx/ecx registers are not modified by cmpxchg8b (or the atomic64_set_386
emulation). Only eax/edx can be modified.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists