Messages in this thread | | | Subject | Re: [PATCH] x86: fix and improve cmpxchg_double{,_local}() | From | Eric Dumazet <> | Date | Tue, 03 Jan 2012 18:31:39 +0100 |
| |
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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |