diff options
author | Fernando Guzman Lugo <fernando.lugo@ti.com> | 2012-08-30 13:26:12 -0500 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2012-09-18 12:53:22 +0300 |
commit | 8afd519c3470f685f964deebd61aa51d83cde90a (patch) | |
tree | e5262256de6e9636594118a5e85cffcc2572040b /Documentation/remoteproc.txt | |
parent | a1a7e0a33ade47d65abc07cddf015b5c576cd772 (diff) | |
download | op-kernel-dev-8afd519c3470f685f964deebd61aa51d83cde90a.zip op-kernel-dev-8afd519c3470f685f964deebd61aa51d83cde90a.tar.gz |
remoteproc: add rproc_report_crash function to notify rproc crashes
Allow low-level remoteproc drivers to report rproc crashes by exporting
a new rproc_report_crash() function (invoking this from non-rproc drivers
is probably wrong, and should be carefully scrutinized if ever needed).
rproc_report_crash() can be called from any context; it offloads the
tasks of handling the crash to a separate thread.
Handling the crash from a separate thread is helpful because:
- Ability to call invoke rproc_report_crash() from atomic context, due to
the fact that many crashes trigger an interrupt, so this function can be
called directly from ISR context.
- Avoiding deadlocks which could happen if rproc_report_crash() is called
from a function which indirectly holds the rproc lock.
Handling the crash might involve:
- Remoteproc register dump
- Remoteproc stack dump
- Remoteproc core dump
- Saving Remoteproc traces so they can be read after the crash
- Reseting the remoteproc in order to make it functional again (hard recovery)
Right now, we only print the crash type which was detected, and only the
mmufault type is supported. Remoteproc low-level drivers can add more types
when needed.
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
[ohad: some commentary, white space and commit log changes]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'Documentation/remoteproc.txt')
-rw-r--r-- | Documentation/remoteproc.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/remoteproc.txt b/Documentation/remoteproc.txt index 23a09b8..e6469fd 100644 --- a/Documentation/remoteproc.txt +++ b/Documentation/remoteproc.txt @@ -129,6 +129,13 @@ int dummy_rproc_example(struct rproc *my_rproc) Returns 0 on success and -EINVAL if @rproc isn't valid. + void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type) + - Report a crash in a remoteproc + This function must be called every time a crash is detected by the + platform specific rproc implementation. This should not be called from a + non-remoteproc driver. This function can be called from atomic/interrupt + context. + 5. Implementation callbacks These callbacks should be provided by platform-specific remoteproc |