From 3d87fa1d47c10c71684e1eca15cb051746ab1d56 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Thu, 5 May 2016 14:29:39 +0100 Subject: remoteproc: core: Task sync during rproc_fw_boot() By default, rproc_fw_boot() needs to wait for rproc to be configured, but a race may occur when using rpmsg/virtio. In this case, it can be called locally in a safe manor. This patch represents two usecases: - External call (via exported rproc_boot()), which waits - Internal call can use 'nowait' version of rproc_boot() Signed-off-by: Fabrice Gasnier Signed-off-by: Lee Jones Signed-off-by: Bjorn Andersson --- drivers/remoteproc/remoteproc_virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/remoteproc/remoteproc_virtio.c') diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index e44872f..cc91556 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c @@ -161,7 +161,7 @@ static int rproc_virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs, } /* now that the vqs are all set, boot the remote processor */ - ret = rproc_boot(rproc); + ret = rproc_boot_nowait(rproc); if (ret) { dev_err(&rproc->dev, "rproc_boot() failed %d\n", ret); goto error; -- cgit v1.1