remoteproc: modify vring allocation to rely on centralized carveout allocator
authorLoic Pallardy <loic.pallardy@st.com>
Fri, 27 Jul 2018 13:14:47 +0000 (15:14 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 15 Oct 2018 06:37:40 +0000 (23:37 -0700)
commitc6aed238b7a9b15a5c90a0c31f1d36577b5d2cbe
tree3cd3bbf5c01854a6777c7b47fedafed245d12e64
parent1e2517d126171a41f801738ffd19687836cd178a
remoteproc: modify vring allocation to rely on centralized carveout allocator

Current version of rproc_alloc_vring function supports only dynamic vring
allocation.

This patch allows to allocate vrings based on memory region declatation.
Vrings are now manage like memory carveouts, to communize memory management
code in rproc_alloc_registered_carveouts().

Allocated buffer is retrieved in rp_find_vq() thanks to
rproc_find_carveout_by_name() functions for.

This patch sets vrings names to vdev"x"vring"y" with x vdev index in
resource table and y vring index in vdev. This will be updated when
name will be associated to vdev in firmware resource table.

Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c
drivers/remoteproc/remoteproc_internal.h
drivers/remoteproc/remoteproc_virtio.c
include/linux/remoteproc.h