Skip to content

Commit

Permalink
remoteproc: don't use virtio's weak barriers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ohad Ben-Cohen committed Feb 22, 2012
1 parent b719587 commit dd6da1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/remoteproc/remoteproc_rpmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ static struct virtqueue *rp_find_vq(struct virtio_device *vdev,

dev_dbg(rproc->dev, "vring%d: va %p qsz %d\n", id, addr, len);

vq = vring_new_virtqueue(len, AMP_VRING_ALIGN, vdev, addr,
/*
* Create the new vq, and tell virtio we're not interested in
* the 'weak' smp barriers, since we're talking with a real device.
*/
vq = vring_new_virtqueue(len, AMP_VRING_ALIGN, vdev, false, addr,
rproc_virtio_notify, callback, name);
if (!vq) {
dev_err(rproc->dev, "vring_new_virtqueue %s failed\n", name);
Expand Down

0 comments on commit dd6da1c

Please sign in to comment.