Skip to content

Commit

Permalink
remoteproc: clear bitmap when stop/shutdown
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
GUIDINGLI authored and CV-Bowen committed Oct 17, 2023
1 parent cd88238 commit 96fb3ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/remoteproc/remoteproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -283,6 +284,8 @@ int remoteproc_shutdown(struct remoteproc *rproc)
rproc->state = RPROC_OFFLINE;
}
}

rproc->bitmap = 0;
}
metal_mutex_release(&rproc->lock);
}
Expand Down

0 comments on commit 96fb3ec

Please sign in to comment.