Re: [cpuops cmpxchg double V1 2/4] x86: this_cpu_cmpxchg_double()support

From: H. Peter Anvin
Date: Tue Dec 14 2010 - 19:57:06 EST


On 12/14/2010 04:46 PM, H. Peter Anvin wrote:
> On 12/14/2010 09:48 AM, Christoph Lameter wrote:
>> +
>> +/*
>> + * Inputs:
>> + * %rsi : memory location to compare
>> + * %rax : low 64 bits of old value
>> + * %rdx : high 64 bits of old value
>> + * %rbx : low 64 bits of new value
>> + * %rcx : high 64 bits of new value
>> + * %al : Operation successful
>> + */
>> +ENTRY(cmpxchg16b_cpuops_emu)
>> +CFI_STARTPROC
>> +
>> +#
>> +# Emulate 'cmpxchg16b %gs:(%rsi)' except we return the result in
>> +# al not via the ZF. Caller will access al to get result.
>> +#
>
> NAK on this. This is acceptable for cmpxchg8b only because we don't
> support SMP on 486s anymore. x86-64 is another matter...
>

Hm, this is meant to be a CPU local operation, isn't it... it isn't very
clear from the comments or naming *in this file*.

Could you make it a little clearer in the local code, please?

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/