search for: virtio_store_release

Displaying 2 results from an estimated 2 matches for "virtio_store_release".

Did you mean: virt_store_release
2015 Dec 17
2
[PATCH] virtio: use smp_load_acquire/smp_store_release
...k_barriers) wmb(); } +static inline __virtio16 virtio_load_acquire(bool weak_barriers, __virtio16 *p) +{ + if (!weak_barriers) { + rmb(); + return READ_ONCE(*p); + } +#ifdef CONFIG_SMP + return smp_load_acquire(p); +#else + dma_rmb(); + return READ_ONCE(*p); +#endif +} + +static inline void virtio_store_release(bool weak_barriers, + __virtio16 *p, __virtio16 v) +{ + if (!weak_barriers) { + wmb(); + WRITE_ONCE(*p, v); + return; + } +#ifdef CONFIG_SMP + smp_store_release(p, v); +#else + dma_wmb(); + WRITE_ONCE(*p, v); +#endif +} + struct virtio_device; struct virtqueue; diff --git a/drivers/virti...
2015 Dec 17
2
[PATCH] virtio: use smp_load_acquire/smp_store_release
...k_barriers) wmb(); } +static inline __virtio16 virtio_load_acquire(bool weak_barriers, __virtio16 *p) +{ + if (!weak_barriers) { + rmb(); + return READ_ONCE(*p); + } +#ifdef CONFIG_SMP + return smp_load_acquire(p); +#else + dma_rmb(); + return READ_ONCE(*p); +#endif +} + +static inline void virtio_store_release(bool weak_barriers, + __virtio16 *p, __virtio16 v) +{ + if (!weak_barriers) { + wmb(); + WRITE_ONCE(*p, v); + return; + } +#ifdef CONFIG_SMP + smp_store_release(p, v); +#else + dma_wmb(); + WRITE_ONCE(*p, v); +#endif +} + struct virtio_device; struct virtqueue; diff --git a/drivers/virti...