atomics: introduce smp_mb__[after|before]_atomic() barriers
authorJuergen Gross <jgross@suse.com>
Thu, 26 Mar 2020 11:42:19 +0000 (12:42 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 26 Mar 2020 11:42:19 +0000 (12:42 +0100)
commitc301211a511111caca29f3bd797eb13965026c78
treeabc1cc00557e455f9cef7c822e992e0a973403f9
parent7ff66809ccd5b6f4b4d09e482cc6f9e8bb727ecc
atomics: introduce smp_mb__[after|before]_atomic() barriers

When using atomic variables for synchronization barriers are needed
to ensure proper data serialization. Introduce smp_mb__before_atomic()
and smp_mb__after_atomic() as in the Linux kernel for that purpose.

Use the same definitions as in the Linux kernel.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/include/asm-arm/system.h
xen/include/asm-x86/system.h