aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorOhad Ben-Cohen <ohad@wizery.com>2012-01-12 02:26:57 -0500
committerOhad Ben-Cohen <ohad@wizery.com>2012-02-22 11:28:48 -0500
commitdd6da1c5e99a3b736b52370c504a2b8843cbfda6 (patch)
treec6d08a5fb72f817d5071c1e9338e9fe5a98e5fad /drivers/remoteproc
parentb719587eb46c588fabc71de97c28bafcf827acf7 (diff)
remoteproc: don't use virtio's weak barriers
When creating a virtqueue for rpmsg, tell virtio we're not interested in "weak" smp barriers, since we're talking to a real device. On ARM, this means using a DSB instead of a DMB, which is needed for platforms that kick the remote processor using some kind of a mailbox device mapped to Device memory (otherwise the kick can jump ahead and wake the remote processor before it has observed the changes to the vrings). Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/remoteproc_rpmsg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_rpmsg.c b/drivers/remoteproc/remoteproc_rpmsg.c
index f30be4c193ef..4f73e811bb80 100644
--- a/drivers/remoteproc/remoteproc_rpmsg.c
+++ b/drivers/remoteproc/remoteproc_rpmsg.c
@@ -96,7 +96,11 @@ static struct virtqueue *rp_find_vq(struct virtio_device *vdev,
96 96
97 dev_dbg(rproc->dev, "vring%d: va %p qsz %d\n", id, addr, len); 97 dev_dbg(rproc->dev, "vring%d: va %p qsz %d\n", id, addr, len);
98 98
99 vq = vring_new_virtqueue(len, AMP_VRING_ALIGN, vdev, addr, 99 /*
100 * Create the new vq, and tell virtio we're not interested in
101 * the 'weak' smp barriers, since we're talking with a real device.
102 */
103 vq = vring_new_virtqueue(len, AMP_VRING_ALIGN, vdev, false, addr,
100 rproc_virtio_notify, callback, name); 104 rproc_virtio_notify, callback, name);
101 if (!vq) { 105 if (!vq) {
102 dev_err(rproc->dev, "vring_new_virtqueue %s failed\n", name); 106 dev_err(rproc->dev, "vring_new_virtqueue %s failed\n", name);