From 96fb3ecfffd11d5dac3f0ca0842e4aa634f6d4b3 Mon Sep 17 00:00:00 2001 From: Guiding Li Date: Mon, 26 Jun 2023 17:03:27 +0800 Subject: [PATCH] remoteproc: clear bitmap when stop/shutdown fix parse res_table failed when repeat start rptun dev. If we don't clear the bitmap it will faild in handle_vdev_rsc->remoteproc_allocate_id. Signed-off-by: Guiding Li --- lib/remoteproc/remoteproc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/remoteproc/remoteproc.c b/lib/remoteproc/remoteproc.c index ad16a2d7e..1f034580e 100644 --- a/lib/remoteproc/remoteproc.c +++ b/lib/remoteproc/remoteproc.c @@ -256,6 +256,7 @@ int remoteproc_stop(struct remoteproc *rproc) if (rproc->ops->stop) ret = rproc->ops->stop(rproc); rproc->state = RPROC_STOPPED; + rproc->bitmap = 0; } else { ret = 0; } @@ -283,6 +284,8 @@ int remoteproc_shutdown(struct remoteproc *rproc) rproc->state = RPROC_OFFLINE; } } + + rproc->bitmap = 0; } metal_mutex_release(&rproc->lock); }