@@ -504,6 +504,7 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,
kref_init(&rvdev->refcount);
+ rvdev->rsc = rsc;
rvdev->id = rsc->id;
rvdev->rproc = rproc;
rvdev->index = rproc->nb_vdev++;
@@ -567,6 +567,7 @@ struct rproc_vring {
* @rproc: the rproc handle
* @vdev: the virio device
* @vring: the vrings for this vdev
+ * @rsc: address of the resource table
* @rsc_offset: offset of the vdev's resource entry
* @index: vdev position versus other vdev declared in resource table
*/
@@ -580,6 +581,7 @@ struct rproc_vdev {
struct list_head node;
struct rproc *rproc;
struct rproc_vring vring[RVDEV_NUM_VRINGS];
+ struct fw_rsc_vdev *rsc;
u32 rsc_offset;
u32 index;
};
Store the resource table address in rvdev struct to be able to retrieve it from vdev device. This patch prepares the migration of rdev management in rproc_virtio. Indeed remoteproc virtio will have to complete the vdev and vrings resource table structures. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> --- drivers/remoteproc/remoteproc_core.c | 1 + include/linux/remoteproc.h | 2 ++ 2 files changed, 3 insertions(+)