summaryrefslogtreecommitdiff
path: root/tools/virtio/asm/barrier.h
blob: ba34f9e96efd6bd760870150dd9cb6ba0eacbd69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#if defined(__i386__) || defined(__x86_64__)
#define barrier() asm volatile("" ::: "memory")
#define virt_mb() __sync_synchronize()
#define virt_rmb() barrier()
#define virt_wmb() barrier()
/* Atomic store should be enough, but gcc generates worse code in that case. */
#define virt_store_mb(var, value)  do { \
	typeof(var) virt_store_mb_value = (value); \
	__atomic_exchange(&(var), &virt_store_mb_value, &virt_store_mb_value, \
			  __ATOMIC_SEQ_CST); \
	barrier(); \
} while (0);
/* Weak barriers should be used. If not - it's a bug */
# define mb() abort()
# define rmb() abort()
# define wmb() abort()
#else
#error Please fill in barrier macros
#endif

-next.git/commit/include/trace/events/task.h?h=nds-private-remove&id=0a019a28e0ca0af7dc2691d1a9527960b07ad2bb'>0a019a28e0ca0af7dc2691d1a9527960b07ad2bb (patch) tree5ee1db9aacacd6af6701fb290e8a294ef3cc2bf2 /include/trace/events/task.h parentec026b5020688a8bde5fae9a69ae3c59b66ba3ae (diff)parent8413299cb3933dade6186bbee8363f190032107e (diff)
Merge tag 'sti-dt-for-v4.10-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into fixes
STi DT fix: Since v4.10-rc1, xhci is complaining in loop with : [ 801.953836] usb usb6-port1: Cannot enable. Maybe the USB cable is bad? [ 801.960455] xhci-hcd xhci-hcd.0.auto: Cannot set link state. [ 801.966611] usb usb6-port1: cannot disable (err = -32) set property "snps,dis_u3_susphy_quirk" in DT fix it. * tag 'sti-dt-for-v4.10-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STiH407-family: set snps,dis_u3_susphy_quirk Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/trace/events/task.h')