All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: mst@redhat.com
Cc: sjur@brendeland.net, Linus Walleij <linus.walleij@linaro.org>,
	Erwan Yvin <erwan.yvin@stericsson.com>,
	virtualization@lists.linux-foundation.org,
	sjur.brandeland@stericsson.com
Subject: [PATCH 2/2] tools/virtio: make barriers stronger.
Date: Wed, 06 Mar 2013 15:54:42 +1100	[thread overview]
Message-ID: <87vc95b019.fsf@rustcorp.com.au> (raw)
In-Reply-To: <87y5e1b03l.fsf@rustcorp.com.au>

In the coming vringh_test, we share an mmap with another userspace process
for testing.  This requires real barriers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff --git a/tools/virtio/asm/barrier.h b/tools/virtio/asm/barrier.h
index aff61e1..7a63693 100644
--- a/tools/virtio/asm/barrier.h
+++ b/tools/virtio/asm/barrier.h
@@ -3,8 +3,8 @@
 #define mb() __sync_synchronize()
 
 #define smp_mb()	mb()
-# define smp_rmb()	barrier()
-# define smp_wmb()	barrier()
+# define smp_rmb()	mb()
+# define smp_wmb()	mb()
 /* Weak barriers should be used. If not - it's a bug */
 # define rmb()	abort()
 # define wmb()	abort()

  reply	other threads:[~2013-03-06  4:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 13:51 [PATCH vringh] virtio: Introduce vringh wrappers in virtio_config sjur.brandeland
2013-03-06  4:42 ` Rusty Russell
2013-03-06 10:50   ` Sjur Brændeland
2013-03-06 12:16     ` Ohad Ben-Cohen
2013-03-06 12:37       ` Sjur Brændeland
2013-03-06 23:28         ` Sjur Brændeland
2013-03-06  4:46 ` [FYI] vringh fixes Rusty Russell
2013-03-06  4:53   ` [PATCH 1/2] Rusty Russell
2013-03-06  4:54     ` Rusty Russell [this message]
2013-03-06 10:20       ` [PATCH 2/2] tools/virtio: make barriers stronger Michael S. Tsirkin
2013-03-07  3:48         ` Rusty Russell
2013-03-07  9:29           ` Michael S. Tsirkin
2013-03-07 23:56             ` Rusty Russell
2013-03-06  4:57   ` [PATCH 1/3] vringh: host-side implementation of virtio rings (v2) Rusty Russell
2013-03-06  4:59     ` [PATCH 2/3] vringh: don't flag already listening Rusty Russell
2013-03-06  5:02     ` [PATCH 3/3] tools/virtio: add vring_test (v2) Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vc95b019.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=erwan.yvin@stericsson.com \
    --cc=linus.walleij@linaro.org \
    --cc=mst@redhat.com \
    --cc=sjur.brandeland@stericsson.com \
    --cc=sjur@brendeland.net \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.