linux/drivers/remoteproc
Loic Pallardy d4c036fec3 remoteproc: fix recovery procedure
Commit 7e83cab824a87e83cab824a8 ("remoteproc: Modify recovery path
to use rproc_{start,stop}()") replaces rproc_{shutdown,boot}() with
rproc_{stop,start}(), which skips destroy the virtio device at stop
but re-initializes it again at start.

Issue is that struct virtio_dev is not correctly reinitialized like done
at initial allocation thanks to kzalloc() and kobject is considered as
already initialized by kernel. That is due to the fact struct virtio_dev
is allocated and released at vdev resource handling level managed and
virtio device is registered and unregistered at rproc subdevices level.

Moreover kernel documentation mentions that device struct must be
zero initialized before calling device_initialize().

This patch disentangles struct virtio_dev from struct rproc_vdev as
the two struct don't have the same life-cycle.

struct virtio_dev is now allocated on rproc_start() and released
on rproc_stop().

This patch applies on top of patch
remoteproc: create vdev subdevice with specific dma memory pool [1]

[1]: https://patchwork.kernel.org/patch/10755781/

Fixes: 7e83cab824 ("remoteproc: Modify recovery path to use rproc_{start,stop}()")

Reported-by: Xiang Xiao <xiaoxiang781216@gmail.com>
Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-02-20 21:34:17 -08:00
..
da8xx_remoteproc.c remoteproc/davinci: Use %zx for formating size_t 2018-08-27 17:06:17 -07:00
imx_rproc.c remoteproc: imx_rproc: Slightly simplify code in 'imx_rproc_probe()' 2018-03-18 15:43:46 -07:00
Kconfig remoteproc: qcom: Introduce Non-PAS ADSP PIL driver 2018-10-05 23:51:34 -07:00
keystone_remoteproc.c remoteproc/keystone: explicitly request exclusive reset control 2017-08-27 23:16:22 -07:00
Makefile remoteproc: qcom: Introduce Non-PAS ADSP PIL driver 2018-10-05 23:51:34 -07:00
omap_remoteproc.c drivers: remoteproc: constify rproc_ops structures 2017-01-18 10:46:50 -08:00
omap_remoteproc.h remoteproc/omap: add a remoteproc driver for OMAP4 2012-02-08 22:53:47 +02:00
qcom_common.c remoteproc: rename subdev probe and remove functions 2018-06-26 14:09:12 -07:00
qcom_common.h remoteproc: qcom: Introduce sysmon 2018-02-12 16:57:22 -08:00
qcom_q6v5_adsp.c remoteproc: q6v5_adsp: Remove voting for lpass_aon clock 2019-02-17 23:01:57 -08:00
qcom_q6v5_mss.c remoteproc: q6v5-mss: Active powerdomain for SDM845 2019-01-30 16:56:15 -08:00
qcom_q6v5_pas.c remoteproc: qcom: Add support for parsing fw dt bindings 2019-01-29 22:01:07 -08:00
qcom_q6v5_wcss.c remoteproc: qcom: Introduce Hexagon V5 based WCSS driver 2018-06-18 15:57:58 -07:00
qcom_q6v5.c remoteproc: qcom: q6v5: shore up resource probe handling 2018-10-09 23:13:32 -07:00
qcom_q6v5.h remoteproc: q6v5: Extract common resource handling 2018-06-18 15:55:57 -07:00
qcom_sysmon.c remoteproc: qcom: Wait for shutdown-ack/ind on sysmon shutdown 2019-01-21 21:14:27 -08:00
qcom_wcnss_iris.c remoteproc: qcom_wcnss: Fix circular module dependency 2016-11-14 21:52:19 -08:00
qcom_wcnss.c remoteproc: qcom: Add shutdown-ack irq 2019-01-21 21:14:26 -08:00
qcom_wcnss.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
remoteproc_core.c remoteproc: fix recovery procedure 2019-02-20 21:34:17 -08:00
remoteproc_debugfs.c remoteproc: debug: add crash debugfs node 2019-01-06 23:02:13 -08:00
remoteproc_elf_loader.c remoteproc: Move resource table load logic to find 2018-01-15 09:29:53 -08:00
remoteproc_internal.h remoteproc: fix recovery procedure 2019-02-20 21:34:17 -08:00
remoteproc_sysfs.c remoteproc: Check for NULL firmwares in sysfs interface 2018-10-05 23:04:20 -07:00
remoteproc_virtio.c remoteproc: fix recovery procedure 2019-02-20 21:34:17 -08:00
st_remoteproc.c remoteproc: st: add reserved memory support 2019-02-20 21:15:38 -08:00
st_slim_rproc.c remoteproc: st_slim: replace "%p" with "%pK" 2018-07-30 23:25:09 -07:00
wkup_m3_rproc.c drivers: remoteproc: constify rproc_ops structures 2017-01-18 10:46:50 -08:00