diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2012-05-17 13:23:59 +0200 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-04 12:27:04 +0200 |
commit | 6db20ea8d85064175c7ef594c433c6c2e6bbab83 (patch) | |
tree | 6087ffde8501059bdfd578758fb05c53aba3d620 /drivers/remoteproc/remoteproc_internal.h | |
parent | Linux 3.5-rc3 (diff) | |
download | linux-6db20ea8d85064175c7ef594c433c6c2e6bbab83.tar.xz linux-6db20ea8d85064175c7ef594c433c6c2e6bbab83.zip |
remoteproc: allocate vrings on demand, free when not needed
Dynamically allocate the vrings' DMA when the remote processor
is about to be powered on (i.e. when ->find_vqs() is invoked),
and release them as soon as it is powered off (i.e. when ->del_vqs()
is invoked).
The obvious and immediate benefit is better memory utilization, since
memory for the vrings is now only allocated when the relevant remote
processor is used.
Additionally, this approach also makes recovery of a (crashing)
remote processor easier: one just needs to remove the relevant
vdevs, and the entire vrings cleanup takes place automagically.
Tested-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'drivers/remoteproc/remoteproc_internal.h')
-rw-r--r-- | drivers/remoteproc/remoteproc_internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index 9f336d6bdef3..f4957cfa0883 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -41,4 +41,6 @@ void rproc_create_debug_dir(struct rproc *rproc); void rproc_init_debugfs(void); void rproc_exit_debugfs(void); +void rproc_free_vring(struct rproc_vring *rvring); +int rproc_alloc_vring(struct rproc_vdev *rvdev, int i); #endif /* REMOTEPROC_INTERNAL_H */ |