summaryrefslogtreecommitdiff
path: root/drivers/remoteproc
Commit message (Collapse)AuthorAge
* remoteproc: fix null pointer dereference on glink only platformsSibi Sankar2018-04-05
| | | | | | | | | Currently calling list_del on smd subdev remove path results in null pointer dereference on glink only platforms. Fix this by adding safety checks in glink/smd subdev remove paths. Signed-off-by: Sibi Sankar <sibis@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* soc: qcom: qmi: add CONFIG_NET dependencyArnd Bergmann2018-03-27
| | | | | | | | | | | | | | | | | | | | Access to the socket API and the root network namespace is only available when networking is enabled: ERROR: "kernel_sendmsg" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "sock_release" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "sock_create_kern" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "kernel_getsockname" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "init_net" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "kernel_recvmsg" [drivers/soc/qcom/qmi_helpers.ko] undefined! Adding a dependency on CONFIG_NET lets us build it in all randconfig builds. Fixes: 9b8a11e82615 ("soc: qcom: Introduce QMI encoder/decoder") Acked-by: Andy Gross <andy.gross@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: imx_rproc: Slightly simplify code in 'imx_rproc_probe()'Christophe JAILLET2018-03-18
| | | | | | | | | We can return directly at the beginning of the function and save the 'err' label. We can also explicitly return 0 when the probe succeed. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: imx_rproc: Re-use existing error handling path in ↵Christophe JAILLET2018-03-18
| | | | | | | | | 'imx_rproc_probe()' Avoid some code ducplication and be more future-proof. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: imx_rproc: Fix an error handling path in 'imx_rproc_probe()'Christophe JAILLET2018-03-18
| | | | | | | | | If 'of_device_get_match_data()' fails, we must undo the previous 'rproc_alloc()' call. Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: qcom: Introduce sysmonBjorn Andersson2018-02-12
| | | | | | | | | | The sysmon client communicates either via a dedicated SMD/GLINK channel or via QMI encoded messages over IPCROUTER with remote processors in order to perform graceful shutdown and inform about other remote processors shutting down. Acked-By: Chris Lew <clew@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Pass type of shutdown to subdev removeBjorn Andersson2018-02-12
| | | | | | | | | | 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: Chris Lew <clew@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: qcom: Register segments for core dumpSarangdhar Joshi2018-02-12
| | | | | | | | | Register MDT segments with the remoteproc core dump functionality in order to include them in a core dump, in case of a recovery of the remote processor. Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* soc: qcom: mdt-loader: Return relocation baseBjorn Andersson2018-02-12
| | | | | | | | | | | In order to implement support for grabbing core dumps in remoteproc it's necessary to know the relocated base of the image, as the offsets from the virtual memory base might not be based on the physical address. Return the adjusted physical base address to the caller. Acked-by: Andy Gross <andy.gross@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Rename "load_rsc_table" to "parse_fw"Bjorn Andersson2018-02-12
| | | | | | | | 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: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Add remote processor coredump supportSarangdhar Joshi2018-02-12
| | | | | | | | | | | | | | | 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: Sarangdhar Joshi <spjoshi@codeaurora.org> [bjorn: Use vmalloc instead of composing the ELF on the fly] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Remove null character write of shared memJitendra Sharma2018-02-12
| | | | | | | | | | | | | | | | remoteproc is writing '\0' in the shared mem region. This region is shared among multiple clients that are also trying to read. Hence they miss first character. Remove this null character write, as this mem area is supposed to be Read only. Further during every subsystem reboot, this region is initialized with default, hence no need to write this region. Signed-off-by: Jitendra Sharma <shajit@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* Merge tag 'rproc-v4.16' of git://github.com/andersson/remoteprocLinus Torvalds2018-02-05
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull remoteproc updates from Bjorn Andersson: "This contains a few bug fixes and a cleanup up of the resource-table handling in the framework, which removes the need for drivers with no resource table to provide a fake one" * tag 'rproc-v4.16' of git://github.com/andersson/remoteproc: remoteproc: Reset table_ptr on stop remoteproc: Drop dangling find_rsc_table dummies remoteproc: Move resource table load logic to find remoteproc: Don't handle empty resource table remoteproc: Merge rproc_ops and rproc_fw_ops remoteproc: Clone rproc_ops in rproc_alloc() remoteproc: Cache resource table size remoteproc: Remove depricated crash completion virtio_remoteproc: correct put_device virtio_device.dev
| * remoteproc: Reset table_ptr on stopBjorn Andersson2018-01-15
| | | | | | | | | | | | | | | | | | The installed resource table is no longer accessible after stopping the remote, so update table_ptr to point to the local copy. Reviewed-By: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: Drop dangling find_rsc_table dummiesBjorn Andersson2018-01-15
| | | | | | | | | | | | | | | | | | 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: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: Move resource table load logic to findBjorn Andersson2018-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: Don't handle empty resource tableBjorn Andersson2018-01-15
| | | | | | | | | | | | | | | | | | | | | | | | Allow a NULL table_ptr to have the same meaning as a table with 0 entries, allowing a subsequent patch to skip the assignment step. A few other places in the implementation does dereference table_ptr, but they are currently all coming from rproc_handle_resources(). Reviewed-By: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: Merge rproc_ops and rproc_fw_opsBjorn Andersson2018-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: Clone rproc_ops in rproc_alloc()Bjorn Andersson2018-01-15
| | | | | | | | | | | | | | | | | | 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: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: Cache resource table sizeBjorn Andersson2018-01-15
| | | | | | | | | | | | | | | | | | | | | | 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: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: Remove depricated crash completionBjorn Andersson2018-01-15
| | | | | | | | | | | | | | | | | | 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: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * virtio_remoteproc: correct put_device virtio_device.devweiping zhang2018-01-02
| | | | | | | | | | | | | | | | | | | | rproc_virtio_dev_release will be called iff virtio_device.dev's reference count drops to 0. Here we just put vdev.dev, and then rproc->dev's cleanup will be done in rproc_virtio_dev_release. Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: weiping zhang <zhangweiping@didichuxing.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Use PTR_ERR_OR_ZERO() in glink probVasyl Gomonovych2017-11-28
|/ | | | | | | | | | | | Fix ptr_ret.cocci warnings: drivers/remoteproc/qcom_common.c:60:8-14: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* Merge tag 'rproc-v4.15' of git://github.com/andersson/remoteprocLinus Torvalds2017-11-17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull remoteproc updates from Bjorn Andersson: "This adds an interface for configuring Qualcomm's "secure SMMU" and adds support for booting the modem Hexagon on MSM8996. Two new debugfs entries are added in the remoteproc core to introspect the list of memory carveouts and the loaded resource table" * tag 'rproc-v4.15' of git://github.com/andersson/remoteproc: remoteproc: qcom: Fix error handling paths in order to avoid memory leaks remoteproc: qcom: Drop pr_err in q6v5_xfer_mem_ownership() remoteproc: debug: add carveouts list dump feature remoteproc: debug: add resource table dump feature remoteproc: qcom: Add support for mss remoteproc on msm8996 remoteproc: qcom: Make secure world call for mem ownership switch remoteproc: qcom: refactor mss fw image loading sequence firmware: scm: Add new SCM call API for switching memory ownership
| * remoteproc: qcom: Fix error handling paths in order to avoid memory leaksChristophe JAILLET2017-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of error returned by 'q6v5_xfer_mem_ownership', we must free some resources before returning. In 'q6v5_mpss_init_image()', add a new label to undo a previous 'dma_alloc_attrs()'. In 'q6v5_mpss_load()', re-use the already existing error handling code to undo a previous 'request_firmware()', as already done in the other error handling paths of the function. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: qcom: Drop pr_err in q6v5_xfer_mem_ownership()Bjorn Andersson2017-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pr_err() in q6v5_xfer_mem_ownership() prints, upon failure, the memory range that failed to be transitioned. But on 32-bit architectures with CONFIG_PHYS_ADDR_T_64BIT set we cannot cast the phys_addr_t variable to a pointer, per below build error. Instead these should be formatted with %pap. In file included from include/linux/kernel.h:14:0, from include/linux/clk.h:16, from drivers/remoteproc/qcom_q6v5_pil.c:18: drivers/remoteproc/qcom_q6v5_pil.c: In function 'q6v5_xfer_mem_ownership': drivers/remoteproc/qcom_q6v5_pil.c:337:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] (void *)addr, (void *)(addr + size), ^ Most callers will upon failure print a specific error message describing which memory region that we failed to pass ownership of, so rather than fixing the format string this patch fixes up the last callers and drop the print from this function, saving us from spamming the log in most of these error cases. Fixes: 6c5a9dc2481b ("remoteproc: qcom: Make secure world call for mem ownership switch") Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: debug: add carveouts list dump featureLoic Pallardy2017-11-06
| | | | | | | | | | | | | | | | This patch offers the capability to dump memory carveouts associated to one remoteprocessor. Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: debug: add resource table dump featureLoic Pallardy2017-11-06
| | | | | | | | | | | | | | | | This patch adds the capability to display the content of the resource table associated to a remote processor firmware. Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: qcom: Add support for mss remoteproc on msm8996Avaneesh Kumar Dwivedi2017-10-30
| | | | | | | | | | | | | | | | | | | | This patch add support for mss boot on msm8996. Major changes include initializing mss rproc for msm8996, making appropriate change for executing mss reset sequence etc. Tested-and-acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: qcom: Make secure world call for mem ownership switchAvaneesh Kumar Dwivedi2017-10-30
| | | | | | | | | | | | | | | | | | | | | | MSS proc on msm8996 can not access fw loaded region without stage second translation of memory pages where mpss image are loaded. This patch in order to enable mss boot on msm8996 invoke scm call to switch or share ownership between apps and modem. Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> [bjorn: Corrected error path in q6v5_start()] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| * remoteproc: qcom: refactor mss fw image loading sequenceAvaneesh Kumar Dwivedi2017-10-30
| | | | | | | | | | | | | | | | | | This patch refactor code to first load all firmware blobs and then update modem proc to authenticate and boot fw. Tested-and-acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | Merge tag 'rpmsg-v4.15' of git://github.com/andersson/remoteprocLinus Torvalds2017-11-17
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull rpmsg updates from Bjorn Andersson: - turn RPMSG_VIRTIO into a user selectable config - fix few bugs in GLINK - provide the support for specifying initial buffer sizes for GLINK channels. * tag 'rpmsg-v4.15' of git://github.com/andersson/remoteproc: rpmsg: glink: The mbox client knows_txdone rpmsg: glink: Add missing MODULE_LICENSE rpmsg: glink: Use best fit intent during tx rpmsg: glink: Add support to preallocate intents dt-bindings: soc: qcom: Support GLINK intents rpmsg: glink: Initialize the "intent_req_comp" completion variable rpmsg: Allow RPMSG_VIRTIO to be enabled via menuconfig or defconfig
| * | rpmsg: Allow RPMSG_VIRTIO to be enabled via menuconfig or defconfigAnup Patel2017-10-25
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, RPMSG_VIRTIO can only be enabled if some other kconfig option selects it. This does not allow it to be enabled for virtualized systems where Virtio RPMSG is available over Virtio MMIO or PCI transport. This patch updates RPMSG_VIRTIO kconfig option so that we can enable the VirtIO RPMSG driver via menuconfig or defconfig. The patch also removes "select RPMSG_VIRTIO" from various remoteproc kconfig options because it is now user selectable. Signed-off-by: Anup Patel <anup@brainfault.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman2017-11-02
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* remoteproc: imx_rproc: fix return value check in imx_rproc_addr_init()Wei Yongjun2017-10-11
| | | | | | | | | | In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: qcom: fix RPMSG_QCOM_GLINK_SMEM dependenciesArnd Bergmann2017-10-10
| | | | | | | | | | | | | | | | | | | | When RPMSG_QCOM_GLINK_SMEM=m and one driver causes the qcom_common.c file to be compiled as built-in, we get a link error: drivers/remoteproc/qcom_common.o: In function `glink_subdev_remove': qcom_common.c:(.text+0x130): undefined reference to `qcom_glink_smem_unregister' qcom_common.c:(.text+0x130): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_glink_smem_unregister' drivers/remoteproc/qcom_common.o: In function `glink_subdev_probe': qcom_common.c:(.text+0x160): undefined reference to `qcom_glink_smem_register' qcom_common.c:(.text+0x160): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_glink_smem_register' Out of the three PIL driver instances, QCOM_ADSP_PIL already has a Kconfig dependency to prevent this from happening, but the other two do not. This adds the same dependency there. Fixes: eea07023e6d9 ("remoteproc: qcom: adsp: Allow defining GLINK edge") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: imx_rproc: fix a couple off by one bugsDan Carpenter2017-10-10
| | | | | | | | | The priv->mem[] array has IMX7D_RPROC_MEM_MAX elements so the > should be >= to avoid writing one element beyond the end of the array. Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* Merge tag 'rpmsg-v4.14' of git://github.com/andersson/remoteprocLinus Torvalds2017-09-09
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull rpmsg updates from Bjorn Andersson: "This extends the Qualcomm GLINK implementation to support the additional features used for communicating with modem and DSP coprocessors in modern Qualcomm platforms. In addition to this there's support for placing virtio RPMSG buffers in non-System RAM" * tag 'rpmsg-v4.14' of git://github.com/andersson/remoteproc: (29 commits) rpmsg: glink: initialize ret to zero to ensure error status check is correct rpmsg: glink: fix null pointer dereference on a null intent dt-bindings: soc: qcom: Extend GLINK to cover SMEM remoteproc: qcom: adsp: Allow defining GLINK edge rpmsg: glink: Export symbols from common code rpmsg: glink: Release idr lock before returning on error rpmsg: glink: Handle remote rx done command rpmsg: glink: Request for intents when unavailable rpmsg: glink: Use the intents passed by remote rpmsg: glink: Receive and store the remote intent buffers rpmsg: glink: Add announce_create ops and preallocate intents rpmsg: glink: Add rx done command rpmsg: glink: Make RX FIFO peak accessor to take an offset rpmsg: glink: Use the local intents when receiving data rpmsg: glink: Add support for TX intents rpmsg: glink: Fix idr_lock from mutex to spinlock rpmsg: glink: Add support for transport version negotiation rpmsg: glink: Introduce glink smem based transport rpmsg: glink: Do a mbox_free_channel in remove rpmsg: glink: Return -EAGAIN when there is no FIFO space ...
| * remoteproc: qcom: adsp: Allow defining GLINK edgeBjorn Andersson2017-09-01
| | | | | | | | | | | | | | Introduce the GLINK subdev, which allows the definition of a GLINK edge as child of a remoteproc. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Introduce rproc handle accessor for childrenBjorn Andersson2017-09-01
| | | | | | | | | | | | | | | | | | | | 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: Suman Anna <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Make ssr_notifiers localBjorn Andersson2017-09-01
| | | | | | | | | | | | | | | | The ssr_notifiers variable should be local, so add the missing static storage classifier. Fixes: 1e140df04965 ("remoteproc: qcom: Add support for SSR notifications") Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Stop subdevices in reverse orderBjorn Andersson2017-08-30
| | | | | | | | | | | | | | | | | | Subdevices might depend on earlier registered subdevices for communication purposes, as such they should be stopped in reverse order so that said communication channel is removed after the dependent subdevice is stopped. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driverOleksij Rempel2017-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a basic driver to control Cortex M4 co-processor found on NXP i.MX7D and i.MX6SX. Currently it is able to resolve addresses between M4 and main CPU, start and stop the co-processor. Other functionality is not provided or test. This driver was tested on NXP i.MX7D and expected to work on i.MX6SX as well. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Use PTR_ERR_OR_ZEROHimanshu Jha2017-08-29
| | | | | | | | | | | | | | Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: st: explicitly request exclusive reset controlPhilipp Zabel2017-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: linux-remoteproc@vger.kernel.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: explicitly request exclusive reset controlPhilipp Zabel2017-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: linux-remoteproc@vger.kernel.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc/keystone: explicitly request exclusive reset controlPhilipp Zabel2017-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: linux-remoteproc@vger.kernel.org Acked-by: Suman Anna <s-anna@ti.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc/keystone: Add support for Keystone 66AK2G SOCsSuman Anna2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to the keystone remoteproc driver for managing the DSP present in the Keystone 2 66AK2G SoC. The 66AK2G SoC has a Power Management Micro Controller (PMMC) that manages the individual device's power, clock and reset functionalities. The keystone remoteproc driver already uses standard frameworks for reset and clock control, so it doesn't require any significant modifications other than a new compatible suitable for 66AK2G DSP. The binding document is also updated to reflect the modified property values used by the 66AK2G DSP node as compared to the values used by existing Keystone 2 DSPs. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc/davinci: Add device tree support for OMAP-L138 DSPSuman Anna2017-08-24
| | | | | | | | | | | | | | | | | | | | | | The Davinci remoteproc driver currently supports the DSP remoteproc device created in legacy-style on OMAP-L13x SoCs. The driver has been enhanced to support the DSP remoteproc device created through Device Tree now. The current DT support handles the C674x DSP processor subsystem on OMAP-L138 SoCs. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc/davinci: Add support to parse internal memoriesSuman Anna2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The DSP subsystem on OMAP-L13x SoCs has various internal RAM memories that can accessed from the ARM side. These memories can be configured to be used as either RAM or Cache. The Davinci remoteproc driver has been enhanced to parse and store the kernel mappings for these internal RAM memories. These mappings can then be used to support direct loading of text/data into these memories from the remoteproc driver. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>