Re: [thisops uV2 09/10] x86: this_cpu_cmpxchg andthis_cpu_cmpxchg_double operations

From: Eric Dumazet
Date: Sat Nov 27 2010 - 01:33:11 EST


Le vendredi 26 novembre 2010 Ã 15:09 -0600, Christoph Lameter a Ãcrit :
...

> +# Emulate 'cmpxchg16b %gs:(%rsi)' except we return the result in
> +# al not via the ZF. Caller will access al to get result.
> +#
> +cmpxchg16b_local_emu:
> + pushf
> + cli
> +
> + cmpq %gs:(%rsi), %rax
> + jne not_same
> + cmpq %gs:8(%rsi), %rdx
> + jne not_same
> +
> + movq %rbx, %gs:(%esi)

(%rsi) instead of (%esi) ?

> + movq %rcx, %gs:8(%esi)

same here

> +
> + popf
> + mov $1, %al
> + ret
> +
> + not_same:
> + popf
> + xor %al,%al
> + ret
> +
> +CFI_ENDPROC
> +ENDPROC(cmpxchg16b_local_emu)
>



--
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/