- 21 4月, 2020 2 次提交
-
-
由 Paul Cercueil 提交于
Add API functions devm_rproc_alloc() and devm_rproc_add(), which behave like rproc_alloc() and rproc_add() respectively, but register their respective cleanup function to be called on driver detach. Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NPaul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200417170040.174319-2-paul@crapouillou.netSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Mathieu Poirier 提交于
For cases where @firmware is declared "const char *", use function kstrdup_const() to avoid needlessly creating another copy on the heap. Suggested-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: NAlex Elder <elder@linaro.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20200420231601.16781-2-mathieu.poirier@linaro.orgSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 20 4月, 2020 1 次提交
-
-
由 Clement Leger 提交于
This function allows drivers to correctly setup the coredump output elf information. Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: NClement Leger <cleger@kalray.eu> Link: https://lore.kernel.org/r/20200410102433.2672-2-cleger@kalray.euSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 26 3月, 2020 5 次提交
-
-
由 Bjorn Andersson 提交于
Introduce generic support for handling kernel panics in remoteproc drivers, in order to allow operations needed for aiding in post mortem system debugging, such as flushing caches etc. The function can return a number of milliseconds needed by the remote to "settle" and the core will wait the longest returned duration before returning from the panic handler. Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20200324052904.738594-3-bjorn.andersson@linaro.orgSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Clement Leger 提交于
Now that remoteproc can load an elf64, coredump elf class should be the same as the loaded elf class. In order to do that, add a elf_class field to rproc with default values. If an elf is loaded successfully, this field will be updated with the loaded elf class. Then, the coredump core code has been modified to use the generic elf macro in order to create an elf file with correct class. Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NClement Leger <cleger@kalray.eu> Link: https://lore.kernel.org/r/20200302093902.27849-9-cleger@kalray.euSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Clement Leger 提交于
elf64 entry is defined as a u64. Since boot_addr is used to store the elf entry point, change boot_addr type to u64 to support both elf32 and elf64. In the same time, fix users that were using this variable. Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NClement Leger <cleger@kalray.eu> Link: https://lore.kernel.org/r/20200302093902.27849-4-cleger@kalray.eu [bjorn: Fixes up return type of rproc_get_boot_addr()] Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Clement Leger 提交于
Now that rproc_da_to_va uses a size_t for length, use a size_t for len field of rproc_mem_entry. Function used to create such structures now takes a size_t instead of int to allow full size range to be handled. Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: NClement Leger <cleger@kalray.eu> Link: https://lore.kernel.org/r/20200302093902.27849-3-cleger@kalray.euSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Clement Leger 提交于
With upcoming changes in elf loader for elf64 support, section size will be a u64. When used with da_to_va, this will potentially lead to overflow if using the current "int" type for len argument. Change da_to_va prototype to use a size_t for len and fix all users of this function. Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: NClement Leger <cleger@kalray.eu> Link: https://lore.kernel.org/r/20200302093902.27849-2-cleger@kalray.euSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 30 6月, 2019 1 次提交
-
-
由 Clement Leger 提交于
In order to allow rproc backend to handle vendor resources such as in OpenAMP, add a handle_rsc hook. This hook allow the rproc backends to handle vendor resources as they like. The hook will be called only for vendor resources and should return RSC_HANDLED on successful resource handling, RSC_IGNORED if resource was ignored, or a negative value on error. Signed-off-by: NClement Leger <cleger@kalray.eu> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 21 2月, 2019 2 次提交
-
-
由 Loic Pallardy 提交于
Commit 7e83cab824a87e83cab824a8 ("remoteproc: Modify recovery path to use rproc_{start,stop}()") replaces rproc_{shutdown,boot}() with rproc_{stop,start}(), which skips destroy the virtio device at stop but re-initializes it again at start. Issue is that struct virtio_dev is not correctly reinitialized like done at initial allocation thanks to kzalloc() and kobject is considered as already initialized by kernel. That is due to the fact struct virtio_dev is allocated and released at vdev resource handling level managed and virtio device is registered and unregistered at rproc subdevices level. Moreover kernel documentation mentions that device struct must be zero initialized before calling device_initialize(). This patch disentangles struct virtio_dev from struct rproc_vdev as the two struct don't have the same life-cycle. struct virtio_dev is now allocated on rproc_start() and released on rproc_stop(). This patch applies on top of patch remoteproc: create vdev subdevice with specific dma memory pool [1] [1]: https://patchwork.kernel.org/patch/10755781/ Fixes: 7e83cab8 ("remoteproc: Modify recovery path to use rproc_{start,stop}()") Reported-by: NXiang Xiao <xiaoxiang781216@gmail.com> Signed-off-by: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Loic Pallardy 提交于
This patch creates a dedicated vdev subdevice for each vdev declared in firmware resource table and associates carveout named "vdev%dbuffer" (with %d vdev index in resource table) if any as dma coherent memory pool. Then vdev subdevice is used as parent for virtio device. Signed-off-by: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 07 1月, 2019 1 次提交
-
-
由 Fabien Dessenne 提交于
Fix the kernel-doc comment for "parse_fw" and fix a typo. Signed-off-by: NFabien Dessenne <fabien.dessenne@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 20 10月, 2018 2 次提交
-
-
由 Sibi Sankar 提交于
This patch adds a mechanism for assigning each rproc dump segment with a custom dump function and private data. The dump function is to be called for each rproc segment during coredump if assigned. Signed-off-by: NSibi Sankar <sibis@codeaurora.org> [bjorn: reordred arguments to rproc_coredump_add_custom_segment()] Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Sibi Sankar 提交于
Introduce custom dump function and private data per remoteproc dump segment. The dump function is responsible for filling the device memory segment associated with coredump Signed-off-by: NSibi Sankar <sibis@codeaurora.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 15 10月, 2018 1 次提交
-
-
由 Loic Pallardy 提交于
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: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 10 10月, 2018 6 次提交
-
-
由 Loic Pallardy 提交于
This patch introduces rproc_res_mem_entry_init() helper function to allocate a rproc_mem_entry structure from a reserved memory region. In that case, rproc_mem_entry structure has no alloc and release ops. It will be used to assigned the specified reserved memory to any rproc sub device. Relation between rproc_mem_entry and rproc sub device will be done by name. Signed-off-by: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Loic Pallardy 提交于
Memory entry could be allocated in different ways (ioremap, dma_alloc_coherent, internal RAM allocator...). This patch introduces an alloc ops in rproc_mem_entry structure to associate dedicated allocation mechanism to each memory entry descriptor in order to do remote core agnostic from memory allocators. The introduction of this ops allows to perform allocation of all registered carveout at the same time, just before calling rproc_start(). It simplifies and makes uniform carveout management whatever origin. Signed-off-by: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Loic Pallardy 提交于
This patch introduces a new API to allow platform driver to register platform specific carveout regions. Signed-off-by: NLoic Pallardy <loic.pallardy@st.com> Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Loic Pallardy 提交于
This patch introduces rproc_mem_entry_init helper function to simplify rproc_mem_entry structure allocation and filling by client. Signed-off-by: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Loic Pallardy 提交于
Add name field in struct rproc_mem_entry. This new field will be used to match memory area requested in resource table with pre-registered carveout. Signed-off-by: NLoic Pallardy <loic.pallardy@st.com> Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Loic Pallardy 提交于
Memory entry could be allocated in different ways (ioremap, dma_alloc_coherent, internal RAM allocator...). This patch introduces a release ops in rproc_mem_entry structure to associate dedicated release mechanism to each memory entry descriptor in order to keep remoteproc core generic. Signed-off-by: NLoic Pallardy <loic.pallardy@st.com> Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 06 10月, 2018 1 次提交
-
-
由 Suman Anna 提交于
The commit ddf71187 ("remoteproc: Introduce auto-boot flag") introduced the auto-boot flag but missed adding the corresponding kernel-doc comment. Add the same. Signed-off-by: NSuman Anna <s-anna@ti.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 27 6月, 2018 3 次提交
-
-
由 Bjorn Andersson 提交于
On rare occasions a subdevice might need to prepare some hardware resources before a remote processor is booted, and clean up some state after it has been shut down. One such example is the IP Accelerator found in various Qualcomm platforms, which is accessed directly from both the modem remoteproc and the application subsystem and requires an intricate lockstep process when bringing the modem up and down. Tested-by: NFabien Dessenne <fabien.dessenne@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> [elder@linaro.org: minor description and comment edits] Signed-off-by Alex Elder <elder@linaro.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Bjorn Andersson 提交于
In preparation of adding the additional prepare and unprepare operations make the client responsible for filling out the function pointers of the rproc_subdev. This makes the arguments to rproc_add_subdev() more manageable, in particular when some of the functions are left out. Tested-by: NFabien Dessenne <fabien.dessenne@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> [elder@linaro.org: added comment about assigning function pointers] Signed-off-by Alex Elder <elder@linaro.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Bjorn Andersson 提交于
"start" and "stop" are more suitable names for how these two operations are used, and they fit better with the upcoming introduction of two additional operations in the struct. Tested-by: NFabien Dessenne <fabien.dessenne@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> [elder@linaro.org: minor comment edits] Signed-off-by Alex Elder <elder@linaro.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 26 4月, 2018 1 次提交
-
-
由 Arnaud Pouliquen 提交于
Fix rproc_add_subdev parameter name and inverse the crashed logic. Fixes: 880f5b38 ("remoteproc: Pass type of shutdown to subdev remove") Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NArnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 13 2月, 2018 3 次提交
-
-
由 Bjorn Andersson 提交于
remoteproc instances can be stopped either by invoking shutdown or by an attempt to recover from a crash. For some subdev types it's expected to clean up gracefully during a shutdown, but are unable to do so during a crash - so pass this information to the subdev remove functions. Acked-By: NChris Lew <clew@codeaurora.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Bjorn Andersson 提交于
The resource table is just one possible source of information that can be extracted from the firmware file. Generalize this interface to allow drivers to override this with parsers of other types of information. Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Sarangdhar Joshi 提交于
As the remoteproc framework restarts the remote processor after a fatal event, it's useful to be able to acquire a coredump of the remote processor's state, for post mortem debugging. This patch introduces a mechanism for extracting the memory contents after the remote has stopped and before the restart sequence has begun in the recovery path. The remoteproc framework builds the core dump in memory and use devcoredump to expose this to user space. Signed-off-by: NSarangdhar Joshi <spjoshi@codeaurora.org> [bjorn: Use vmalloc instead of composing the ELF on the fly] Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 16 1月, 2018 6 次提交
-
-
由 Bjorn Andersson 提交于
As the core now deals with the lack of a resource table, remove the dangling custom dummy implementations of find_rsc_table from drivers. Reviewed-By: NLoic Pallardy <loic.pallardy@st.com> Tested-By: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Bjorn Andersson 提交于
Extend the previous operation of finding the resource table in the ELF with the extra step of populating the rproc struct with a copy and the size. This allows drivers to override the mechanism used for acquiring the resource table, or omit it for firmware that is known not to have a resource table. This leaves the custom, dummy, find_rsc_table implementations found in some drivers dangling. Reviewed-By: NLoic Pallardy <loic.pallardy@st.com> Tested-By: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Bjorn Andersson 提交于
There are currently a few different schemes used for overriding fw_ops or parts of fw_ops. Merge fw_ops into rproc_ops and expose the default ELF-loader symbols so that they can be assigned by the drivers. To keep backwards compatibility with the "default" case, a driver not specifying the "load" operation is assumed to want the full ELF-loader suit of functions. Reviewed-By: NLoic Pallardy <loic.pallardy@st.com> Tested-By: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Bjorn Andersson 提交于
In order to allow rproc_alloc() to, in a future patch, update entries in the "ops" struct we need to make a local copy of it. Reviewed-By: NLoic Pallardy <loic.pallardy@st.com> Tested-By: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Bjorn Andersson 提交于
We don't re-read the resource table during a recovery, so it is possible in the recovery path that the resource table has a different size than cached_table. Store the original size of cached_table to avoid these getting out of sync. Reviewed-By: NLoic Pallardy <loic.pallardy@st.com> Tested-By: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Bjorn Andersson 提交于
The crash handling now happens in a single execution context, so there's no longer a need for a completion to synchronize this. Reviewed-By: NLoic Pallardy <loic.pallardy@st.com> Tested-By: NLoic Pallardy <loic.pallardy@st.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 02 9月, 2017 1 次提交
-
-
由 Bjorn Andersson 提交于
In certain circumstances rpmsg devices needs to acquire a handle to the ancestor remoteproc instance, e.g. to invoke rproc_report_crash() when a fatal error is detected. Introduce an interface that walks the device tree in search for a remoteproc instance and return this. Tested-by: NSuman Anna <s-anna@ti.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 31 1月, 2017 2 次提交
-
-
由 Sarangdhar Joshi 提交于
firmware_loading_complete is used to synchronize operations on rproc while asynchronous firmware loading is in progress. However, rproc_boot() no longer waits on firmware_loading_complete. Hence drop this completion variable altogether and handle the race between rproc_del() and rproc_boot() using new state RPROC_DELETED. The request_firmware_nowait() will hold the reference to rproc device by using a get_device()/put_device(), so the rproc struct will remain valid even when we return from rproc_del() before the asynchronous call to rproc_fw_config_virtio() completes. CC: Loic Pallardy <loic.pallardy@st.com> CC: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NSarangdhar Joshi <spjoshi@codeaurora.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
由 Sarangdhar Joshi 提交于
Add new state RPROC_DELETED to handle synchronization between rproc_del() and other operations on rproc. This state represents the rproc device that has been "deleted". CC: Loic Pallardy <loic.pallardy@st.com> CC: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NSarangdhar Joshi <spjoshi@codeaurora.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 30 12月, 2016 1 次提交
-
-
由 Bjorn Andersson 提交于
Following any fw_rsc_vdev entries in the resource table are two variable length arrays, the first one reference vring resources and the second one is the virtio config space. The virtio config space is used by virtio to communicate status and configuration changes and must as such be shared with the remote. The reverted commit incorrectly made any changes to the virtio config space only affect the local copy, in an attempt to allowing memory protection of the shared resource table. This reverts commit cda85293. Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-
- 15 11月, 2016 1 次提交
-
-
由 Bjorn Andersson 提交于
As all vdev resources are allocated before we boot the remote processor we no longer need to support modifying the resource table while the remote is running. This saves us from the table_ptr dance, but more importantly allow the remote processor to enable security lock down of the loaded table memory region. Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
-