[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/2] xen: Introduce cmpxchg64() and guest_cmpxchg64()



On 11.09.2020 18:06, Julien Grall wrote:
> --- a/xen/include/asm-x86/guest_atomics.h
> +++ b/xen/include/asm-x86/guest_atomics.h
> @@ -20,6 +20,7 @@
>      ((void)(d), test_and_change_bit(nr, p))
>  
>  #define guest_cmpxchg(d, ptr, o, n) ((void)(d), cmpxchg(ptr, o, n))
> +#define guest_cmpxchg64(d, ptr, o, n) ((void)(d), cmpxchg(ptr, o, n))

While them sitting side by side there's perhaps little risk of
them going out of sync with one another, I still find it a
little odd to open-code guest_cmpxchg() instead of using it,
preferably even like

#define guest_cmpxchg64 guest_cmpxchg

(i.e. not using the function-like macro form). Unless of course
there's a particular reason you went this route. Preferably with
it adjusted this minor x86 part
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.