Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1504470
| From | Bjorn Andersson <bjorn.andersson@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 09/11] remoteproc: Update max_notifyid as we allocate vrings |
| Date | 2016-10-20 04:50 +0200 |
| Message-ID | <subAC-1wS-15@gated-at.bofh.it> (permalink) |
| References | <subAB-1wS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Vrings are now allocated as we parse the resource table, before we
boot the rproc or register any virtio devices, so it's safe to bump
max_notifyid as part of this process.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/remoteproc/remoteproc_core.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index c242ca016496..57f12421fdd2 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -236,6 +236,10 @@ int rproc_alloc_vring(struct rproc_vdev *rvdev, int i)
}
notifyid = ret;
+ /* Potentially bump max_notifyid */
+ if (notifyid > rproc->max_notifyid)
+ rproc->max_notifyid = notifyid;
+
dev_dbg(dev, "vring%d: va %p dma %pad size 0x%x idr %d\n",
i, va, &dma, size, notifyid);
@@ -719,15 +723,6 @@ static int rproc_handle_carveout(struct rproc *rproc,
return ret;
}
-static int rproc_count_vrings(struct rproc *rproc, struct fw_rsc_vdev *rsc,
- int offset, int avail)
-{
- /* Summarize the number of notification IDs */
- rproc->max_notifyid += rsc->num_of_vrings;
-
- return 0;
-}
-
/*
* A lookup table for resource handlers. The indices are defined in
* enum fw_resource_type.
@@ -736,7 +731,7 @@ static rproc_handle_resource_t rproc_loading_handlers[RSC_LAST] = {
[RSC_CARVEOUT] = (rproc_handle_resource_t)rproc_handle_carveout,
[RSC_DEVMEM] = (rproc_handle_resource_t)rproc_handle_devmem,
[RSC_TRACE] = (rproc_handle_resource_t)rproc_handle_trace,
- [RSC_VDEV] = (rproc_handle_resource_t)rproc_count_vrings,
+ [RSC_VDEV] = NULL,
};
static rproc_handle_resource_t rproc_vdev_handler[RSC_LAST] = {
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/11] rproc subdevice support Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 05/11] remoteproc: Assign kref to rproc_vdev Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 06/11] remoteproc: virtio: Anchor vring life cycle in vdev Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 09/11] remoteproc: Update max_notifyid as we allocate vrings Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 08/11] remoteproc: Decouple vdev resources and devices Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 01/11] remoteproc: Introduce subdevices Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 03/11] remoteproc: wcnss: Bond SMD edge to remoteproc Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 11/11] remoteproc: Merge table_ptr and cached_table pointers Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 04/11] dt-binding: remoteproc: wcnss: Allow describing smd edge Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 10/11] remoteproc: Remove custom vdev handler list Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200 [PATCH 07/11] remoteproc: Further extend the vdev life cycle Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-20 04:50 +0200
csiph-web